2

Blockstates cause Lag?

BarrowWight_Scarecrowman 12/26/21 5:09 pm history
240
1/19/2022 9:40 pm
Hey,

I am using blockstates variation to change the terrain in a texturepack/resourcepack. I have made seperate models to change occasional blocks. However, I seem to be getting lag and spikes from utilizing this trick. Does anybody know if lag is typical of blockstates, or have I forgotten to modify the custom .json models somehow to optimize their rendering?

Currently I'm working on tree fringe which is something often used in packs, but I also added variation to sand blocks.

Any reply would be greatly appreciated, and I'll credit your assistance in the next update of my pack.

Classic Default DX.
Posted by
BarrowWight_Scarecrowman
Level 44 : Master Crafter
47

  Have something to say?

JoinSign in

4

WhoAteMyButter
12/27/2021 12:07 am
Level 43 : Master System
Not really. Blockstates are used everywhere. Maybe there's some sort of bottleneck in your system.
1
BarrowWight_Scarecrowman
12/27/2021 12:38 am
Level 44 : Master Crafter
history
Thanks for the reply. I didn't think there should be issues with blockstates. I noticed that when my custom foliage blocks had more geometry faces, and were set higher in weight variance, my game slowed down significantly. Especially when I loaded new chunks exploring, as apposed to when I loaded without the pack.

I am also playing with shaders FYI. But normally the shaders work fine.
2
Lordslash2007
01/07/2022 2:17 am
Level 26 : Expert Nerd
If your playing with shaders that makes a massive difference because every second optifine updates the blockstates a bunch depending on the quality of biome blending you have. Even just playing with optifine and no shaders will still cause lag depending on the biome blending.
2
BarrowWight_Scarecrowman
01/19/2022 9:40 pm
Level 44 : Master Crafter
I actually figured out the issue. The problem wasn't my shaders, it was the fact that I wasn't 'culling' the unseen faces of custom blocks. Basically, the use of culling will tell Minecraft not to render faces that aren't exposed to the open air when they're placed. It is clear that my custom blocks were rendering every face all the time. No wonder there was lag.

-Cheers ^,..,^
2

Welcome