NPCs don't appear when placed
wadewegner opened this issue ยท 20 comments
Having a challenge where, after an NPC (e.g. worker) is created and we attempt to place it, it disappears from inventory but never appears. Then we seem to get some glitchy behavior near the area it was placed, such as the inability to place blocks and such.
ancientwarfare-1.12.2-2.5.54.jar
CodeChickenLib-1.12.2-3.1.5.331-universal.jar
Any ideas?
Sharing additional information, hoping it helps:
- Somehow my research book disappeared. Which sucks, because I had accomplished quite a bit
- In fact, I had a lot of materials (research book included) at the engineering station. They're all gone.
- Around the area I tried to place the NPC I'm now having issues placing any kind of block. They disappear.
where did you download the mod from? I am pretty sure that I have never released a mod jar with that name.
You should really only get AW from curseforge and you can see the file format there that includes proper version number.
Sorry, I shared the wrong name (I'll update).
ancientwarfare-1.12.2-2.5.54.jar
https://minecraft.curseforge.com/projects/ancient-warfare-2/files/2521491
It works correctly for me in dev. Are you getting this on dedicated server perhaps?
And do you see anything in logs when you place these NPCs?
I first saw this on a dedicated server. But I also see it locally in a single player game.
In the minecraft instance folder there's logs folders and latest.log is what you would be looking for (at least in the case of single player). Then just place it on pastebin / hastebin and paste the link to that here
I don't see anything useful there. When placing (or, in this case, not placing) and NPC, it doesn't log anything into any of the logs.
Well, I could be wrong. Maybe there's value in this log?
https://gist.github.com/wadewegner/359e7fe8031617562cea40a6db90efd1
[11:39:35] [main/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.RuntimeException: A severe problem occurred during the spawning of an entity at (137.5, 64.0, -397.5)
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_74]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_74]
at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1086) [bib.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:397) [bib.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: java.lang.RuntimeException: A severe problem occurred during the spawning of an entity at (137.5, 64.0, -397.5)
at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:134) ~[EntitySpawnHandler.class:?]
at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.process(EntitySpawnHandler.java:63) ~[EntitySpawnHandler.class:?]
at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.lambda$channelRead0$0(EntitySpawnHandler.java:55) ~[EntitySpawnHandler.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_74]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_74]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?]
... 9 more
Caused by: io.netty.util.IllegalReferenceCountException: refCnt: 0
at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1408) ~[AbstractByteBuf.class:4.1.9.Final]
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1394) ~[AbstractByteBuf.class:4.1.9.Final]
at io.netty.buffer.AbstractByteBuf.readLong(AbstractByteBuf.java:792) ~[AbstractByteBuf.class:4.1.9.Final]
at net.shadowmage.ancientwarfare.npc.entity.NpcBase.readSpawnData(NpcBase.java:779) ~[NpcBase.class:?]
at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:128) ~[EntitySpawnHandler.class:?]
at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.process(EntitySpawnHandler.java:63) ~[EntitySpawnHandler.class:?]
at net.minecraftforge.fml.common.network.internal.EntitySpawnHandler.lambda$channelRead0$0(EntitySpawnHandler.java:55) ~[EntitySpawnHandler.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_74]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_74]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?]
... 9 more
@P3pp3rF1y Anything else I can get for you?
Would you mind sharing what version of Forge you're using? Having just set this up, I'm on forge-1.12.2-14.23.1.2604
. Seeing that the EntitySpawnHandler
is in the dump, it makes me wonder if there's some strange interaction at play between the two.
14.23.1.2559 in my test modpack where it works for me as well in addition to dev where I am on 14.23.0.2549.
What i am getting from that error log above is that for some reason part of the packet that's sent when entity is spawned disappears. Not sure entirely what could be doing that for you, but if you have more mods in the pack I would try removing them to see which one does that. Of course best to keep a backup of your world in that case as that is inevitably going to remove items/blocks from the world that those mods used.
Actually if you can check the log for any additional errors that may be happening earlier than this one that may help as it may be an issue happening when the packet is being compiled.
I removed all other mods. I only have CodeChickenLib-1.12.2-3.1.5.331-universal.jar
which is a dependency.
I posted a link to the gist above that shows logs in its entirety. No other errors that I can see.
Okay, I figured it out. Oy.
In downloading forge 14.23.1.2559 (to mimic you) I noticed that in my client I was launching an old 1.12.2 forge client (14.23.0.2538 to be exact). Updating it to 2559 fixed the issue.
Thanks for talking me through this!