Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

somarani

Members
  • Joined

  • Last visited

Everything posted by somarani

  1. Both world.isRemote and SIDE yield the same results. When its client side only, the custom effects aren't implemented, when its server side, I get kicked out as soon as armor is on. Here is the code If its of any help public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { float bootsOn = 0; float legsOn = 0; float chestOn = 0; float helmOn = 0; if(player.getCurrentArmor(0) != null ){ ItemStack boots = player.getCurrentArmor(0); if(boots.getItem() == SoulCraft.soulBoots2) bootsOn = 0.1f; } player.stepHeight = 1; if(player.getCurrentArmor(1) != null ){ ItemStack legs = player.getCurrentArmor(1); if(legs.getItem() == SoulCraft.soulLeggings2) legsOn = 0.05f; } if(player.getCurrentArmor(2) != null ){ ItemStack chest = player.getCurrentArmor(2); if(chest.getItem() == SoulCraft.soulChest2) chestOn = 0.05f; } if(player.getCurrentArmor(3) != null ){ ItemStack helm = player.getCurrentArmor(3); if(helm.getItem() == SoulCraft.soulHelmet2) helmOn = 0.05f; } if (player.isSprinting()) player.capabilities.setPlayerWalkSpeed(0.1f + bootsOn + legsOn + chestOn + helmOn); else player.capabilities.setPlayerWalkSpeed(0.1f); }
  2. Making it CLIENT only I get no errors, but it also doesn't speed me up at all. If I make it SERVER side it still kicks me out immediately with the same error.
  3. Thanks to all your help I was able to get everything working fine, with the speed going back to normal after armor is off. However, when I ran the mod on a server, It kicked me out immediately after putting on the armor, here is the log [23:05:30] [server thread/WARN]: Failed to handle packet for /127.0.0.1:55671 net.minecraft.util.ReportedException: Ticking player at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:417) ~[EntityPlayerMP.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayer(NetHandlerPlayServer.java:334) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.C03PacketPlayer.processPacket(C03PacketPlayer.java:37) ~[C03PacketPlayer.class:?] at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.processPacket(C03PacketPlayer.java:218) ~[C03PacketPlayer$C06PacketPlayerPosLook.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:242) ~[NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:190) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:763) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:341) [DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:651) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:530) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:788) [MinecraftServer$2.class:?] Caused by: java.lang.NoSuchMethodError: net.minecraft.entity.player.PlayerCapabilities.setPlayerWalkSpeed(F)V at somarani.soulcraft.armor.ArmorSetSoul2.onArmorTick(ArmorSetSoul2.java:111) ~[ArmorSetSoul2.class:?] at net.minecraft.entity.player.InventoryPlayer.decrementAnimations(InventoryPlayer.java:365) ~[inventoryPlayer.class:?] at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:643) ~[EntityPlayer.class:?] at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1856) ~[EntityLivingBase.class:?] at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:360) ~[EntityPlayer.class:?] at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:363) ~[EntityPlayerMP.class:?] ... 10 more
  4. Hey, does anyone know of a way I can implement uphill step assist into my armor? Thanks
  5. SOLVED! Here is the new code if anyone is interested http://pastebin.com/fcUJJ6C9
  6. This is code that I used in 1.6.4 that had a similar effect and it worked. But getCurrentItemorArmor is no longer a thing in 1.7.2 and when I change it to the suggested getCurrentArmor the code stops working. http://pastebin.com/bkrn42aD
  7. When I do your way, when I'm wearing the armor it says Im not wearing it, and when I'm not wearing the armor, the game crashes
  8. I'm trying to replace an item with another item on right click on a custom mob if player is wearing a certain armor. This is the code I have and it wont work. Everything works except that even when I'm wearing the armor it says that I'm not wearing the armor. Code - http://pastebin.com/Ve8FzRJm
  9. Thank you that works!
  10. Hi, I've been updating my mod to 1.7 and want to output a message to chat when something happens. I know how to activate the method I just don't know what to use to actually get my mod to display something in chat. Thanks
  11. If I register the block in the preInit method, the texture doesn't show up, also, If I create the object in the preInit method the texutre doesn't show up either. To get the texture to work, I either have to do this line - "GameRegistry.registerBlock(this, "infusedstone");" in the constructor for the block, or the constructor of the Main mod class. This is what I have now and it works, is this the bad way of doing it, and is there a better way? Main Mod Class - http://pastebin.com/kbPPv4Ee Block class - http://pastebin.com/69haC0bu
  12. Hi, I'm updating my mod from forge 1.6.4 to forge 1.7.2 and I'm following some tutorials online. In almost all the tutorial I've seen, the blocks are registered under the init method. But whenever I did that, the block texture wouldn't show. The only way I could get the block texture to load was to register my block the my main mod class constructor. Which is the better way to do it? Here is what I have: public SoulCraft(){ //This is my constructor GameRegistry.registerBlock(infusedStone, "infusedstone"); }
  13. Do you mean a TickHandler class? I made one of those but for some reason I cant get it to work. Could you please explain more? Thank you
  14. I know, but WHERE do I put that is the question. I currently have things in the onArmorTickUpdate, but when the armor is off that method doesn't get called anymore and it never gets set back. I need a method that runs everytime armor is taken of, does anyone know of a method like that?
  15. @Alpha wolf, What you're saying makes sense but the problem is I dont know where I should reset the speed, does anyone know what method I can put it in?
  16. @MikaXD - this method does work but the problem with it is that even after I take the armor off the player still walks at the faster speed, I'm not sure how to fix that. @MrIbby - your method works pretty well, and the effect stops after you take the boots off, but the problem with it is that it affects jumping and makes it that you land very fast after jumping, is there a way to address that? Thanks to both of you!
  17. I'm trying to make boots which speed up the player when worn. I don't want it to be a potion effect (because speed potion changes FOV). I tried doing this: http://pastebin.com/FQXDdKxb but this makes my screen go crazy, it keeps zooming in and out. Does anyone know a better way of doing this?
  18. Haha don't worry man, I don't use modloader for anything important, It was just the one I had memorized and didn't want to look it up , but yes DeathTime does help but its not perfect. It will do for now, thanks for the help
  19. Hey, I'm working on a sword that has soulsteal, so everytime you kill a mob you get some health back. The way I'm currently doing it is through the itemsword hitEntity class. Although this works, because the method is called upon hitting with the sword, if you spam the mouse click, even after you kill the mob it registers it as you hitting it multiple times and gives you a ton of health back. Does anyone know a more efficient way of doing this so it only registers once after killing the mob? Here is my code http://pastebin.com/C6Jddeqy I'm using the chat output to check how many times the procedure is called and it comes to about 10 times. Any help would be greatly appreciated.
  20. It works! Thank you my problem turns out that i was never registering the Gui handler in my main class. Thanks to all for the help
  21. Thats a valid point . Like I said Im new to this. In my main mod class I have public static CommonProxy proxy and i also have GuiHandler guiHandler = new GuiHandler(); I tried completely deleting my GUI handler class and putting everything in it inside common proxy and it still didn't work. But I feel like that may have something to do with the problem. What do you think I should do now? Thanks for all the help!
  22. One is a gui Handler and one is a gui container. This is my first time coding a minecraft mod, is there a better way to do this? Thanks
  23. Just a side note, if I set it to check if the world is remote the GUI does open and display properly, but it doesn't allow me to pick up any of the inventory items, they snap back in place as soon as I pick them up Here is my common proxy, it would be great if someone can take a look and see if something there is causing the problem. http://pastebin.com/qmNNrVY6
  24. Well, good news I guess, on right click it does show true and false. If anyone has any ideas please let me know
  25. I tried outputting a message when (par1World.isRemote) and the message never showed up, but it did show up when I changed it to check if the world is remote. Could it have to do something with my Proxy classes? or my @server configuration?

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.