Cancel fire effect when wearing fireward necklace #45
@ -10,6 +10,7 @@ import net.minecraft.world.item.TooltipFlag;
|
|||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import top.theillusivec4.curios.api.SlotContext;
|
||||||
import top.theillusivec4.curios.api.type.capability.ICurioItem;
|
import top.theillusivec4.curios.api.type.capability.ICurioItem;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@ -30,6 +31,13 @@ public class FireWardItem extends Item implements ICurioItem {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void curioTick(SlotContext slotContext, ItemStack stack) {
|
||||||
|
if (slotContext.entity().isOnFire()) {
|
||||||
|
slotContext.entity().clearFire();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Properties getProperties() {
|
private static Properties getProperties() {
|
||||||
return new Properties().tab(ModCreativeModeTab.TAB).stacksTo(1);
|
return new Properties().tab(ModCreativeModeTab.TAB).stacksTo(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user