Channel Interface
RlonRyan opened this issue ยท 13 comments
We should make a channel API, so all water handling devices may be used interchangeably.
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.
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.
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.
That was for Waila, because only the discrete level was synced to the client, now it is indeed redundant, I'll remove that.
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.
Yeah... that class is hard to understand... all I know is that it seems to work... somehow...
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.
That's a huge task, all of the rendering relies on that axis and direction crap :s
I think I got it! By implementing the ability to rotate lower down, I think the code gets shortened and ForgeDirection is automatically used.
Also what's the whole thing with the discrete levels and all the floats? Wouldn't it be better just to use plain integers?