Better mobGriefing GameRule

Better mobGriefing GameRule

1M Downloads

Handle Enderman mobGriefing rule within LivingUpdateEvent event

Judge40 opened this issue ยท 1 comments

commented

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.

commented

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.