Fix wrenching

This commit is contained in:
Aidan Brady 2013-11-04 16:59:19 -05:00
parent d825154bf6
commit 3b746e4a1d
3 changed files with 19 additions and 10 deletions

View file

@ -43,6 +43,7 @@ import mekanism.common.tileentity.TileEntityOsmiumCompressor;
import mekanism.common.tileentity.TileEntityPurificationChamber;
import mekanism.common.tileentity.TileEntityTeleporter;
import mekanism.common.util.MekanismUtils;
import mekanism.generators.common.block.BlockGenerator.GeneratorType;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
@ -151,16 +152,16 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
int height = Math.round(entityliving.rotationPitch);
int change = 3;
if(world.getBlockMetadata(x, y, z) == MachineType.LOGISTICAL_SORTER.meta)
if(tileEntity.canSetFacing(0) && tileEntity.canSetFacing(1))
{
if(height >= 65)
{
change = 1;
}
else if(height <= -65)
{
change = 0;
}
if(height >= 65)
{
change = 1;
}
else if(height <= -65)
{
change = 0;
}
}
if(change != 0 && change != 1)

View file

@ -422,4 +422,10 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
{
return 0;
}
@Override
public boolean canSetFacing(int facing)
{
return true;
}
}

View file

@ -116,7 +116,9 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds
change = 0;
}
}
else {
if(change != 0 && change != 1)
{
switch(side)
{
case 0: change = 2; break;