Added wrench rotation to the aesu.
This commit is contained in:
parent
23bf14b37d
commit
8122d25877
2 changed files with 8 additions and 7 deletions
|
@ -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));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue