minecraft doesn't crash for 10 seconds challenge (100% impossible)

This commit is contained in:
Bob 2022-04-01 22:23:53 +02:00
parent 6280d92a83
commit 80667f5eed

View File

@ -246,8 +246,11 @@ public class BlockMotherOfAllOres extends BlockContainer implements IBlockMultiP
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
int key = itemMap.inverse().get(getCompStack());
nbt.setInteger("item", key);
try {
Integer key = itemMap.inverse().get(getCompStack());
nbt.setInteger("item", key != null ? key : 0);
} catch(Exception ex) { }
}
@Override