mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 11:29:23 +00:00
Remove old ETFenceGate class
This commit is contained in:
1 parent
36c0409e5a
commit
bb9427367d
1 file changed
-142
@@ -1,142 +0,0 @@
|
||||
package binnie.extratrees.block.decor;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.block.BlockMetadata;
|
||||
import binnie.core.block.IBlockMetadata;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.IPlankType;
|
||||
import binnie.extratrees.block.WoodManager;
|
||||
import forestry.api.core.Tabs;
|
||||
import net.minecraft.block.BlockFenceGate;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockETFenceGate extends BlockFenceGate implements IBlockMetadata {
|
||||
public BlockETFenceGate() {
|
||||
super(BlockPlanks.EnumType.OAK);
|
||||
this.setCreativeTab(Tabs.tabArboriculture);
|
||||
this.setResistance(5.0f);
|
||||
this.setHardness(2.0f);
|
||||
this.setSoundType(SoundType.WOOD);
|
||||
setRegistryName("gate");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(final Item itemIn, final CreativeTabs par2CreativeTabs, final NonNullList<ItemStack> itemList) {
|
||||
for (final IPlankType type : WoodManager.getAllPlankTypes()) {
|
||||
final ItemStack gate = WoodManager.getGate(type);
|
||||
itemList.add(gate);
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public IIcon getIcon(final IBlockAccess world, final int x, final int y, final int z, final int side) {
|
||||
// final TileEntityMetadata tile = TileEntityMetadata.getTile(world, x, y, z);
|
||||
// if (tile != null) {
|
||||
// return this.getIcon(side, tile.getTileMetadata());
|
||||
// }
|
||||
// return super.getIcon(world, x, y, z, side);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IIcon getIcon(final int side, final int meta) {
|
||||
// return WoodManager.getPlankType(meta).getIcon();
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public ArrayList<ItemStack> getDrops(final World world, final int x, final int y, final int z, final int blockMeta, final int fortune) {
|
||||
// return BlockMetadata.getBlockDropped(this, world, x, y, z, blockMeta);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean removedByPlayer(final World world, final EntityPlayer player, final int x, final int y, final int z) {
|
||||
// return BlockMetadata.breakBlock(this, player, world, x, y, z);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(final World var1, final int i) {
|
||||
return new TileEntityMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean eventReceived(IBlockState state, World world, BlockPos pos, int id, int param) {
|
||||
TileEntity tileentity = world.getTileEntity(pos);
|
||||
return tileentity != null && tileentity.receiveClientEvent(id, param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPlacedMeta(final ItemStack stack, final World world, final BlockPos pos, final EnumFacing clickedBlock) {
|
||||
return TileEntityMetadata.getItemDamage(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDroppedMeta(IBlockState state, int tileMetadata) {
|
||||
return tileMetadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName(final ItemStack par1ItemStack) {
|
||||
final int meta = TileEntityMetadata.getItemDamage(par1ItemStack);
|
||||
return Binnie.LANGUAGE.localise(ExtraTrees.instance, "block.woodgate.name", WoodManager.getPlankType(meta).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state) {
|
||||
super.breakBlock(world, pos, state);
|
||||
world.removeTileEntity(pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWood(IBlockAccess world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
return BlockMetadata.getPickBlock(world, pos);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ItemStack getPickBlock(final MovingObjectPosition target, final World world, final int x, final int y, final int z) {
|
||||
// return BlockMetadata.getPickBlock(world, x, y, z);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess worldIn, BlockPos pos) {
|
||||
return worldIn.getBlockState(pos).getValue(OPEN);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user