Draco18s / ReasonableRealism

For 1.10!
Other
17 stars 8 forks source link

Crash with Open Terrain Generator and Quark #37

Open seasonedfish opened 6 years ago

seasonedfish commented 6 years ago

Creating a new world with Harder Farming, Harder Ores, Open Terrain Generator, Biome Bundle, and Quark results in a crash. However, the world was able to generate the second time I tried it.

Crash log: https://paste.dimdev.org/aharefaguv.mccrash

Full Modlist: image

Forge Version: 14.23.4.2755

Draco18s commented 6 years ago

Hmm, this seems familiar, but I'm not sure where the related issue is at the moment. Looks like one of those three (Open Terrain Generator, Biome Bundle, or Quark), though my guess is OTG (quick second, Biome Bundle) having registered a biome after the biome RegistryEvent (naughty, naughty).

alfuken commented 3 years ago

Checking in to report similar issue.

1.12.1-Harderfarming-7.0.0a forge-1.12.2-14.23.5.2855 OTG

[15:20:59] [Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.world.BlockEvent$HarvestDropsEvent@415ee40b:
java.lang.NullPointerException: null
    at com.draco18s.farming.FarmingEventHandler.harvestGrass(FarmingEventHandler.java:650) ~[FarmingEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_485_FarmingEventHandler_harvestGrass_HarvestDropsEvent.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
    at net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(ForgeEventFactory.java:344) [ForgeEventFactory.class:?]
    at net.minecraft.block.Block.dropBlockAsItemWithChance(Block.java:572) [aow.class:?]
    at net.minecraft.block.Block.dropBlockAsItem(Block.java:564) [aow.class:?]
    at net.minecraft.block.BlockBush.checkAndDropBlock(BlockBush.java:67) [apc.class:?]
    at net.minecraft.block.BlockBush.updateTick(BlockBush.java:60) [apc.class:?]
    at net.minecraft.block.Block.randomTick(Block.java:508) [aow.class:?]
    at net.minecraft.world.WorldServer.updateBlocks(WorldServer.java:476) [oo.class:?]
    at net.minecraft.world.WorldServer.tick(WorldServer.java:225) [oo.class:?]
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:756) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:397) [nz.class:?]
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221]

It seems that, due to reasons unknown, either the call to getBiome at https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/FarmingEventHandler.java#L649 returns null , or it just doesn't end up in biomeTemps

That might be due to the fact that OTG registers it's biomes on world load, not on game init. Solution would be to either change registerBiomes or dig into OTG internals and see when exactly does it initialises it's biomes and then hook up to that. I remember fiddling with OTG's biomes stuff, and to get the list of registered biomes I've hooked up on "world loaded" event or something like that, and then check the biome registry. You may want to do something similar here. If you want to fix that, of course.

if you're not into fixing this incompatibility, then I would request to at least add a incompatibility check on world load with some meaningful explanation rather than just a NullPointer crash.

👍

Draco18s commented 3 years ago

That might be due to the fact that OTG registers it's biomes on world load, not on game init.

Yeah that sounds about right.

if you're not into fixing this incompatibility...

At this point, its more that 1.12 is so old that I'm not sure I have a dev environment any more.