generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: piston block entity special behavior (#27)
Most block entity will try to create one if there are none. for maybe some reason to save storage usage. Due to Mojang's strange logic, pistons does not--they returns null instead of create a piston block entity. This fix uses reflection to create a block entity--this may not suitable for all types of blocks and maybe not performative enough but it should works. Mojang-ma=ojng Note: The block entities will tick itself--so even if we dont add a BE ot scheduled tick, after redo, the pistons will still keep working instead of stopping. We think this works as intended due to mojang's bull-shit game mechanics. close: #27
- Loading branch information
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters