MineColonies

MineColonies

57M Downloads

Size Achievement trigger bug & enhancement

Isfirs opened this issue ยท 1 comments

commented
[20:11:42] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.NullPointerException
        at com.minecolonies.colony.Colony.lambda$checkAchievements$12(Colony.java:728) ~[Colony.class:?]
        at com.minecolonies.colony.Colony.lambda$null$15(Colony.java:743) ~[Colony.class:?]
        at java.util.ArrayList.forEach(ArrayList.java:1249) ~[?:1.8.0_101]
        at com.minecolonies.colony.Colony.lambda$checkAchievements$16(Colony.java:743) ~[Colony.class:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_101]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_101]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_101]
        at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1620) ~[?:1.8.0_101]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_101]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_101]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_101]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_101]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_101]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_101]
        at com.minecolonies.colony.Colony.checkAchievements(Colony.java:743) ~[Colony.class:?]
        at com.minecolonies.colony.Colony.spawnCitizen(Colony.java:710) ~[Colony.class:?]
        at com.minecolonies.colony.Colony.spawnCitizen(Colony.java:665) ~[Colony.class:?]
        at com.minecolonies.colony.Colony.onWorldTick(Colony.java:411) ~[Colony.class:?]
        at com.minecolonies.colony.ColonyManager.lambda$onWorldTick$62(ColonyManager.java:419) ~[ColonyManager.class:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_101]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_101]
        at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1620) ~[?:1.8.0_101]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_101]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_101]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_101]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_101]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_101]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_101]
        at com.minecolonies.colony.ColonyManager.onWorldTick(ColonyManager.java:419) ~[ColonyManager.class:?]
        at com.minecolonies.event.FMLEventHandler.onWorldTick(FMLEventHandler.java:46) ~[FMLEventHandler.class:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_42_FMLEventHandler_onWorldTick_WorldTickEvent.invoke(.dynamic) ~[?:?]
        at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49) ~[ASMEventHandler.class:?]
        at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140) ~[EventBus.class:?]
        at net.minecraftforge.fml.common.FMLCommonHandler.onPreWorldTick(FMLCommonHandler.java:274) ~[FMLCommonHandler.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:686) ~[MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:344) ~[ko.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:605) ~[MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:481) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
[20:11:42] [Server thread/ERROR]: This crash report has been saved to: /home/marvin/Minecraft/MineColonies/MinecolonyMain/./crash-reports/crash-2016-08-31_20.11.42-server.txt

Fixing this and enhancing the MineColonies Achievements as this:

  • Colony achievements mainly trigger on the owner!
  • Then each achievement taken by the owner will be triggered on each player in the permission list
  • If a new player joins the colony, the achievements taken by the owner will be triggered on him to sync the colony state
commented

๐Ÿ‘