Quark

Quark

143M Downloads

Enderman Anti-Cheese pickupDefense() Poorly Implemented

ChloeDawn opened this issue · 5 comments

commented

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

commented

This is duplicate of #466. And, was discussed here #469.

Edit: But you might be on to something by having the TE spill its inventory when it is picked up.

commented
commented

They both are concerned with Enderman picking up TileEntities and the contents disappearing.

commented

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.

commented

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.