RavinMaddHatter / Structura

This is a project to make a sort of analog to litematica for bedrock
MIT License
242 stars 41 forks source link

lightning rods #129

Open RavinMaddHatter opened 2 years ago

Machbar24 commented 11 months ago

@RavinMaddHatter Lightning rods are defined as a "cube" shape in block_definition.json. The default dimensions in block_shapes.json defines a full block or (1,1,1). Should I be looking to define a cube variant in block_shapes . Does Structura reference the variants by name ie lightning_rod? Thanks

RavinMaddHatter commented 11 months ago

The string that is in block definitions is used to look up the data in rotations, block shapes, and UI. So you can define a new "lightning" rod string in the block definitions then make new objects in the other 3 files that are specific to lighting rods.

Hopefully that makes sense. I set everything to cube until someone gets a chance to update it the shape and other properties. The operations is

Get block Name Look in Vanilla_Resource_Pack\blocks.json for the texture classification Look in Vanilla_Resource_Pack\textures\terrain_texture.json for the PNG files for each side Look in lookups\nbt_defs.json for what nbt keys mean (this is chaos and i have to clean it up, Data is type string is used in the shape file, Variant is type int but hopefully going away, rot is type string and references the keys in the rotation files, top is bool) look in lookups\block_definition.json for what "classification" of block something is Look in lookups\block_shapes.json the shape for that "classification" of block, then use "data" values to select shape variants like show layer height Look in lookups\block_rotation.json for the classification found in block_definition then look up the rotation for the block from the NBT value classified as rot Look in lookups\block_uv.json for the texture offsets for the block_definition and "data" value.

Previously this was all hard-coded. but since writing the json importer mojang changes a bunch of stuff and i think i need to refactor, but i dont want to do that until after mojang finishes flattening blocks. Planks and stones are in 1.20.50.... so we are getting closer.

Machbar24 commented 11 months ago

Complete in Decorative Block Update