Commit Graph

1141 Commits

Author SHA1 Message Date
ht06
52e48ec0bd Add /defaultgamemode command (#588)
* Add Defaultgamemode command

* add force_gamemode in configuration.toml
Check if the force_gamemode is enabled while doing the command

* Delete useless import + adapt to the new TextComponent::translate.

* add a space...

* Save the default gamemode in the server

* refactor + delete a .clone

* Add #[must_use]
2025-03-02 15:02:11 +01:00
Alvsch
85d457fa88 rename rayon worker threads (#603) 2025-03-02 14:52:53 +01:00
Alexander Medvedev
440008fe0a Use Loot tables for blocks (#605)
* more loot table work

* make Loot Tables work
2025-03-02 14:49:53 +01:00
kralverde
d518732a76 Fix dupe, double click, and shift click (re-PR) (#591)
* Fix dupe, doubble click and shift click

* Fix inventory desync

* Fix clippy

* refactor magic numbers

* fix clippy

* refactor item logic

* fix inventory

* prefer main inventory over offhand

* Set slot stack to None if empty

* fix container deadlock

* fix linter

* fix lint pt 2

---------

Co-authored-by: 4lve <72332750+4lve@users.noreply.github.com>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-03-01 08:09:14 -10:00
Alexander Medvedev
a60a3ba243 Add Experience Orb and drop it when breaking Blocks 2025-03-01 16:58:02 +01:00
Alexander Medvedev
27f239a612 Living Entity: Proper death
Now we wait until despawning the entity so the death animation is played
2025-02-27 22:51:49 +01:00
Toyo
d827f68826 README: Specify features state (#598)
* Order completed to be up

Make completed features on top and unfinished below

* Group similar features

* Add features and mark if completed

Basically we have:
(W.I.P): The feature is there but is not behaving as intended.
Checkmark: The feature works as intended, it could be improved but it works.
No checkmark: The feature does not exist and will not work nor do anything.

* config is not wip
2025-02-27 16:42:05 +01:00
Alexander Medvedev
fe400e4970 Make non living entities not attackable
Adds a cool abstraction to progress damage, Now implementing End Crystals should be very easy
2025-02-26 22:48:19 +01:00
Alexander Medvedev
01e5719464 Make SChatMessage sendable 2025-02-26 19:41:46 +01:00
Alexander Medvedev
b336a50955 Batch CSetEntityMetadata data
Allows us to send multiple meta in only one Packet
2025-02-25 23:21:59 +01:00
kralverde
0f6c7aed73 fix resource leak (#593) 2025-02-25 11:34:33 -10:00
Alexander Medvedev
9a1add029f Fix Explosion block sounds 2025-02-25 22:27:02 +01:00
Alexander Medvedev
8aef30ee13 Make TNT Work (#590)
* make tnt work

* Spawn TNT at right position

* Fix tnt
2025-02-25 16:38:12 +01:00
kralverde
7c3487e9c1 revert resource pack names (#587) 2025-02-24 06:17:45 -10:00
dependabot[bot]
0bbb7f7823 Bump crate-ci/typos from 1.29.7 to 1.29.9 (#586)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.7 to 1.29.9.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.29.7...v1.29.9)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 07:51:30 +01:00
Luís Tavares
110ba3ad94 fix docker logger (#580) 2025-02-23 14:40:58 -10:00
Luis
160d98d5c7 fix: encode Uuid correctly (fixes #454) (#583)
* fix: encode Uuid correctly (fixes #454)

* chore: use default implementation for #is_human_readable

* chore: override #is_human_readable to always return false

* fix resource packs

* fix spelling

---------

Co-authored-by: kralverde <github@email.kralverde.dev>
2025-02-23 13:09:41 -10:00
kralverde
cc9d0a8a63 Merge pull request #563 from kralverde/clean_logger
Clean our logger interface slightly
2025-02-23 07:42:38 -10:00
Alexander Medvedev
7c1d5eff4c Implement ServerPacket for CPlayerPosition 2025-02-23 14:35:02 +01:00
Alexander Medvedev
f45991a717 pumpkin-protocol: make more fields public 2025-02-23 14:23:06 +01:00
Alexander Medvedev
26b69eae33 Minior packet changes 2025-02-23 13:35:22 +01:00
kralverde
2323c60a54 merge master 2025-02-22 22:03:15 -10:00
suprohub
f71ec64e22 removes unused dependency uuid in pumpkin-utils (#578) 2025-02-22 16:48:25 +01:00
Alexander Medvedev
995edfb3c2 Add Effects 2025-02-22 14:17:06 +01:00
Jayryn
0fb1b76ea7 Fix tool rules: Ensure get_speed and is_correct_for_drops check for tags (#566)
* fix(tool-rules): ensure `get_speed` and `is_correct_for_drops` check for tags

Both functions were ignoring tags (`#tag`), causing incorrect default values.
- Now correctly checks tags before returning speed or drop validity.
- Ensures tool rules work as expected for both direct and tagged block matches.

* Make Clippy happy and use strip_prefix

replace manual stripping with strip_prefix

* Make clippy happy and use strip_prefix

Make clippy happy and use strip_prefix instead of manual stripping. Also removing unnecessary reference

* cargo: fmt

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-02-22 14:04:49 +01:00
Toyo
2af2fbbf73 README: Add more to the To-Do (#569)
* Add more to the To-Do

Added biomes, vegetation, player data saving, off hand, advancements, villagers and mobs inventory as objectives in the to-do

* Remove stack limits from the to-do
2025-02-21 09:42:40 +01:00
Alexander Medvedev
1f414f347c Support dropping items out of Inventory 2025-02-20 21:50:59 +01:00
Alexander Medvedev
1fb2be46d4 Update to Rust edition 2024 2025-02-20 18:42:20 +01:00
4lve
b428fdca1a Proper item stacking (#562)
* Implement item stacking

* Fix clippy issues

* Fix comments

* Some improvements

* Fix item picking bug

* Fully fix pickblock

* Pioritize item held

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-02-20 16:51:48 +01:00
kralverde
3f1fd5a0f1 Fix deadlock when "packet ready" buffer is full (#565) 2025-02-19 07:21:36 +01:00
kralverde
8b5743f323 initial commit 2025-02-18 16:42:17 -10:00
Alexander Medvedev
1da941755a World: Give different error message on WorldInfoError::UnsupportedVersion 2025-02-18 19:23:27 +01:00
4lve
dbf58a54a8 Don't boradcast Equipment Change back to player (#561) 2025-02-18 19:06:46 +01:00
kralverde
e146130fd2 Check version of level.dat before trying to deserialize it (#555)
* initial commit

* cargo: fmt

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-02-18 17:41:27 +01:00
kralverde
a0d3a71ba8 Gracefully exit on stop, new logger and rustyline (#557)
* initial commit

* fix linter

* save remaining chunks in memory

* fix colors not working when terminal prompt is enabled

* fix typo
2025-02-18 16:10:09 +01:00
4lve
76188b9a47 Differentiate between single and stack drops (#559)
* Differentiate between single and stack drops

* Fix formatting
2025-02-18 15:50:06 +01:00
kralverde
80c9d90767 Fixes a typo in the nbt deserializer (#558) 2025-02-17 16:48:22 +01:00
Alexander Medvedev
148ac38fe3 Make TextComponent::translate simpler 2025-02-16 18:47:30 +01:00
kralverde
4f3c146500 Fix Item Tool Components and Partially Implement Tag Updates (#554)
* initial commit

* add fluid tags

* rename tag item

* Don't broadcast block breaking to breaker

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-02-16 15:54:07 +01:00
kralverde
7ec99a0411 Fix our NBT serde (#549)
* make deserializer streamable

* fix logic

* fix deserializing

* work on deserialization

* finish serialize

* replace everything with pumpkin_nbt

* fix more serialization cases

* finish conversion

* add comment

* remove all fast_nbt, test nbt arrays, add implement tuples/arrays

* add size hints for deserialization

* fix deserialization
2025-02-16 13:39:43 +01:00
Alexander Medvedev
5a77b21d22 Calculate block breaking speed
Also broadcast current held item. The block progress is already correctly displayed and calculated for tools. But for some reason the destruction does not work, looking at vanilla code i have no idea what i'm doing wrong
2025-02-15 22:47:14 +01:00
vyPal
94dc37a275 Fix plugin macros (#553) 2025-02-15 12:02:00 +01:00
Alexander Medvedev
3d1e0bf35c Check for correct tool when breaking blocks
Also rewrite how we handle tags. Now we can use tags everywhere we want!. I also decided to make the json assets pretty printed which is so much easier to debug, The decision was made because of the reason that we are moving to compile time assets, so pretty printing does not affect performance
2025-02-14 22:47:09 +01:00
vyPal
d6a3506627 Only show commands that player can execute (#551) 2025-02-14 17:50:12 +01:00
vyPal
9c324990fa world: change player list to rwlock (#550) 2025-02-14 17:49:45 +01:00
kralverde
95e04c7ff9 fix logging env level (#548) 2025-02-13 16:02:32 +01:00
Thomas Tartrau
73d3fe0373 Add new plugin events / change plugin organization (#536)
* refactor: make file per event

* feat: edit plugins organization
2025-02-12 16:37:23 +01:00
Alexander Medvedev
e2dff9d55a CI: Check for typos 2025-02-12 16:19:26 +01:00
kralverde
73a0f665ea Slight Density Function Refactor (#544)
* rename things and make it easier to generate a MultiNoiseSampler

* fix typo

* Box chunk components for slight speed up
2025-02-12 16:08:21 +01:00
Alexander Medvedev
06334ec658 Add Particle command 2025-02-11 20:43:16 +01:00