Use FMLModIdMappingEvent for numeric id mapping (#15)

This commit is contained in:
SuperSoupr authored and GitHub committed 2025-12-05 11:41:36 +02:00
1 parent 727348ecad
commit 85cacc679c
1 file changed
+3 -2
@@ -6,8 +6,8 @@ import static com.gtnewhorizons.postea.api.BlockReplacementManager.posteaMarkedI
import net.minecraft.block.Block;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLModIdMappingEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
@Mod(
@@ -26,7 +26,8 @@ public class Postea {
public void preInit(FMLPreInitializationEvent event) {}
@Mod.EventHandler
public void onServerStarting(FMLServerAboutToStartEvent event) {
public void onIdMappingsChanged(FMLModIdMappingEvent event) {
posteaMarkedIDs.clear();
for (String name : blockReplacementMap.keySet()) {
Block block = Block.getBlockFromName(name);
if (block != null) {