AgriCraft

AgriCraft

30M Downloads

Channel Interface

RlonRyan opened this issue ยท 13 comments

commented

We should make a channel API, so all water handling devices may be used interchangeably.

commented

They were integers at first, but that had huge FPS issues, so it was converted to a system with discrete fluid levels. Under the hood there still is the same functionality, however sometimes fluid would be created/deleted due to rounding, that's why there are floats.

commented

InfinityRaider@2c710e2 Removes the block updates on discrete fluid level changes, it might be possible to get rid of the discrete levels system, but this would require some testting.

commented

Yeah... I tried removing it, but the system is integrated so far into the rendering that it went beyond my capacity, as I am terrible with rendering. The main thing is that one of the functions rounds down into the 0-8? range and then back up to the full range, which is kinda nonsensical if you ask me.

commented

That was for Waila, because only the discrete level was synced to the client, now it is indeed redundant, I'll remove that.

commented

Or wait it wasn't, I remember now, its used to check if the fluid level is more than zero. so it would actually render a little bit of fluid if the first discrete level isn't reached yet, but there is fluid in there.

commented

Yeah... that class is hard to understand... all I know is that it seems to work... somehow...

commented

Also, lets try to convert to using ForgeDirection to represent directions. Hopefully, once the conversion is done, it won't be so easy to mess up the directions.

commented

That's a huge task, all of the rendering relies on that axis and direction crap :s

commented

I know.

commented

I think I got it! By implementing the ability to rotate lower down, I think the code gets shortened and ForgeDirection is automatically used.

commented

Also what's the whole thing with the discrete levels and all the floats? Wouldn't it be better just to use plain integers?

commented

Oops...

commented

Done.