mojira.dev
MC-136152

Placing mob spawner renders a pig for up to a second

The bug

In current versions:

/give @p spawner{BlockEntityTag:{SpawnData:{entity:{id:creeper}},Delay:10000}}

results in the mob spawner rendering pig for 0.1-1 full second before going back to the right render of the specified mob.

In older versions between 1.8-1.8.1 for sure this did not occur.
In 1.8.1:

/give @p spawner{BlockEntityTag:{EntityId:Creeper,Delay:10000}}

Solutions

Make blank spawners always blank (force people to use pig spawners with the blockdata). Then it simply won't render till the client gets its data. I don't recommend this approach as it's not instant when the client already has the data of nbt from the itemstack. I recommend the below solution.

Backport code to 1.8 where the blockentitytag was placed on both client and server side note that 1.8 had an issue with render as well not noticeable until porting the code to spawners newer then 1.10 where horses will render two different models only to the person placing the spawner. This is fixed by the server not sending a packet to the placer if a block entity tag was placed but, everyone else should get the packet.

Attachments

Comments 20

The pig isn't shown for one second, more for one tick.

yes it is look closely after placing 10 spawners really fast it renders a different model and pink for example place a parrot spawner on a server with lag you will see the pig every time. Although I had to deal with fixing this bug so I notice it everytime but, in order for you to notice it fully experience lag it renders pig the first tick to 0.3 seconds at least sometimes before it renders the proper entity. 

Anyways just posted pics for you to view I had to clutch it since it does correct itself in < 1 second usually but, it's about 1 second in 1.13+

Yes this is vanilla I do not say otherwise until after I test it.

 

Please do not mark unreleased versions as affected.
You don't have access to them yet.

As I said, it's around a split second, maybe on tick for me in 1.13.1

well 1 second is the max but, it shouldn't render improperly at all.

10 more comments

Can confirm in 1.19.

Can confirm in 1.19.2.

I'm pretty sure that this issue has been fixed in 22w44a, though it's slightly hard to tell due to the nature of this bug only occurring for a split second. I've tried to recreate the observed behavior for only five minutes now, only to be unsuccessful. Would someone mind reinforcing my claim here and double-checking if this problem has been fixed? I'd greatly appreciate it; thank you! 🙂

I tested it on a pretty bad laptop in 22w44a about 15-20 times and didn´t find a single frame of pig, so I think I can say it´s resolved 🙂 I attached the mp4 in the files, but I had to cut it short to match the max file size

Alright; sweet. I'll put in a request for this ticket to be resolved as fixed in the Mojira Discord. Just for clarity, this issue was present in 22w43a, but no longer occurs in 22w44a, meaning that this problem was fixed in 22w44a.

jredfox

(Unassigned)

Confirmed

Networking

Minecraft 1.13, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, ..., 1.17, 1.17.1, 1.18.2, 1.19, 1.19.2

22w44a

Retrieved