Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPCs don't appear when placed #578

Closed
wadewegner opened this issue Jan 25, 2018 · 20 comments
Closed

NPCs don't appear when placed #578

wadewegner opened this issue Jan 25, 2018 · 20 comments

Comments

@wadewegner
Copy link
Contributor

wadewegner commented Jan 25, 2018

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?

@wadewegner
Copy link
Contributor Author

image

Same behavior enemy NPCs, but notice that I placed Custom 1 Mounted Archers and the horses appear but the NPCs don't.

(I'm still getting riddled with bullets though.)

Makes me think that perhaps the NPCs are there, but invisible?

Quirky.

@wadewegner
Copy link
Contributor Author

wadewegner commented Jan 25, 2018

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.

@P3pp3rF1y
Copy link
Owner

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.

@wadewegner
Copy link
Contributor Author

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

@P3pp3rF1y
Copy link
Owner

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?

@wadewegner
Copy link
Contributor Author

I first saw this on a dedicated server. But I also see it locally in a single player game.

@wadewegner
Copy link
Contributor Author

How can I get you logs or debug info to help? I'm very willing to. Thanks!

@P3pp3rF1y
Copy link
Owner

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

@wadewegner
Copy link
Contributor Author

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.

@wadewegner
Copy link
Contributor Author

image

Even placing archers shows that something's there. They're firing arrows like crazy.

@wadewegner
Copy link
Contributor Author

Well, I could be wrong. Maybe there's value in this log?

https://gist.github.com/wadewegner/359e7fe8031617562cea40a6db90efd1

@wadewegner
Copy link
Contributor Author

[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

@wadewegner
Copy link
Contributor Author

@P3pp3rF1y Anything else I can get for you?

@wadewegner
Copy link
Contributor Author

wadewegner commented Jan 25, 2018

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.

@P3pp3rF1y
Copy link
Owner

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.

@P3pp3rF1y
Copy link
Owner

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.

@wadewegner
Copy link
Contributor Author

I removed all other mods. I only have CodeChickenLib-1.12.2-3.1.5.331-universal.jar which is a dependency.

@wadewegner
Copy link
Contributor Author

wadewegner commented Jan 25, 2018

I posted a link to the gist above that shows logs in its entirety. No other errors that I can see.

@wadewegner
Copy link
Contributor Author

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!

@P3pp3rF1y
Copy link
Owner

Well, doesn't seem like i have helped much here :). Nice find, I wouldn't have imagined that forge would be issue, they probably included bad version of netty (the component responsible for packet handling) back then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants