iceiix / stevenarella

Multi-protocol Minecraft-compatible client written in Rust
Apache License 2.0
1.43k stars 58 forks source link

Implement Block Actions for chest #366

Open skillman623 opened 4 years ago

skillman623 commented 4 years ago

When connected to vanilla 15W39c server the following error occurs

[server/mod.rs:1593][DEBUG] Unsupported block entity action: 1

According to https://wiki.vg/Protocol#Block_Entity_Data As this is a new world it can be a few different things Piston head direction-piston head direction down ( Chest state Trapped Chest Ender Chest Beacon Spawner End gateway (purple layer formed between frames) Shulker box Noteblock (https://minecraft.gamepedia.com/)

1: Set data of a mob spawner (everything except for SpawnPotentials: current delay, min/max delay, mob to be spawned, spawn count, spawn range, etc.)

While this is probably a chest or a spawner could the debug log be updated to indicate what block caused the block action? https://wiki.vg/Block_Actions

skillman623 commented 4 years ago

Disconnected and reconnected to minecraft 15W39C and got this. I can't test spawner (not in creative menu). Disconnecting and reconnecting to the server doesn't fix this.

[server/mod.rs:1593][DEBUG] Unsupported block entity action: 1 [model/mod.rs:226][ERROR] Error missing block state for minecraft:chest [model/mod.rs:196][ERROR] Error loading model minecraft:chest Missing_block_State Chest_BlockState_Not_Loading

iceiix commented 4 years ago

There are a lot of block entity actions missing, currently only sign is supported:

https://github.com/iceiix/stevenarella/blob/1fabc0c5bfe314cee8f47cfd2e3485749313bee5/src/server/mod.rs#L1554-L1594

The main difficulty is the model, for example chests are not an ordinary block but would require special rendering to be coded. Same with mob spawners, etc. Agreed chests are important, this would likely need to be implemented for #62 inventory.

To get a spawner in your inventory for testing, on the vanilla server you can do give player mob_spawner.