Commit Graph

1765 Commits

Author SHA1 Message Date
FabseGP
cccf8dc2b0 ci: detect unused dependencies in CI + rearrange CI-steps (#1419)
* chore: detect unused dependencies

* fix: exclude phf in pumpkin-data

* fix: combine CI-steps and fail earlier

* fix: use cargo-nextest + split clippy-steps
2026-02-02 12:37:36 +01:00
GamerBene19
8b733b8d3e fix: /help (#1423) 2026-02-02 12:30:06 +01:00
dependabot[bot]
59cfea8b1f build(deps): bump crate-ci/typos from 1.42.1 to 1.42.3 (#1424)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.42.1 to 1.42.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.42.1...v1.42.3)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.42.3
  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-02 12:10:07 +01:00
Alexander Medvedev
05688ade9e fix: structure connection through chunks
still needs a bit more work, also changed the license,
2026-02-01 23:03:15 +01:00
Bjorn Beishline
441040105b chore: add sounds variants slice (#1420) 2026-02-01 16:31:12 +01:00
Ashank Sundaram
ed318c94c4 chore: Add block type helper methods (#1421) 2026-02-01 14:03:43 +01:00
RB007
f93be68caa fix: fluids now follow gamerules (#1410) 2026-01-31 15:44:04 +01:00
Bjorn Beishline
eb76c6377d fix: make TargetSelector new function public (#1416) 2026-01-31 15:43:20 +01:00
Alexander Medvedev
452d8c413b chore: add uuid to world 2026-01-31 15:24:11 +01:00
Alexander Medvedev
67fc80439d fix: player count overflowing 2026-01-31 13:57:26 +01:00
Purdze
84b0a6b25a fix: stop elytra flight when switching to spectator mode (#1395) 2026-01-31 12:55:37 +01:00
Alexander Medvedev
72bd4dfbef feat: add from_legacy_string to TextComponent 2026-01-30 23:12:54 +01:00
RB007
d64f538138 fix: eggs, snowballs, and babies (#1400)
* fix: eggs, snowballs, and babies

* chore: warnings and clippy

* fix: switch to RwLock<ItemStack>

* fix: now using has_hit to prevent stack overflow

* fix: updated clippy

* refactor: check is_projectile in projectile mod instead

---------

Signed-off-by: RB007 <36972202+RoosterBooster007@users.noreply.github.com>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-01-30 09:45:09 +01:00
Purdze
d98223b5e6 fix: armor stands now break instantly in creative mode (#1391)
- pass Player instead of Entity as damage source so get_player() works
- creative mode: spawn break particles, play sound, remove without drops
- add spawn_break_particles method (TODO: use oak plank block particles)
2026-01-30 09:43:29 +01:00
RB007
0d9f5b7409 feat: sponges (#1413) 2026-01-30 09:30:05 +01:00
Alexander Medvedev
be322123cf chore: make chunk gen usable in debug mode 2026-01-30 00:57:55 +01:00
RB007
4ec9db1e36 chore: optimized, working fluids (#1392)
* fix: optimized, working fluids

* chore: clippy and formatting
2026-01-29 16:53:00 +01:00
Laptop59
54d99b8ae6 commands: added out of bounds checking for some commands and added strict mode for setblock (#1408) 2026-01-29 16:38:52 +01:00
Alexander Medvedev
7d63253a87 fix: fmt 2026-01-29 11:54:57 +01:00
Alexander Medvedev
35e4d6b04d fix: import 2026-01-29 11:47:10 +01:00
Purdze
676e7e2f65 fix: implement potion_contents data component to prevent crashes (#1387)
implements the minecraft:potion_contents data component which was causing
server crashes when players clicked on potions or tipped arrows in creative
mode

fixes #1309
2026-01-29 11:38:28 +01:00
Alexander Medvedev
2abb33c2ab README: link to some tracking issues 2026-01-29 11:36:08 +01:00
Alexander Medvedev
985ada2445 CI: maybe this? 2026-01-29 08:27:20 +01:00
Alexander Medvedev
b58822319d fix: CI 2026-01-28 23:40:48 +01:00
Alexander Medvedev
fb13004b47 fix: apply clippy lints to workspace
also add contributors to /pumpkin command

Co-Authored-By: Fyor <90567841+fyordev@users.noreply.github.com>
Co-Authored-By: MartV0 <34748938+martv0@users.noreply.github.com>
Co-Authored-By: FabseGP <fabsegp@fabseman.space>
2026-01-28 00:52:47 +01:00
Alexander Medvedev
3776b225e4 fix: CI 2026-01-27 20:54:38 +01:00
Jerry
e796cf8374 fix: await output handling in RCONClient to ensure proper synchronization (#1385) 2026-01-27 20:48:10 +01:00
spectradevv
fd19e3e3f3 fix: server crash when placing liquids in survival (#1341) 2026-01-27 20:47:00 +01:00
Steve
31c60c1854 fix: make entities respect the allow_nether setting and add an allow_end setting (#1374)
* fix: make try_use_portal respect allow_nether

* feat: add allow_end (#881)

* else if

* else if
2026-01-27 20:41:58 +01:00
Purdze
dc4ade7365 feat: add /spawnpoint command (#1386)
* feat: add /spawnpoint command with cross-dimension respawn

- implement /spawnpoint command to set player spawn points
- add force flag to bypass bed/respawn anchor checks
- support cross-dimension respawn (e.g., die in nether, respawn in overworld)
- fix respawn teleport by sending position packet after chunks load

* chore: retrigger ci

* refactor: improve respawn point API based on review feedback

- rename get_respawn_point to calculate_respawn_point for clarity
- add CalculatedRespawnPoint struct to replace tuple return type
- remove packet sending from calculate function (caller handles it)
- document force flag behavior in function docs
- fix lock held across await points in respawn logic

* fix: implement proper bed/anchor respawn position finding

- remove duplicate send_abilities_update in respawn_player
- implement vanilla-like spawn position finding for beds
- implement spawn position finding for respawn anchors with charge decrement
- add find_respawn_pos validation (floor check, collision check, invalid spawn tag)
- validate forced spawn positions are safe
- add fixme comments for world spawn calculation (see #1381)
2026-01-27 20:38:47 +01:00
Purdze
83aa08941f feat: implement /setidletimeout command (#1383)
* feat: implement /setidletimeout command

adds the /setidletimeout <minutes> command that sets the player idle
timeout. setting to 0 disables the timeout.

* feat: implement idle timeout kick logic

track player actions and kick idle players after the timeout set by
/setidletimeout. matches vanilla behavior:
- check idle timeout every tick
- only reset timer on actual movement
- reset timer on chat, commands, interactions, slot changes, etc.
2026-01-27 20:36:23 +01:00
Purdze
ad5b97ddfd feat: add git commit hash to /version command (#1380)
- Shows 7-character commit hash in version display
- Full 40-character hash visible on hover
- Closes #1378
2026-01-27 20:35:00 +01:00
Purdze
830284c091 feat: Implement nether portal linking (#1372)
* fix: nether portals

* fix: add world border checks and match vanilla portal behavior

* feat: add region-based POI storage for nether portal linking

Implemented Point of Interest system for fast portal lookups:
- region-based NBT storage matching vanilla format
- sections keyed by Y coordinate within per-chunk data
- auto-registration on portal creation/destruction
- used by portal search to avoid scanning all blocks

Note: this POI implementation covers nether portals only.
The full POI system still needs significant work for:
- villager job sites
- beds, bells, beehives
- ticket/occupation system
- auto-scanning chunks for POI blocks
- distance tracker for pathfinding

Vanilla POI reference: net/minecraft/world/poi/

* feat: add entity position preservation and collision avoidance for portals

- preserve entity position relative to portal when teleporting
- add collision avoidance to find safe spawn positions
- add source portal tracking for accurate exit position calculation
- fix clippy pedantic warnings across portal and border code

* feat: add yaw rotation and vehicle teleportation for portals

- rotate entity yaw 90° when portal axis changes between dimensions
- prevent passengers from teleporting independently (wait for vehicle)
- teleport all passengers along with vehicle through portals

* fix: handle nested passengers recursively for portal teleportation

passengers of passengers (e.g., player riding a pig riding a minecart)
are now teleported correctly through portals

* style: apply cargo fmt and allow too_many_lines for portal search

find_safe_location exceeds 100 lines but splitting it would reduce
readability - the portal search algorithm flows naturally as one unit

* feat: use MCA format for POI storage for vanilla compatibility

Change POI storage to vanilla-compatible .mca region format. This allows
proper portal linking when importing existing vanilla worlds, as Pumpkin
can now read portals registered by vanilla.

* fix: remove local cargo config that breaks CI

* fix: correct portal direction calculations and dimension chunk loading

- fix portal direction to match vanilla: z-axis uses south (not north)
- fix perpendicular direction to match vanilla's rotateyc1ockwise()
- fix fallback clearing dimensions to match vanilla (3x2x4 blocks)
- store world reference in chunkmanager, updated on dimension change
- use chunkmanager's world for chunk loading instead of entity.world

this fixes players spawning inside blocks and seeing wrong terrain
(overworld blocks in nether) after portal teleportation.

* fix: portal neighbor update logic and remove_player return value

- fix impossible condition in portal neighbor update (was always false)
- fix remove_player to return the removed player instead of none

* fix: update entity.world to arcswap for dimension teleportation

entity.world was an immutable arc<world> that was never updated after
dimension teleportation. when a player teleported to the nether,
chunkmanager.world was updated but entity.world still pointed to the
overworld. this caused tick_block_collisions() to read blocks from the
wrong dimension, preventing return portal detection.

changed entity.world from arc<world> to arcswap<world> to allow atomic
updates when changing dimensions. added set_world() method and updated
teleport_world() to call it after dimension changes.

* fix: reset chunk batch state on dimension change

when changing dimensions, the chunk batch state was not being reset.
this caused slow chunk loading if the player was in a throttled state
before teleporting, as the server would wait for acknowledgments for
chunks that no longer exist in the new dimension.

now resets batches_sent_since_ack to Initial in change_world() so
chunks can be sent immediately after dimension change.
2026-01-27 20:30:58 +01:00
Alexander Medvedev
ac4c85192f chore: less ugly code
and less allocations
2026-01-26 22:23:58 +01:00
Purdze
ccf62b842a feat: implement /rotate command (#1382)
* feat: implement /rotate command

adds the /rotate command with all vanilla syntax variants:
- /rotate <target> <yaw> <pitch> (with ~ relative support)
- /rotate <target> facing <x> <y> <z>
- /rotate <target> facing entity <entity> [eyes|feet]

also adds EntityAnchorArgumentConsumer for eyes/feet argument parsing
and updates RotationArgumentConsumer to support relative rotation (~).

* style: apply cargo fmt
2026-01-26 15:14:36 +01:00
とぴ。(おーけ
45aa815d68 chore: move static instances into Server struct (#1362)
* vanilla data container

* banned_ip_list

* banned_player_list

* operator_config

* whitelist_config

* permission_manager

* permission_registry

* plugin_manager
2026-01-26 14:47:33 +01:00
dependabot[bot]
e1f427b414 build(deps): bump crate-ci/typos from 1.42.0 to 1.42.1 (#1379)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.42.0 to 1.42.1.
- [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.42.0...v1.42.1)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.42.1
  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-01-26 09:49:52 +01:00
Alexander Medvedev
a546de128f fix: https://github.com/Pumpkin-MC/Pumpkin/issues/1377
upsi from last commit
2026-01-25 23:11:51 +01:00
Alexander Medvedev
186ad2edea feat: 1.21.7-1.21.11 support
Its works, but block state ids are currently not mapped, meaning that when using the current default world gen the client mostly will disconnect due to a not found block state id, vanilla version compatible worlds should work
2026-01-25 23:08:28 +01:00
DrPing
232bf29d07 fix: prevent player from getting kicked when doing jab attack with spear (#1375) 2026-01-25 16:58:34 +01:00
Purdze
fc537c7e93 fix: initialize player abilities based on gamemode on first join (#1373)
when a player first joins with creative or spectator mode, their abilities
(flying, invulnerability, creative mode flag) were not being set, this caused
blocks to not display properly and flying to be disabled until switching
gamemodes

now calls set_for_gamemode() during player::new() to match vanilla

fixes #1367
2026-01-25 16:51:30 +01:00
Purdze
7d11858dc0 fix: schedule fluid ticks to properly drain flowing liquids (#1376) 2026-01-25 16:50:31 +01:00
RB007
9742e09ac0 fix: button and lever placement (#1357)
* fix: button, lever, and grindstone placement use working direction function

* chore: clippy and formatting

* refactor: passing final_face is much simpler
2026-01-25 16:49:24 +01:00
Alexander Medvedev
622d0599df chore: added gradient and rainbow to TextComponent
ofc did also a bunch of other things, the JavaClient implementation should be cleaner now and does not lock the player anymore
2026-01-25 16:41:46 +01:00
spectradevv
2853a1e741 feat: Implemented Drowning (#1338)
* implemented drowning mechanics

* fix lints and formatting

* Fix air supply not resetting on death

* fixed air supply filling instantly in creative mode

* Fixed gaining oxygen randomly underwater

* separated breath system

* refactored sync_air -> send_air_supply

* reset drowning_tick on death

* fixed formatting

* added reset_air_supply method

* removed unused variables

* use e.get_eye_y()

* fixed gaining breath when inside water plants

* improved non-solid blocks
2026-01-25 12:38:19 +01:00
RB007
7b107c505a fix: placing blocks on composters (#1358)
* fix: properly check if composter interaction causes level change

* chore: clippy and formatting

* refactor: early return instead of handled

* fix: composter consumes items
2026-01-24 22:15:15 +01:00
Alexander Medvedev
28c477c8ea fix: typo 2026-01-24 22:06:10 +01:00
Alexander Medvedev
7eccda00ff fix: bedrock movement
also added a bunch of docs, and fixed bedrock air bubbles constantly shown, and also fix bedrock block states
2026-01-24 22:05:50 +01:00
Purdze
33cf5237a8 fix: piston sounds (#1361) 2026-01-24 13:13:34 +01:00
Felipe Muñoz Mazur
a124ef61b3 fix: implement broken behavior for piston block to break the head (#1364) 2026-01-24 13:12:49 +01:00