Added wrench rotation to the aesu.

This commit is contained in:
modmuss50 2015-06-07 19:11:08 +01:00
parent 23bf14b37d
commit 8122d25877
2 changed files with 8 additions and 7 deletions

View file

@ -9,6 +9,7 @@ import net.minecraft.world.World;
import techreborn.Core;
import techreborn.blocks.BlockMachineBase;
import techreborn.client.GuiHandler;
import techreborn.packets.PacketHandler;
import techreborn.tiles.TileAesu;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -58,14 +59,13 @@ public class BlockAesu extends BlockMachineBase {
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata)
{
public IIcon getIcon(int side, int metadata) {
if(side == metadata)
return this.iconFront;
return metadata == 0 && side == 3 ? this.iconFront
: side == 1 ? this.iconTop :
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
: (side == metadata ? this.iconFront : this.blockIcon));
}
}

View file

@ -28,19 +28,20 @@ public class TileAesu extends TileEntityElectricBlock implements IWrenchable {
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side)
{
return false;
return true;
}
@Override
public short getFacing()
{
return 0;
return (short) getBlockMetadata();
}
@Override
public void setFacing(short facing)
{
}
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, facing, 2);
}
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer)