Judge40 / BetterMobGriefingGameRule

"Better mobGriefing GameRule" is a Minecraft mod which improves the "mobGriefing" game rule, allowing separate values to be specified for individual types of entity.
MIT License
1 stars 1 forks source link

Handle Enderman mobGriefing rule within LivingUpdateEvent event #14

Closed Judge40 closed 7 years ago

Judge40 commented 8 years ago

Currently the Enderman mobGriefing game rule is handled by performing core mod ASM transformation on the EntityEnderman class. The default "mobGriefing" game rule is switched out for "mobGriefingEnderman".

In an effort to reduce the reliance on the core mod and ASM transformation the Enderman handling should be moved to the LivingUpdateEvent. It should be possible to manipulate the list of blocks available for the Enderman to carry within the LivingUpdateEvent. Removing the blocks will stop the default code from getting ran, at which point a copy of the code can be ran using the new mobGriefing game rule.

Judge40 commented 7 years ago

This approach requires duplication of OOTB code, which increases the amount of maintenance required. As such the ASM transformation will continue to handle this functionality.