mirror of
https://github.com/TicTicBoooom-Mods/MasterfulMachinery.git
synced 2026-03-18 21:40:34 +01:00
Create Impl
This commit is contained in:
@@ -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())));
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user