Game Freezes on World Reload
Camawama opened this issue · 10 comments
Describe the bug
When your mod is installed with some other mods I have (Biomes O' Plenty and Oh The Biomes You'll Go) it causes some pretty annoying issues. When creating a world, everything works perfectly fine...but the second I close the world and attempt to join back, it freezes the entire game at 100% to the point where I can only close it with Task Manager. I have been testing mods for 2 weeks now trying to figure out which mod in my pack was causing the issue, and I finally pin-pointed it to your mod. There are no errors in the console, so I don't know how the issue is happening.
To Reproduce
Steps to reproduce the behavior:
- Create a World
- Exit world and attempt to join same world or another
Infos:
- Minecraft verson: 1.16.1
- Mod version: FallingTree-1.16.1-2.2.1
Ok, I can reproduce it. Happens when FallingTree and BYG are together.
Will look into it.
Seems like BYG and BOP already have some issues when together (very similar to what's happening here) and may be linked to this too.
Did you try the things mentioned in that issue? Potion-Studios/BYG#32
Seems related to the TickEvent.ServerTickEvent
.
Adding a single log line at the beginning of my event subscriber makes the world load fine. It's super weird.
Can also fix it by adding logs on BYG side and not modifying FallingTree:
Index: src/main/java/voronoiaoc/byg/config/BYGWorldConfig.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/voronoiaoc/byg/config/BYGWorldConfig.java (revision 1f30a3eebc5996216db257080b558abb00fb5461)
+++ src/main/java/voronoiaoc/byg/config/BYGWorldConfig.java (date 1596663786159)
@@ -113,6 +113,7 @@
@SubscribeEvent
public static void onLoad(final ModConfig.Loading configEvent) {
-
+
+ BYG.LOGGER.debug("BYG: CM ONFF");
}
}
Index: src/main/java/voronoiaoc/byg/config/BYGConfig.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/voronoiaoc/byg/config/BYGConfig.java (revision 1f30a3eebc5996216db257080b558abb00fb5461)
+++ src/main/java/voronoiaoc/byg/config/BYGConfig.java (date 1596663786165)
@@ -38,6 +38,7 @@
@SubscribeEvent
public static void onLoad(final ModConfig.Loading configEvent) {
-
+
+ BYG.LOGGER.debug("BYG: CONF ONFF");
}
}
Index: src/main/java/voronoiaoc/byg/client/textures/BlockColorManager.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/voronoiaoc/byg/client/textures/BlockColorManager.java (revision 1f30a3eebc5996216db257080b558abb00fb5461)
+++ src/main/java/voronoiaoc/byg/client/textures/BlockColorManager.java (date 1596663529091)
@@ -13,6 +13,7 @@
import net.minecraftforge.client.event.ColorHandlerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
+import voronoiaoc.byg.BYG;
import voronoiaoc.byg.core.byglists.BYGBlockList;
import voronoiaoc.byg.core.byglists.BYGItemList;
@@ -23,11 +24,14 @@
*/
@SubscribeEvent
public static void onBlockColorsInit(ColorHandlerEvent.Block event) {
+ BYG.LOGGER.debug("BYG: CMB ON");
BlockColors blockColors = event.getBlockColors();
//registers the colors for blocks that changes colors based on biome
blockColors.register((unknown, lightReader, pos, unknown2) -> lightReader != null && pos != null ? BiomeColors.getGrassColor(lightReader, pos) : GrassColors.get(0.5D, 1.0D), BYGBlockList.MEADOW_GRASSBLOCK, BYGBlockList.OVERGROWN_STONE, BYGBlockList.OVERGROWN_NETHERRACK, BYGBlockList.SHORT_GRASS, BYGBlockList.TINY_LILYPADS, BYGBlockList.OVERGROWN_DACITE, BYGBlockList.GLOWCELIUM, BYGBlockList.WILTED_GRASS, BYGBlockList.WEED_GRASS, BYGBlockList.NETHER_BRISTLE, BYGBlockList.WATER_SILK);
blockColors.register((unknown, lightReader, pos, unknown2) -> lightReader != null && pos != null ? BiomeColors.getFoliageColor(lightReader, pos) : FoliageColors.get(0.5D, 1.0D), BYGBlockList.MAHOGANY_LEAVES, BYGBlockList.POISON_IVY, BYGBlockList.LEAF_PILE, BYGBlockList.ORCHARD_LEAVES, BYGBlockList.FLOWERING_ORCHARD_LEAVES, BYGBlockList.RIPE_ORCHARD_LEAVES, BYGBlockList.RAINBOW_EUCALYPTUS_LEAVES, BYGBlockList.WILLOW_LEAVES, BYGBlockList.MAPLE_LEAVES, BYGBlockList.JOSHUA_LEAVES, BYGBlockList.RIPE_JOSHUA_LEAVES);
+
+ BYG.LOGGER.debug("BYG: CMB OFF");
}
/**
@@ -35,6 +39,8 @@
*/
@SubscribeEvent
public static void onItemColorsInit(ColorHandlerEvent.Item event) {
+
+ BYG.LOGGER.debug("BYG: CMI ON");
final BlockColors blockColors = event.getBlockColors();
final ItemColors itemColors = event.getItemColors();
@@ -47,5 +53,7 @@
itemColors.register(itemBlockColourHandler,
BYGItemList.MEADOW_GRASSBLOCK, BYGItemList.OVERGROWN_NETHERRACK, BYGItemList.MAHOGANY_LEAVES, BYGItemList.POISON_IVY, BYGItemList.OVERGROWN_STONE, BYGItemList.SHORT_GRASS, BYGItemList.TINY_LILYPADS, BYGItemList.NETHER_BRISTLE, BYGItemList.OVERGROWN_DACITE, BYGItemList.GLOWCELIUM, BYGItemList.WILTED_GRASS, BYGItemList.WEED_GRASS, BYGItemList.LEAF_PILE, BYGItemList.ORCHARD_LEAVES, BYGItemList.FLOWERING_ORCHARD_LEAVES, BYGItemList.RIPE_ORCHARD_LEAVES, BYGItemList.RAINBOW_EUCALYPTUS_LEAVES, BYGItemList.WILLOW_LEAVES, BYGItemList.WATER_SILK, BYGItemList.MAPLE_LEAVES, BYGItemList.JOSHUA_LEAVES, BYGItemList.RIPE_JOSHUA_LEAVES);
+
+ BYG.LOGGER.debug("BYG: CMI OFF");
}
}
Honestly I don't know what to think about this. Probably a synchronization issue or something?
Though kinda hard to believe that FallingTree is causing this as it barely do anything except receiving some events from Forge. But setting the log line on my side make it work too so.... I'll try to keep looking into it.
Now BYG seem to have this issue with other mods too so it may be more related to them. Adding these log lines shouldn't really cost much to add, and not flood the log file. Cause on my end I have to add the log on the server tick loop and it'd make log files huge pretty fast.
Also what could be the case is that it's a Forge issue. Though I don't know how to test if it comes for Forge.
Hmm, That's quite strange. Most of my tests have seemed quite random. I have disabled mods and started up the modpack so many times now and sometimes it just randomly doesn't load the world. Restarting the game seems to fix it though. It's really annoying dealing with these types of bugs, lol.
Can you try with this version of BYG? I just added some logs that fixes the problem and shouldn't flood the logs.
https://www.dropbox.com/s/ly37tb7igziaauc/byg-1.0.14.jar?dl=0
As info, this is the changes that are made to this compiled version of BYG:
Index: src/main/java/voronoiaoc/byg/client/textures/BlockColorManager.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/voronoiaoc/byg/client/textures/BlockColorManager.java (revision 1f30a3eebc5996216db257080b558abb00fb5461)
+++ src/main/java/voronoiaoc/byg/client/textures/BlockColorManager.java (date 1596694225483)
@@ -13,6 +13,7 @@
import net.minecraftforge.client.event.ColorHandlerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
+import voronoiaoc.byg.BYG;
import voronoiaoc.byg.core.byglists.BYGBlockList;
import voronoiaoc.byg.core.byglists.BYGItemList;
@@ -23,11 +24,13 @@
*/
@SubscribeEvent
public static void onBlockColorsInit(ColorHandlerEvent.Block event) {
+ BYG.LOGGER.debug("BYG: Registering block colors");
BlockColors blockColors = event.getBlockColors();
//registers the colors for blocks that changes colors based on biome
blockColors.register((unknown, lightReader, pos, unknown2) -> lightReader != null && pos != null ? BiomeColors.getGrassColor(lightReader, pos) : GrassColors.get(0.5D, 1.0D), BYGBlockList.MEADOW_GRASSBLOCK, BYGBlockList.OVERGROWN_STONE, BYGBlockList.OVERGROWN_NETHERRACK, BYGBlockList.SHORT_GRASS, BYGBlockList.TINY_LILYPADS, BYGBlockList.OVERGROWN_DACITE, BYGBlockList.GLOWCELIUM, BYGBlockList.WILTED_GRASS, BYGBlockList.WEED_GRASS, BYGBlockList.NETHER_BRISTLE, BYGBlockList.WATER_SILK);
blockColors.register((unknown, lightReader, pos, unknown2) -> lightReader != null && pos != null ? BiomeColors.getFoliageColor(lightReader, pos) : FoliageColors.get(0.5D, 1.0D), BYGBlockList.MAHOGANY_LEAVES, BYGBlockList.POISON_IVY, BYGBlockList.LEAF_PILE, BYGBlockList.ORCHARD_LEAVES, BYGBlockList.FLOWERING_ORCHARD_LEAVES, BYGBlockList.RIPE_ORCHARD_LEAVES, BYGBlockList.RAINBOW_EUCALYPTUS_LEAVES, BYGBlockList.WILLOW_LEAVES, BYGBlockList.MAPLE_LEAVES, BYGBlockList.JOSHUA_LEAVES, BYGBlockList.RIPE_JOSHUA_LEAVES);
+ BYG.LOGGER.debug("BYG: Registered block colors");
}
/**
@@ -35,6 +38,7 @@
*/
@SubscribeEvent
public static void onItemColorsInit(ColorHandlerEvent.Item event) {
+ BYG.LOGGER.debug("BYG: Registering items colors");
final BlockColors blockColors = event.getBlockColors();
final ItemColors itemColors = event.getItemColors();
@@ -47,5 +51,6 @@
itemColors.register(itemBlockColourHandler,
BYGItemList.MEADOW_GRASSBLOCK, BYGItemList.OVERGROWN_NETHERRACK, BYGItemList.MAHOGANY_LEAVES, BYGItemList.POISON_IVY, BYGItemList.OVERGROWN_STONE, BYGItemList.SHORT_GRASS, BYGItemList.TINY_LILYPADS, BYGItemList.NETHER_BRISTLE, BYGItemList.OVERGROWN_DACITE, BYGItemList.GLOWCELIUM, BYGItemList.WILTED_GRASS, BYGItemList.WEED_GRASS, BYGItemList.LEAF_PILE, BYGItemList.ORCHARD_LEAVES, BYGItemList.FLOWERING_ORCHARD_LEAVES, BYGItemList.RIPE_ORCHARD_LEAVES, BYGItemList.RAINBOW_EUCALYPTUS_LEAVES, BYGItemList.WILLOW_LEAVES, BYGItemList.WATER_SILK, BYGItemList.MAPLE_LEAVES, BYGItemList.JOSHUA_LEAVES, BYGItemList.RIPE_JOSHUA_LEAVES);
+ BYG.LOGGER.debug("BYG: Registered items colors");
}
}
If this works fine for you I think the easiest would be to have BYG make these changes on their side. That'd improve their logs (as they already have some compared to me 🤣) and at the same time fix the problem between us.
I will give that a try right now, but one question I have. Will CurseForge allow me to upload my Modpack with the modified file?