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.

AimeryCM

Members
  • Joined

  • Last visited

  1. Got it working. Thanks Very Much!
  2. No, i was unaware I had to do that; where do I put the MinecraftForge.EVENT_BUS.register(new EventHandler()); ?
  3. Didn't work. Any other possibilities, or other methods to use instead of onBurnDamage?
  4. Ok. I used that information and came up with a bit of new code: public void onBurnDamage(LivingAttackEvent event) { if(event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)event.entity; if(event.source.equals(DamageSource.lava) || event.source.equals(DamageSource.inFire) || event.source.equals(DamageSource.onFire)){ ItemStack head = player.inventory.armorInventory[0]; ItemStack chest = player.inventory.armorInventory[1]; ItemStack legs = player.inventory.armorInventory[2]; ItemStack feet = player.inventory.armorInventory[3]; if(head != null && chest != null && legs != null && feet != null){ ItemStack helmet = player.getEquipmentInSlot(1); ItemStack chestplate = player.getEquipmentInSlot(2); ItemStack Leggs = player.getEquipmentInSlot(3); ItemStack boots = player.getEquipmentInSlot(4); if(helmet.getItem() == MainClass.fieryHelmet && chestplate.getItem() == MainClass.fieryChestplate && Leggs.getItem() == MainClass.fieryLeggings && boots.getItem() == MainClass.fieryBoots){ event.setCanceled(true); } } } } } Still take damage from fire.
  5. Almost every method i have tried has required an ItemStack not Item, so I tried to fix it by making the Items into ItemStacks, but didnt work.
  6. I am trying to make it so that when an entity wears my custom armor, it is immune to magic damage, but the code that i have is not working. public void onBurnDamage(LivingAttackEvent event) { if(event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)event.entity; if(event.source.equals(DamageSource.lava) || event.source.equals(DamageSource.inFire) || event.source.equals(DamageSource.onFire)){ ItemStack head = player.inventory.armorInventory[0]; ItemStack chest = player.inventory.armorInventory[1]; ItemStack legs = player.inventory.armorInventory[2]; ItemStack feet = player.inventory.armorInventory[3]; if(head != null && chest != null && legs != null && feet != null){ ItemStack helmet = new ItemStack((Item) Item.itemRegistry.getObject(MainClass.fieryHelmet)); ItemStack chestplate = new ItemStack((Item) Item.itemRegistry.getObject(MainClass.fieryChestplate)); ItemStack Leggs = new ItemStack((Item) Item.itemRegistry.getObject(MainClass.fieryLeggings)); ItemStack boots = new ItemStack((Item) Item.itemRegistry.getObject(MainClass.fieryBoots)); if(player.getEquipmentInSlot(1) == helmet && player.getEquipmentInSlot(2) == chestplate && player.getEquipmentInSlot(3) == Leggs && player.getEquipmentInSlot(4) == boots){ event.setCanceled(true); } } } } } If someone can figure out what I am doing wrong that would be great! Also, I am on 1.7 because it is what most other mods I plan on combining with this are on and what I am used to.
  7. I am not finding that method. By the way, i am using 1.7
  8. I am trying to find what to use to check if an entity is wearing my custom armor (fieryArmor) so that i can make them immune to fire damage by canceling the event onBurnDamage. Just to be specific, all i am looking for is an if statement to check if the armor being worn is my custom armor, whatever it may be through. Thanks!
  9. Didnt Realize it was just a texture thing, not a programming thing. Thanks. P.S. I am using 1.7 because it is the minecraft that i got to know and what most modpacks run on.
  10. I am a pretty new modder and was wondering what to use to make a custom item (a pickaxe) to change texture while it is being held, like how vanilla minecraft's fire works while in the player's inventory. Thanks!
  11. That worked! Thanks a lot! I thought i remembered trying to change my modid to FirstMod and it didnt work so i didnt think it work to do change the package names.
  12. As for my forge version, i am using 10.13.4.1448. Also, i have my textures saved in the source folder src/main/resources and in the packages assets.FirstMod.textures.items or substituting items with blocks or models or gui
  13. When i run the client, in the console this error comes up. [14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found. [14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: DOMAIN firstmod [14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------------------------------- [14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: domain firstmod is missing 38 textures [14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: domain firstmod is missing a resource manager - it is probably a side-effect of automatic texture processing [14:27:09] [Client thread/ERROR] [TEXTURE ERRORS]: ------------------------- Also, thanks for the tips on cleaning up my code, but i dont mind my code being longer than needed, as long as i can navigate it.
  14. i just havent removed them from when this mod was 1.6

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.