mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 03:59:37 +00:00
Merge branch 'development' into 1.8
Conflicts: src/main/java/mekanism/common/tile/TileEntitySalinationController.java src/main/java/mekanism/common/util/MekanismUtils.java src/main/java/mekanism/generators/common/block/BlockGenerator.java
This commit is contained in:
commit
514b6962d2
12 files changed
+138
-231
No files matched your search
@@ -667,7 +667,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int facing, float posX, float posY, float posZ)
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int side, float posX, float posY, float posZ)
|
||||
{
|
||||
if(ItemAttacher.canAttach(entityplayer.getCurrentEquippedItem()))
|
||||
{
|
||||
@@ -686,57 +686,39 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
{
|
||||
Item tool = entityplayer.getCurrentEquippedItem().getItem();
|
||||
|
||||
if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") && tool instanceof IToolWrench && !tool.getUnlocalizedName().contains("omniwrench"))
|
||||
if(MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
|
||||
{
|
||||
if(((IToolWrench)tool).canWrench(entityplayer, x, y, z))
|
||||
if(entityplayer.isSneaking() && metadata != 13)
|
||||
{
|
||||
if(entityplayer.isSneaking() && metadata != 13)
|
||||
{
|
||||
dismantleBlock(world, x, y, z, false);
|
||||
return true;
|
||||
}
|
||||
dismantleBlock(world, x, y, z, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") && tool instanceof IToolWrench)
|
||||
((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);
|
||||
|
||||
int change = 0;
|
||||
int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][tileEntity.facing];
|
||||
|
||||
switch(tileEntity.facing)
|
||||
if(tileEntity instanceof TileEntityLogisticalSorter)
|
||||
{
|
||||
if(!((TileEntityLogisticalSorter)tileEntity).hasInventory())
|
||||
{
|
||||
case 3:
|
||||
change = 5;
|
||||
break;
|
||||
case 5:
|
||||
change = 2;
|
||||
break;
|
||||
case 2:
|
||||
change = 4;
|
||||
break;
|
||||
case 4:
|
||||
change = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityLogisticalSorter)
|
||||
{
|
||||
if(!((TileEntityLogisticalSorter)tileEntity).hasInventory())
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tile = Coord4D.get(tileEntity).getFromSide(dir).getTileEntity(world);
|
||||
TileEntity tile = Coord4D.get(tileEntity).getFromSide(dir).getTileEntity(world);
|
||||
|
||||
if(tileEntity instanceof IInventory)
|
||||
{
|
||||
change = dir.getOpposite().ordinal();
|
||||
break;
|
||||
}
|
||||
if(tile instanceof IInventory)
|
||||
{
|
||||
change = dir.getOpposite().ordinal();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
world.notifyBlocksOfNeighborChange(x, y, z, this);
|
||||
return true;
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
world.notifyBlocksOfNeighborChange(x, y, z, this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user