Daring Do Posted July 16, 2017 Posted July 16, 2017 I'm trying to add in the explosive slave collar as an item in game, however I can't get it to show on the player model properly. Removing it from the ClientProxy makes it invisible, but leaving it in there, it shows as a glowing Steve head with a leather helmet. How it's supposed to look: Spoiler How it actually looks when in the ClientProxy: Spoiler And my code that has any mention of the item and/or model: Spoiler ItemExplosivecollar ModelExplosivecollar ModArmor ClientProxy ServerProxy CommonProxy Honestly, I wish I could've used JSON files for this. It would've been much easier... and knowing me, it's likely a super small piece in the code I've been unable to spot, due to how miniscule it is. But I've looked over the code 20 times at this point, and I'm running thin on ideas. So if anyone has any ideas on how to make it show up as it's supposed to, I'm listening. Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 15 minutes ago, Daring Do said: Honestly, I wish I could've used JSON files for this. It would've been much easier... and knowing me, it's likely a super small piece in the code I've been unable to spot, due to how miniscule it is. But I've looked over the code 20 times at this point, and I'm running thin on ideas. So if anyone has any ideas on how to make it show up as it's supposed to, I'm listening. I'm pretty sure it is the fact that your Collar uses ArmorMaterial.LEATHER. Make a custom one and use that instead. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 Just now, Animefan8888 said: I'm pretty sure it is the fact that your Collar uses ArmorMaterial.LEATHER. Make a custom one and use that instead. I'll see if that works. Quote "Be patient with me, because I'm an absolute moron half the time."
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 (edited) 15 minutes ago, Animefan8888 said: I'm pretty sure it is the fact that your Collar uses ArmorMaterial.LEATHER. Make a custom one and use that instead. Nope. It just does this: Nothing =/ Edited July 16, 2017 by Daring Do Quote "Be patient with me, because I'm an absolute moron half the time."
Kokkie Posted July 16, 2017 Posted July 16, 2017 Show your code Quote Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 (edited) 5 minutes ago, Kokkie said: Show your code Only code that had mention to leather armor: Spoiler package init; import com.ibm.icu.text.DisplayContext.Type; import camellias_.fallout.Reference; import items.ItemExplosivecollar; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModArmor { public static ArmorMaterial EXPLOSIVECOLLARM = EnumHelper.addArmorMaterial("EXCOLLAR", null, 5, new int[]{1, 3, 2, 1}, 1, null, 0); public static ItemArmor explosivecollar; public static void init() { explosivecollar = new ItemExplosivecollar(EXPLOSIVECOLLARM, 1, EntityEquipmentSlot.HEAD); } public static void register() { GameRegistry.register(explosivecollar); } public static void registerRenders() { } private static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } Changed to have a custom armor type. Edited July 16, 2017 by Daring Do Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 4 minutes ago, Daring Do said: Only code that had mention to leather armor: Reveal hidden contents package init; import com.ibm.icu.text.DisplayContext.Type; import camellias_.fallout.Reference; import items.ItemExplosivecollar; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModArmor { public static ArmorMaterial EXPLOSIVECOLLARM = EnumHelper.addArmorMaterial("EXCOLLAR", null, 5, new int[]{1, 3, 2, 1}, 1, null, 0); public static ItemArmor explosivecollar; public static void init() { explosivecollar = new ItemExplosivecollar(EXPLOSIVECOLLARM, 1, EntityEquipmentSlot.HEAD); } public static void register() { GameRegistry.register(explosivecollar); } public static void registerRenders() { } private static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } Changed to have a custom armor type. I suggest stepping through your code in the debugger set a breakpoint at the top of getArmorModel. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 11 minutes ago, Animefan8888 said: I suggest stepping through your code in the debugger set a breakpoint at the top of getArmorModel. Attempted that, and Ecplise denied it, saying it was a syntax error and to delete it, with not optional fixes. Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 1 minute ago, Daring Do said: Attempted that, and Ecplise denied it, saying it was a syntax error and to delete it, with not optional fixes. Could you show me in a picture? Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 2 minutes ago, Animefan8888 said: Could you show me in a picture? I'm betting I did it wrong, but eh. And also, I noticed I forgot to register the render for the armor in the ModArmor class, but no, that wasn't it either, if you were thinking it might have been. (I'm still rather new to coding in general, so yeah... mostly been following tutorials and frankensteining most of the code I get, building my understanding that way, which works well enough for me, until I hit a roadblock like this :/) Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 Just now, Daring Do said: I'm betting I did it wrong, but eh. And also, I noticed I forgot to register the render for the armor in the ModArmor class, but no, that wasn't it either, if you were thinking it might have been. A breakpoint and a break are two different things. Look up how to set a breakpoint in eclipse. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 (edited) 6 minutes ago, Animefan8888 said: A breakpoint and a break are two different things. Look up how to set a breakpoint in eclipse. Ah, okay. Set one up, then. I assumed it was probably somewhat similar to HTML, but I suppose not. Though I might just be thinking of a line break... anyways, running in debug with the breakpoint set at that line. And pressing f5 crashes the game. And completely alters my workspace, apparently. Edited July 16, 2017 by Daring Do Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 1 minute ago, Daring Do said: And pressing f5 crashes the game. It shouldn't crash the game, it will basically pause it and eclipse should prompt you. Say yes and you should get a debug ui that you can view things with. That looks something like this, though the color shouldn't change. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 4 minutes ago, Animefan8888 said: It shouldn't crash the game, it will basically pause it and eclipse should prompt you. Say yes and you should get a debug ui that you can view things with. That looks something like this, though the color shouldn't change. Oh. Well, I did get that. But the game still crashed. Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 Just now, Daring Do said: Oh. Well, I did get that. But the game still crashed. Post the crash report. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 (edited) 9 minutes ago, Animefan8888 said: Post the crash report. Wait, there isn't one... the heck? Maybe it's not a full crash. It just stops responding. I've got that back up, though. Edited July 16, 2017 by Daring Do Quote "Be patient with me, because I'm an absolute moron half the time."
Kokkie Posted July 16, 2017 Posted July 16, 2017 Aren't there any errors in the console? Quote Classes: 94 Lines of code: 12173 Other files: 206 Github repo: https://github.com/KokkieBeer/DeGeweldigeMod
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 1 minute ago, Daring Do said: Reveal hidden contents ---- Minecraft Crash Report ---- // But it works on my machine. Time: 7/14/17 11:13 AM Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Fallout (camfm) Caused by: net.minecraftforge.fml.common.LoaderException: java.lang.InstantiationException at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:102) at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:626) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148) at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:582) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:233) at net.minecraft.client.Minecraft.init(Minecraft.java:478) at net.minecraft.client.Minecraft.run(Minecraft.java:387) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) Caused by: java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:85) ... 39 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.11.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_131, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 796841480 bytes (759 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.38 Powered by Forge 13.20.1.2388 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UC minecraft{1.11.2} [Minecraft] (minecraft.jar) UC mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UC FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11.2-13.20.1.2388.jar) UC forge{13.20.1.2388} [Minecraft Forge] (forgeSrc-1.11.2-13.20.1.2388.jar) UE camfm{0.1} [Fallout] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4463' Renderer: 'Intel(R) HD Graphics 5500' Something is wrong with your Proxy setup. Post your main mod class and make sure that your proxies have zero argument constructors. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 Just now, Animefan8888 said: Something is wrong with your Proxy setup. Post your main mod class and make sure that your proxies have zero argument constructors. I posted one from a while back, not realizing that that was from over half an hour ago. It just stops responding, which I assumed meant a crash was imminent. I usually would execute the process to save time. But it's back up, not responding, that same setup back on Eclipse. Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 1 minute ago, Daring Do said: It just stops responding, which I assumed meant a crash was imminent. As you have realized that is not what it means. When you set a breakpoint you essentially says pause here and let me take a look. 2 minutes ago, Daring Do said: that same setup back on Eclipse. The one I posted or the normal one? Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 (edited) Just now, Animefan8888 said: As you have realized that is not what it means. When you set a breakpoint you essentially says pause here and let me take a look. The one I posted or the normal one? Eeyup. The one you posted Edited July 16, 2017 by Daring Do Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 Just now, Daring Do said: Eeyup. The one you posted Good. Now what you can do is click on the buttons on the top left of eclipse "step into", "step over", and "step return" which come after the "resume", "suspend", and "terminate" buttons. And in doing so you can see how your code is executing. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 1 minute ago, Animefan8888 said: Good. Now what you can do is click on the buttons on the top left of eclipse "step into", "step over", and "step return" which come after the "resume", "suspend", and "terminate" buttons. And in doing so you can see how your code is executing. Erm, they're muted into the background. I can't use any of those. That entire section of buttons is unclickable. Quote "Be patient with me, because I'm an absolute moron half the time."
Animefan8888 Posted July 16, 2017 Posted July 16, 2017 1 minute ago, Daring Do said: Erm, they're muted into the background. I can't use any of those. That entire section of buttons is unclickable. Did you run the game in debug mode? Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Daring Do Posted July 16, 2017 Author Posted July 16, 2017 Just now, Animefan8888 said: Did you run the game in debug mode? Yes, I did. Still inaccessible, and pressing "use step filters" doesn't do anything, either. Quote "Be patient with me, because I'm an absolute moron half the time."
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.