use of com.infinityraider.agricraft.tiles.TileEntityCustomWood in project AgriCraft by AgriCraft.
the class BlockCustomWood method setTag.
protected void setTag(IBlockAccess world, BlockPos pos, ItemStack stack) {
TileEntity te = world.getTileEntity(pos);
if (te != null && te instanceof TileEntityCustomWood) {
TileEntityCustomWood tile = (TileEntityCustomWood) te;
stack.setTagCompound(tile.getMaterialTag());
}
}
use of com.infinityraider.agricraft.tiles.TileEntityCustomWood in project AgriCraft by AgriCraft.
the class BlockCustomWood method onBlockPlacedBy.
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
TileEntity te = world.getTileEntity(pos);
if (te instanceof TileEntityCustomWood) {
TileEntityCustomWood tileEntity = (TileEntityCustomWood) te;
tileEntity.setMaterial(stack);
}
super.onBlockPlacedBy(world, pos, state, placer, stack);
}
Aggregations