OpenBlocks

OpenBlocks

56M Downloads

Sprinklers animation cannot be disabled.

drangorinja opened this issue ยท 6 comments

commented

I tried all in game options with no success. So i decided to look at the code in question.

private void sprayParticles() {
    if (tank.getFluidAmount() > 0) {
        // 0 = All, 1 = Decreased, 2 = Minimal
        final int particleSetting = Minecraft.getMinecraft().gameSettings.particleSetting;
        if (particleSetting > 2) return;

If my logic is not wrong, shouldn't it be particleSetting >= 2 or particleSetting > 1?

commented

Expected. "Minimal" does not mean "none". Particles are only indicator that sprinkler is working, so I've chosen to leave some even on minimal setting.

Check protects against broken configurations, since next line would crash if particleSetting > 2.

commented

Okay. Then I understand better.
Then is it possible to get it in the config file if they should animate at all?
I do like the aesthetics but it's always nice to be able to disable things that require cputime.
I'm just profiling things in my base to see if there are optimizations that could be made on my end.

https://dl.dropboxusercontent.com/u/60387/Screenshot%202015-10-27%2017.45.58.png

Is what I get with 80 sprinklers.

commented

As I said, no particles = no work indication. It's not just aesthetics. I don't have any alternative, since I can't change texture like furnace, etc.

And 3 particles / 1s / sprinkler sounded like sensible value, but I can still tweak it.

commented

Not to sound condescending but don't torches create more particles than that? Is the sprinkler really a performance issue?

commented

You might be totally true on that. I don't have the data there. Difference though is that i can disable torches' particles by putting my particle setting to minimal. That means they have a good scaling for large quantities of them. This is not as much of an issue as a feature request. That being able to disable particles gives the sprinkler really good scaleability for any persons system. If said feature is hidden really far into some config file so normal users can't find it, I won't mind. I just like the ability to customize what is, and what isn't using cputime.

commented

Closing for now. Right now I have no idea how to indicate work without particles, but I think current settings should be enough for most cases.