Enderman Anti-Cheese pickupDefense() Poorly Implemented
ChloeDawn opened this issue · 5 comments
The feature does not respect TEs and sets the block to air, voiding any contents and/or data, when it should be broken as a fake player to avoid problems.
Quark version: r1.2-99
Relevant code: EndermenAntiCheese.java#L97-L103
Example of fake player block break emulation: AstralSorcery/MiscUtils.java#L143-L170
They both are concerned with Enderman picking up TileEntities and the contents disappearing.
Oh, well, it is borderline a duplicate issue, however my concerns are with how the blocks are broken. I want the endermen to be able to carry tile entities, I just don't want said tile entities or blocks to lose information from bad state handling in code.
Currently you are not respecting any saved data in the block. You do not check for a tile entity and consequently don't attempt to save the tile's data to the item stack. On top of this, you don't remove the block in a way that would cause it to behave as if it had been broken by a player, resulting in situations such as the contents of a chest being voided instead of spawned as item entities on the ground.