gkazan / ZAWA

The Zoo & Wild Animals Mod
10 stars 3 forks source link

[Bug] Server Crash with RfTools Query and Zawa #200

Open Pyario opened 3 years ago

Pyario commented 3 years ago

Describe the bug

The server crashes when the query from RfTools hits a block from Zawa. I suspect it is a mistake by Zawa.

To Reproduce

  1. Start query from Rftools and wait until it hits a block from Zawa

Crash Report or Game Log java.lang.NullPointerException: Ticking block entity at net.minecraft.entity.player.EntityPlayerMP.func_70670_a(EntityPlayerMP.java:1187) at net.minecraft.entity.EntityLivingBase.func_70690_d(EntityLivingBase.java:751) at org.zawamod.init.ZAWABlocks$4.canEntityDestroy(ZAWABlocks.java:153) at mcjty.rftools.blocks.builder.BuilderTileEntity.allowedToBreak(BuilderTileEntity.java:1117) at mcjty.rftools.blocks.builder.BuilderTileEntity.commonQuarryBlock(BuilderTileEntity.java:1156) at mcjty.rftools.blocks.builder.BuilderTileEntity.quarryBlock(BuilderTileEntity.java:1126) at mcjty.rftools.items.builder.ShapeCardType.handleSingleBlock(ShapeCardType.java:195) at mcjty.rftools.blocks.builder.BuilderTileEntity.handleSingleBlock(BuilderTileEntity.java:1035) at mcjty.rftools.blocks.builder.BuilderTileEntity.handleBlockShaped(BuilderTileEntity.java:977) at mcjty.rftools.blocks.builder.BuilderTileEntity.checkStateServerShaped(BuilderTileEntity.java:701) at mcjty.rftools.blocks.builder.BuilderTileEntity.checkStateServer(BuilderTileEntity.java:741) at mcjty.rftools.blocks.builder.BuilderTileEntity.func_73660_a(BuilderTileEntity.java:715) at net.minecraft.world.World.func_72939_s(World.java:1838) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) at java.lang.Thread.run(Thread.java:748)

Please complete the following information):

gkazan commented 3 years ago

That line points to this cast which is checked before done. if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; player.addPotionEffect(new PotionEffect(MobEffects.POISON, 50, 1)); } Would be the second line in the block there. Is it happening with every block or specifically the small sea urchin which this points too?

Pyario commented 3 years ago

Well, it definitely happens when the builder(with Quarray Shape Card) from Rftools is in the ocean, i.e. where there are sea urchins (I would guess because that's logical), but then I don't know why it crashes. I just tried it in single player exactly the same thing crashed again. So he tries to destroy "Entity", but it doesn't work and then it crashes. Here is the full crash log, maybe. can you do more with it ^^ I'm not so good at recognizing that ^^

Link to Crash log: https://pastebin.com/H78yW2Ht

P.s: I think I know why it crashes. When the builder of Rftools is set up in the ocean and a "sea urchin" hits it crashes. The only question is whether it is due to Zawa or Rftool? :)

gkazan commented 3 years ago

I don't believe there is any way it can be the fault of zawa. If I didn't have that if statement I would expect errors, but I do have it. You have a lot of core mods which could also be causing the issue. My suggestion would be to ask the Rftool devs about this.