From 085ccc9d210dfd5891e46a0fd5aa106cc5f8307d Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Wed, 10 Jul 2024 13:22:29 -0700 Subject: [PATCH 1/4] Try a CasList, since the Collections.synchronizedList actually needed the reads to be synchronized... --- .../java/crazypants/enderio/conduit/TileConduitBundle.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/crazypants/enderio/conduit/TileConduitBundle.java b/src/main/java/crazypants/enderio/conduit/TileConduitBundle.java index d0e36bdb00..8bb0b9188d 100644 --- a/src/main/java/crazypants/enderio/conduit/TileConduitBundle.java +++ b/src/main/java/crazypants/enderio/conduit/TileConduitBundle.java @@ -2,7 +2,6 @@ import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.EnumSet; import java.util.HashSet; import java.util.List; @@ -26,6 +25,7 @@ import net.minecraftforge.fluids.FluidTankInfo; import com.enderio.core.client.render.BoundingBox; +import com.gtnewhorizon.gtnhlib.concurrent.cas.CasList; import appeng.api.networking.IGridNode; import appeng.api.util.AECableType; @@ -67,7 +67,7 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle { public static final short NBT_VERSION = 1; - private final List conduits = Collections.synchronizedList(new ArrayList<>()); + private final List conduits = new CasList<>(); private Block facadeId = null; private int facadeMeta = 0; From 04964e15e477026de2e1c11577663fda3c34f887 Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Wed, 10 Jul 2024 14:07:05 -0700 Subject: [PATCH 2/4] hard dep on gtnhlib --- src/main/java/crazypants/enderio/EnderIO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/crazypants/enderio/EnderIO.java b/src/main/java/crazypants/enderio/EnderIO.java index 2d6720451e..b320bffe04 100644 --- a/src/main/java/crazypants/enderio/EnderIO.java +++ b/src/main/java/crazypants/enderio/EnderIO.java @@ -186,7 +186,7 @@ modid = MODID, name = MOD_NAME, version = VERSION, - dependencies = "required-after:CoFHLib@(1.0.3B3,);after:endercore;after:MineFactoryReloaded;after:Forestry;after:Waila@[1.5.8,);after:Thaumcraft;after:appliedenergistics2@[rv2-beta-8,);after:chisel", + dependencies = "required-after:CoFHLib@(1.0.3B3,);after:endercore;after:MineFactoryReloaded;after:Forestry;after:Waila@[1.5.8,);after:Thaumcraft;after:appliedenergistics2@[rv2-beta-8,);after:chisel;required-after:gtnhlib@[0.2.10,)", guiFactory = "crazypants.enderio.config.ConfigFactoryEIO") public class EnderIO { From 0fc382dd13d1e6ea2f6ff193139fa083f543112a Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Thu, 11 Jul 2024 01:31:46 -0700 Subject: [PATCH 3/4] Update dependencies.gradle (#170) Fix server test --- dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index d4e73495c4..8633798f54 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -4,7 +4,7 @@ dependencies { api('com.github.GTNewHorizons:EnderCore:0.4.6:dev') {transitive = false} compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.7:dev') compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.6.14-GTNH:dev') - compileOnly("com.github.GTNewHorizons:GTNHLib:0.3.2:dev") + api("com.github.GTNewHorizons:GTNHLib:0.3.2:dev") compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:dev') api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748 shadowImplementation('cglib:cglib-nodep:3.3.0') From 4a94c1ba909d6f2e957298658e4b5ddb8bfd5703 Mon Sep 17 00:00:00 2001 From: glowredman <35727266+glowredman@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:44:35 +0200 Subject: [PATCH 4/4] Remove `isModLoaded` check for GTNH Lib (#172) --- .../enderio/teleport/TravelController.java | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/main/java/crazypants/enderio/teleport/TravelController.java b/src/main/java/crazypants/enderio/teleport/TravelController.java index 55e066a26e..40f6927aca 100644 --- a/src/main/java/crazypants/enderio/teleport/TravelController.java +++ b/src/main/java/crazypants/enderio/teleport/TravelController.java @@ -46,7 +46,6 @@ import com.google.common.collect.TreeBasedTable; import com.gtnewhorizon.gtnhlib.GTNHLib; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ObfuscationReflectionHelper; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; @@ -1188,19 +1187,15 @@ private BlockCoord getActiveTravelBlock(EntityPlayer player) { } public static void showMessage(EntityPlayer player, IChatComponent chatComponent) { - if (Loader.isModLoaded("gtnhlib")) { - if (player instanceof EntityPlayerMP) { - chatComponent.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.WHITE)); - GTNHLib.proxy.sendMessageAboveHotbar((EntityPlayerMP) player, chatComponent, 60, true, true); - } else { - GTNHLib.proxy.printMessageAboveHotbar( - EnumChatFormatting.WHITE + chatComponent.getFormattedText(), - 60, - true, - true); - } + if (player instanceof EntityPlayerMP) { + chatComponent.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.WHITE)); + GTNHLib.proxy.sendMessageAboveHotbar((EntityPlayerMP) player, chatComponent, 60, true, true); } else { - player.addChatComponentMessage(chatComponent); + GTNHLib.proxy.printMessageAboveHotbar( + EnumChatFormatting.WHITE + chatComponent.getFormattedText(), + 60, + true, + true); } } }