The Meaning of Life, the Universe, and Everything.
Join Date:
5/7/2015
Posts:
55
Minecraft:
OrangeVillager61
Member Details
Hello! Is there any way to view buildings and convert them into code? Basically I'm not really into building buildings and then dividing them into layers and putting layer by layer into code. This would be very helpful.
You can use Structure Blocks to save a structure to NBT and then generate it later.
For examples, look at ComponentScatteredFeaturePieces.Igloo, WorldGenFossils, StructureEndCityPieces and WoodlandMansionPieces.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You can use Structure Blocks to save a structure to NBT and then generate it later.
For examples, look at ComponentScatteredFeaturePieces.Igloo, WorldGenFossils, StructureEndCityPieces and WoodlandMansionPieces.
Okay, so I have made and saved two structures, how do I read the NBT and convert it to using code since there are a few functions that need to be in it?
Okay, so I have made and saved two structures, how do I read the NBT and convert it to using code since there are a few functions that need to be in it?
You can take a look at how I load nbt structures here
Okay, so I have made and saved two structures, how do I read the NBT and convert it to using code since there are a few functions that need to be in it?
You don't convert the NBT to code, you load the structure from NBT in your world generator.
You can use Structure Blocks in Data Mode to run custom logic for specific positions (e.g. generate a chest with a specific loot table or spawn a mob). Either override StructureComponentTemplate#handleDataMarker or use Template#getDataBlocks to implement this custom logic.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You don't convert the NBT to code, you load the structure from NBT in your world generator.
You can use Structure Blocks in Data Mode to run custom logic for specific positions (e.g. generate a chest with a specific loot table or spawn a mob). Either override StructureComponentTemplate#handleDataMarker or use Template#getDataBlocks to implement this custom logic.
Ah, then I may need something else since I want to use functions like getBiomeSpecificBlockState for these buildings.
Ah, then I may need something else since I want to use functions like getBiomeSpecificBlockState for these buildings.
You can probably achieve that with a custom ITemplateProcessor.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Create a class which implements ITemplateProcessor and modify the processBlock method to check what biome you are in and change the block accordingly. When you go to spawn the structure in, call the addBlocksToWorld method which allows you to specify the processor you want to use and use yours instead of the default one.
Hello! Is there any way to view buildings and convert them into code? Basically I'm not really into building buildings and then dividing them into layers and putting layer by layer into code. This would be very helpful.
Thanks!
Orange1861
You can use Structure Blocks to save a structure to NBT and then generate it later.
For examples, look at ComponentScatteredFeaturePieces.Igloo, WorldGenFossils, StructureEndCityPieces and WoodlandMansionPieces.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Okay, so I have made and saved two structures, how do I read the NBT and convert it to using code since there are a few functions that need to be in it?
You can take a look at how I load nbt structures here
You don't convert the NBT to code, you load the structure from NBT in your world generator.
You can use Structure Blocks in Data Mode to run custom logic for specific positions (e.g. generate a chest with a specific loot table or spawn a mob). Either override StructureComponentTemplate#handleDataMarker or use Template#getDataBlocks to implement this custom logic.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Ah, then I may need something else since I want to use functions like getBiomeSpecificBlockState for these buildings.
You can probably achieve that with a custom ITemplateProcessor.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Okay, is that what MC uses to process the templates? If so, where is it? I can't seem to find it.
Create a class which implements ITemplateProcessor and modify the processBlock method to check what biome you are in and change the block accordingly. When you go to spawn the structure in, call the addBlocksToWorld method which allows you to specify the processor you want to use and use yours instead of the default one.