Jump to content

elllkere

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by elllkere

  1. 14 hours ago, Luis_ST said:

    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)

    I found the other method which this.immuneToFire = true;
    btw, how can i add the method manually to the Properties class if this file is read-only?

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

  3. On 2/14/2021 at 4:11 PM, diesieben07 said:

    Use a GlobalLootModifier. In there check if any of the dropped stacks is smeltable. To do this, you need an inventory (you can just use new Inventory(1)) and put the stack into it. Then call RecipeManager#getRecipe(IRecipeType.SMELTING, <inventory>, <world>). If that returns something, use IRecipe#getRecipeOutput to get the output (remember to copy it) and replace the dropped stack with it.

    how to replace the dropped stack ?

×
×
  • Create New...

Important Information

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