Skip to content

Conversation

@gustovafing
Copy link
Member

@gustovafing gustovafing commented Dec 12, 2025

What

Fully refactors MetaMachine to remove the seperation between the machine class and the block entity which holds the machine. All references to MMBE have been updated to use MetaMachine directly.
Also contains a number of general refactors to the machine inheritance tree and machine constructors.

TODO: Write a ton of migration docs

Potential Compatibility Issues

there will be at least one compatibility issue, maybe even two

@gustovafing gustovafing added Do Not Merge DO NOT MERGE THIS PR YET! type: refactor Suggestion to refactor a section of code Admin Merge Requires Specialized Merge Permissions -Ask Org Admin to merge Release: API - X.0.0 Major Breaking Refactors that MUST be in a API-Breaking Release labels Dec 12, 2025
@github-actions github-actions bot added 1.20.1 Tests: Failed Game Tests have failed on this PR labels Dec 12, 2025
@gustovafing gustovafing force-pushed the gus/refactor-machine-construction branch from 8244e82 to 9626f7a Compare December 12, 2025 01:55
@gustovafing gustovafing changed the base branch from 1.20.1 to 1.20.1-v8.0.0 December 12, 2025 13:51
@gustovafing gustovafing removed Do Not Merge DO NOT MERGE THIS PR YET! Admin Merge Requires Specialized Merge Permissions -Ask Org Admin to merge labels Dec 12, 2025
@gustovafing gustovafing marked this pull request as ready for review December 12, 2025 13:51
@gustovafing gustovafing requested a review from a team as a code owner December 12, 2025 13:51
@github-actions github-actions bot added Tests: Passed Game Tests have passed on this PR Tests: Failed Game Tests have failed on this PR and removed Tests: Failed Game Tests have failed on this PR Tests: Passed Game Tests have passed on this PR labels Dec 19, 2025
@gustovafing gustovafing force-pushed the gus/refactor-machine-construction branch from b428190 to 6524987 Compare December 25, 2025 00:16
@github-actions github-actions bot added Tests: Failed Game Tests have failed on this PR and removed Tests: Passed Game Tests have passed on this PR labels Dec 25, 2025
}
}
}
// if (is(tool, GTToolType.HARD_HAMMER)) {
Copy link
Member

Choose a reason for hiding this comment

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

What's the status on this code?

import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.extensions.IForgeBlockEntity;

public interface IGregtechBlockEntity extends ISyncManaged, ITickSubscription, IForgeBlockEntity {
Copy link
Member

Choose a reason for hiding this comment

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

There's probably a better name for this.

public interface ICoverable extends ITickSubscription, ISyncManaged {

Level getLevel();
IGregtechBlockEntity getHolder();
Copy link
Member

Choose a reason for hiding this comment

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

There's probably a better name for this.

return list;
}

public static @NotNull <T> LazyOptional<T> getCapability(MetaMachine machine, @NotNull Capability<T> cap,
Copy link
Member

Choose a reason for hiding this comment

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

Can this be made private? Also, this should be made non-static and the machine param removed.

protected void checkAutoOutput() {
if (getOffsetTimer() % ticksPerCycle == 0) {
if (isAutoOutputItems() && getOutputFacingItems() != null) {
if (isAutoOutputItems()) {
Copy link
Member

Choose a reason for hiding this comment

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

Is removing the null check safe?

@gustovafing gustovafing force-pushed the gus/refactor-machine-construction branch from 173fab8 to 940864e Compare January 2, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Release: API - X.0.0 Major Breaking Refactors that MUST be in a API-Breaking Release Tests: Failed Game Tests have failed on this PR type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants