Reinventing the boolean #TrainsInMotion 0.2.6 #Traincraft rewrite

First day in a week I've actually been awake. Screw coffee, Subway's sweet tea is some strong stuff.

Most of my day ended up being lost to reinventing the boolean so I can sync data between client and server better. Why? Because Datawatchers are more efficient than making my own packets (thinking about it, I should rewrite this again tomorrow, I have an idea to simplify it more.....)

The basic idea is using a BitSet as a list of booleans, and when we need to transfer it, convert it to a long that we can cast to an int which we can sync over the datawatcher.

Plus side I did cover most of the fuel management stuff yesterday, so, yay, progress you can see.

All the changes since 0.2.5, the 0.2.6 release changelog is not gonna be fun to make....

And the usual changelog:
- Booleans are now stored as bytes in an int, and synced through the datawatcher.
- Added fuel efficiency to the API.
- Removed the redundant explosion from the damage function.
- Fixed the datawatcher sync, now it only updates when it's supposed to.
- Fluids now more properly support nulls.
- FuelHandler now properly gets the fluid value of the item from the FluidContainerRegistry, this adds support for 3rd party fluid containers.
- Simplified the calculation for fuel use, still not accurate, but it's a lot closer.
- Fixed some GL errors in the GUIs and the player render.
- Reworked the button ID's in the TransportGUI, it's a little more efficient but the code is much simpler.

Comments