Commit Graph

42 Commits

Author SHA1 Message Date
Alexander Medvedev
2e2fe83720 Add Hunger 2025-02-07 00:22:52 +01:00
suprohub
186e846858 Plugin event rewrite (#513)
* simplify all

* fmt

* Consider using derive macro

* Add new events

* Add events call

* minor fixes

* minor fixes

* fix

* optimize code

* big changes

* fix skill issue

* fix

* Consider not specify patch version

* make logger shared

* i want test one thing

* Add one useful function

* add little amouth of docs

* use config instead

* revert changes

* fmt

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-02-01 18:14:28 +01:00
Alexander Medvedev
ef497fb435 Refactor World Entity System
Also support Item drops (WIP)
2025-01-31 21:45:20 +01:00
Alexander Medvedev
deda78231a play sound on fall damage 2025-01-27 21:55:32 +01:00
Alexander Medvedev
ee485056fb rename pumpkin-core to pumpkin-util
I see that there is an confusion between the pumpkin-core crate,  People often think that this is the most important one
2025-01-09 13:12:57 +01:00
Alexander Medvedev
f772d971f6 Remove lifetime from TextComponent 2024-12-30 13:10:02 +01:00
Alexander Medvedev
0633197b62 pumpkin-protocol: added codecs 2024-12-21 17:05:44 +01:00
Snowiiii
f587cb6748 remove iter_tools
we only used them for collect_vec. I think its worth the "effort" to write Vec type annotations ourself and have one big crate with way too may features we don't need less
2024-12-12 23:40:52 +01:00
Snowiiii
2ee2cc06dd fix some typos 2024-12-11 16:15:31 +01:00
Snowiiii
d0d0f35a94 Some minor improvements 2024-12-08 23:59:52 +01:00
Nico Göbel
b82a4e130b Add: Interactive blocks (#333)
* WIP interactive blocks

* Added jukebox and crafting table

* Making feature more dynamic allowing every block action to be registered here

* Renamed interactive_block_manager to block_manager

* Simplifying register functions

* Added on placed

* Fix master merge

* Added pumpkin_block macro

* Removed junk

* Added the option to block placing in on_use_with_item

* Fixed inventory lock

* Adding on_broken and implementing it for the jukebox

* Fixed merge
2024-12-07 13:00:03 +01:00
Snowiiii
35afc0bfb9 Port to 1.21.4 2024-12-03 23:34:59 +01:00
Snowiiii
5efa881090 Fix: Clippy 1.83 2024-11-28 21:52:55 +01:00
Snowiiii
796341be05 Extractor: minimize everything
- blocks.json 8.3MB -> 4.1MB
- items.json 988KB -> 548KB
- packets.json 6.9kb -> 4.2kb
- particles.json 3.5kb -> 1.6kb
- recipies.json 376kb -> 264kb
- screens.json 731b -> 315b
- sounds.json 72.2kb -> 42.2kb
- synced_registeries.json 143.3kb -> 87.6kb
- tags.json 335.4kb -> 165.8kb
2024-11-27 00:12:11 +01:00
Alvsch
c3c4aff912 Consistent registry values and player changes (#324)
* Made registry values consistent

* Port to own nbt crate

---------

Co-authored-by: Snowiiii <lilalexmed@proton.me>
2024-11-23 19:00:34 +01:00
Alexander Medvedev
402f3951f5 Move to own NBT crate (Mostly) (#100)
* Remove fastnbt as dependency

* Move to own NBT crate

* Added deserialization

Also replaced i8 bool's with bool's

* Use: fastnbt for pumpkin-world

Until i don't figure out why Arrays do not work, we can use fastnbt
2024-11-23 14:50:54 +01:00
Edvin Bryntesson
8cde02e625 Add Shaped and Unshaped crafting support, as well as deserializing the entire recipe format (#165)
* add cleaner registry parsing

* start adding recipes

* add tags, and some crafting things

* Fix echest command

* add partly working crafting interface

* add generated assets

* fix container commands and clippy lints

* fix issues with resolving recursive item tags for crafting

* add flatten3x3 function

* add shapeless crafting

* add tests to and fix recipe flattening function

* refactor recipe system a bit

* add rayon to speed up initial loading of recipes

* almost working after rebase

* add deserialization for new crafting type "transmute"

* make crafting work again

* make shapeless recipes not require all permutations

* fixed visual bug with when taking out ingredients for crafting

* add support for new tags system
2024-11-12 12:57:14 +01:00
Alvsch
d3f299d2f6 Add damage and re-spawning (#224)
* Added new packets

Added packets to pumpkin-protocol for damage and re-spawning.

* Made damage_type registry value accessible

* Added damage and fall damage

* fixed phasing bug

* fix issues caused by merge

* spawn player on ground

make the player spawn on the highest block instead of in the air.

* dont default player to flying

* mode last_pos to living_entity

* fix using entity instead of living_entity

* fixed fall damage not working properly when switching gamemodes
2024-11-05 23:38:26 +01:00
Snowiiii
8db277f63e Minior Changes 2024-11-03 22:36:00 +01:00
Snowiiii
9e7adec16b Parse Registries from JSON 2024-11-02 16:34:35 +01:00
Alexander Medvedev
e396399e66 Port to 1.21.2 (#171)
* Update JSON Files to 1.21.2

* Update constants to 1.21.2

* Port c_login_success to 1.21.2

* Fix: damage type

* Overhaul Packet ID system

We now use Packet IDS from enums.

1. This is very very nice for seeing which Packets are already implemented and which not.
2. This lets us easly port to newer Minecraft version, In vanilla there are no Packet ids hardcoded, Packet IDs will be parsed from a enum like this

* Port all Packets to 1.20.2

* Update README badge to 1.20.2

* Change doc for the new packet id system
2024-10-23 14:31:23 +02:00
Snowiiii
287f466ae1 More workspace dependencies 2024-10-21 19:36:42 +02:00
StripedMonkey
229be05e98 run formatter on cargo.toml files 2024-09-19 03:10:26 -04:00
Alexander Medvedev
91d190c212 Remove unused deps
to mention is the take_mut dep i removed. Its heavily outdated and uses unsafe combined with pointer magic.
2024-09-06 13:30:57 +01:00
Alexander Medvedev
dad4798844 Update deps 2024-09-06 11:34:59 +01:00
we sell insurance
0a02c28b26 Move serde into workspace 2024-09-01 12:26:48 -05:00
lukas0008
8eb894ef13 Create pumpkin-core, and move pumpkin-text 2024-08-21 16:12:09 +02:00
Snowiiii
a6d9ed216d Use Cow's in TextComponent
We now don't always convert &str to Strings allowing us to use stack allocations
2024-08-19 20:05:18 +02:00
Kolibroid
1a21290e0f Fix some minor typos 2024-08-19 17:52:04 +01:00
Snowiiii
8fa8b793ee improve doc 2024-08-14 23:16:02 +02:00
Snowiiii
5cf19a4e98 Add ChatType 2024-08-12 15:46:24 +02:00
Snowiiii
5b636111e4 Prepare ChatType registry 2024-08-11 17:55:41 +02:00
Snowiiii
414cf3190c Added RCON support 2024-08-10 23:53:32 +02:00
Snowiiii
50dcbfeb6d Add inventory support 2024-08-09 22:38:00 +02:00
Snowiiii
19af3618cb fix: all clippy warns 2024-08-04 00:40:27 +02:00
Snowiiii
ae69bbc7f1 Add pumpkin-world
also refactor player
2024-08-04 00:29:20 +02:00
Snowiiii
f779d31880 Add Clientbound Chunk Data and Update Light 2024-08-03 13:56:32 +02:00
Snowiiii
a45a43397c Add Serverbound Confirm Teleportation 2024-08-03 13:25:28 +02:00
Snowiiii
f111c7881c add damage type registries 2024-08-03 12:56:21 +02:00
Snowiiii
1f041cc7db Fix Clientbound Login 2024-08-03 11:25:38 +02:00
Snowiiii
2fd3585af7 Finally fix all registries 2024-08-03 01:01:15 +02:00
Snowiiii
fd9344a512 reorganize into different crates
Should help to get a more clear view and simplify things
2024-08-02 10:57:38 +02:00