Jump to content

How to change isImmuneToFire from custom item tool? 1.16.5


Recommended Posts

Posted

I have a class 
 

public class KilnPickaxe extends PickaxeItem {
    public KilnPickaxe(IItemTier tier, int attackDamageIn, float attackSpeedIn, Properties builder) {
        super(tier, attackDamageIn, attackSpeedIn, builder);
    }
}

which is empty yet
And my register of it 

public static final RegistryObject<Item> KILN_PICKAXE = ITEMS.register("kiln_pickaxe",
            () -> new KilnPickaxe(ModItemTier.KILN, 0, -2, new Item.Properties().group(ModGroupTab.MAIN_GROUP)));

So where i can write isImmuneToFire = true ?

Posted
2 hours ago, elllkere said:

So where i can write isImmuneToFire = true ?

What are you trying to make immune to fire? The axe? The player?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
5 hours ago, elllkere said:

What yes, i need to know where i can put this, because i tried to use it from new KilnPickaxe and it gives me error

add it to your Item.Properties

Posted

MCP mappings are the old one, the newer versions use the offical Mojang mappings (the offical Mappings contains the names of methods, fields and classes which mojnag use)

Posted
3 minutes ago, Luis_ST said:

MCP mappings are the old one, the newer versions use the offical Mojang mappings (the offical Mappings contains the names of methods, fields and classes which mojnag use)

but my problem isn`t in the names, i cant set immuneFire to true because of private access

Posted

you don't need to set it, there is the fireResistant method in Item.Properties which you should called here:

23 hours ago, elllkere said:
new Item.Properties().group(ModGroupTab.MAIN_GROUP)

 

Posted
On 1/1/2022 at 6:36 PM, Luis_ST said:

you don't need to set it, there is the fireResistant method in Item.Properties which you should called here:

 

there isn`t

Posted
59 minutes ago, Luis_ST said:

which version and which mappings did you use?

i dont use mappings i event dont know what it is, i use Intelij IDEA with gradle.build from Forge MDK 1.16.5

Posted
2 hours ago, Luis_ST said:

post the line in your build.gradle file which looks like:

 mappings channel: '***', version: '***'

mappings channel: 'snapshot', version: '20210309-1.16.5'

Posted (edited)

then it's isImmuneToFire, but i don't know why since with this mappings in my project:

mappings channel: 'official', version: '1.16.5'
      public Item.Properties fireResistant() {
         this.isFireResistant = true;
         return this;
      }

 

Edited by Luis_ST
Posted
37 minutes ago, Luis_ST said:

in your version it should be fireResistant and not immuneToFire,
try with fireResistant

i gave you my screenshot when i attemping to write fireResistant

Posted

take a look into the Item.Properties class, check if there's a method called fireResistant
-> if there is one add the method manually to the Properties
-> if not then look for a method called immuneToFire, (or smoething like this)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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