Worked thanks!
If anyone wants the code:
package com.riceandcheese.jademod.common.items;
import com.riceandcheese.jademod.core.init.Iteminit;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class SpecialItem4 extends Item {
public SpecialItem4(Properties properties) {
super(properties);
}
@Override
public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
if(entityIn instanceof PlayerEntity){
PlayerEntity player = (PlayerEntity) entityIn;
if(player.inventory.hasItemStack(Iteminit.fire_fragment.get().getDefaultInstance())) {
player.forceFireTicks(30);
}
}
super.inventoryTick(stack, worldIn, entityIn, itemSlot, isSelected);
}
}