Skip to content

Some Sable compatibility fixes - #5396

Open
awakaxis wants to merge 4 commits into
GregTechCEu:1.21from
awakaxis:1.21
Open

Some Sable compatibility fixes#5396
awakaxis wants to merge 4 commits into
GregTechCEu:1.21from
awakaxis:1.21

Conversation

@awakaxis

@awakaxis awakaxis commented Sep 4, 2026

Copy link
Copy Markdown

What

This PR fixes two compatibility issues with Sable:

1. MetaMachineBlock doesn't apply the correct vertical rotations while being placed on a Sable SubLevel

This is due to how Sable places the SubLevel's plot at extreme coordinates. As a result, the distance checks in MetaMachineblock.getStateForPlacement incorrectly assume the player is very far away from the block they are placing, thereby preventing vertical placement.

3. MufflerPartMachine doesn't spawn particles at the right position when on a SubLevel that has been rotated in any way

The coordinates just dont align with the SubLevel's rotation / orientation, causing the visual bug.

Implementation Details

Both issues are solved with some simple coordinate transformations via SableCompanion's utilities

AI Usage

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

Outcome

  1. MetaMachineBlock now rotates correctly when placed vertically on a SubLevel
  2. MufflerPartMachine now properly applies the required transforms to the particle's coordinates

How Was This Tested

The code in this PR was tested in game as I developed it, see attached images for the before/after screenshots of the two fixes:

MetaMachineBlock

Before: The machine, when attempting to place it vertically on a SubLevel, does not rotate correctly.
image

After: The machine now rotates correctly when placed vertically on a SubLevel.
image

MufflerPartMachine

Before: The particles are offset from where they would be if this EBF wasn't a SubLevel, a consequence of the SubLevel's rotation.
image

After: The particles now line up with the muffler when it's SubLevel has been rotated.
image

Additional Information

I'm new to PRing big projects like this, please let me know if anything is wrong.

@awakaxis
awakaxis requested a review from a team as a code owner September 4, 2026 11:06
@github-actions github-actions Bot added the 1.21 label Sep 4, 2026
Comment thread src/main/java/com/gregtechceu/gtceu/api/block/MetaMachineBlock.java Outdated
@awakaxis
awakaxis requested a review from gustovafing September 4, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants