Fixed bug with Mechanical Piston not breaking blocks.
This commit is contained in:
parent
00b79b1d69
commit
a4e300ad9a
|
@ -76,9 +76,11 @@ public class TileMechanicalPiston extends TileMechanical implements IRotatable
|
|||
Vector3 moveNewPosition = movePosition.clone().translate(getDirection());
|
||||
|
||||
if (canMove(movePosition, moveNewPosition))
|
||||
{
|
||||
move(movePosition, moveNewPosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
markRevolve = false;
|
||||
}
|
||||
|
@ -102,10 +104,9 @@ public class TileMechanicalPiston extends TileMechanical implements IRotatable
|
|||
{
|
||||
int breakStatus = (int) (((float) (startBreakCount - breakCount) / (float) startBreakCount) * 10f);
|
||||
world().destroyBlockInWorldPartially(0, blockPos.intX(), blockPos.intY(), blockPos.intZ(), breakStatus);
|
||||
ResonantInduction.LOGGER.info("[Mechanical Piston] Break Count: " + breakCount);
|
||||
|
||||
if (breakCount <= 0)
|
||||
{
|
||||
if (!world().isRemote)
|
||||
if (breakCount >= mechanicalPistonMultiplier)
|
||||
{
|
||||
for (RecipeResource recipe : resources)
|
||||
{
|
||||
|
@ -118,7 +119,6 @@ public class TileMechanicalPiston extends TileMechanical implements IRotatable
|
|||
getWorldObj().destroyBlock(blockPos.intX(), blockPos.intY(), blockPos.intZ(), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ResonantInduction.proxy.renderBlockParticle(worldObj, blockPos.clone().translate(0.5), new Vector3((Math.random() - 0.5f) * 3, (Math.random() - 0.5f) * 3, (Math.random() - 0.5f) * 3), block.blockID, 1);
|
||||
breakCount--;
|
||||
|
@ -127,7 +127,10 @@ public class TileMechanicalPiston extends TileMechanical implements IRotatable
|
|||
}
|
||||
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
world().destroyBlockInWorldPartially(0, blockPos.intX(), blockPos.intY(), blockPos.intZ(), -1);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -175,9 +178,7 @@ public class TileMechanicalPiston extends TileMechanical implements IRotatable
|
|||
|
||||
if (tileEntity != null && tileData != null)
|
||||
{
|
||||
/**
|
||||
* Forge Multipart Support. Use FMP's custom TE creator.
|
||||
*/
|
||||
/** Forge Multipart Support. Use FMP's custom TE creator. */
|
||||
boolean isMultipart = tileData.getString("id").equals("savedMultipart");
|
||||
|
||||
TileEntity newTile = null;
|
||||
|
@ -239,9 +240,7 @@ public class TileMechanicalPiston extends TileMechanical implements IRotatable
|
|||
{
|
||||
if (Loader.isModLoaded("BuildCraft|Factory"))
|
||||
{
|
||||
/**
|
||||
* Special quarry compatibility code.
|
||||
*/
|
||||
/** Special quarry compatibility code. */
|
||||
try
|
||||
{
|
||||
Class clazz = Class.forName("buildcraft.factory.TileQuarry");
|
||||
|
|
Loading…
Reference in a new issue