Serialize the charge def for nodes (except battery supplier)
liach opened this issue ยท 4 comments
See 7316d4d
I edited the charge system for a few purposes below:
- #1036 Interfacing charge system (block)
- #1413 Fix tile interaction issues with the batteries
- Serializing nodes to the world so that they don't require a chunk load to be loaded again.
- Use breath first search to prevent stack overflows (Player suggested using bfs over dfs/recursion)
- Rename so concepts are clearer (also move some classes out of subclasses)
Now I totally move batteries to blocks. Tiles should always retrieve when needed. Block#onBlockAdded
is always called before the te is loaded, so the code is safe.
Because the names of files were reverted. See https://github.com/Railcraft/Railcraft/blob/7316d4d495f7f11df052121174562cf0fa57d045/src/main/java/mods/railcraft/common/blocks/charge/ChargeSaveData.java
Hmm... you just serialize the ChargeDef, I can see that working pretty well. I hadn't considered that.