diff --git a/src/main/java/com/gtnewhorizon/structurelib/StructureLib.java b/src/main/java/com/gtnewhorizon/structurelib/StructureLib.java index 4a491d86..dfbb54b0 100644 --- a/src/main/java/com/gtnewhorizon/structurelib/StructureLib.java +++ b/src/main/java/com/gtnewhorizon/structurelib/StructureLib.java @@ -125,6 +125,7 @@ public class StructureLib { InventoryUtility.init(); ChannelDescription.set(CHANNEL_SHOW_ERROR, MOD_ID, "channels.structurelib.show_errors"); + ChannelDescription.set(StructureLibAPI.CHANNEL_TIER, MOD_ID, "channels.structurelib.tier"); DevelopHelper.onPreInit(); } diff --git a/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java b/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java index 1f195d80..7792c0ce 100644 --- a/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java +++ b/src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java @@ -44,6 +44,7 @@ public class StructureLibAPI { public static final int HINT_BLOCK_META_AIR = 13; public static final int HINT_BLOCK_META_NOT_AIR = 14; public static final int HINT_BLOCK_META_ERROR = 15; + public static final String CHANNEL_TIER = "tier"; public static final String CHANNEL_SHOW_ERROR = "show_error"; static final ThreadLocal instrument = new ThreadLocal<>(); diff --git a/src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ConstructableUtility.java b/src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ConstructableUtility.java index 9b42ad71..cdf8efe4 100644 --- a/src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ConstructableUtility.java +++ b/src/main/java/com/gtnewhorizon/structurelib/alignment/constructable/ConstructableUtility.java @@ -28,8 +28,9 @@ public class ConstructableUtility { public static boolean handle(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide) { + ItemStack effectiveStack = ChannelDataAccessor.withChannel(aStack, StructureLibAPI.CHANNEL_TIER); StructureLibAPI.startHinting(aWorld); - boolean ret = handle0(aStack, aPlayer, aWorld, aX, aY, aZ, aSide); + boolean ret = handle0(effectiveStack, aPlayer, aWorld, aX, aY, aZ, aSide); StructureLibAPI.endHinting(aWorld); return ret; } diff --git a/src/main/resources/assets/structurelib/lang/en_US.lang b/src/main/resources/assets/structurelib/lang/en_US.lang index 8a733238..ac0d9000 100644 --- a/src/main/resources/assets/structurelib/lang/en_US.lang +++ b/src/main/resources/assets/structurelib/lang/en_US.lang @@ -42,6 +42,7 @@ item.structurelib.constructableTrigger.gui.channels.from=§rMod: §9§o%s item.structurelib.constructableTrigger.gui.info=Many multiblocks support some degree of variation in their structure and a sub channel allows indication of which variant to use.\n All sub channels have a sequence of lowercase characters as key and a positive integer as value. Most known sub channels should be available as typeahead completions.\n You can also drag and drop items from NEI to set the corresponding sub channel value. These items all have a tooltip of "§oIndicates§r §ovalue§r §oX§r §ofor§r §osub§r §ochannel§r §oY§r". channels.structurelib.show_errors=When set, will highlight parts of the multiblock that is definitely wrong +channels.structurelib.tier=Selects the constructable tier and overrides the projector stack size structurelib.tooltip.channelvalue=§7Value §b%d§r§7 for subchannel §b%s structurelib.tooltip.indicator_dnd=Drop into GUI or middle-click to select this value for this channel diff --git a/src/main/resources/assets/structurelib/lang/zh_CN.lang b/src/main/resources/assets/structurelib/lang/zh_CN.lang index 9505645d..eddb0bd3 100644 --- a/src/main/resources/assets/structurelib/lang/zh_CN.lang +++ b/src/main/resources/assets/structurelib/lang/zh_CN.lang @@ -41,6 +41,7 @@ item.structurelib.constructableTrigger.gui.channels.from=§r模组: §9§o%s item.structurelib.constructableTrigger.gui.info=许多多方块的结构都是可变的,在自动放置时,可以使用子信道来向多方块指明该使用哪一个变体。\n子信道由一个字符串标识、并拥有一个正整数作为值。这个GUI中的信道名支持自动补全到绝大多数已知的子信道。\n你也可以将部分物品从NEI中拖拽至GUI内来设置子信道值为该物品表示的值。这些物品的物品说明中都带有§o表示子信道 X 为 Y§r。 channels.structurelib.show_errors=添加后,在投影时会高亮标出必然错误的部分 +channels.structurelib.tier=选择多方块结构等级,并覆盖投影仪堆叠数量 structurelib.tooltip.channelvalue=§7表示子信道 §b%2$s§r§7 为 §b%d§r structurelib.tooltip.indicator_dnd=拖入GUI中来选择该值