From 8ea7cf4080faf70a8e5f5dceafb523e7177aa8fb Mon Sep 17 00:00:00 2001 From: Boblet Date: Fri, 22 Aug 2025 13:06:47 +0200 Subject: [PATCH] can't wait for people to complain about this one --- changelog | 6 +----- .../java/com/hbm/handler/BulletConfigSyncingUtil.java | 1 + .../java/com/hbm/handler/guncfg/GunEnergyFactory.java | 1 + .../java/com/hbm/handler/guncfg/GunNPCFactory.java | 1 + src/main/java/com/hbm/handler/imc/IMCBlastFurnace.java | 1 + src/main/java/com/hbm/handler/imc/IMCCentrifuge.java | 1 + src/main/java/com/hbm/handler/imc/IMCCrystallizer.java | 1 + src/main/java/com/hbm/handler/imc/IMCHandler.java | 7 +++++++ src/main/java/com/hbm/tileentity/TileMappings.java | 10 +++++++++- src/main/java/com/hbm/util/Compat.java | 6 ++++++ 10 files changed, 29 insertions(+), 6 deletions(-) diff --git a/changelog b/changelog index d3d8a6554..67551c1c8 100644 --- a/changelog +++ b/changelog @@ -1,6 +1,2 @@ ## Changed -* Blueprint folders can now be bought on bobmazon (64 for blue recipes, 256 for beige ones) - -## Fixed -* Fixed the QMAW loader crashing servers - * Oops \ No newline at end of file +* Due to severe issues with ticking order as well as a crash caused by certain tiles that uses threaded packets, Torcherino accelerator torches no longer affect NTM machines \ No newline at end of file diff --git a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java index 3deab1d17..bf9cddaa0 100644 --- a/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java +++ b/src/main/java/com/hbm/handler/BulletConfigSyncingUtil.java @@ -5,6 +5,7 @@ import java.util.Map.Entry; import com.hbm.handler.guncfg.*; +@Deprecated public class BulletConfigSyncingUtil { private static HashMap configSet = new HashMap(); diff --git a/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java b/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java index d0e8e6bd7..dab6b35f3 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunEnergyFactory.java @@ -4,6 +4,7 @@ import com.hbm.handler.BulletConfiguration; import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.items.ModItems; +@Deprecated public class GunEnergyFactory { public static BulletConfiguration getTurbineConfig() { diff --git a/src/main/java/com/hbm/handler/guncfg/GunNPCFactory.java b/src/main/java/com/hbm/handler/guncfg/GunNPCFactory.java index 8b5cb54bb..aa33eba4f 100644 --- a/src/main/java/com/hbm/handler/guncfg/GunNPCFactory.java +++ b/src/main/java/com/hbm/handler/guncfg/GunNPCFactory.java @@ -23,6 +23,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.Vec3; +@Deprecated public class GunNPCFactory { public static BulletConfiguration getMaskmanOrb() { diff --git a/src/main/java/com/hbm/handler/imc/IMCBlastFurnace.java b/src/main/java/com/hbm/handler/imc/IMCBlastFurnace.java index 7a99d4349..d553587bf 100644 --- a/src/main/java/com/hbm/handler/imc/IMCBlastFurnace.java +++ b/src/main/java/com/hbm/handler/imc/IMCBlastFurnace.java @@ -14,6 +14,7 @@ import net.minecraft.nbt.NBTTagList; * @author UFFR */ +@Deprecated public class IMCBlastFurnace extends IMCHandler { public static final ArrayList> buffer = new ArrayList<>(); diff --git a/src/main/java/com/hbm/handler/imc/IMCCentrifuge.java b/src/main/java/com/hbm/handler/imc/IMCCentrifuge.java index 24456f70f..8fc5666cb 100644 --- a/src/main/java/com/hbm/handler/imc/IMCCentrifuge.java +++ b/src/main/java/com/hbm/handler/imc/IMCCentrifuge.java @@ -10,6 +10,7 @@ import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +@Deprecated public class IMCCentrifuge extends IMCHandler { public static HashMap buffer = new HashMap(); diff --git a/src/main/java/com/hbm/handler/imc/IMCCrystallizer.java b/src/main/java/com/hbm/handler/imc/IMCCrystallizer.java index 9230bb11c..8ca219536 100644 --- a/src/main/java/com/hbm/handler/imc/IMCCrystallizer.java +++ b/src/main/java/com/hbm/handler/imc/IMCCrystallizer.java @@ -13,6 +13,7 @@ import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +@Deprecated public class IMCCrystallizer extends IMCHandler { public static HashMap, CrystallizerRecipe> buffer = new HashMap(); diff --git a/src/main/java/com/hbm/handler/imc/IMCHandler.java b/src/main/java/com/hbm/handler/imc/IMCHandler.java index 22cd5a386..4aa650742 100644 --- a/src/main/java/com/hbm/handler/imc/IMCHandler.java +++ b/src/main/java/com/hbm/handler/imc/IMCHandler.java @@ -6,6 +6,13 @@ import com.hbm.main.MainRegistry; import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage; +/** + * I'm not aware of anyone even using these, and for proper addon mods it's way easier to use direct calls instead of messages. + * Too cumbersome to implement and maintain, especially since the recipe register listeners exist now. Current implementation will break on recipe reload anyway. + * + * @author hbm + */ +@Deprecated public abstract class IMCHandler { private static final HashMap handlers = new HashMap(); diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index 63bc3640e..250305afe 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -54,8 +54,9 @@ import com.hbm.tileentity.machine.rbmk.*; import com.hbm.tileentity.machine.storage.*; import com.hbm.tileentity.network.*; import com.hbm.tileentity.turret.*; -import cpw.mods.fml.common.Loader; +import com.hbm.util.Compat; +import cpw.mods.fml.common.Loader; import net.minecraft.tileentity.TileEntity; public class TileMappings { @@ -480,5 +481,12 @@ public class TileMappings { if(IConfigurableMachine.class.isAssignableFrom(clazz)) { configurables.add((Class) clazz); } + + /** + * Causes problems with most machines where two independently acting tiles work together (TU machines, RBMKs, fluid transfer) + * Also breaks due to some sort of buffer leak in the threaded packets, if a boiler is involved (which uses a ByteBuf instead of the usual serializing) it crashes + * Ticking order of Torcherinos is AAA BBB CCC instead of ABC ABC ABC which can lead to some horrifying behavior + */ + Compat.blacklistAccelerator(clazz); } } diff --git a/src/main/java/com/hbm/util/Compat.java b/src/main/java/com/hbm/util/Compat.java index db59a6026..138b109ed 100644 --- a/src/main/java/com/hbm/util/Compat.java +++ b/src/main/java/com/hbm/util/Compat.java @@ -9,6 +9,7 @@ import com.hbm.inventory.fluid.Fluids; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; +import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.eventhandler.EventBus; import cpw.mods.fml.common.eventhandler.IEventListener; import cpw.mods.fml.relauncher.ReflectionHelper; @@ -37,6 +38,7 @@ public class Compat { public static final String MOD_TC = "tc"; public static final String MOD_EIDS = "endlessids"; public static final String MOD_ANG = "angelica"; + public static final String MOD_TOR = "Torcherino"; public static Item tryLoadItem(String domain, String name) { return (Item) Item.itemRegistry.getObject(getReg(domain, name)); @@ -259,4 +261,8 @@ public class Compat { if(!world.getChunkProvider().chunkExists(x >> 4, z >> 4)) return null; return world.getTileEntity(x, y, z); } + + public static void blacklistAccelerator(Class clazz) { + FMLInterModComms.sendMessage("Torcherino", "blacklist-tile", clazz.getName()); + } }