Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCB Multiblocks #395

Merged
merged 13 commits into from
Mar 6, 2025
Merged

PCB Multiblocks #395

merged 13 commits into from
Mar 6, 2025

Conversation

littlecube8152
Copy link
Contributor

This PR adds two multiblocks: Curtain Coater curtain_coater and Precise Milling Machine milling.

@MCTian-mi
Copy link
Collaborator

these multis look very nice
nice work!

@littlecube8152 littlecube8152 force-pushed the pcb-multis branch 2 times, most recently from 6d15dfa to b0dc9a4 Compare February 27, 2025 07:58
Comment on lines 89 to 106
@Override
protected void formStructure(PatternMatchContext context) {
super.formStructure(context);

// RelativeDirection will take into account of the multi flipping pattern
EnumFacing conveyorFacing = RelativeDirection.LEFT.getRelativeFacing(getFrontFacing(), getUpwardsFacing(), isFlipped());

List<BlockPos> conveyorBlocks = context.getOrDefault("ConveyorBelt", new LinkedList<>());
if (conveyorBlocks != null && !conveyorBlocks.isEmpty()) {
World world = getWorld();
for (BlockPos blockPos : conveyorBlocks) {
Block conveyor = world.getBlockState(blockPos).getBlock();
if (conveyor instanceof BlockConveyor) {
world.setBlockState(blockPos, world.getBlockState(blockPos).withProperty(BlockConveyor.FACING, conveyorFacing));
}
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

With this implementation, the direction will only be corrected once when the multi is formed
so if you wrench the belt to rotate it after the multi gets formed, it won't invadiate the structure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

now the multi will store conveyor belt blocks and check that every 20 ticks (through updateFormedValid)
the multiblock will not be invalidated, but the directions will be corrected quickly

Copy link
Contributor Author

@littlecube8152 littlecube8152 Feb 28, 2025

Choose a reason for hiding this comment

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

2025-03-01_03 00 06
but i am not sure if this still makes sense

@MCTian-mi
Copy link
Collaborator

also there's a small visual glitch I just found
image
well ig gregtech doesn't think of such kind of non-full blocks to get grid rendered
iirc there is a way you can supplier a custom grid renderer in ceu?
or maybe we can simply move the CustomBlockRotations.registerCustomRotation(this, BLOCK_HORIZONTAL_BEHAVIOR) out of the constructor and just not to register a rotation behavior for the conveyor belt block.

@MCTian-mi
Copy link
Collaborator

MCTian-mi commented Feb 28, 2025

also there's a small visual glitch I just found image well ig gregtech doesn't think of such kind of non-full blocks to get grid rendered iirc there is a way you can supplier a custom grid renderer in ceu? or maybe we can simply move the CustomBlockRotations.registerCustomRotation(this, BLOCK_HORIZONTAL_BEHAVIOR) out of the constructor and just not to register a rotation behavior for the conveyor belt block.

wait is this kind of visual intended 💀
anyways the rotation behavior is broken as well so ig this is bugged

@MCTian-mi
Copy link
Collaborator

gif
another visual bug: the animation is inaccurate in two frames (there should be one frame where the first and the second half of the arrow exist on two adjacent blocks)

@littlecube8152
Copy link
Contributor Author

I think its impossible to actually maintain animations for both top-bottom and front-back sides smoothly without some extra texture support. Should I just leave the top-bottom face animations?

@MCTian-mi
Copy link
Collaborator

I think its impossible to actually maintain animations for both top-bottom and front-back sides smoothly without some extra texture support. Should I just leave the top-bottom face animations?

yeah ig that makes sense
maybe you can use a bottom side texture without belt animations

@littlecube8152
Copy link
Contributor Author

also there's a small visual glitch I just found image well ig gregtech doesn't think of such kind of non-full blocks to get grid rendered iirc there is a way you can supplier a custom grid renderer in ceu? or maybe we can simply move the CustomBlockRotations.registerCustomRotation(this, BLOCK_HORIZONTAL_BEHAVIOR) out of the constructor and just not to register a rotation behavior for the conveyor belt block.

wait is this kind of visual intended 💀 anyways the rotation behavior is broken as well so ig this is bugged

the rotation behavior is not bugged (the one bugged is the overlay grid)
now the grid is hidden, but the top/bottom face still accept the wrenching rotation (which will work as if the grid is correctly placed)

@littlecube8152
Copy link
Contributor Author

Can we keep this funny wall-shared setup (#395 (comment))
or I should do something to prevent this madness (right now I dont want it to be a MTE, but what I have in mind is kind of messy)

@MCTian-mi
Copy link
Collaborator

Can we keep this funny wall-shared setup (#395 (comment)) or I should do something to prevent this madness (right now I dont want it to be a MTE, but what I have in mind is kind of messy)

maybe just change the structure a bit to avoid such sharing?

@littlecube8152
Copy link
Contributor Author

i have changed the structure which made the conveyor belts completely closed in the multiblock structure
it is now impossible to wall-share them now and the new design fits better for the circuit board production (i guess)

@MCTian-mi
Copy link
Collaborator

i have changed the structure which made the conveyor belts completely closed in the multiblock structure it is now impossible to wall-share them now and the new design fits better for the circuit board production (i guess)

nice!

Copy link
Collaborator

@MCTian-mi MCTian-mi left a comment

Choose a reason for hiding this comment

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

lgtm

@MCTian-mi MCTian-mi merged commit b81b51f into SymmetricDevs:main Mar 6, 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