Commit Graph

1555 Commits

Author SHA1 Message Date
Alexander Medvedev
fbbade23dc Improved chunk deserializing performance
doing `let _ = io::copy(&mut self.reader.by_ref().take(count), &mut io::sink())` was just crazy slow when skipping bytes in NBT, we now instead use `seek`

The Palette was also changed and does not use a HashMap anymore
2025-08-15 14:57:43 +02:00
CrabbyDisk
ea2678a235 Fix broken nix flake, add rust-analyzer to devshell and move to fenix from rust-overlay (#1126) 2025-08-15 10:02:05 +02:00
MrMelther
f4eadc5681 feat: Added custom translations (#1109)
* Custom translations!

Added to TextComponents custom translations, allowing to send commands in the current player locale.

* Ignoring locale's typos

* Paired reorder_substitutions with vanilla

Changed how reorder substitutions work to match how vanilla allows to join next and numeral substitutions.
2025-08-15 09:59:47 +02:00
Alexander Medvedev
3407404e95 pumpkin-world(structure): add BuriedTreasureGenerator 2025-08-14 23:35:38 +02:00
Connor
71dd912eb1 fix: Make all client packet members public. (#1125) 2025-08-14 09:52:12 +02:00
4lve
c4f922d27c Rework chunk generation system (#1115)
* Workers instead of spawning on chunks

* Piority

* Remove piority - broken

* Non arbitary worker threads number

* Make info to debugs

* fix clippy

* New rust version clippy fixes

* Use the same system for entity chunks

* Fix all warnings

* Fix clippy

* Fix benchmark
2025-08-13 22:05:04 +02:00
Alexander Medvedev
fae24008db pumpkin-world(structures): Add structure placement calculation 2025-08-13 17:11:56 +02:00
Tom
f63a039918 Add carved pumpkin and jack o lantern roation (#1108)
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-08-13 17:10:08 +02:00
ht06
ccb9b883f1 Implement chain and lantern placement (#1050)
* feat: chain placement

* feat: lantern placement

* fmt + clippy

* all good

* all good

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-08-13 16:20:10 +02:00
Ancient77
46d82db4a4 implement basic sign edit behavior (#1016)
* implement basic sign edit behavior

* add sign edit behavior

* WIP: add sign waxing

* fix is_facing_front_text

* signs: add dye and ink sac mechanic

* fix: update sign block entity and dont replace it

* sign: update entity and send packet

* signs: add currently editing

* refactor sign code

* add as_any to items

* make items public

* move sign application code to Items

* fmt

* fmt

* fmt

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-08-12 18:33:27 +02:00
Alexander Medvedev
308ca77440 I give up 2025-08-12 18:05:04 +02:00
Ancient77
b6e55cfbd2 build: Make file generation deterministic & skip unchanged files (#1119)
* update build.rs formatting code

* update build.rs don't save generated file when no change

* generated files use BTreeMap no build changes

* disallow HashMap in build scripts

* fmt
2025-08-12 17:34:01 +02:00
Alexander Medvedev
f8b896092c Update rust.yml 2025-08-12 17:32:17 +02:00
Alexander Medvedev
d38f5a51da maybe this 2025-08-12 17:00:53 +02:00
Alexander Medvedev
1fc3de914d Update rust.yml 2025-08-12 16:44:22 +02:00
Alexander Medvedev
4b2a8b9fca Update rust.yml 2025-08-12 16:34:57 +02:00
Alexander Medvedev
60dda6ecf1 Update rust.yml 2025-08-12 15:52:30 +02:00
Alexander Medvedev
a12f8c38e5 😞 2025-08-12 15:12:52 +02:00
Alexander Medvedev
f5bc7982f6 lets try that 😞 2025-08-12 14:53:19 +02:00
Alexander Medvedev
8da91bae6b lets try this 2025-08-12 14:26:00 +02:00
Alexander Medvedev
cb3483372c hope that this fixes CI 2025-08-12 14:09:10 +02:00
Alexander Medvedev
86f3f5794d fix: tests 2025-08-12 13:57:15 +02:00
Alexander Medvedev
472946f85d fix clippy 2025-08-12 13:08:21 +02:00
Alexander Medvedev
6a1cd304d7 Add release per commit workflow 2025-08-12 12:57:05 +02:00
Alexander Medvedev
40fb8ec481 pumpkin-world: Move noise_router into noise/router 2025-08-12 12:21:18 +02:00
Commandcracker
8c859953ee fix: include static file instead of reading dynamic (#1114)
* Fi #1113

* Update lib.rs
2025-08-12 09:45:33 +02:00
dependabot[bot]
1ae16b032d Bump crate-ci/typos from 1.34.0 to 1.35.3 (#1118)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.34.0 to 1.35.3.
- [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.34.0...v1.35.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-08-11 22:00:53 +02:00
Alexander Medvedev
386fe547ad use rust's new file::try_lock
I was already waiting for this for a long time, now in the newest rust 1.89 it got stabilized :D
https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.try_lock
2025-08-11 21:03:29 +02:00
Alexander Medvedev
7e3a1c0972 Fix rust 1.89 warns 2025-08-11 20:45:55 +02:00
Alexander Medvedev
9f94ce1d0d Made Chunks faster
Moreeee Speeeedddddd
2025-08-04 15:43:47 +02:00
Alexander Medvedev
43e8d9b6d9 Make some packets ServerPacket 2025-08-03 23:25:02 +02:00
Alexander Medvedev
306a007e3c feat: Falling Blocks 2025-08-03 17:21:46 +02:00
Liyan Zhao
73c2c0115e Refactor entity argument (#1098)
* refactor: implement entity arguments

* refactor: use dyn EntityBase in EntitiesArgument, unify entities & players

[skip ci]

* refactor: use dyn EntityBase in EntitiesArgument, unify entities & players

[skip ci]

* refactor: use dyn EntityBase in EntitiesArgument, unify entities & players

[skip ci]

* refactor: use dyn EntityBase in EntitiesArgument, unify entities & players

[skip ci]

* refactor: use dyn EntityBase in EntitiesArgument, unify entities & players

[skip ci]

* refactor: use dyn EntityBase in EntitiesArgument, unify entities & players

* fix clippy

* feat: server.select_entities

* fix clippy

* fix clippy

* fix /kill

* fix /kill damage

* fix entity filter parsing

* type filtering

* chore

* fix entity argument

* fix clippy

* fix entity arg

* Update player.rs

* Update entities.rs

* Update entity_type.rs

* fix

* fix clippy

* fix kill
2025-08-03 12:10:21 +02:00
deadfry42
4230f1f5f7 Allow creative mode players to pick up items regardless of if they have (#1105)
enough inventory room
2025-08-03 11:10:31 +02:00
Alexander Medvedev
14db025fa6 Revert "solve deadlock (#1091)"
This reverts commit 2b8f2726f3.
2025-08-02 16:24:18 +02:00
Alexander Medvedev
6e4a05d66d More Entity Physics work
Co-Authored-By: akashbeh <112662680+akashbeh@users.noreply.github.com>
2025-08-02 16:24:06 +02:00
Clicks
a4180e0512 Fix Breaking the Block below Vegetation (#1082)
* fix block breaking for roots and tall grass

* also fix bushes, dry vegetation and mushrooms

* remove explicit implementation that is handled by the trait

* optimize imports

* fix imports

* cargo fmt
2025-08-02 11:48:56 +02:00
Commandcracker
e8f6cc7313 Store equipment and level.dat correctly (#1028)
* Make it so you can load a pumpkin world form vanilla

* Fix reading walk Speed

* Add reasonable fallback values for player abilities

Add warnings to unsuccessful NBT player ability reads.

* Fix eqipment

* Clippy

* Move CURRENT_MC_VERSION to world crate

* merge clenup

* Remove logging

* Check if levle version is compatibil

* merge
2025-08-02 11:47:43 +02:00
Alexander Medvedev
3f2484672c Add Entity physics
Thanks to akashbeh for his work
https://github.com/Pumpkin-MC/Pumpkin/pull/824

Co-Authored-By: akashbeh <112662680+akashbeh@users.noreply.github.com>
2025-08-01 15:25:18 +02:00
Liyan Zhao
e75e52cd37 feat: add /data get Command (#1097)
* feat: /data get

* fix: colorize like vanilla

* fix: clippy

* fix: clippy

* fix: clippy

* fix: clippy
2025-08-01 12:17:38 +02:00
spr-equinox
2b8f2726f3 solve deadlock (#1091) 2025-08-01 11:13:27 +02:00
teknostom
96fe522609 Add irrigation (#1093)
* add irrigation

* fix
2025-08-01 11:10:10 +02:00
Rafael
a2289992a1 feat: Implement ViewerCountManager for block entities (#1092)
* feat: Add simple viewer counter

* feat: More work on the viewer counter

* feat: Add barrel visuals

* fix: Sound

* feat: Implement chest screen handler

* fix: Inventory ordering

* feat: Implement chest animation

* feat: Implement shulker animation

* fix: Only send updates if the viewer count changes
2025-08-01 10:35:11 +02:00
Liyan Zhao
5ea2f70dba Fix damage & death msg & portal delay (#1095)
* fix: damage sound & death message

* fix

* fix

* fix rustfmt

* fix: reset_state

* fix
2025-08-01 10:04:59 +02:00
Alexander Medvedev
0c1f0b9a33 Send Inventory and Health when Switching dimension 2025-07-31 20:10:51 +02:00
spr-equinox
5084ccd43f Add Entity spawning on Chunk generation (#1054)
* Support Spawn

* Update natural_spawner.rs

* fix distance

* fix error

* fix

* use heigh map

* Update living.rs

* impl get_rough_biome and merge

* fix dropper and entity disappear

* merge

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-31 18:38:06 +02:00
Alexander Medvedev
7468f2cf76 Smaller fixes 2025-07-31 10:29:41 +02:00
TheDarkSword
fab33370b5 Implements some AI Goals for Zombie (#1011)
* Starting implementing AI goals

* Implement LookAtEntityGoal

* Implement ActiveTargetGoal

* Cleanup code

* Fix error when merging

* Implement LookAroundGoal

* Mob refactoring and implemented MoveToTargetPosGoal

* Implement StepAndDestroyBlockGoal

* Implement DestroyEggGoal

* cargo fmt

* Start implementation of Path and collisions

* Revert "Start implementation of Path and collisions"

This reverts commit 833941f4d1.

* Fix looking

* cargo fmt

* Implement priority

* fix clippy

* Implement mob moving with MeleeAttackGoal

* cargo fmt
2025-07-31 09:33:48 +02:00
Liyan Zhao
2ff2bee05e Fix panic message formatting & remove ansi color escape in log file (#1089)
* fix: panic & file logger color

* fix: panic & file logger color

* fix: panic & file logger color

* ci: try cargo expand

* ci: try cargo expand

* ci: try cargo expand

* ci: try cargo expand

* ci

* ci

* ci

* refactor logging: simplify log method by inlining record creation

* fix

* fix
2025-07-31 09:30:11 +02:00
Liyan Zhao
43534cbffd Add EquippableComponent; Handle armour items more elegantly (#1052)
* Partially revert #1008

commit a378e48a04

* feat: equippable component

* chore

* chore

* fix

* fix

* fix: slot & equip_sound

* fix: reg
2025-07-30 22:31:13 +02:00