possible fixed to rotation fill crash
Not tested but this might reduce how often it happens
This commit is contained in:
parent
9e9537d693
commit
44343a56d5
1 changed files with 11 additions and 10 deletions
|
@ -82,6 +82,7 @@ public class BlockConstructionPump extends BlockAdvanced
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderType()
|
public int getRenderType()
|
||||||
{
|
{
|
||||||
|
@ -118,6 +119,12 @@ public class BlockConstructionPump extends BlockAdvanced
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
int angle = MathHelper.floor_double((entityPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
int angle = MathHelper.floor_double((entityPlayer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||||
|
|
||||||
|
TileEntity entity = world.getBlockTileEntity(x, y, z);
|
||||||
|
if (entity instanceof TileEntityConstructionPump)
|
||||||
|
{
|
||||||
|
HydraulicNetworkHelper.invalidate(entity);
|
||||||
|
}
|
||||||
|
|
||||||
if (meta == 3)
|
if (meta == 3)
|
||||||
{
|
{
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 0, 3);
|
world.setBlockMetadataWithNotify(x, y, z, 0, 3);
|
||||||
|
@ -127,15 +134,9 @@ public class BlockConstructionPump extends BlockAdvanced
|
||||||
world.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
|
world.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
TileEntity entity = world.getBlockTileEntity(x, y, z);
|
|
||||||
if(entity instanceof TileEntityConstructionPump)
|
|
||||||
{
|
|
||||||
HydraulicNetworkHelper.invalidate(entity);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return this.onUseWrench(world, x, y, z, entityPlayer, side, hitX, hitY, hitZ);
|
return this.onUseWrench(world, x, y, z, entityPlayer, side, hitX, hitY, hitZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue