From 569e4dc39cd031222c71639f5d3505d4ac7663f1 Mon Sep 17 00:00:00 2001 From: CromaMclos Date: Sun, 12 May 2024 11:31:43 -0700 Subject: Update GT_MetaTileEntity_IndustrialApiary.java (#2596) The Apimancer's Drainer uses GT_MetaTileEntity_IndustrialApiary.getUsedQueen to retrieve the queen currently being processed by the Industrial Apiary. getUsedQueen is annotated with @SideOnly(Side.CLIENT) which only allows this function to be called from singleplayer. This function is not available when called from server-side and leads to the crash detailed in this issue. As far as I can tell, this function has no reason to be singleplayer / client-side only. This seems to be an artifact from when this function was imported over 2 years ago. Testing this change in our world prevents the crash and allows the Apimancer's Drainer to work as expected with the Industrial Apiary. Resolves GTNewHorizons/GT-New-Horizons-Modpack#16222 --- .../machines/basic/GT_MetaTileEntity_IndustrialApiary.java | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java index 0a3dd02a66..50f544334c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_IndustrialApiary.java @@ -69,8 +69,6 @@ import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.mojang.authlib.GameProfile; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.apiculture.EnumBeeType; @@ -743,7 +741,6 @@ public class GT_MetaTileEntity_IndustrialApiary extends GT_MetaTileEntity_BasicM if (aIndex > drone && aIndex < getOutputSlot()) updateModifiers(); } - @SideOnly(Side.CLIENT) public ItemStack getUsedQueen() { return usedQueen; } -- cgit