Started by
MetoolMan
on
Topic category: Help with Minecraft modding (Java Edition)
I asked an AI model for an example (embarrassing, I know) and it spat this out - no testing has been done, but does this work? Any experts here? I doubt it, somehow, lol.
@Override
public ItemStack getCloneItemStack(BlockGetter world, BlockPos pos, BlockState state) {
ItemStack stack = new ItemStack(this.asItem());
stack.fireResistant(); // Makes the dropped item fire-resistant
return stack;
}
public static class FireResistantBlockItem extends BlockItem {
public FireResistantBlockItem(Block block) {
super(block, new Item.Properties().fireResistant());
}
}
This has been done in the block's .java file.
HEADS UP: DIDN'T WORK! What an unexpected suprise! So the question still stands - how does one do this?