Opening chests with the luck potion effect and AppleTreesRev causes error
tharrmeehan opened this issue ยท 4 comments
Opening generated chests, which got a loottable while having the luck potion effects applied creates an error in the logfile and no items are being generated in the chest.
The following error is present:
[31Jul2021 08:55:04.682] [Server thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Server
java.lang.NullPointerException: null
at net.minecraft.enchantment.EnchantmentHelper.func_77506_a(EnchantmentHelper.java:35) ~[?:?]
at dav.mod.world.loot.GlobalLootModifiers$LuckyGlobalModifier.doApply(GlobalLootModifiers.java:53) ~[appletreesrev:1.0]
at net.minecraftforge.common.loot.LootModifier.apply(LootModifier.java:53) ~[forge:?]
at net.minecraftforge.common.ForgeHooks.modifyLoot(ForgeHooks.java:1314) ~[forge:?]
at net.minecraft.loot.LootTable.func_216113_a(LootTable.java:86) ~[?:?]
at net.minecraft.loot.LootTable.func_216118_a(LootTable.java:106) ~[?:?]
at net.minecraft.tileentity.LockableLootTileEntity.func_184281_d(SourceFile:81) ~[?:?]
at net.minecraft.tileentity.LockableLootTileEntity.createMenu(SourceFile:159) ~[?:?]
at net.minecraft.entity.player.ServerPlayerEntity.func_213829_a(ServerPlayerEntity.java:890) ~[?:?]
at net.minecraft.block.ChestBlock.func_225533_a_(ChestBlock.java:234) ~[?:?]
at net.minecraft.block.AbstractBlock$AbstractBlockState.func_227031_a_(AbstractBlock.java:640) ~[?:?]
at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:338) ~[?:?]
at net.minecraft.network.play.ServerPlayNetHandler.func_184337_a(ServerPlayNetHandler.java:958) ~[?:?]
at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.func_148833_a(SourceFile:36) ~[?:?]
at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.func_148833_a(SourceFile:10) ~[?:?]
at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:36) ~[?:?]
at net.optifine.util.PacketRunnable.run(PacketRunnable.java:28) ~[?:?]
at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(ThreadTaskExecutor.java:189) ~[?:?]
at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:734) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:159) ~[?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(ThreadTaskExecutor.java:151) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:717) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:711) ~[?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(ThreadTaskExecutor.java:128) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:696) ~[?:?]
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:646) ~[?:?]
at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_301]
This might be an incompatibility but I'm not sure.
I Confirm the Bug, Chests are not generating Loottable content while having Luck Effect, I'll be Fixing the bug for the next Version, Thanks for the Feedback <3
I'm currently using AppleTreesRev-Forge-1.16.5-v2.1 on 1.16.5, my Forge version is 36.2.2.