Posted March 28, 20178 yr I've been having issues trying to render an entity. I believe I've narrowed the issue down to either my custom item class or my custom entity class. So I've been looking at the EntitySnowball.java as a reference. The only difference I see is the snowball entity class has a method that registers a data fix to the snowball. Can someone explain what "registerFixesThrowable()" does and what a DataFixer is and its purpose? // In EntitySnowball.java public static void registerFixesSnowball(DataFixer fixer) { EntityThrowable.registerFixesThrowable(fixer, "Snowball"); } But funny enough, if you look inside EntityThrowable.java to see the "registerFixesThrowable()" method, it's empty... // In EntityThrowable.java public static void registerFixesThrowable(DataFixer fixer, String name) { } I was confused by this but I decided to look up the call hierarchy for "registerFixesSnowball()". And "registerFixesSnowball()" gets called in DataFixesManager.java which calls a LOT of other entity fixes (which I will remove from the code block for readability purposes). // In DataFixesManager.java public static DataFixer createFixer() { DataFixer datafixer = new DataFixer(922); datafixer = new net.minecraftforge.common.util.CompoundDataFixer(datafixer); WorldInfo.registerFixes(datafixer); EntityPlayerMP.func_191522_a(datafixer); EntityPlayer.registerFixesPlayer(datafixer); AnvilChunkLoader.registerFixes(datafixer); ItemStack.registerFixes(datafixer); Template.registerFixes(datafixer); Entity.registerFixes(datafixer); EntityArmorStand.registerFixesArmorStand(datafixer); // ... EntitySnowball.registerFixesSnowball(datafixer); // ... registerFixes(datafixer); return datafixer; } This "createFixer()" gets called in "main()" method of MinecraftServer.java and in the CONSTRUCTOR of Minecraft.java Edited March 28, 20178 yr by Sack Of Potatoes
March 29, 20178 yr Author 23 hours ago, diesieben07 said: DataFixers are basically converters for old save formats. They convert the old NBT data to the new format when you load an old world. As for your error: Show your entity, your renderer and where you register them. I have a thread for the issue here. The renderer is called in client.java preinit() and everything else is in the commonproxy
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.