Skip to content

Commit 5cea2f4

Browse files
committed
Do not show red highlight for replaceable blocks (approximate)
1 parent 525cdec commit 5cea2f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client/java/aztech/modern_industrialization/machines/multiblocks/MultiblockMachineBER.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public void render(MultiblockMachineBlockEntity be, float tickDelta, PoseStack m
7171
}
7272
if (drawHighlights) {
7373
if (!matcher.matches(pos, be.getLevel(), null)) {
74-
if (be.getLevel().getBlockState(pos).isAir()) {
74+
var existingState = be.getLevel().getBlockState(pos);
75+
if (existingState.isAir() || /* approximate check for e.g. grass and snow */ existingState.canBeReplaced()) {
7576
// Enqueue state preview
7677
MultiblockErrorHighlight.enqueueHighlight(pos, matcher.getSimpleMember(pos).getPreviewState());
7778
} else {

0 commit comments

Comments
 (0)