Skip to content

Conversation

@Swedz
Copy link
Collaborator

@Swedz Swedz commented Nov 21, 2024

This is in a "somewhat done" state. It is not ready to be merged. This relies on some other pull requests, and this needs to go through some testing and extra refinement first.

My plans for things that need to be addressed:

  • The documentation needs to be updated to explain how to use this system. Including screenshots would be ideal

  • Include the block requirements for framed blocks in the recipe viewer

  • Include tooltip when looking at a block in the hologram that requires other blocks to go inside it (like framed blocks) / or maybe flip through the framed block without nbt and the one with

  • MIStructureTemplateManager is pretty messy and I am unhappy with how it works. I'm not sure what could be done about this.

  • ShapeTemplate may benefit from a bit of a rewrite that makes it better follow OOP standards. Right now, when I need to check if a ShapeTemplate is a structure ShapeTemplate, I have to iterate over all of the members and ensure they are StructureMembers. Quite messy :P

Here are some things that may need addressing:

  • This system at the moment is not used for the Large Tank and Nuclear Reactor multiblock shapes. Reason being both of these have functionality inherently linked to their shapes. No clue how this could be addressed, if at all. May be fine to just leave them as-is.

  • While this system is being used for the Distillation Tower, there is a config option that lets you change the max height of the tower. As a quick "fix" for this, I have added structures for the Distillation Tower up to height 15 and it only uses them based on the config. The game will crash if the height is set to anything beyond 15, because the structure can't be found. Here are some possible solutions:

    • The distillation tower doesn't use the structure system.
    • The user is required to add structures for the distillation tower for higher height settings (how it works now).
    • Using something like datagen to create structure files and then having these taller tower structure files generate when enabling some config option.

@Swedz Swedz force-pushed the structure-multiblocks branch from 653ba34 to 7c90a8b Compare November 21, 2024 21:32
Swedz added 27 commits November 21, 2024 16:50
@James103
Copy link

James103 commented Dec 2, 2024

For structures with block entity NBT requirements, if an NBT tag is not specified within the required NBT data but is present on the block entity being checked, does the check fail hard as the extra NBT must not be present, or is the extra NBT ignored?

For example, if I want to require a player head with a specific texture as part of the structure (with said head being obtainable by other means), will I need to specify all parts of the profile data, or can I leave out a part and still get a match when someone builds my custom multiblock?

@Swedz
Copy link
Collaborator Author

Swedz commented Dec 2, 2024

It uses strict matching. If the NBT for a block in the file is completely omitted, then it will not check will not check against the NBT in world. If there is NBT present, it must be an exact match to the NBT in world. I have plans to add a structure wrench item to allow you to exclude specific blocks in the multiblock shape from checking NBT even if you have "Include NBT" enabled. I also have plans to allow for NBT being defined in the text boxes for the structure member block so you can specify what parts of the NBT to check against.

@James103
Copy link

James103 commented Jan 7, 2025

Is it possible to specify that the block at a specific position MUST be air lest the multiblock not form?
For example, I would like to add some kind of exhaust block to the structure of the Large Steam Boiler (and its advanced variants) and require the block above that to be air.

@Swedz
Copy link
Collaborator Author

Swedz commented Jan 7, 2025

Yes, you can use the member block and set the member as air.

Swedz added 3 commits February 9, 2025 12:02
# Conflicts:
#	docs/ADDING_MACHINES.md
#	src/client/java/aztech/modern_industrialization/MIClient.java
#	src/client/java/aztech/modern_industrialization/client/MIRenderTypes.java
#	src/client/java/aztech/modern_industrialization/compat/viewer/impl/MachineScreenPredicateTest.java
#	src/client/java/aztech/modern_industrialization/machines/gui/MachineMenuClient.java
#	src/client/java/aztech/modern_industrialization/machines/gui/MachineScreen.java
#	src/client/java/aztech/modern_industrialization/machines/models/MachineBakedModel.java
#	src/client/java/aztech/modern_industrialization/machines/models/MachineUnbakedModel.java
#	src/client/java/aztech/modern_industrialization/machines/multiblocks/MultiblockMachineBER.java
#	src/client/java/aztech/modern_industrialization/util/RenderHelper.java
#	src/generated/resources/assets/modern_industrialization/lang/en_us.json
#	src/main/java/aztech/modern_industrialization/api/energy/CableTier.java
#	src/main/java/aztech/modern_industrialization/compat/kubejs/machine/RegisterCasingsEventJS.java
#	src/main/java/aztech/modern_industrialization/datagen/translation/TranslationProvider.java
#	src/main/java/aztech/modern_industrialization/debug/DebugCommands.java
#	src/main/java/aztech/modern_industrialization/inventory/BackgroundRenderedSlot.java
#	src/main/java/aztech/modern_industrialization/machines/ComponentStorage.java
#	src/main/java/aztech/modern_industrialization/machines/MachineBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/hatches/EnergyHatch.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/AbstractCraftingMultiblockBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/AbstractElectricCraftingMultiblockBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/GeneratorMultiblockBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/LargeTankMultiblockBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/NuclearReactorMultiblockBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/SteamBoilerMultiblockBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/blockentities/multiblocks/SteamCraftingMultiblockBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/components/CasingComponent.java
#	src/main/java/aztech/modern_industrialization/machines/components/OrientationComponent.java
#	src/main/java/aztech/modern_industrialization/machines/gui/MachineMenuServer.java
#	src/main/java/aztech/modern_industrialization/machines/models/MachineCasing.java
#	src/main/java/aztech/modern_industrialization/machines/models/MachineCasings.java
#	src/main/java/aztech/modern_industrialization/machines/multiblocks/MultiblockMachineBlockEntity.java
#	src/main/java/aztech/modern_industrialization/machines/multiblocks/ShapeMatcher.java
#	src/main/java/aztech/modern_industrialization/network/machines/ChangeShapePacket.java
#	src/main/java/aztech/modern_industrialization/network/machines/ReiLockSlotsPacket.java
#	src/main/java/aztech/modern_industrialization/network/machines/SetAutoExtractPacket.java
#	src/main/resources/modern_industrialization.mixins.json
@Swedz Swedz closed this Aug 21, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Completed in Swedz's Corner Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants