diff --git a/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java b/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java index 7ac5e382b6..756d0401a0 100644 --- a/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java +++ b/src/main/java/com/simibubi/create/content/fluids/spout/SpoutBlockEntity.java @@ -113,6 +113,7 @@ public class SpoutBlockEntity extends SmartBlockEntity implements IHaveGoggleInf // Process finished ItemStack out = FillingBySpout.fillItem(level, requiredAmountForItem, transported.stack, fluid); if (!out.isEmpty()) { + transported.clearFanProcessingData(); List outList = new ArrayList<>(); TransportedItemStack held = null; TransportedItemStack result = transported.copy(); diff --git a/src/main/java/com/simibubi/create/content/kinetics/belt/transport/TransportedItemStack.java b/src/main/java/com/simibubi/create/content/kinetics/belt/transport/TransportedItemStack.java index aa55002608..fb522c9f83 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/belt/transport/TransportedItemStack.java +++ b/src/main/java/com/simibubi/create/content/kinetics/belt/transport/TransportedItemStack.java @@ -3,7 +3,9 @@ package com.simibubi.create.content.kinetics.belt.transport; import java.util.Random; import com.simibubi.create.content.kinetics.belt.BeltHelper; +import com.simibubi.create.content.kinetics.fan.processing.AllFanProcessingTypes; import com.simibubi.create.content.kinetics.fan.processing.FanProcessingType; +import com.simibubi.create.content.kinetics.fan.processing.FanProcessingTypeRegistry; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -74,6 +76,12 @@ public class TransportedItemStack implements Comparable { nbt.putInt("InSegment", insertedAt); nbt.putInt("Angle", angle); nbt.putInt("InDirection", insertedFrom.get3DDataValue()); + + if (processedBy != null && processedBy != AllFanProcessingTypes.NONE) { + nbt.putString("FanProcessingType", FanProcessingTypeRegistry.getIdOrThrow(processedBy).toString()); + nbt.putInt("FanProcessingTime", processingTime); + } + if (locked) nbt.putBoolean("Locked", locked); if (lockedExternally) @@ -92,7 +100,18 @@ public class TransportedItemStack implements Comparable { stack.insertedFrom = Direction.from3DDataValue(nbt.getInt("InDirection")); stack.locked = nbt.getBoolean("Locked"); stack.lockedExternally = nbt.getBoolean("LockedExternally"); + + if (nbt.contains("FanProcessingType")) { + stack.processedBy = AllFanProcessingTypes.parseLegacy(nbt.getString("FanProcessingType")); + stack.processingTime = nbt.getInt("FanProcessingTime"); + } + return stack; } + + public void clearFanProcessingData() { + processedBy = null; + processingTime = 0; + } } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/content/kinetics/deployer/BeltDeployerCallbacks.java b/src/main/java/com/simibubi/create/content/kinetics/deployer/BeltDeployerCallbacks.java index e18b1d699a..a14f80bf14 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/deployer/BeltDeployerCallbacks.java +++ b/src/main/java/com/simibubi/create/content/kinetics/deployer/BeltDeployerCallbacks.java @@ -113,6 +113,8 @@ public class BeltDeployerCallbacks { .collect(Collectors.toList()); blockEntity.award(AllAdvancements.DEPLOYER); + + transported.clearFanProcessingData(); TransportedItemStack left = transported.copy(); blockEntity.player.spawnedItemEffects = transported.stack.copy(); diff --git a/src/main/java/com/simibubi/create/content/kinetics/press/BeltPressingCallbacks.java b/src/main/java/com/simibubi/create/content/kinetics/press/BeltPressingCallbacks.java index 900aab84b3..2ae6407f11 100644 --- a/src/main/java/com/simibubi/create/content/kinetics/press/BeltPressingCallbacks.java +++ b/src/main/java/com/simibubi/create/content/kinetics/press/BeltPressingCallbacks.java @@ -49,6 +49,8 @@ public class BeltPressingCallbacks { boolean bulk = behaviour.specifics.canProcessInBulk() || transported.stack.getCount() == 1; + transported.clearFanProcessingData(); + List collect = results.stream() .map(stack -> { TransportedItemStack copy = transported.copy();