mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-23 21:49:50 +00:00
52 lines
1.5 KiB
Java
52 lines
1.5 KiB
Java
/**
|
|
* This class was created by <Vazkii>. It's distributed as
|
|
* part of the Botania Mod. Get the Source Code in github:
|
|
* https://github.com/Vazkii/Botania
|
|
*
|
|
* Botania is Open Source and distributed under a
|
|
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
|
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
|
*
|
|
* File Created @ [May 4, 2014, 12:29:56 PM (GMT)]
|
|
*/
|
|
package vazkii.botania.common.block;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraft.world.World;
|
|
import vazkii.botania.client.core.helper.IconHelper;
|
|
import vazkii.botania.common.block.tile.TileOpenCrate;
|
|
import vazkii.botania.common.lib.LibBlockNames;
|
|
|
|
public class BlockOpenCrate extends BlockModContainer {
|
|
|
|
IIcon iconBottom;
|
|
|
|
public BlockOpenCrate() {
|
|
super(Material.wood);
|
|
setHardness(2.0F);
|
|
setStepSound(soundTypeWood);
|
|
setBlockName(LibBlockNames.OPEN_CRATE);
|
|
}
|
|
|
|
@Override
|
|
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
|
blockIcon = IconHelper.forBlock(par1IconRegister, this, 0);
|
|
iconBottom = IconHelper.forBlock(par1IconRegister, this, 1);
|
|
}
|
|
|
|
@Override
|
|
public IIcon getIcon(int side, int meta) {
|
|
return side == 0 ? iconBottom : blockIcon;
|
|
}
|
|
|
|
@Override
|
|
public TileEntity createNewTileEntity(World world, int meta) {
|
|
return new TileOpenCrate();
|
|
}
|
|
|
|
}
|