MineColonies

MineColonies

53M Downloads

[CTD] Crash to desktop when picking Spawner with ChestTransporter, with MineColonies installed

drakray opened this issue ยท 4 comments

commented

Minecolonies version

Version:
Minecraft 1.12.2
MineColonies-1.12.2-0.11.841-ALPHA-universal
ChestTransporter-2.8.8
+others

Expected behavior

  • Pick up MobSpawner with Gold ChestTransporter to move it

Actual behaviour

  • Crash to Desktop
java.lang.NullPointerException: Unexpected error
	at com.minecolonies.coremod.colony.ColonyManager.getColonyByDimension(ColonyManager.java:269)
	at com.minecolonies.coremod.event.EventHandler.onBlockBreak(EventHandler.java:382)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1465_EventHandler_onBlockBreak_BreakEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
	at cubex2.mods.chesttransporter.ItemChestTransporter.onItemUseFirst(ItemChestTransporter.java:80)
	at net.minecraft.item.ItemStack.onItemUseFirst(ItemStack.java:200)
	at net.minecraft.client.multiplayer.PlayerControllerMP.func_187099_a(PlayerControllerMP.java:409)

Steps to reproduce the problem

  1. Have Chesttransporter and Minecolonies installed (config minecolonies.cfg.txt )
  2. Connect on server
  3. Try to pickup MobSpawner with Gold Chest Transporter
  4. ... Profit(crash to desktop)

Logs: Latest.log and crashlog at https://gist.github.com/

commented

More Info: the crash does not occur in Single Player, nor in Open to LAN.

commented

Code links for those who look at this:

Also, this doesn't make too much sense, only thing that could NPE are the things that Forge provides. So, only thing i can think of is it possibly happening off thread?

https://github.com/cubex2/chesttransporter/blob/1a31a01d168a6adff5473616665c5cbec20b401e/src/main/java/cubex2/mods/chesttransporter/ItemChestTransporter.java#L80

.getColonyByDimension(spawner.getSpawnerBaseLogic().spawnData.getNbt().getInteger(TAG_COLONY_ID), event.getWorld().provider.getDimension());

final World world = FMLCommonHandler.instance().getMinecraftServerInstance().getWorld(dimension);

commented

The chest transporter mod is causing the crash by sending the break event on clientside, while forge only ever sends it on serverside. So the chesttransporter mod should change that, as its likely to break with other mods aswell.

commented

Problem: Chest Transporter is an abandoned mod.
Solution: Disabling the ability to pick up a spawner in Chest Transporter. The mod Carry On can handle this task.