This commit is contained in:
MysteriousAges committed 2013-02-26 17:56:57 -08:00
1 parent 0fa9a6ed23
commit aed979a19f
14 files changed
+600 -132

No files matched your search

@@ -3,9 +3,10 @@ package thaumicbees.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumicbees.main.CommonProxy;
import thaumicbees.tile.TileEntityMagicApiary;
import net.minecraft.block.BlockContainer;
import thaumicbees.block.TileEntityMagicApiary;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
@@ -16,41 +17,57 @@ import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
public class BlockMagicApiary extends BlockContainer
public class BlockMagicApiary extends Block
{
public BlockMagicApiary(int par1)
{
super(par1, Material.wood);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setBlockName("Magic Apiary");
this.blockIndexInTexture = 48;
this.blockIndexInTexture = 50;
this.setHardness(2f);
this.setResistance(5f);
}
@Override
@SideOnly(Side.CLIENT)
public int getBlockTexture(IBlockAccess worldAccess, int x, int y, int z, int side)
{
int texture = 48;
if (side == 0 || side == 1)
int texture = 50;
if (side == 0)
{
texture = 50;
texture = 51;
}
else if (side == 1)
{
TileEntityMagicApiary tileInfo = (TileEntityMagicApiary)worldAccess.getBlockTileEntity(x, y, z);
if (tileInfo != null && tileInfo.isMaster())
{
texture = 52;
}
else
{
texture = 51;
}
}
return texture;
}
public int getBlockTextureFromSideAndMetadata(int side, int meta)
{
int texture = 48;
int texture = 50;
if (side == 0 || side == 1)
{
texture = 50;
texture = 51;
}
return texture;
}
@Override
public TileEntity createNewTileEntity(World var1)
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entity)
{
return new TileEntityMagicApiary();
super.onBlockPlacedBy(world, x, y, z, entity);
// Validate block arrangement
}
}