Commit Graph

984 Commits

Author SHA1 Message Date
Alexander Medvedev
2a935d0025 Update PR template 2025-01-03 12:31:48 +01:00
Alexander Medvedev
d5174a2d31 Delete issues/config.yml 2025-01-03 10:20:39 +01:00
Alexander Medvedev
ad39b28d6d move some config things into networking 2025-01-02 22:42:56 +01:00
Alexander Medvedev
2767eff91a fix: clippy 2025-01-02 15:49:35 +01:00
Alexander Medvedev
fa07af7308 shorten compile times
but only by a bit :c
2025-01-02 15:47:11 +01:00
smuu
4bfbff7c88 feat: add deop command and refactor op command (#440)
* fix: command permission handling

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix: formatting

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* feat: add deop command

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* refactor: op command

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix: fmt and clippy

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix: merge conflict

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix: cargo fmt

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

---------

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
2025-01-01 22:49:04 +01:00
Alexander Medvedev
c95345f1bd Update year in license 2025-01-01 13:05:17 +01:00
Nico Göbel
72a9670ba9 Changed bossbar title to TextComponent instead of String (#435)
* Changed bossbar title to TextComponent instead of String

* Clippy and fmt
2024-12-30 22:30:12 +01:00
kedor
9d770e9fb6 add the missing Acknowledge Block Change packet on interact (#434)
* add the missing Acknowledge Block Change packet when the player break a block

* move it down the match to be call everytime
2024-12-30 18:27:24 +01:00
Alexander Medvedev
a9a7dcc6b0 Update README.md 2024-12-30 16:39:00 +01:00
Alexander Medvedev
f772d971f6 Remove lifetime from TextComponent 2024-12-30 13:10:02 +01:00
Kris
6f7433ee68 Added Spawn Egg Functionality (#350)
* Added spawn egg functionality

* Readd changes from before merge

* Added basic attacks on mobs

* Fixed spawn rotation and position

* Updated entities.json

* Fixed entity registry

* Added correct bounding boxes per entity

* Various fixes

* use right data types in entity registry

* fix: clippy

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2024-12-29 22:52:12 +01:00
Adel C
02cec5873b Add Pick block (Middle Mouse Click) (#418)
* Pick Item Changes

* Changed some logging

* Pick Item working for hotbar slots

* Basic functionality, changes needed to adhere to expected minecraft behaviour

* Clean up code

* Added todo for pick from entity

* Added item swapping

* Swapping and cleanup

* Fix for rebase

* Remove unused function

* Bugfix

* remove todo

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2024-12-29 19:04:57 +01:00
Alexander Medvedev
b40c274445 extractor moved to: https://github.com/Pumpkin-MC/Extractor 2024-12-29 18:15:39 +01:00
DataModel
f4de9e41c8 kick for self-attacking (#430)
* fix(combat): kick for self-attacking

* chore(combat): fix the duplication of the word client

* chore(pumpkin/src/net/packet/play.rs#Player/handle_interact): remove useless parens

* fix(combat): compare entity IDs, not actual objects

* chore(pumpkin/src/net/packet/play): `cargo fmt`
2024-12-29 17:19:14 +01:00
smuu
2d136b1c24 fix: command permission message (#428)
* fix: command permission handling

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix: formatting

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

---------

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
2024-12-29 16:43:25 +01:00
Alexander Medvedev
c5c7e897cb Update website and repo links 2024-12-29 12:40:22 +01:00
Kris
ad2fd3c9a5 Added chest opening and closing animation (#421)
* Added basic chest opening and closing

* Added number tracking

* Added play chest action function
2024-12-28 18:02:32 +01:00
Kris
205191b194 Added default op level (#426) 2024-12-28 17:46:25 +01:00
Kyle Davis
6a5add8de5 Added native operator permission management (#348)
* Starting work on Operator permission system

This commit adds the ops.json configuration found in vanilla
servers, and updates the basic configuration to handle the default
permission level.

Server now uses ops file and defaults players to op level 0

The /op command has been added but needs players to rejoin for now.

* Clippy Fix + need to Rejoin after /op removed

I found the source of the DeadLock. Updated set permission function.

Fix cargo formatting issues and clippy issues.

* Remove temp warn message

* Move OperatorConfig to server

As Snowiii pointed out, OperatorConfig is runtime data.

Revert most changes in pumpkin-config.

op_permission_level must say in the basic configuration for
parity with Minecraft.

* cargo fmt + cargo clippy

* Sync permission change with client

* Fixs issues @Commandcracker found in review

- Move PermissionLvl to core and removed OpLevel
- Move ops.json to /data/ops.json
- Fix permissions issue with /op command
- Shorten /op command description

* refactor into `data` folder

* create data dir when needed

* add to readme

* fix: conflicts

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2024-12-27 17:22:19 +01:00
Kris
c521ef8bb0 Correct Interactive Block Behavior (#388)
* Added chest and furnace

* Corrected interactive block functionality

* Fixed merge

* Added standard functions and player remove on destroy

* Added unique block standard functions

* Fix clippy

* Fix deadlock in standard function
2024-12-27 16:24:23 +01:00
Alexander Medvedev
98d1406646 Implement session.lock
Lock session.lock so other processes know that we currently read and write to the level. This is vanilla behavior.

Test:
Tested to start the a new server while on was locking the file, and got `Failed to lock level: AlreadyLocked("session.lock")` as expected
2024-12-27 16:04:40 +01:00
LieOnLion
37372986b0 Fixed Pumpkin website links (#423) 2024-12-27 13:18:43 +01:00
Alexander Medvedev
af54cb4289 fix: clippy fmt 2024-12-27 13:15:45 +01:00
Alexander Medvedev
7161491005 add some simple test to our nbt crate 2024-12-27 00:27:24 +01:00
urisinger
25f4834236 Remove unnecessary lifetimes in CommandDispatcher and Command (#419)
* make command dispatcher use owned strings and not take any lifetimes

* remove get_argument_consumer

* fix clippy

* fix elided lifetimes
2024-12-26 23:15:13 +01:00
Alexander Medvedev
29ed502aea extractor: extract entities 2024-12-26 22:10:12 +01:00
Alexander Medvedev
a0339728c7 pumpkin-protocol: remove pumpkin-config 2024-12-26 20:59:25 +01:00
Alexander Medvedev
d833582c7b Check byte size on custom payloads 2024-12-26 14:09:18 +01:00
Alexander Medvedev
febbfd89e6 Remove target-cpu=native from Docker
This can cause illegal instructions when using the public docker image build on the CI
2024-12-26 00:04:43 +01:00
Tiiita
e8deff519e Add nearby players collision check when trying to place blocks (#293)
* Try to update boundingbox when changin pos

* Remove unused imports

* Add nearby player check when placing blocks

* Add seach for nearby players when placing block

* Reformat

* Fix conflict

* fix: conflicts

and fix clippy

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2024-12-25 16:53:39 +01:00
kralverde
0e9b1af760 make command dispatcher writable (#405) 2024-12-25 14:43:26 +01:00
DataModel
991ac37eae fix(pumpkin-inventory/src/drag_handler.rs): divide by 0 (#393)
* fix(pumpkin-inventory/src/drag_handler.rs): divide by 0

Please work
Also, commit made on mobile using Built-in GitHub editor 🔥

* fix(pumpkin-inventory/src/drag_handler.rs): syntax errors
2024-12-25 13:59:44 +01:00
Commandcracker
2ae6b08c47 Upgrade Alpine to 3.21 (see CVE-2024-9143) (#409) 2024-12-25 13:32:21 +01:00
Alexander Medvedev
f5c20fb5d9 Create configs in a folder (#407)
* create configs in a folder

* use `env::current_dir()`
2024-12-24 20:02:27 +01:00
kralverde
5e60dba9d6 fix seed command output (#403) 2024-12-24 18:05:04 +01:00
Alexander Medvedev
fcf85df518 Save level.dat 2024-12-24 17:48:59 +01:00
we sell insurance
cc83e090f9 Implement level.dat reading and load the seed for use in world generation (#402)
* Implement level.dat reading and use the seed in the world for chunk generation

* Add tests

* Seperate world info loading from chunk reading

* Fix cargo fmt

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2024-12-24 15:25:33 +01:00
Alexander Medvedev
53949103cd fix: https://github.com/Snowiiii/Pumpkin/issues/406 2024-12-24 12:40:05 +01:00
Alexander Medvedev
1d96701cc0 fix: Received unknown packet id 130
this was mostly because of poor naming, While there are two CServerLinks packets, I accidentally send the play CServerLinks in the login state which has a different packet id
2024-12-24 12:20:10 +01:00
Alexander Medvedev
3dae300f81 Some refactors 2024-12-24 00:56:19 +01:00
Alexander Medvedev
fd667901cd add codecs folder to git 2024-12-21 17:09:27 +01:00
Alexander Medvedev
0633197b62 pumpkin-protocol: added codecs 2024-12-21 17:05:44 +01:00
kralverde
55e8cd696e Remove optimizations for dev builds (#404) 2024-12-21 12:54:23 +01:00
Alexander Medvedev
cc0f30848e More clippy lints
Also made some vars NonZero
2024-12-19 01:25:19 +01:00
Alexander Medvedev
133ef45c19 extractor: update to Kotlin 2.1 2024-12-17 00:56:13 +01:00
Alexander Medvedev
f7fa7bfa46 fix: clippy test failing
-_-
2024-12-17 00:27:21 +01:00
kralverde
c285915d00 properly check respawn and config updates (#398) 2024-12-17 00:12:59 +01:00
Alexander Medvedev
f323e78ef5 Fix: https://github.com/Snowiiii/Pumpkin/issues/270 2024-12-17 00:06:49 +01:00
Lucas11
9a2e68a053 add Github link in /pumpkin command (#372)
* Add the text and the open link

* Update cmd_pumpkin.rs

* Fixed all the warnings and clippy and fmt

* fixed more

* trying to fix confics

* Fixed a bug

* another one

* Update .gitignore

* Update cmd_pumpkin.rs

* Added docs

* Formated

* Update cmd_pumpkin.rs

* im gonna test

* Change color bcs aqua is ugly

* Update cmd_pumpkin.rs

* Update cmd_pumpkin.rs

* Update cmd_pumpkin.rs
2024-12-16 20:30:23 +01:00