copygirl / WearableBackpacks

Minecraft mod which adds beautiful, balanced backpacks
MIT License
61 stars 35 forks source link

Error on interact with BP in a non allowe interaction (Multiplayer) #77

Open FabioZumbi12 opened 6 years ago

FabioZumbi12 commented 6 years ago

Hi,

I using this mod in a Sponge server, and with a plugin to deny interaction and block placement in one specific world.

I getting this error on try to interact with a BP ins a non interactable BP, where a plugin cancel the interaction by sponge event listeners:

[21:54:53] [Server thread/FATAL] [net.minecraft.server.MinecraftServer]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_162]
        at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_162]
        at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?]
        at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:277) [SpongeImplHooks.class:1.12.2-2655-7.1.0-BETA-3064]
        at net.minecraft.server.MinecraftServer.redirect$onRun$zjg000(MinecraftServer.java:3975) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:721) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:666) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:524) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_162]
Caused by: java.lang.NullPointerException
        at net.mcft.copy.backpacks.block.BlockBackpack.func_180639_a(BlockBackpack.java:148) ~[BlockBackpack.class:?]
        at net.minecraft.server.management.PlayerInteractionManager.func_187251_a(PlayerInteractionManager.java:1268) ~[or.class:?]
        at net.minecraft.network.NetHandlerPlayServer.redirect$onProcessRightClickBlock$zil000(NetHandlerPlayServer.java:2393) ~[pa.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_184337_a(NetHandlerPlayServer.java:739) ~[pa.class:?]
        at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:55) ~[ma.class:?]
        at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.func_148833_a(SourceFile:11) ~[ma.class:?]
        at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:150) ~[PacketUtil.class:1.12.2-2655-7.1.0-BETA-3064]
        at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zlb000(SourceFile:539) ~[hv$1.class:?]
        at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_162]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_162]
        at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?]
        ... 7 more

WBP Version: WearableBackpacks-1.12.2-3.1.2.jar Forge version: forge-1.12.2-14.23.3.2655

Edit: Testing now and the BP still disapearing when i try to place the BP in a not allowed region, but now without errors, only on interaction.

copygirl commented 6 years ago

Besides the error, this is still the same issue as #41? (Should I close that one, now?) What changed that made the error go away? A differerent plugin?

I suspect it might still be difficult for anyone to work around Sponge / Forge when they do something non-standard as I am. I was considering doing #14 but I didn't get around to that. Also I've stopped working on WBs for now.