Create Impl

This commit is contained in:
Quarris
2021-12-28 17:30:19 +00:00
parent ae4e13ed6c
commit 25014342c9
4 changed files with 7 additions and 13 deletions

View File

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

View File

@@ -154,6 +154,7 @@ public class MachineProcessRecipe implements IRecipe<IInventory> {
boolean canTick = true;
// Every tick
index = 0;
for (PortState input : inputs) {
if (input.isConsumePerTick()) {
@@ -175,7 +176,9 @@ public class MachineProcessRecipe implements IRecipe<IInventory> {
}
}
if (canTick) {
if (!canTick) {
this.onInterrupted(inputPorts, outputPorts);
} else {
for (PortState input : inputs) {
if (inputRolls.get(index) < input.getChance()) {
if (input.isConsumePerTick()) {

View File

@@ -25,6 +25,7 @@ public class RotationPortStorage extends PortStorage {
public static final Codec<RotationPortStorage> CODEC = RecordCodecBuilder.create(x -> x.group(
Codec.INT.fieldOf("stress").forGetter(z -> z.stress)
).apply(x, RotationPortStorage::new));
@Getter
@Setter
private float speed;

View File

@@ -1,2 +1,2 @@
#Sun Dec 12 21:28:07 GMT 2021
VERSION_CODE=883
#Tue Dec 28 16:25:35 GMT 2021
VERSION_CODE=884