Commit Graph

25 Commits

Author SHA1 Message Date
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
Alvsch
a04b23f633 Added compile time BlockState (#347)
* added block_state! macro

* Update block_state! macro
2024-12-07 13:10:37 +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
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
4348b56fbe Fix packet side in extractor (#294)
* fix packet side
2024-11-17 19:51:46 +01:00
Snowiiii
711e16528a Simplify Screens, Sounds and Particles Extractor
Particles: 6.6KB -> 3.5KB
Screens: 1.4KB -> 732B
Sounds: 118KB -> 72.2KB
2024-11-14 19:00:38 +01:00
Snowiiii
ac31d1c83b Improve Packet Extractor
Optimize packets.json
- Reduce lines from 1394 -> 256
- Reduces File size 23KB-> 6.9KB
2024-11-14 18:52:47 +01:00
Snowiiii
8db277f63e Minior Changes 2024-11-03 22:36:00 +01:00
Snowiiii
1842e8e6b1 Parse Serverbound Packet IDs from JSON as well
Before only Clientbound Packet IDs where parsed from JSON, Now Serverbound Packet IDs are parsed from JSON as well. This makes porting to new minecraft version much easier
2024-11-03 12:25:10 +01:00
Snowiiii
8f90b29cfe Extractor: Parse and use screens.json 2024-11-03 11:25:15 +01:00
Snowiiii
9e7adec16b Parse Registries from JSON 2024-11-02 16:34:35 +01:00
Snowiiii
a6f3b3f748 Clientbound Packets: use ids from JSON 2024-10-27 14:18:18 +01:00
Alexander Medvedev
b17ade7b06 Add own Extractor (#201)
* Add custom extractor

* Add namespaces to blocks

* Fix: Errors
2024-10-27 12:21:55 +01:00
Alvsch
7de3e0e995 Improved pvp (#173)
* Added CSoundEffect packet

* Added sound macro

added a macro that turns sound namespaces to the sounds id

* added CEntitySoundEffect

* updated id to i32

* Added sound effects to pvp

* Added sweeping and particles

* Added I-Frames to living entity

* Refactored combat

split up the combat handling into multiple functions and a new combat module

* use new packet macro

* updated json files

* fixed attacking

* use builtin clamp
2024-10-24 17:49:23 +02: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
lukas0008
78d6069786 Clippy 2024-10-19 20:53:06 +02:00
lukas0008
7300bda967 Make block state macro comptime-again 2024-10-19 20:48:19 +02:00
kralverde
b7b975a064 rebase block_id 2024-09-28 17:39:11 -04:00
lukas0008
8112f4a6d9 Make block_id macro work in pumpkin-world 2024-09-19 20:24:15 +02:00
lukas0008
d2f700ac1f Cargo fmt 2024-09-18 17:21:05 +02:00
lukas0008
79c6730386 Make block_id macro 2024-09-18 17:11:45 +02:00
Alexander Medvedev
dad4798844 Update deps 2024-09-06 11:34:59 +01:00
Snowiiii
80ffaff777 Update deps 2024-08-26 17:06:15 +02:00
lukas0008
a5110eb939 Packet proc macro 2024-08-05 12:56:46 +02:00