Fixed machine opening gui's while being wrenched now players must be sneaking to wrench machine

This commit is contained in:
Gig 2015-05-10 17:06:08 +01:00
parent 744a694142
commit 0de33330e3
19 changed files with 97 additions and 20 deletions

View file

@ -45,9 +45,13 @@ public class TileAesu extends TileMachineBase implements IWrenchable, IEnergyTil
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -58,9 +58,13 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -58,9 +58,13 @@ public class TileAssemblingMachine extends TileMachineBase implements IWrenchabl
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -50,9 +50,14 @@ public class TileBlastFurnace extends TileMachineBase implements IWrenchable, II
} }
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) { public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() { public float getWrenchDropRate() {

View file

@ -416,9 +416,13 @@ public class TileCentrifuge extends TileMachineBase implements IInventory,
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -53,9 +53,13 @@ public class TileChunkLoader extends TileMachineBase implements IWrenchable, IEn
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -59,9 +59,13 @@ public class TileDieselGenerator extends TileEntity implements IWrenchable,
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -60,9 +60,13 @@ public class TileDragonEggSiphoner extends TileMachineBase implements IWrenchabl
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -35,9 +35,13 @@ public class TileGrinder extends TileMachineBase implements IWrenchable, IEnergy
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -75,9 +75,13 @@ public class TileHeatGenerator extends TileMachineBase implements IWrenchable, I
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -50,9 +50,13 @@ public class TileImplosionCompressor extends TileMachineBase implements IWrencha
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -58,9 +58,13 @@ public class TileIndustrialElectrolyzer extends TileMachineBase implements IWren
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -57,9 +57,13 @@ public class TileLathe extends TileMachineBase implements IWrenchable, IEnergyTi
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -35,9 +35,13 @@ public class TileMatterFabricator extends TileMachineBase implements IWrenchable
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -56,9 +56,13 @@ public class TilePlateCuttingMachine extends TileMachineBase implements IWrencha
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -240,9 +240,13 @@ public class TileQuantumChest extends TileMachineBase implements IInventory,
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -221,9 +221,13 @@ public class TileQuantumTank extends TileMachineBase implements IFluidHandler,
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -146,9 +146,13 @@ public class TileRollingMachine extends TileMachineBase implements IWrenchable,
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()

View file

@ -59,9 +59,13 @@ public class TileThermalGenerator extends TileEntity implements IWrenchable,
@Override @Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) public boolean wrenchCanRemove(EntityPlayer entityPlayer)
{
if (entityPlayer.isSneaking())
{ {
return true; return true;
} }
return false;
}
@Override @Override
public float getWrenchDropRate() public float getWrenchDropRate()