From 4573ef480b5872168a5b050e6533b2b74e9b94f8 Mon Sep 17 00:00:00 2001 From: Caedis Date: Sun, 1 Sep 2024 00:07:38 -0500 Subject: [PATCH] implement methods for ResultNoSpaceProject --- .../recipe/ResultNoSpaceProject.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/gtnewhorizons/gtnhintergalactic/recipe/ResultNoSpaceProject.java b/src/main/java/com/gtnewhorizons/gtnhintergalactic/recipe/ResultNoSpaceProject.java index a7799cd..09c3f19 100644 --- a/src/main/java/com/gtnewhorizons/gtnhintergalactic/recipe/ResultNoSpaceProject.java +++ b/src/main/java/com/gtnewhorizons/gtnhintergalactic/recipe/ResultNoSpaceProject.java @@ -1,8 +1,11 @@ package com.gtnewhorizons.gtnhintergalactic.recipe; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.PacketBuffer; import net.minecraft.util.StatCollector; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizons.modularui.common.internal.network.NetworkUtils; import gregtech.api.recipe.check.CheckRecipeResult; @@ -60,6 +63,19 @@ public String getDisplayString() { StatCollector.translateToLocal(neededLocation)); } + @Override + public @NotNull NBTTagCompound writeToNBT(@NotNull NBTTagCompound tag) { + tag.setString("neededProject", neededProject); + tag.setString("neededLocation", neededLocation); + return tag; + } + + @Override + public void readFromNBT(@NotNull NBTTagCompound tag) { + neededProject = tag.getString("needProject"); + neededLocation = tag.getString("neededLocation"); + } + /** * @return New instance of this error without configured parameters */