Block fixes
This commit is contained in:
parent
df8aa8e7d9
commit
391cd2b03d
|
@ -27,7 +27,6 @@ public class BlockAlchemicalChest extends BlockEE implements ITileEntityProvider
|
|||
this.setHardness(2.5F);
|
||||
this.setUnlocalizedName(Strings.ALCHEMICAL_CHEST_NAME);
|
||||
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,6 @@ public class BlockAludelBase extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
super(id, Material.anvil);
|
||||
this.setUnlocalizedName(Strings.ALUDEL_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setBlockBounds(0.10F, 0.0F, 0.10F, 0.90F, 1.0F, 0.90F);
|
||||
this.setHardness(5F);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ public class BlockCalcinator extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
super(id, Material.rock);
|
||||
this.setUnlocalizedName(Strings.CALCINATOR_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setHardness(2.0F);
|
||||
this.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1.0F, 0.9F);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.pahimar.ee3.block;
|
||||
|
||||
import com.pahimar.ee3.EquivalentExchange3;
|
||||
import com.pahimar.ee3.lib.Strings;
|
||||
import com.pahimar.ee3.tileentity.TileEE;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -29,6 +30,7 @@ public class BlockEE extends Block
|
|||
public BlockEE(int id, Material material)
|
||||
{
|
||||
super(id, material);
|
||||
setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -59,34 +61,35 @@ public class BlockEE extends Block
|
|||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack itemStack)
|
||||
{
|
||||
int direction = 0;
|
||||
int facing = MathHelper.floor_double(entityLiving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
if (world.getBlockTileEntity(x, y, z) instanceof TileEE)
|
||||
{
|
||||
int direction = 0;
|
||||
int facing = MathHelper.floor_double(entityLiving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if (facing == 0)
|
||||
{
|
||||
direction = ForgeDirection.NORTH.ordinal();
|
||||
}
|
||||
else if (facing == 1)
|
||||
{
|
||||
direction = ForgeDirection.EAST.ordinal();
|
||||
}
|
||||
else if (facing == 2)
|
||||
{
|
||||
direction = ForgeDirection.SOUTH.ordinal();
|
||||
}
|
||||
else if (facing == 3)
|
||||
{
|
||||
direction = ForgeDirection.WEST.ordinal();
|
||||
}
|
||||
if (facing == 0)
|
||||
{
|
||||
direction = ForgeDirection.NORTH.ordinal();
|
||||
}
|
||||
else if (facing == 1)
|
||||
{
|
||||
direction = ForgeDirection.EAST.ordinal();
|
||||
}
|
||||
else if (facing == 2)
|
||||
{
|
||||
direction = ForgeDirection.SOUTH.ordinal();
|
||||
}
|
||||
else if (facing == 3)
|
||||
{
|
||||
direction = ForgeDirection.WEST.ordinal();
|
||||
}
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, direction, 3);
|
||||
if (itemStack.hasDisplayName())
|
||||
{
|
||||
((TileEE) world.getBlockTileEntity(x, y, z)).setCustomName(itemStack.getDisplayName());
|
||||
}
|
||||
|
||||
if (itemStack.hasDisplayName())
|
||||
{
|
||||
((TileEE) world.getBlockTileEntity(x, y, z)).setCustomName(itemStack.getDisplayName());
|
||||
((TileEE) world.getBlockTileEntity(x, y, z)).setOrientation(direction);
|
||||
}
|
||||
|
||||
((TileEE) world.getBlockTileEntity(x, y, z)).setOrientation(direction);
|
||||
}
|
||||
|
||||
protected void dropInventory(World world, int x, int y, int z)
|
||||
|
|
|
@ -26,7 +26,6 @@ public class BlockGlassBell extends BlockEE implements ITileEntityProvider
|
|||
{
|
||||
super(id, Material.glass);
|
||||
this.setUnlocalizedName(Strings.GLASS_BELL_NAME);
|
||||
this.setCreativeTab(EquivalentExchange3.tabsEE3);
|
||||
this.setHardness(1.0F);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,25 +20,21 @@ import org.lwjgl.opengl.GL12;
|
|||
* @author pahimar
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityAlchemicalChestRenderer extends
|
||||
TileEntitySpecialRenderer
|
||||
public class TileEntityAlchemicalChestRenderer extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
||||
private ModelChest modelChest = new ModelChest();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
|
||||
{
|
||||
|
||||
if (tileEntity instanceof TileAlchemicalChest)
|
||||
{
|
||||
|
||||
TileAlchemicalChest tileAlchemicalChest = (TileAlchemicalChest) tileEntity;
|
||||
ForgeDirection direction = null;
|
||||
|
||||
if (tileAlchemicalChest.getWorldObj() != null)
|
||||
{
|
||||
direction = ForgeDirection.getOrientation(tileAlchemicalChest.getBlockMetadata());
|
||||
direction = tileAlchemicalChest.getOrientation();
|
||||
}
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMICAL_CHEST);
|
||||
|
|
|
@ -27,20 +27,16 @@ import org.lwjgl.opengl.GL11;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityAludelRenderer extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
||||
private ModelAludel modelAludel = new ModelAludel();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public TileEntityAludelRenderer()
|
||||
{
|
||||
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
|
||||
@Override
|
||||
public boolean shouldBob()
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
@ -51,10 +47,8 @@ public class TileEntityAludelRenderer extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
|
||||
{
|
||||
|
||||
if (tileEntity instanceof TileAludel)
|
||||
{
|
||||
|
||||
TileAludel tileAludel = (TileAludel) tileEntity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
|
Loading…
Reference in a new issue