From ff88cbf2d75beadb05bb26b8e72cfa7ce1fdc288 Mon Sep 17 00:00:00 2001 From: attempt0 Date: Fri, 3 Jul 2026 23:33:08 +0800 Subject: [PATCH] Read channel in getBlocksToPlace (#68) ## Summary This causes inconsistency in the API and should be addressed. The primary consumer of the API is NEI preview and the preview does show wrong block with glass tier set, not sure if this is the cause image ## Checklist - [ ] I have tested this PR in DevEnv - [ ] I have tested this PR in Fullpack - [x] This PR is in compliance with the [GTNH AI Policy](https://github.com/GTNewHorizons/GTNH-Dev-Doc/blob/master/AI_POLICY.md) - [ ] This PR requires another PR in order to merge --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../gtnewhorizon/structurelib/structure/StructureUtility.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java b/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java index d6a047d3..8abde125 100644 --- a/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java +++ b/src/main/java/com/gtnewhorizon/structurelib/structure/StructureUtility.java @@ -3013,7 +3013,8 @@ public class StructureUtility { @Override public BlocksToPlace getBlocksToPlace(T t, World world, int x, int y, int z, ItemStack trigger, AutoPlaceEnvironment env) { - return backing.getBlocksToPlace(t, world, x, y, z, trigger, env); + return backing + .getBlocksToPlace(t, world, x, y, z, ChannelDataAccessor.withChannel(trigger, channel), env); } @Deprecated