Rotation output ports now do not attempt to store kinetic speed from inputs. This fixes infinitely speed loops

This commit is contained in:
Quarris
2022-07-12 14:41:21 +01:00
parent 39c37394c8
commit 342b49f730
3 changed files with 6 additions and 3 deletions

View File

@@ -53,6 +53,9 @@ public class RotationMachinePortBlockEntity extends KineticTileEntity implements
public void tick() {
super.tick();
this.storage.tick(this);
if (this.storage instanceof RotationPortStorage) {
((RotationPortStorage) this.storage).setSpeed(Math.abs(this.getSpeed()));
}
if (!world.isRemote()) {
PacketHandler.INSTANCE.send(PacketDistributor.ALL.noArg(), new TileClientUpdatePacket.Data(pos, write(new CompoundNBT())));

View File

@@ -75,7 +75,7 @@ public class RotationPortStorage extends PortStorage {
public void tick(IMachinePortTile tile) {
KineticTileEntity kinetic = tile.getTile();
this.isOverStressed = kinetic.isOverStressed();
this.speed = Math.abs(kinetic.getSpeed());
//this.speed = Math.abs(kinetic.getSpeed());
}
@Override

View File

@@ -1,2 +1,2 @@
#Tue Jul 12 14:00:21 BST 2022
VERSION_CODE=972
#Tue Jul 12 14:38:10 BST 2022
VERSION_CODE=974