Commit Graph

1891 Commits

Author SHA1 Message Date
Alexander Medvedev
4afe60aca9 chore: i'm back 2026-02-21 20:52:37 +01:00
RB007
0ed3c8d9df fix: send proper dimension/timeline tag data (#1684) 2026-02-21 14:29:20 +01:00
Richard Marshall
33cb4e5f23 permission check event (#1671) 2026-02-20 01:39:18 +00:00
Richard Marshall
392d1813f8 chicken ai (#1606)
* feat: chicken ai with escape panic, tempt, and wandering

* add egg laying

* fix escape danger speed and add alive guard on egg laying
2026-02-20 01:04:35 +00:00
RB007
dfb24bf76f fix: proj pos regression (#1616) 2026-02-20 00:45:18 +00:00
Richard Marshall
8bd5009178 cow ai (#1605)
* feat: cow ai with escape panic, tempt, and wandering

* make escape danger speed configurable

* trigger ci

* fmt fix
2026-02-19 03:57:17 +00:00
Musawer
59b7e0a14e Fix spectator explosion immunity and TNT fuse underflow (#1587) (#1588)
* made it so spectators don't take knockback from explosions

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

* fix(tnt): prevent fuse underflow

Underflow Prevention: By checking if current_fuse <= 1 before subtracting, we ensure the fuse never rolls over from 0 to 4,294,967,295.

Instant Summon Fix: If a player uses /summon tnt and the fuse is somehow initialized to 0, it will now explode on the very first tick instead of bouncing forever.


Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

* Update explosion.rs

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

* fixes

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

* fix spectator check

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

* CLIPPY

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>

---------

Signed-off-by: Musawer <118316797+TheRealMusawer@users.noreply.github.com>
2026-02-19 03:50:23 +00:00
Richard Marshall
bce7359d4c avoid entity goal (#1607)
* feat: avoid entity goal

* dynamic flee speed and vanilla-style flee position targeting
2026-02-19 03:37:46 +00:00
Richard Marshall
68f90e5360 cat ai (#1612)
* feat: cat ai with escape panic, tempt, and wandering

* make escape danger speed configurable

* fix sheep escape danger after rebase
2026-02-19 03:05:28 +00:00
Richard Marshall
45b1bf7ba1 follow parent goal (#1614)
* feat: follow parent goal for baby entities

* remove move control and add y range filter
2026-02-19 02:23:47 +00:00
Richard Marshall
296b8c23f9 owner hurt goals (#1608)
* owner hurt goals

* add distance check and can_attack_with_owner hook
2026-02-19 02:20:09 +00:00
Richard Marshall
654dbc7a18 breed goal (#1613)
* breed goal

* clippy fixes

* fix breeding cooldown, baby spawn position, and tick decrements

* add panicking check and update navigation every tick
2026-02-19 02:04:30 +00:00
Richard Marshall
41b4f286a5 follow owner goal (#1615)
* sheep ai (#1604)

* feat: sheep AI with wool color, eating grass, escape panic, and tempt

* fix: check both hands for tempt items

* beg goal (#1611)

* follow owner goal

* fix teleport validation and look target

* trigger ci
2026-02-19 01:38:28 +00:00
Richard Marshall
d026ca7274 beg goal (#1611) 2026-02-18 23:50:36 +00:00
Richard Marshall
ad96041f09 sheep ai (#1604)
* feat: sheep AI with wool color, eating grass, escape panic, and tempt

* fix: check both hands for tempt items
2026-02-18 23:36:30 +00:00
AnthonyDuong1
e75e63a3de fix: double-click behavior on empty slot after placing or dragging items in chests (#1595) 2026-02-18 13:12:28 +00:00
Richard Marshall
a65372645b fix: preserve knockback velocity on killing blow (#1591)
on_death was clearing velocity immediately, preventing the killing blow
knockback from being visible. Vanilla's onDeath does not clear velocity.
Fixes #1577
2026-02-17 22:58:22 +00:00
Greened
bc8ffa2c18 feat: wither rose collision (#1590)
* feat: add wither rose collision

* chore: remove unnecessary ;

* fix: this comment was wrong.

* fix: remove damage, prevent adding effect in peaceful difficulty, prevent adding effect for wither, wither_skeleton and ender_dragon

* chore: switch to macro
2026-02-17 22:55:28 +00:00
RB007
b3fc910579 fix: lava and fire behavior (#1509)
* fix: item burning (except netherite), proper lava damage, and eliminate ghost lava

* fix: soul fire damage

* fix: fire spreading behavior

* chore: clippy and formatting

* fix: add on_entity_step for magma block damage

* chore: clippy and formatting

* fix: remove item.rs edit and hardcode is_fire_immune for now

* fix: compare biome ids and restore a fn name

* fix: god mode gamerule hack

* feat: DamageResistantImpl

* refactor: remove campfire damage fixes

* refactor: shared fire collision fn

* fix: typos

* fix: i did now 💀

* fix: gamerule and fire resistance now prevent magma block damage

* fix: fire_damage gamerule only for players

* fix: better on_entity_step detection (block edges)

* fix: on_entity_step now fires with bool flag (for detection under non-solid blocks)

* fix: rip

* fix: infiniburn tags and damage

* fix: send_pos_rot

* fix: restore adjust_movement_for_collisions logic and fmt

---------

Signed-off-by: RB007 <36972202+RoosterBooster007@users.noreply.github.com>
2026-02-17 22:49:58 +00:00
Richard Marshall
b77d9c1b4d feat: complete boat implementation (#1440)
* feat: implement boat placement

- add boat item handler for all boat/raft types
- raycast with fluid handling to place on water or blocks
- filter entities with can_hit predicate (vanilla parity)
- check space is empty before spawning
- decrement item unless creative mode

* feat: add boat entity with damage handling

- create BoatEntity struct implementing EntityBase
- implement can_hit() and is_collidable() for boats
- implement damage handling that drops boat item on destroy
- update boat item to spawn BoatEntity instead of generic Entity

* fix: boat damage wobble and attack sounds match vanilla

Boats now accumulate damage with wobble animation that decays over time.
Attack sounds play for all hittable entities, not just living entities.

* feat: add boat riding and vehicle movement packets

* feat: complete boat implementation matching vanilla

- add underwater check (60 ticks) and max 2 passengers limit
- add paddle animation metadata and handler
- implement proper land dismount with offset calculation
- add riding_cooldown field to entity

* fix: clippy warnings for boat implementation

* refactor: use loot tables for boat item drops

* fix: collapse nested if to satisfy clippy

* style: fix cargo fmt formatting for collapsible if

* fix: boat dismount places player correctly beside vehicle

- implement vanilla's dismount position calculation with
  getDismountHeight, canDismountInBlock, and pose fallback
  (standing → crouching → swimming)
- fix packet ordering race: use enqueue_packet for teleport so it
  arrives after CSetPassengers (send_packet_now bypassed the queue)
- pre-set awaiting_teleport before CSetPassengers to block stale
  movement packets during async dismount calculation
- send CSetPassengers directly to dismounting player, broadcast to
  others (matching vanilla's targeted packet behavior)
- use DELTA|ROT position flags for teleport (vanilla preserves
  current look direction with relative rotation)
- add riding cooldown (60 ticks) to prevent immediate re-mount
- reset sneaking state after player dismount
- fix water detection to check specifically for water/flowing_water
  fluids (Fluid::from_state_id returns EMPTY for air blocks)
- revert broken loot table refactor for boat item drops (boats use
  hardcoded entity-to-item mapping, not loot tables)
- add get_dismount_height helper on World matching vanilla's
  BlockView.getDismountHeight()
- ignore movement packets while awaiting teleport confirmation in
  handle_position and handle_position_rotation

* style: fix cargo fmt formatting

* refactor: use loot tables for boat item drops

add loot table entries to entities.json for all 20 boat/raft types
and use the existing loot table system instead of hardcoded mapping.

* fix: resolve rebase conflicts and clippy warnings

* fix: regenerate codegen to include boat loot tables
2026-02-17 19:47:49 +00:00
dependabot[bot]
1c4ea3a1d5 build(deps): bump crate-ci/typos from 1.43.3 to 1.43.4 (#1581)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.43.3 to 1.43.4.
- [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.43.3...v1.43.4)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.43.4
  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>
2026-02-17 18:00:10 +00:00
Richard Marshall
ce46bf8e0e feat: creeper ai, explosion, and entity interaction (#1575)
* feat: add swim and wander around goals for creeper

* feat: implement creeper fuse countdown and explosion

* feat: add revenge goal and attacker tracking for mobs

* clean up code

* fix: mobs no longer target creative/spectator players

* feat: add creeper nbt persistence and swim depth check

* feat: flint and steel ignites creepers

* fix: creeper NBT parent call and attacker tracking ordering
2026-02-17 17:30:17 +00:00
Axillux
3a48274d7b Added russian and ukrainian translation (#1586)
* added russian and ukranian

* forgot to change the translation.rs

* remove the double pt_br parsing

---------

Co-authored-by: Rocker <sanatnurasyl@outlook.com>
2026-02-17 16:40:05 +00:00
Richard Marshall
9257b908a4 fix: waterlogged blocks not recognized as water sources (#1563)
* fix: waterlogged blocks not recognized as water sources by fluid system

* fix fmt
2026-02-17 16:03:14 +00:00
Richard Marshall
c0aea8cf07 feat: bat ai (#1580)
* feat: bat ai with roosting, flying, and damage wake-up

* fix clippy

* fix: bat ai improvements matching vanilla behavior

- Move velo.y dampening into travel_in_air via get_y_velocity_drag
- Set bat gravity to 0 (vanilla bat travel has no gravity)
- Fix on_damage firing before damage validation
- Remove unused caller param from post_tick (eliminates Arc clone)
- Add ambient idle sounds every 80 ticks
- Pre-validate flight targets to avoid water, lava, and hazards
2026-02-17 15:50:55 +00:00
Richard Marshall
58fdb0c8ca fix: implement proper armor stand damage handling to match vanilla (#1574) 2026-02-17 15:13:46 +00:00
Greened
97951dfa48 fix: match campfires with vanilla logic (#1576)
* fix: match campfires with vanilla logic

* chore: remove redundant living entity check

* chore: simplify code

* fix: spelling
2026-02-17 13:14:50 +00:00
Richard Marshall
ad77d650d9 fix: resolve constant cpu core load after player join (#1541) (#1573)
- insert lighting into level_to_stage between full and features
- bump FULL_RADIUS from 2 to 3 to cover the full dependency chain
- bump MAX_LEVEL from 46 to 47 to accommodate the extra level
- remove redundant ready/missing_chunk requeue checks that caused the
  cpu spin (the dag already guarantees these invariants)
- add missing send_change() calls in clean_up() and change_world() so
  the scheduler is notified when chunk tickets are removed on player
  disconnect or world change
2026-02-17 04:14:23 +00:00
RB007
fb0750c342 fix: inventory saving/loading (#1582)
* fix: inventory saving

* fix: potion NBT schema

* fix: firework NBT schema

* fix: different fireworks won't stack now

* chore: formatting

* fix: restore hopper TransferCooldown saving

* fix: use filter_map

* fix: firework duration default

* fix: proper is_dirty support

* fix: add clear_dirty overrides and remove double furnace mark_dirty
2026-02-17 03:17:54 +00:00
Sol ☆
ef9800020b fix: replace oldest log file when log filename id has reached maximum (#1565)
* fix: replace oldest log file when log filename id has reached maximum

* fix formatting

* track oldest log file in single pass

* warn when overwriting existing log

* increase MAX_ATTEMPTS to 1000
2026-02-17 03:16:09 +00:00
ChocoDev
15fbf8f03b fix: item drop velocity (#1584)
* fix: itemdrop velocity

* fix: entity fall velocity

* shared bounce logic

* no more bounce badie

---------

Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
2026-02-17 02:23:00 +00:00
AnthonyDuong1
854d9cebf7 fix: creative drag of items and middle click in chests (#1585)
* fix: creative drag of items and middle click in chests should match vanilla now

* fix formatting check

* readded the min function
2026-02-17 01:31:10 +00:00
Richard Marshall
6e1bea72b7 fix: resolve multiple fluid flow bugs (#1561)
* fix: resolve multiple fluid flow bugs

- Fix from_state_id overlapping ranges so WATER/LAVA source blocks are
  correctly identified instead of always returning FLOWING variants
- Fix is_source always being false (was checking level==0 instead of is_still)
- Fix waterlogged blocks getting garbage fluid properties
- Fix lava receive_neighbor_fluids checking above instead of below
- Remove incorrect falling-to-non-falling quiescence guard in apply_spread
- Fix flow_to_sides TOCTOU by passing props from caller
- Add matches_type/same_fluid_type/to_flowing helpers for fluid type matching

* fix: check all 6 directions in lava receive_neighbor_fluids

Vanilla checks all directions (including Up) for water interaction.

* fix: clippy overlapping arm and redundant closure lints
2026-02-16 13:10:06 +00:00
ChocoDev
3f170e4922 fix: Entity really teleport instead only packet (#1556)
* check every hitbox onplace block, not just player

* bounding_box

* refactor: use get_all_at_box for placement collision

* fix: use blocking entity rules for block placement

* entity_blocks_block_placement for player

* fix setting for flat world

* fix setting for flat world

* todo

* entity teleport

* yaw and pitch apply

---------

Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
2026-02-16 12:10:26 +00:00
Tyler Critchlow
74ecc3b2a5 dynamically set entity eye height (#1503) 2026-02-16 12:09:23 +00:00
PrintedScript
8433f05094 fix: prevent mobs from attacking when already dead (#1549) 2026-02-15 16:31:29 +00:00
Tyler Critchlow
11545cfe73 Prevent subtraction overflow in translation_to_pretty (#1511)
* Prevent subtraction overflow in `translation_to_pretty`

* build translation strings from parts instead of mutating in place
2026-02-15 16:24:39 +00:00
yunuservices
581437ee80 feat(worldgen): implement blender biome supplier hook (#1508)
* feat(worldgen): implement blender biome supplier hook

* refactor(worldgen): wrap biome supplier in blender hook
2026-02-15 16:23:36 +00:00
Ksawier Wilczynski
501eb25ec3 feat(fireworks): implement firework data components (#1548)
* feat: implement firework data components

* Fix: Cargo Fmt

* Fix: Update color to i32 and add color limits

* Fix: Check firework flight time is within NBT limit

* fix: cargo fmt

* fix: clippy
2026-02-15 16:20:26 +00:00
yunuservices
73fda66154 fix(chunk): add fallback when chunk ACK stalls (#1558)
* fix(chunk): add fallback when chunk ACK stalls

* ci: retrigger workflows after transient macOS rustup DNS failure

* fix(chunk): use saturating ACK batch counters

* fix(chunk): align entity ACK fallback behavior
2026-02-15 14:42:10 +00:00
Mikhail Reznichenko
3a9468d8ad feat: cobweb (#1560)
* feat: cobweb

* remove duplicate code
2026-02-15 14:21:15 +00:00
Richard Marshall
74e1cd1f5b feat: add plugin events for entity interaction and block placement (#1572)
* feat: add cancellable PlayerInteractEntityEvent for plugin API

* feat: add cancellable PlayerInteractUnknownEntityEvent for plugin API

* feat: fire cancellable BlockPlaceEvent in block placement flow

* fix: add backticks to InteractAt in doc comments for clippy
2026-02-14 23:53:28 +00:00
Richard Marshall
a61238a498 fix: improve level.dat deserialization for imported worlds (#1568)
* fix: improve level.dat deserialization for imported worlds

worlds from different minecraft versions could fail to load due to
strict field requirements and missing nbt type support. this makes
level.dat fields default to vanilla values when missing, handles
both string and compound generator settings, and fixes nbttag
deserialization for lists containing compound elements.

* style: run cargo fmt on world_info module
2026-02-14 15:11:28 +00:00
FabseGP
24ea53b2e9 feat: replace log with tracing (#1460)
* feat: replace log with tracing

* chore: clippy

* fix: revert replacing println!-calls

* fix: await async construct

* fix: lints + incorrect await

* fix: each plugin spawns their own tracing-subscriber

* fix: replace info! with println for commands

* chore: remove env_logger

* fix: added TODO about structured logging
2026-02-13 21:10:13 +00:00
Sean Yang
bb75b783fd feat: add trapped chest block entity with redstone power support (#1550)
* feat: add trapped chest block entity with redstone power support

* refactor: run cargo fmt

* refactor: remove duplicated chest logic using common impl

* fix: fix trapped chest redstone behavior for double chests and block updates

* fix(trapped_chest): remove extraneous double chest logic

* refactor(chest): abstract chest and trapped chest implementations with macros
2026-02-13 18:39:37 +00:00
yunuservices
cb60cbc86f fix(chunk): resend replaced chunk data at same position (#1544)
* fix(chunk): resend replaced chunk data at same position

* fix(clippy): simplify chunk resend dedupe check

* fix(chunk): dedupe by weak chunk identity
2026-02-13 13:42:40 +00:00
Richard Marshall
ba30b4e9a2 fix: close container screens when their block is destroyed (#1539)
Track the block position of open container screens on the player and
close them when the underlying block is broken or exploded, preventing
ghost UIs and item duplication.

Closes #1512
2026-02-13 11:00:38 +00:00
Musawer
ab1926f3a9 Fixes #1513 (makes trapdoor placing more like vanilla and fixes it rotating incorrectly) (#1545)
* Optimize trapdoor facing logic

Refactored trapdoor facing logic to optimize direction handling based on player interaction.

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* another fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Add HorizontalFacingExt import to trapdoor.rs

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix again

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Use HorizontalFacingExt for trapdoor 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Refactor facing direction handling for trapdoor

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Improve facing logic in trapdoor.rs and hope that it passes the check's

Refactor trapdoor facing logic to use Option unwrap for better handling of directions.

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

---------

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>
2026-02-13 10:58:49 +00:00
Mikhail Reznichenko
0acb913775 fix: sweet berry bush collision (#1547)
* fix berry bush collision

* fix format

* fix fall distance

* rename function
2026-02-13 10:57:51 +00:00
ChocoDev
528d5b3945 fix: check every hitbox onplace block, not just player (#1494)
* check every hitbox onplace block, not just player

* bounding_box

* refactor: use get_all_at_box for placement collision

* fix: use blocking entity rules for block placement

* entity_blocks_block_placement for player

---------

Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
2026-02-13 10:51:16 +00:00