"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
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.
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.
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.