Advertisement
42Scope42

Suggested Vanilla Block Model Modifications

Nov 27th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. Suggested Vanilla Block Model Modifications
  2.  
  3. These are additions to the vanilla system and should not prevent any models made using the current vanilla system from working
  4.  
  5. Add a "default" tag at the beginning of the blockstates file
  6. - eg. "default": { "model": "base_model" },
  7. - The default model could be left blank if the variants have no common model parts ("model": "")
  8. - If present the game is then to stack all relevant variants with the specified default model
  9. - Also, if present each variant does not need all the block states to have a specified state ie. some can be left out
  10.  
  11. Allow the block states to use not equal (!=) as well as equal(=)
  12. - eg. in the redstone wire file the direction states can be up, side or none, so instead of needing:
  13. "east=none,north=up,west=none": { "model": "redstone_n" },
  14. "east=none,north=side,west=none": { "model": "redstone_n" },
  15. you could have the simpler:
  16. "east=none,north!=none,west=none": { "model": "redstone_n" },
  17.  
  18. These additions should make it much easier for modders to make their model files and can even improve some of the vanilla models.
  19. - eg. they change a theoretical block (described here: http://imgur.com/a/FyyJX) from needing a blockstates file just over 2^54 lines long to only needing something like this: http://pastebin.com/Eg8YXruK resulting in a file size change of approx. 9 exabytes to less than 4KB. This also reduces the number of model files needed from 2^54 to 10 (or at most 55).
  20.  
  21. Example modified vanilla blockstates files with resulting changes to vanilla files:
  22. Redstone wire: http://pastebin.com/Y06uJJYr
  23. Variants: 81 -> 18, Model files: 24 -> 6 (-19,+1), Blockstates file size: 9KB -> 2KB.
  24.  
  25. Fire: http://pastebin.com/8BzwQBwP
  26. Variants: 192 -> 25, Model files: 95 -> 12 (-83), Blockstates file size: 23KB -> 3KB.
  27.  
  28. Tripwire: http://pastebin.com/mJtPmz5K
  29. Variants: 64 -> 40, Model files: 20 -> 8 (-16,+4), Blockstates file size: 9KB ->5KB.
  30.  
  31. An alternate tripwire with added complexity to make the file less than 4KB: http://pastebin.com/gdWJZxQm
  32. Here I used nested variant block states just to reduce the file size. Nested states are probably unnecessary as the other changes suggested should prevent the need for a ridiculous number of model files so the actual file size is less important.
  33. I don't know how I'd count the number of variants in this. Model files 8, Blockstates file size: 4KB.
  34.  
  35. All the other blockstates files, apart from stairs which don't look to be easily simplifiable, are less than 4KB in size so modification to use these additions would make little difference.
  36. (Attempts to get file sizes below 4KB, while completely unnecessary with only a few files, is due to the windows file allocation unit defaulting to blocks of 4KB)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement