Lazauya Posted November 11, 2020 Posted November 11, 2020 I'm trying to determine when an enderman picks up a block. I've looked into subscribing to the EntityEvent, LivingEvent, LivingUpdateEvent, BlockEvent, EntityMobGriefingEvent, and some others. I looked a little bit into the mapped source for the EndermanEntity, and I actually found what appear to be oversights that make this task that much harder if not impossible. First, the EntityMobGriefingEvent isn't fired at the right time, and instead it's fired much earlier than when a block is actually trying to be broken/placed. Even if it were fired at the right time, then it still wouldn't be able to distinguish between and enderman picking up or placing down a block. It seems like either a new event is needed or the TakeBlockGoal should post a LivingDestroyBlockEvent. If anyone has any ideas on how to determine if the enderman picks up a block or not, please feel free to chime in. Otherwise, I would like to modify the Minecraft Forge EndermanEntity file myself and would appreciate any direction on this topic. Quote
Draco18s Posted November 11, 2020 Posted November 11, 2020 Yeah, there's no good way to detect this right now. Its based on several random variables and the EntityMobGriefingEvent simply determines whether or not the endermen are allowed to make that random check (which can still fail). Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Lazauya Posted November 11, 2020 Author Posted November 11, 2020 So should I just create a pull request? It seems like there's already a good event for this sort of thing (LivingDestroyBlockEvent) and I could add a single line of code to fix this issue. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.