Everything posted by skullcrusher1005
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
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
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Yes, thats what was giving me the error fixed the error launching now.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Heres the code for the armor event handler
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
No, it crashed on world load.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
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.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
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.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
There are two ways of registering event handlers the MinecraftForge event is the 2nd way FMLCommonHandler.instance().bus().register(new ClassName()) is another way.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Wow I've been putting it into the wrong class the whole time It spams my console like you said it should but it still however doesn't allow me to fly.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Question, How does the GravityArmor class know that the event it is looking for is located in the ArmorEventHandler? Also, If I don't reply it means I wen't to sleep I have to get up for school in the morning But, I'll finish when I get home.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Sorry for the delay, I had to watch a movie with my family, but here is the code. Not really sure what I'm supposed to put in that class though.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Didn't get any spam so I must not have registered it correctly.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Still can't fly here's the code if I've done something incorrect
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
I seem to get an error on "getEquipmentInSlot(3).item" It tells me to change the .item to .getItem tried that and I can't even fly with the armor on and where it says "youritemhere" I put BetterThings.GravityChestplate i'm assuming I did that part right.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Would it be player.getCurrentArmor(2) != null) ?
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Fixed all those errors but one last one, The parenthesis between the comment and the if statement says "Expression expected after this token."
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Getting strange errors under START and player, say's they both can't be resovled to a variable. Which is strange unless I'm missing something
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Ok, thank you for your help Sorry I've been an incompetent noob at this.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
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.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Three's the charm? I'm new to this so I'm currently looking up how to register a tick handler. I know this isn't a java school so forgive me for my incompetence
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
I know you have to check for the chestplate slot. But I don't know how to make flying false when the item isn't in the slot.
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
Yes you're right it didn't work, So how would I do this?
-
[1.7.2][Solved] Can still fly when gravity chestplate is off
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.
-
[1.7.2][Solved]Mod looking in the wrong directory for armor.
Nevermind I figured it out I imported the wrong Entity it picked another entity when I did Ctrl + Shift + O works like a charm now
-
[1.7.2][Solved]Mod looking in the wrong directory for armor.
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
-
[1.7.2][Solved]Mod looking in the wrong directory for armor.
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
IPS spam blocked by CleanTalk.