diff --git a/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalGui.java b/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalGui.java index d2e15fb..5cfd5a4 100644 --- a/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalGui.java +++ b/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalGui.java @@ -32,7 +32,7 @@ public class CraftingTerminalGui extends ItemTerminalGui { int all = hasShiftDown() ? 1 : 0; PacketHandler.sendToServer(new PacketButton(this.container.tile.getPos(), PacketButton.ButtonResult.CRAFT_TERMINAL_REQUEST, all)); })); - this.requestButton.active = false; + this.tick(); } @Override @@ -41,7 +41,8 @@ public class CraftingTerminalGui extends ItemTerminalGui { CraftingTerminalTileEntity tile = this.getCraftingContainer().getTile(); this.requestButton.active = false; for (int i = 0; i < tile.craftItems.getSlots(); i++) { - if (!tile.getRequestedCraftItem(i).isEmpty()) { + ItemStack stack = tile.getRequestedCraftItem(i); + if (!stack.isEmpty() && stack.getCount() < stack.getMaxStackSize()) { this.requestButton.active = true; break; } diff --git a/src/main/resources/assets/prettypipes/blockstates/crafting_terminal.json b/src/main/resources/assets/prettypipes/blockstates/crafting_terminal.json new file mode 100644 index 0000000..c9078c4 --- /dev/null +++ b/src/main/resources/assets/prettypipes/blockstates/crafting_terminal.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "prettypipes:block/crafting_terminal" + } + } +} diff --git a/src/main/resources/assets/prettypipes/lang/en_us.json b/src/main/resources/assets/prettypipes/lang/en_us.json index 19560d9..6a5ff9a 100644 --- a/src/main/resources/assets/prettypipes/lang/en_us.json +++ b/src/main/resources/assets/prettypipes/lang/en_us.json @@ -34,11 +34,14 @@ "info.prettypipes.tag_filter_modifier": "Causes any filter slots to filter by tags\n(Modern equivalent of the Ore Dictionary)", "info.prettypipes.redstone_module": "Allows disabling the pipe with a redstone signal\nWorks for both extraction and retrieval", "info.prettypipes.item_terminal": "Allows viewing and requesting all items in a pipe network\nAlso has slots for putting items into the network", + "info.prettypipes.crafting_terminal": "Allows requesting ingredients for crafting recipes\nSupports auto-filling from JEI if installed", "block.prettypipes.pipe": "Pipe", "block.prettypipes.item_terminal": "Item Terminal", + "block.prettypipes.crafting_terminal": "Crafting Terminal", "itemGroup.prettypipes": "Pretty Pipes", "container.prettypipes.pipe": "Pipe", "container.prettypipes.item_terminal": "Item Terminal", + "container.prettypipes.crafting_terminal": "Crafting Terminal", "info.prettypipes.whitelist": "Allowed", "info.prettypipes.blacklist": "Disallowed", "info.prettypipes.shift": "Hold Shift for info", diff --git a/src/main/resources/assets/prettypipes/models/block/crafting_terminal.json b/src/main/resources/assets/prettypipes/models/block/crafting_terminal.json new file mode 100644 index 0000000..f5c539a --- /dev/null +++ b/src/main/resources/assets/prettypipes/models/block/crafting_terminal.json @@ -0,0 +1,7 @@ +{ + "parent": "block/cube_column", + "textures": { + "end": "prettypipes:block/item_terminal_top", + "side": "prettypipes:block/crafting_terminal" + } +} diff --git a/src/main/resources/assets/prettypipes/models/item/crafting_terminal.json b/src/main/resources/assets/prettypipes/models/item/crafting_terminal.json new file mode 100644 index 0000000..97ea040 --- /dev/null +++ b/src/main/resources/assets/prettypipes/models/item/crafting_terminal.json @@ -0,0 +1,3 @@ +{ + "parent": "prettypipes:block/crafting_terminal" +} \ No newline at end of file diff --git a/src/main/resources/assets/prettypipes/textures/block/crafting_terminal.png b/src/main/resources/assets/prettypipes/textures/block/crafting_terminal.png new file mode 100644 index 0000000..9b2ceec Binary files /dev/null and b/src/main/resources/assets/prettypipes/textures/block/crafting_terminal.png differ diff --git a/src/main/resources/data/prettypipes/loot_tables/blocks/crafting_terminal.json b/src/main/resources/data/prettypipes/loot_tables/blocks/crafting_terminal.json new file mode 100644 index 0000000..46913ca --- /dev/null +++ b/src/main/resources/data/prettypipes/loot_tables/blocks/crafting_terminal.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "prettypipes:crafting_terminal" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/prettypipes/recipes/crafting_terminal.json b/src/main/resources/data/prettypipes/recipes/crafting_terminal.json new file mode 100644 index 0000000..858e595 --- /dev/null +++ b/src/main/resources/data/prettypipes/recipes/crafting_terminal.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " C ", + "RTR", + " R " + ], + "key": { + "T": { + "item": "prettypipes:item_terminal" + }, + "C": { + "item": "minecraft:crafting_table" + }, + "R": { + "item": "minecraft:redstone" + } + }, + "result": { + "item": "prettypipes:crafting_terminal" + } +} \ No newline at end of file