Commit Graph

995 Commits

Author SHA1 Message Date
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
Alexander Medvedev
dbaf240da5 Remove spawn chunks
these will be also soon gone in Vanilla
2025-07-30 15:26:40 +02:00
teknostom
d8d6676008 add gourds (#1090)
* add gourds

* fix

* Update stem.rs
2025-07-30 14:10:15 +02:00
Liyan Zhao
018457d199 Fix client id increment (#1087)
* fix: client id increment (passing &mut u64)

* clippy
2025-07-29 12:40:28 +02:00
Alexander Medvedev
fd8d89a219 Fix https://github.com/Pumpkin-MC/Pumpkin/issues/1075 2025-07-29 12:19:05 +02:00
spr-equinox
13ef8de2dc add Potion Data, refactor Effect, and add BrewingRecipe Data (#1070)
* improve tag v1

* improve tag v2

* fix typo and make BlockPredicate better

* improve get state from state id

* impl DataComponent

* make tag pub

* make component work

* apply clippy

* apply clippy

* remove unused crate

* apply to itemstack and no lifetime mark anymore

* Update tag.rs

* use Cow

* remove unnecessary lazy_static and Cow

* Update mod.rs

* Update mod.rs

* make DataComponent dyn

* 1

* fmt

* remove unused crate

* fix error

* fix

* Update Cargo.toml

* Update Cargo.lock

* fix

* Update composter.rs

* update rust-version, remove unused crate, and merge

* Update furnace.rs

* Update lib.rs

* Update living.rs

* Update living.rs
2025-07-28 20:34:29 +02:00
ht06
4b7d9e0fd5 Implement ladder (#1056)
* feat: add ladder placement

* fix: delete .clone()

* all good
2025-07-28 20:32:24 +02:00
Rafael
c76c2f7cff feat: Implement item scattering when destroying blocks with inventories (#1078)
* feat: Implement item scatterer

* fix: Some issues

* fix: Formatting

* feat: Remove unused functions

* feat: Optimize blockentity check

* fix: Formatting

* fix: Ups

* fix: Remove log

* fix: Make clippy happy

* fix: Merge conflicts
2025-07-28 20:21:29 +02:00
Alexander Medvedev
a66fbc9671 add killed_by_player for loot table 2025-07-28 19:59:07 +02:00
Liyan Zhao
0e375434c5 Improve entity damage handling & entity name, Add death message & void damage, Weak reference to server in worlds. (#961)
* fix: enhance damage handling with context in LivingEntity

* feat: add out-of-world damage handling

Fix: #957

* fix: refine damage handling with context for entities

* fix: clippy

* feat: death message

* fix

* fix

* fix

* fix: review suggestions

* fix

* Update mod.rs

* fix display name

* fix display name

* fix clippy

* fix clippy

* fix

* fix

* fix world load

* fix logger timestamp

* fix logger timestamp

* fix compiling

* fix fall damage

* fix: pass fat ptr in damage_with_context

* refactor: Refactor commands to use styled name instead of plain text.

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-28 18:07:52 +02:00
spr-equinox
8ce65cc42d Refactor ItemStack to Support Vanilla-Like Data Components (#1059)
* improve tag v1

* improve tag v2

* fix typo and make BlockPredicate better

* improve get state from state id

* impl DataComponent

* make tag pub

* make component work

* apply clippy

* apply clippy

* remove unused crate

* apply to itemstack and no lifetime mark anymore

* Update tag.rs

* use Cow

* remove unnecessary lazy_static and Cow

* Update mod.rs

* Update mod.rs

* make DataComponent dyn

* remove unused crate

* fix error

* Update Cargo.toml

* Update Cargo.lock

* fix

* Update composter.rs

* update rust-version, remove unused crate, and merge

* Update furnace.rs
2025-07-28 12:24:40 +02:00
Alexander Medvedev
eaf5959f2b Minor Chunk gen speed gains 2025-07-28 12:18:54 +02:00
AyaSanae
f80650c36c Implement Furnace (#1058)
* fix: the fields of the struct CookingRecipe should be pub.

* Add furnace screen handler and slot

* Add furnace block entity

* Add furnace block

* fix bug

* add client-side sync

* fix furnace facing

* remove unused statements

* fix spelling error

* Listening for property changes and syncing them to the client-side.

* fix furnace lit state

* fix fuel should be placed at fuel slot in quick_move()

* fix spelling error

* remove unused comment

* fix: only one listener is needed.

* pumpkin-data: add recipe_remainder

* Set the bottom item as the remainder if it has one

* pumpkin-data && furnace:fix spelling error

* fix building error

* use_with_item is the same as normal_use

* fix quick_move()

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-28 10:10:17 +02:00
spr-equinox
15c9aa4ac8 Improve tags (#1057)
* improve tag v1

* improve tag v2

* fix typo and make BlockPredicate better

* improve get state from state id

* make tag pub

* Update tag.rs

* fix error

* Update hopper.rs

* Update hopper.rs
2025-07-27 21:34:18 +02:00
vyPal
f463b5bc81 allow Custom Plugin APIs (#1080)
* Wrap Context in Arc

* Add support for plugin to expose custom APIs

* Add functionality to allow plugins to load in parallel

* Remove PluginManager from RwLock
2025-07-27 17:34:41 +02:00
とぴ。(おーけ
27bd9b15c3 Optimize and Fix Tick Scheduler (#1055)
* optimize and fix tick scheduler

* add serialize/deserialize

* extend to append

* fmt

* small optimization

* fmt
2025-07-27 17:32:16 +02:00
spr-equinox
8495a009b5 support Hopper, remove dropper todo, and support shulker box basically (#1064)
* support Hopper, remove dropper todo, and support shulker box basically

* typo

* fix dead lock

* Update hopper.rs

* Update mod.rs

* Update hopper.rs

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-27 11:40:25 +02:00
Rafael
3d72b72639 feat: Implement hand swing animation for beds (#1025)
* feat: Swing hand like vanilla

* feat: Make it more vanilla

* fix: Remove comment

* fix: Stop action if the block it too be stopped

* fix: rename to match vanilla

* fix: Add missing comment

* fix: clippy

* fix: Use names from yarn mappings

* fix: Make clippy happy
2025-07-27 10:35:39 +02:00
Clicks
af498ce1d7 Feat setworldspawn Command (#1073)
* prototype

* fix permissions

* fix spawning on the edge of blocks

* fix level_info being cloned without Arc and fully implement setworldspawn

* prettier

* cargo fmt my beloved bitching about a comma
2025-07-26 21:10:01 +02:00
teknostom
ee361f35cb Add macro for expanding tags to PumpkinBlock (#1071)
* add macro for expanding tags

* fmt

* Remove log
2025-07-26 19:56:17 +02:00
Clicks
63950097a3 fix the xp calculations (#1074) 2025-07-26 18:06:10 +02:00
Alexander Medvedev
8ccc135d74 Update all crates 2025-07-26 17:51:15 +02:00
unschlagbar
2e2236bf3b Bedrock player joining (#1063)
Co-authored-by: unschlagbar <adrian@kuhlmann@gmx.de>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
Co-authored-by: unschlagbar <adrian@kuhlmann@gmx.de>
2025-07-26 17:31:00 +02:00
APO2073
fc1a9a5bd4 Update rsa version to fix plugin errors (#1065) 2025-07-26 16:02:37 +02:00
4lve
c01e0b93b9 Use rayon for chunkgen (#1046)
* Start fixing block entities

* Fix

* Begin performance fixing

* Fix stuff

* cleanup

* fix clippy

* Fast as fuck

* fix clippy

* Write chunks concurrently

* Disable random ticks for now

* Fix

* Merge

* fix merge errors

* Fix clippy

* Use rayon for chunkgen

* Fix clippy and add tokio console

* Remove unused imports

* Merge

* Fix panic and warn instead

* Fix clippy

* Fix formatting

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-11 21:23:32 +02:00
spr-equinox
0d649a87d5 support offhand (#1047)
* support offhand

* Update play.rs

* Update play.rs

* Update play.rs

* Update play.rs
2025-07-11 20:27:25 +02:00
Alexander Medvedev
b0cea38596 remove some internal crates 2025-07-11 14:23:14 +02:00
spr-equinox
0dbc8e0286 fix #1004 (#1048) 2025-07-10 19:43:34 +02:00
Commandcracker
49a15c6031 Add proper placement rotation (#1044) 2025-07-10 11:36:26 +02:00
spr-equinox
c965a2ff1f Change BlockRegistry and ItemRegistry to use u16 (#1035)
* optimize

* fix

* fix the weird indent

* Update fluid.rs

* Update blocks.rs

* fmt

* use hash block

* apply to item

* fix incorrect name
2025-07-10 10:43:47 +02:00
Clicks
c1af97d2b4 Fix Ghost Blocks on Candle Cakes (#1043) 2025-07-10 10:34:58 +02:00
MollTheCoder
ef658a906d Update permission level for /transfer (#1039)
* Fix /transfer permission

* It's actually permission level three, not permission level two.

* Move dispatcher.register call to correct place
2025-07-10 10:25:01 +02:00
Alexander Medvedev
6ea5da408a Fix https://github.com/Pumpkin-MC/Pumpkin/issues/964
this was because of the light level not being checked, now there are too few mushrooms but i think still better
2025-07-10 10:22:30 +02:00
4lve
60d83022be Optimize everything (#1032)
* Start fixing block entities

* Fix

* Begin performance fixing

* Fix stuff

* cleanup

* fix clippy

* Fast as fuck

* fix clippy

* Write chunks concurrently

* Disable random ticks for now

* Fix

* Merge

* fix merge errors

* Fix clippy

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-09 23:53:50 +02:00
とぴ。(おーけ
1c97edb360 replace to static Fluid / impl ToResourceLocation and FromResourceLocation traits (#1023) 2025-07-09 18:00:52 +02:00
Clicks
90fe277dbe Reduce LLVM IR to cut down on compile times (#1027)
* cleanup entity_prevents_sleep

* ups
2025-07-09 17:52:40 +02:00
ht06
7332c5f6a3 Fix random_tick for potted_open_eyeblossom and potted_closed_eyeblossom (#1031)
* fix: random_tick for potted_open_eyeblossom and potted_closed_eyeblossom

* fix: random_tick for open_eyeblossom and closed_eyeblossom

* clippy

* fmt
2025-07-09 17:17:42 +02:00
Ancient77
10e2a76db9 Pressure Plates & Redstone Gates handle invalid placement (#1000)
* redstone_gates should drop themselves

* pressure plate handle invalid placement

* fix clippy

* fix merge

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-09 17:11:50 +02:00
Alexander Medvedev
e96dc4d98e Improve compile time 2025-07-09 16:26:16 +02:00
Alexander Medvedev
8fec1d56cd Improve compile time by a bit 2025-07-08 23:58:00 +02:00
Omar Afet
776da02c39 Implement Powering Logic for Powered & Activator Rails (#1030)
* implement powered & activator rails powering logic

* fix errors/warnings

* clippy

* cargo fmt
2025-07-08 17:24:17 +02:00
teknostom
a18d399ad1 Add random block ticks and crop impls (#935)
* add random block ticks

* fix linx

* fmt

* fix performance

* remove log

* fix ci

* fix data

* Crop growing

* fix

* fix crops

* optimize

* fix

* fmt

* performance

* fmt

* remove chunk checking

* fix deadlocks

* final fixes

* clippy

* fix
2025-07-08 15:06:34 +02:00
spr-equinox
8ce27b9b65 feat: support dropper (#977)
* support dropper screen

* support drop item

* fix block_receives_redstone_power

* Update mod.rs

* Update mod.rs

* fix

* Update dropper.rs

* fix

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-07-07 21:01:49 +02:00
Greened
46d63e9a90 limit tp command range (#1015)
* fix: /tp command server crash

Set bounds for /tp command arguments

* fix: formatting

fixed formatting

* Update teleport.rs

switched from else to return

* Update teleport.rs

Switch to is_valid method added in world

* Update mod.rs

Added is_valid_horizontally, is_valid_vertically, and is_valid functions.

* Update teleport.rs

fixed if checks

* Update mod.rs

Fixed error. switched to .contains() instead of checking bounds with >= <=

* Update mod.rs

added must use. (because of test error)

* chore: Switch to return Err() instead of manually sending error message.

* fix: formatting

* removed unused sender variables

* chore: fix formatting again
2025-07-07 20:36:36 +02:00