![[EMF] Entity Model Features [Fabric & Forge]](https://media.forgecdn.net/avatars/thumbnails/983/284/256/256/638491564386011875.png)
[Bug] unleashed mob causes huge lag spikes
pelegST opened this issue ยท 8 comments
Unleashing a mob with nbt parameters in the cem properties file lags the game
To Reproduce
- Using a resource pack that utilizes the nbt parameters in the cem properties file, go to the edited mob
- Leash the mob using a lead
- Remove the lead by either right-clicking the leashed mob, or connecting the lead to a fence and then unleash the mob by right-clicking the fence
- Experience lag spikes when looking at the mob.
Expected behavior
No lag when Unleashing a mob
Screenshots
A video showing the problem:
https://vimeo.com/1082536483/6977e28fad?share=copy
In the video I leash and then unleash multiple cows causing lag spikes, I then look away and when the cows are off-screen the lag stops, I then look back at the cows and the lag returns. One thing I didn't show in the video is that exiting and then re-entering the world stops the lag.
Crashlog
Even when unleashing many mobs, I couldn't get the game to crash, however, I am using ATLauncher and I got the following error repeated many times in the console:
[Render thread/ERROR] [ETF]: nbt test crashed reading entity NBT.
(please complete the following information):
- Minecraft Version: 1.21.5
- EMF version: 2.4.3
- Does the issue persist with only EMF installed?: Yes
- if applicable, provide your modlist or log
latest.log
Additional context
I'm using fabric and I didn't test if the problem persists when using other mod-loaders.
can i see the properties?
Oh right I totally forgot to add it..
Some things to note: I renamed the properties file to .json because github didn't allow me to upload a .properties file, but obviously in the pack it is a regular .properties file.
Also the weights are so huge because some models have even more texture variants using ETF. and for some reason it only works when the total amount of the texture weights are smaller then the total amount of the models weights.
And as you'll see in the file, the reason I used the nbt parameters is to differentiate between the default cow variants.
that's all and thanks for the quick reply! (:
also you dont need " in properties thats a json thing
you want something like nbt.4.variant=raw:minecraft:cold
also use nbt.4.variant=print:raw:minecraft:cold
to test what it finds and nbt.4.variant=print_all:raw:minecraft:cold
to output all the nbt to the log
why dont you just use the variant specific models?
I might be wrong but I thought the variant specific models aren't supported by optifine yet, and I'm trying to make sure the pack works on both optifine and ETF
also you dont need " in properties thats a json thing
you want something like nbt.4.variant=raw:minecraft:cold
I just tried that and for some reason it applies the temperate cow textures on the cold cow model, so I'll keep the quotation marks for now...
also use
nbt.4.variant=print:raw:minecraft:cold
to test what it finds andnbt.4.variant=print_all:raw:minecraft:cold
to output all the nbt to the log
I don't know if I did that correctly but here's the log, all I did here was I entered the world and reproduced the leash bug on the adult cold cow.
HI I KNOW WHAT IS CAUSING THESE LAG SPIKES AND DONOT HAVE A SOLUTION

nbt test appears to be crashing, (having this issue while trying to make custom models for the seperate horse variations)
i dont know how this works internally but i would assume it is crashing when leash is cleared from nbt, beacause it is still looking for it despite not existing,
weirdly, this same thing appears to happen when using a mob like the new 'warm_cow' which doesnt appear to save a leash value?

it does however print in console so i think minecraft just hates me
