SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

[1.9.4] Cannot place or drop items #709

Closed XileForce closed 8 years ago

XileForce commented 8 years ago

Basically in sponge 1489 trying to place an item or block spams this in my console and the block doesnt place. if in survival mode it also removes the block from your hand.

[21:18:18] [Server thread/DEBUG] [mixin/]: Mixing MixinPacketUtil from mixins.common.exploit.json into org.spongepowered.common.network.PacketUtil
[21:18:18] [Server thread/TRACE] [mixin/]: Added class metadata for org/spongepowered/common/config/category/ExploitCategory to metadata cache
[21:18:18] [Server thread/INFO] [STDERR/]: [pokecube.core.events.handlers.SpawnHandler:doSpawnForLocation:598]: x:-56.0 y:88.0 z:248.0 50.461931 Scatterbug 1 Maximum was Scatterbug at 50.461931
[21:18:22] [Server thread/ERROR] [FML/]: Exception caught during firing event net.minecraftforge.event.entity.item.ItemTossEvent@51479cb1:
java.lang.NullPointerException
    at biomesoplenty.common.handler.ItemEventHandler.onItemToss(ItemEventHandler.java:23) ~[ItemEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_54_ItemEventHandler_onItemToss_ItemTossEvent.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:107) [EventBus.class:?]
    at org.spongepowered.mod.event.SpongeForgeEventFactory.callItemTossEvent(SpongeForgeEventFactory.java:1006) [SpongeForgeEventFactory.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeForgeEventFactory.callForgeEvent(SpongeForgeEventFactory.java:406) [SpongeForgeEventFactory.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:201) [SpongeModEventManager.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:253) [SpongeModEventManager.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:238) [SpongeModEventManager.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:138) [SpongeImpl.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.common.event.SpongeCommonEventFactory.callCreativeDropInventoryEvent(SpongeCommonEventFactory.java:603) [SpongeCommonEventFactory.class:1.9.4-1968-5.0.0-BETA-1489]
    at net.minecraft.network.NetHandlerPlayServer.func_147344_a(NetHandlerPlayServer.java:443) [mc.class:?]
    at net.minecraft.network.play.client.CPacketCreativeInventoryAction.func_148833_a(SourceFile:23) [jd.class:?]
    at net.minecraft.network.play.client.CPacketCreativeInventoryAction.func_148833_a(SourceFile:9) [jd.class:?]
    at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:121) [PacketUtil.class:1.9.4-1968-5.0.0-BETA-1489]
    at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$0(SourceFile:39) [fj$1.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [fj$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_92]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_92]
    at net.minecraft.util.Util.func_181617_a(SourceFile:45) [h.class:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:666) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:385) [lb.class:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:611) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:469) [MinecraftServer.class:?]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]
[21:18:23] [Server thread/ERROR] [FML/]: Index: 3 Listeners:
[21:18:23] [Server thread/ERROR] [FML/]: 0: NORMAL
[21:18:23] [Server thread/ERROR] [FML/]: 1: ASM: Ring_Magnet{Name=Ring_Magnet} onTossItem(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 2: ASM: Ring_NotLMagnet{Name=Ring_NotLMagnet} onTossItem(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 3: ASM: biomesoplenty.common.handler.ItemEventHandler@2e1e821c onItemToss(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 4: ASM: ItemMagnetRing{Name=magnetRing} onTossItem(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 5: ASM: ItemAesirRing{Name=aesirRing} onDropped(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 6: ASM: vazkii.morphtool.MorphingHandler@3e95874b onItemDropped(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 7: ASM: pokecube.core.events.handlers.PCEventsHandler@58f542bf playerTossPokecubeToPC(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 8: ASM: mods.flammpfeil.slashblade.item.TossEventHandler@7cae0b63 itemTossEvent(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:23] [Server thread/ERROR] [FML/]: 9: ASM: jotato.quantumflux.registers.EventRegister@2e3ad8a9 onItemToss(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:18:55] [Server thread/DEBUG] [FML/]: Gathering id map for writing to world save world
[21:19:05] [Server thread/ERROR] [FML/]: Exception caught during firing event net.minecraftforge.event.entity.item.ItemTossEvent@1734f548:
java.lang.NullPointerException
    at biomesoplenty.common.handler.ItemEventHandler.onItemToss(ItemEventHandler.java:23) ~[ItemEventHandler.class:?]
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_54_ItemEventHandler_onItemToss_ItemTossEvent.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:107) [EventBus.class:?]
    at org.spongepowered.mod.event.SpongeForgeEventFactory.callItemTossEvent(SpongeForgeEventFactory.java:1006) [SpongeForgeEventFactory.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeForgeEventFactory.callForgeEvent(SpongeForgeEventFactory.java:406) [SpongeForgeEventFactory.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:201) [SpongeModEventManager.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:253) [SpongeModEventManager.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:238) [SpongeModEventManager.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:138) [SpongeImpl.class:1.9.4-1968-5.0.0-BETA-1489]
    at org.spongepowered.common.event.SpongeCommonEventFactory.callCreativeDropInventoryEvent(SpongeCommonEventFactory.java:603) [SpongeCommonEventFactory.class:1.9.4-1968-5.0.0-BETA-1489]
    at net.minecraft.network.NetHandlerPlayServer.func_147344_a(NetHandlerPlayServer.java:443) [mc.class:?]
    at net.minecraft.network.play.client.CPacketCreativeInventoryAction.func_148833_a(SourceFile:23) [jd.class:?]
    at net.minecraft.network.play.client.CPacketCreativeInventoryAction.func_148833_a(SourceFile:9) [jd.class:?]
    at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:121) [PacketUtil.class:1.9.4-1968-5.0.0-BETA-1489]
    at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$0(SourceFile:39) [fj$1.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [fj$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_92]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_92]
    at net.minecraft.util.Util.func_181617_a(SourceFile:45) [h.class:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:666) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:385) [lb.class:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:611) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:469) [MinecraftServer.class:?]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_92]
[21:19:05] [Server thread/ERROR] [FML/]: Index: 3 Listeners:
[21:19:05] [Server thread/ERROR] [FML/]: 0: NORMAL
[21:19:05] [Server thread/ERROR] [FML/]: 1: ASM: Ring_Magnet{Name=Ring_Magnet} onTossItem(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 2: ASM: Ring_NotLMagnet{Name=Ring_NotLMagnet} onTossItem(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 3: ASM: biomesoplenty.common.handler.ItemEventHandler@2e1e821c onItemToss(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 4: ASM: ItemMagnetRing{Name=magnetRing} onTossItem(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 5: ASM: ItemAesirRing{Name=aesirRing} onDropped(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 6: ASM: vazkii.morphtool.MorphingHandler@3e95874b onItemDropped(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 7: ASM: pokecube.core.events.handlers.PCEventsHandler@58f542bf playerTossPokecubeToPC(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 8: ASM: mods.flammpfeil.slashblade.item.TossEventHandler@7cae0b63 itemTossEvent(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
[21:19:05] [Server thread/ERROR] [FML/]: 9: ASM: jotato.quantumflux.registers.EventRegister@2e3ad8a9 onItemToss(Lnet/minecraftforge/event/entity/item/ItemTossEvent;)V
Zidane commented 8 years ago

Incompatibility with biomes o plenty and us

@gabizou

I think your item pre-merge is to blame. That needs to be reverted, these methods should never be passing null stacks.

XileForce commented 8 years ago

alright I wasn't sure who to post this to. thanks for letting me know.

gabizou commented 8 years ago

I think your item pre-merge is to blame. That needs to be reverted, these methods should never be passing null stacks.

Potentially, but the stacks shouldn't be null, the entities shouldn't be null to begin with? To simply toggle it, override one of the methods in the PacketPhase to ignorePreMerging and it will allow items to be spawned as normal.

The pre-merging system is designed to be toggle able based on not only the config option, but also the phase states themselves.

TLDR: You can disable item pre-merging until I fix this tomorrow in the global.conf under optimizations.drops-pre-merge

XileForce commented 8 years ago

Shall I try disabling pre merging in the config and see if the issue is resolved?

gabizou commented 8 years ago

It won't resolve the issue, it'll just disable the bit of code that is causing the issue. Item pre-merging is a good optimization overall for various cases, just not a very well tested feature where mods are concerned (as some contracts are intentionally broken, and others are not intentionally broken, such as in this case of BoP breaking). Yes, if you want it to work properly, disable it in the config, then tomorrow when I close this issue with the fix, you can re-enable it again :)

XileForce commented 8 years ago

thanks! ill give it a shot for the time being