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.

Featured Replies

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 ?

  • Author
21 minutes ago, Luis_ST said:

yes

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

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.

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

  • Author
16 hours ago, Draco18s said:

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

KILN_PICKAXE

  • Author
12 hours ago, Luis_ST said:

add it to your Item.Properties

immuneToFire is private i cant access to it

  • Author
7 minutes ago, Luis_ST said:

it's called fireResistant in MCP mappings

What is MCP mappings

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)

  • Author
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

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)

 

  • Author
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

  • Author
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

  • Author
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'

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

  • Author
Just now, Luis_ST said:

then it's isImmuneToFire, but i don't know why

it`s function with bool return, i cant set it to true

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

Edited by Luis_ST

  • Author
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

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...

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.