Fixed block breaker delay
This commit is contained in:
parent
5bae138f51
commit
7a54f36ee1
1 changed files with 13 additions and 2 deletions
|
@ -26,6 +26,7 @@ public class TileBreaker extends TileBase implements IRotatable, IPacketReceiver
|
|||
{
|
||||
private boolean doWork = false;
|
||||
private InternalInventoryHandler invHandler;
|
||||
private byte place_delay = 0;
|
||||
|
||||
public TileBreaker()
|
||||
{
|
||||
|
@ -59,8 +60,17 @@ public class TileBreaker extends TileBase implements IRotatable, IPacketReceiver
|
|||
{
|
||||
if (doWork)
|
||||
{
|
||||
doWork();
|
||||
doWork = false;
|
||||
if (place_delay < Byte.MAX_VALUE)
|
||||
{
|
||||
place_delay++;
|
||||
}
|
||||
|
||||
if (place_delay >= 10)
|
||||
{
|
||||
doWork();
|
||||
doWork = false;
|
||||
place_delay = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,6 +79,7 @@ public class TileBreaker extends TileBase implements IRotatable, IPacketReceiver
|
|||
if (isIndirectlyPowered())
|
||||
{
|
||||
doWork = true;
|
||||
place_delay = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue