Posted December 28, 20222 yr Hi, I'm currently trying to develop a mod, that stops the enderman from picking up blocks. I know such a mod already exists but ist is too comprehensive for my tasta and also not suppurts my current minecraft version. Also I wanted to learn something about minecraft modding. This is my fist minecraft mod. I want to create an eventhandler like this: @SubscribeEvent public void onEndermanPickUpBlock(PickUpLootEvent event) { // Check if the entity picking up the block is an Enderman if (event.getEntity() instanceof EndermanEntity) { // Cancel the event to prevent the Enderman from picking up the block event.setCanceled(true); } } Sadly my informations seem to be outdated, since both the class EndermanEntity and the class PickUpLootEvent seem to have been renamed or removed completely in my current forge version 1.19.2-43.2.0 I also could not find a documentation, that would help me to find wout what happened to these classes. https://docs.minecraftforge.net/en/latest/ returns no results. I found the class net.minecraft.world.entity.monster.EnderMan in the library files but I have no Idea what happened to the event. I hope someone can help me. Edited December 28, 20222 yr by Lennard Schilling typo
December 28, 20222 yr You could deny the `EntityMobGriefingEvent` by setting the result, but you could also just disable mob griefing without the need for a mod.
January 2, 20232 yr Author On 12/28/2022 at 4:51 PM, ChampionAsh5357 said: You could deny the `EntityMobGriefingEvent` by setting the result, but you could also just disable mob griefing without the need for a mod. Thanks, this event looks like what I'm looking for. Disabeling mob griefing in the settings would is not exactly what I want since it also removes the vilagers ability to consume food and it disables creeper block damage.
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.