Skip to content

Schema parts catalyst#5050

Open
YoungOnionMC wants to merge 1 commit into
1.20.1from
yo/schema-part-catalyst
Open

Schema parts catalyst#5050
YoungOnionMC wants to merge 1 commit into
1.20.1from
yo/schema-part-catalyst

Conversation

@YoungOnionMC

Copy link
Copy Markdown
Member

What

Fix schema widget offset when in emi and terminal
Add all parts of a multi to its input and output list
attempt to rotate the camera properly in the terminal so it faces the multi center

Implementation Details

see above

AI Usage

  • No AI driven tools were used for this pull request.
  • Yes AI driven tools were used for this pull request.

Outcome

cleaner emi and terminal usage

How Was This Tested

ingame

… previews, clean up size for terminal and emi schema
@YoungOnionMC YoungOnionMC requested a review from a team as a code owner July 2, 2026 10:38
@YoungOnionMC YoungOnionMC added type: bugfix General bug fixes Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. labels Jul 2, 2026
@github-actions github-actions Bot added 1.20.1 Tests: Passed Game Tests have passed on this PR labels Jul 2, 2026
public static Function<MultiblockMachineDefinition, IBlockPattern> getPattern() {
return (definition) -> {
PatternPredicate wallPredicate = getValidFloorBlocks().or(states(getCasingState(), getGlassState()));
PatternPredicate wallPredicate = states(getCasingState(), getGlassState()).or(getValidFloorBlocks());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getValidFloorBlocks() shouldn't even exist IMO, just make plastcrete part of the cleanroom floors tag

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope

@screret screret left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't implement the input/output stuff for REI or JEI, why?


public MultiblockInfoEmiWrapper(MultiblockMachineDefinition definition) {
super(definition.getId(), () -> new MultiblockPreviewWidget(definition, null));
super(definition.getId(), () -> new MultiblockPreviewWidget(definition, null, 200, 180));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this slightly shorter than the terminal's viewer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because emi doesn't take into account the header to determine the max size so it was going off the main panel

sliceRepeats.put(i, blockPattern.getSlices()[i].getMinRepeats());
}
structureHelper = AbstractStructureHelper.blockPattern(sliceRepeats);
} else if (pattern instanceof ExpandablePattern expandablePattern) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is ExpandablePattern still a 90% copypaste of BlockPattern with minor changes to the iteration logic and not a subclass?

Honestly, thinking abt it, expandable should be the only option that exists and "normal" patterns simply only allow expanding in one direction

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idts, repeatable patterns allow stuff like "A(BC)*D" e.g. "ABCBCBCD" but that doesn't work in more than 1 dimension. They should be 2 seperate classes with seperate logics/viewers/etc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also out of scope for this PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What? Expandable patterns allow for expansion in all 6 axis, where al block only allows in the relative direction the dev defines in the multi definition


private final MultiblockMachineDefinition definition;
private SlotWidget slotWidget;
private final List<EmiStack> outputBlocks = new ArrayList<>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename this to containedBlocks; they aren't actually outputs, after all.

resultStructure.values().stream()
.map(BlockInfo::getBlockState)
.collect(Collectors.toSet())
.forEach(block -> outputBlocks.add(EmiStack.of(block.getBlock())));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern's blocks should be INPUTS in the multiblock's "recipe". IMO only the controller should be classified as an output.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, either this or we make all blocks both inputs and outputs so they're "most visible", I could take eitehr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO they should be specifically inputs so (for example) creating AE2 patterns for "a multiblock" will be easy

@YoungOnionMC

Copy link
Copy Markdown
Member Author

You didn't implement the input/output stuff for REI or JEI, why?

Mui doesn't even work with jei and rei atm

@screret

screret commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

well, you should still implement it so it won't be forgotten when jei/rei is supported

.forEach(userDimensions::add);
structureHelper = AbstractStructureHelper.expandable(userDimensions);
}
if (structureHelper != null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we care about letting other mods impl subclasses of IBlockPattern? if so, how would we do stuff like this? (might be a discussion for later since that's relevant to other call sites than this one as well)

resultStructure.values().stream()
.map(BlockInfo::getBlockState)
.collect(Collectors.toSet())
.forEach(block -> outputBlocks.add(EmiStack.of(block.getBlock())));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, either this or we make all blocks both inputs and outputs so they're "most visible", I could take eitehr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Release: Patch - 0.0.X Smaller changes that either are bug fixes or very minor tweaks. Tests: Passed Game Tests have passed on this PR type: bugfix General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants