Vega Alpha Posted April 9, 2016 Posted April 9, 2016 Greetings, I have a working mod for Forge 1.8-11.14.4.1577. The mod overrides addRandomArmor() as shown in the following code excerpt. public class MyMob extends net.minecraft.entity.monster.EntityMob { private net.minecraft.item.Item rareItem; public MyMob(net.minecraft.world.World world, net.minecraft.item.Item rareItem) { super(world); this.rareItem = rareItem; } @Override protected void addRandomArmor() { this.dropItem(rareItem, 1); } } I want to migrate this mod to Forge 1.8.9-11.15.1.1722. I took the documented steps to upgrade the project. After the upgrade I found that addRandomArmor() method does not seem to be a part of EntityMob anymore. I went through the normal intuitive search into the Minecraft source, looking for how best to handle this problem. I didn't find an answer so I moved on to search this forum and eventually Google. Google found for me that addRandomArmor() is misleading and that the correct method name might be dropRareDrop(). That better represents how I am using addRandomArmor(), but dropRareDrop() is not present either. I made a guess when I moved my code to net.minecraft.entity.EntityLivingBase#onDeathUpdate(), but that did not seem to work correctly. I decided I lack sufficient familiarity with the Minecraft source to find the best solution within a reasonable amount time. What would you recommend? - Thank you for your time. Quote A software engineer’s job is often to condense fact from the nuance of vapor.
Choonster Posted April 9, 2016 Posted April 9, 2016 MCPBot tells me that EntityLivingBase#addRandomArmor ( func_82164_bB ) was renamed to EntityLivingBase#addRandomDrop on 2015-02-02 (in 1.. It still has this name in 1.8.9, but the method was removed in 1.9. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.