mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-06 02:14:58 +01:00
rename back to finished
This commit is contained in:
parent
e1816ec8fe
commit
0845797d0c
1 changed files with 7 additions and 7 deletions
|
@ -38,7 +38,7 @@ public class PressingBehaviour extends BeltProcessingBehaviour {
|
|||
public int prevRunningTicks;
|
||||
public int runningTicks;
|
||||
public boolean running;
|
||||
public boolean wentDown;
|
||||
public boolean finished;
|
||||
public Mode mode;
|
||||
|
||||
int entityScanCooldown;
|
||||
|
@ -72,7 +72,7 @@ public class PressingBehaviour extends BeltProcessingBehaviour {
|
|||
public void read(CompoundTag compound, boolean clientPacket) {
|
||||
running = compound.getBoolean("Running");
|
||||
mode = Mode.values()[compound.getInt("Mode")];
|
||||
wentDown = compound.getBoolean("WentDown");
|
||||
finished = compound.getBoolean("Finished");
|
||||
prevRunningTicks = runningTicks = compound.getInt("Ticks");
|
||||
super.read(compound, clientPacket);
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class PressingBehaviour extends BeltProcessingBehaviour {
|
|||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
compound.putBoolean("Running", running);
|
||||
compound.putInt("Mode", mode.ordinal());
|
||||
compound.putBoolean("WentDown", wentDown);
|
||||
compound.putBoolean("Finished", finished);
|
||||
compound.putInt("Ticks", runningTicks);
|
||||
super.write(compound, clientPacket);
|
||||
|
||||
|
@ -110,7 +110,7 @@ public class PressingBehaviour extends BeltProcessingBehaviour {
|
|||
public void start(Mode mode) {
|
||||
this.mode = mode;
|
||||
running = true;
|
||||
wentDown = false;
|
||||
finished = false;
|
||||
prevRunningTicks = 0;
|
||||
runningTicks = 0;
|
||||
particleItems.clear();
|
||||
|
@ -174,7 +174,7 @@ public class PressingBehaviour extends BeltProcessingBehaviour {
|
|||
return;
|
||||
}
|
||||
|
||||
if (runningTicks >= CYCLE / 2 && !wentDown) {
|
||||
if (runningTicks >= CYCLE / 2 && !finished) {
|
||||
if (inWorld())
|
||||
applyInWorld();
|
||||
if (onBasin())
|
||||
|
@ -190,11 +190,11 @@ public class PressingBehaviour extends BeltProcessingBehaviour {
|
|||
if (!level.isClientSide)
|
||||
blockEntity.sendData();
|
||||
|
||||
wentDown = true;
|
||||
finished = true;
|
||||
}
|
||||
|
||||
if (!level.isClientSide && runningTicks > CYCLE) {
|
||||
wentDown = false;
|
||||
finished = false;
|
||||
particleItems.clear();
|
||||
specifics.onPressingCompleted();
|
||||
blockEntity.sendData();
|
||||
|
|
Loading…
Reference in a new issue