Posted July 5, 201411 yr Hello, I am searching for a way to modify the default ore xp drop values. This is going to be part of a fix based mod to add difficulty, and would like to remove all xp drops from ores. Does anyone have any hints as to how I would go about doing this?
July 5, 201411 yr Author I am unable to figure out how to replace the drop event on a vanilla ore, to where it will not drop XP. I have modified the mob drops just fine, but cannot figure out the ores.
July 5, 201411 yr Author My only problem as of now, is checking if the block is, (Coal ore, Iron Ore, etc...). I would think that it would be something like this, but it's not. if (event.block.getBlock == Blocks.coal_ore) { // Do This }
July 5, 201411 yr Author I know it's not getBlock, it was what I would think it would be for simplicity. When using Event.block.*, I'm not sure what the next part is, What I am looking for is to get the original ores, and set their xp drop to 0. Once I am able to get one block, the others won't be a problem.
July 5, 201411 yr So, diesieben07: Would this be the correct way of going about it? @SubscribeEvent public void brokeBlock(BreakEvent event) { if (event.block instanceof BlockOre) { event.setExpToDrop(0); } }
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.