From 9fee35c065e197199f57ef1df31ac303e94d1d50 Mon Sep 17 00:00:00 2001 From: HoleFish <48403212+HoleFish@users.noreply.github.com> Date: Sat, 31 Aug 2024 01:48:23 +0800 Subject: Add duration since last shutdown (#2977) * machine message * fix & prass channel * machine message * fix & prass channel * fix machines that dont use regular onPostTick * follow error fixes and fix hatch check * oops * sa --------- Co-authored-by: Martin Robertz Co-authored-by: boubou19 --- .../recipe/check/ResultInsufficientStartupPowerBigInt.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java') diff --git a/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java b/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java index 6a719b3c9c..f4b186c9a1 100644 --- a/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java +++ b/src/main/java/gregtech/api/recipe/check/ResultInsufficientStartupPowerBigInt.java @@ -5,6 +5,7 @@ import static util.Util.toStandardForm; import java.math.BigInteger; import java.util.Objects; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.PacketBuffer; import net.minecraft.util.StatCollector; @@ -36,6 +37,17 @@ public class ResultInsufficientStartupPowerBigInt implements CheckRecipeResult { StatCollector.translateToLocalFormatted("GT5U.gui.text.insufficient_startup_power", required)); } + @Override + public @NotNull NBTTagCompound writeToNBT(@NotNull NBTTagCompound tag) { + tag.setString("required", required); + return tag; + } + + @Override + public void readFromNBT(@NotNull NBTTagCompound tag) { + required = tag.getString("required"); + } + @NotNull @Override public CheckRecipeResult newInstance() { -- cgit