mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Fix a crash that sometimes happens when placing down container blocks
Closes #437
This commit is contained in:
parent
073eb2168a
commit
fc4484cc73
1 changed files with 3 additions and 3 deletions
|
@ -23,8 +23,6 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
|
@ -216,7 +214,9 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
|
|||
if(tile instanceof TileEntityBase){
|
||||
TileEntityBase base = (TileEntityBase)tile;
|
||||
NBTTagCompound compound = stack.getTagCompound().getCompoundTag("Data");
|
||||
base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK);
|
||||
if(compound != null){
|
||||
base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue