
skullcrusher1005
Members-
Posts
50 -
Joined
-
Last visited
Everything posted by skullcrusher1005
-
Ok it worked as we planned When it was on: Equipment Stack 1xitem.GravityChestplate@0 Item com.skullcrusher.BetterThings.Armor.GravityArmor@4aa33ead Target Item com.skullcrusher.BetterThings.Armor.GravityArmor@4aa33ead true When it was off: Equipment Stack null Target Item com.skullcrusher.BetterThings.Armor.GravityArmor@4aa33ead false
-
There are two ways of registering event handlers the MinecraftForge event is the 2nd way FMLCommonHandler.instance().bus().register(new ClassName()) is another way. Thats kinda correct. There are multiple different event busses MinecraftForge.EVENT_BUS and FMLCommonHandler.instance().bus() are just 2 of therm and they each handle different events so you need to register your event to the correct buss which in this case is FMLCommonHandler.instance().bus() And he isnt working on the client side. @OP Well you are closer atleast try adding System.out.println("Equipment Stack "+getEquipmentInSlot(3).getItem()); if (event.player.getEquipmentInSlot(3) != null) System.out.println("Item "+event.player.getEquipmentInSlot(3).getItem()); System.out.println("Target Item"+BetterThings.GravityChestplate); if (event.player.getEquipmentInSlot(3) != null && event.player.getEquipmentInSlot(3).getItem() == BetterThings.GravityChestplate) bellow if (event.phase != TickEvent.Phase.START || event.player.worldObj.isRemote) return; and tell me what is printed to the console. The System.out.println("Equipment Stack "+getEquipmentInSlot(3).getItem()); is giving me the crash, I had to create a method for +getEquipmentInSlot(3) So I could get the error to go away. Not sure if that's why it crashed or not.
-
There are two ways of registering event handlers the MinecraftForge event is the 2nd way FMLCommonHandler.instance().bus().register(new ClassName()) is another way. Thats kinda correct. There are multiple different event busses MinecraftForge.EVENT_BUS and FMLCommonHandler.instance().bus() are just 2 of therm and they each handle different events so you need to register your event to the correct buss which in this case is FMLCommonHandler.instance().bus() And he isnt working on the client side. @OP Well you are closer atleast try adding System.out.println("Equipment Stack "+getEquipmentInSlot(3).getItem()); if (event.player.getEquipmentInSlot(3) != null) System.out.println("Item "+event.player.getEquipmentInSlot(3).getItem()); System.out.println("Target Item"+BetterThings.GravityChestplate); if (event.player.getEquipmentInSlot(3) != null && event.player.getEquipmentInSlot(3).getItem() == BetterThings.GravityChestplate) bellow if (event.phase != TickEvent.Phase.START || event.player.worldObj.isRemote) return; and tell me what is printed to the console. That caused me to crash here's the report.
-
So something like this: @EventHandler public void onTick(PlayerTickEvent event){ if (event.player.inventory.armorInventory[1] == new ItemStack(this)) event.player.capabilities = false; } I'm not sure I'm following you forgot .allowFlying at the end of the last line but, No it didn't work I'm a bit confused as well.
-
Hello Everyone, I'm working on a gravity chestplate that gives creative flight. I'm new to this and I've run into a problem. When the player takes off the gravity chestplate they can still fly how would I fix this? If someone knows what to add to my code and would like to help I would appreciate it.
-
Did that, Still get the same error it keeps looking in minecraft:textures/models/armor for some reason. If I put the texture in that directory it'll work fine. But I don't want to do that because if someone wanted to make a texture pack with my mod in it, it would be a huge hastle because i'd have to have a minecraft folder with the betterthings folder. I don't see anything else telling it to look for a texture in that directory i'm so confused
-
Hello Everyone, I've tried to add some custom armor to my mod. I got the armor to work but the problem is it's not rendering because it's looking in minecraft's texture folder, not my mod's. If someone can help me fix this that would be great because I've been at this for hours. Emerald Armor Code Error in console The path to my texture is "betterthings:textures/models/armor/" My mod id is "BetterThings" all the other textures work fine, it's just the armor isn't