Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

AimeryCM

Members
  • Posts

    38
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

AimeryCM's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. No, i was unaware I had to do that; where do I put the MinecraftForge.EVENT_BUS.register(new EventHandler()); ?
  2. Didn't work. Any other possibilities, or other methods to use instead of onBurnDamage?
  3. 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.
  4. 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.
  5. 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.
  6. I am not finding that method. By the way, i am using 1.7
  7. 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!
  8. 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.
  9. 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!
  10. 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.
  11. 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
  12. 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.
  13. i just havent removed them from when this mod was 1.6
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.