finished the crafting terminal

This commit is contained in:
Ellpeck 2020-05-09 15:42:09 +02:00
parent 3104062b82
commit 8391f2222a
8 changed files with 64 additions and 2 deletions

View file

@ -32,7 +32,7 @@ public class CraftingTerminalGui extends ItemTerminalGui {
int all = hasShiftDown() ? 1 : 0; int all = hasShiftDown() ? 1 : 0;
PacketHandler.sendToServer(new PacketButton(this.container.tile.getPos(), PacketButton.ButtonResult.CRAFT_TERMINAL_REQUEST, all)); PacketHandler.sendToServer(new PacketButton(this.container.tile.getPos(), PacketButton.ButtonResult.CRAFT_TERMINAL_REQUEST, all));
})); }));
this.requestButton.active = false; this.tick();
} }
@Override @Override
@ -41,7 +41,8 @@ public class CraftingTerminalGui extends ItemTerminalGui {
CraftingTerminalTileEntity tile = this.getCraftingContainer().getTile(); CraftingTerminalTileEntity tile = this.getCraftingContainer().getTile();
this.requestButton.active = false; this.requestButton.active = false;
for (int i = 0; i < tile.craftItems.getSlots(); i++) { 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; this.requestButton.active = true;
break; break;
} }

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "prettypipes:block/crafting_terminal"
}
}
}

View file

@ -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.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.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.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.pipe": "Pipe",
"block.prettypipes.item_terminal": "Item Terminal", "block.prettypipes.item_terminal": "Item Terminal",
"block.prettypipes.crafting_terminal": "Crafting Terminal",
"itemGroup.prettypipes": "Pretty Pipes", "itemGroup.prettypipes": "Pretty Pipes",
"container.prettypipes.pipe": "Pipe", "container.prettypipes.pipe": "Pipe",
"container.prettypipes.item_terminal": "Item Terminal", "container.prettypipes.item_terminal": "Item Terminal",
"container.prettypipes.crafting_terminal": "Crafting Terminal",
"info.prettypipes.whitelist": "Allowed", "info.prettypipes.whitelist": "Allowed",
"info.prettypipes.blacklist": "Disallowed", "info.prettypipes.blacklist": "Disallowed",
"info.prettypipes.shift": "Hold Shift for info", "info.prettypipes.shift": "Hold Shift for info",

View file

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "prettypipes:block/item_terminal_top",
"side": "prettypipes:block/crafting_terminal"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "prettypipes:block/crafting_terminal"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "prettypipes:crafting_terminal"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -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"
}
}