From 4a43c323422fc2f9dd760553c0f81dc4a764e484 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 15 Sep 2024 20:56:48 +0200 Subject: [PATCH] fixes --- .../prettypipes/packets/PacketGhostSlot.java | 20 ++++----- .../containers/CraftingTerminalContainer.java | 38 ++++++++++++---- .../containers/WrappedCraftingInventory.java | 43 +++++++++++++++---- .../{blocks => block}/mineable/pickaxe.json | 0 .../block}/crafting_terminal.json | 0 .../block}/item_terminal.json | 0 .../blocks => loot_table/block}/pipe.json | 0 .../block}/pressurizer.json | 0 .../{recipes => recipe}/blank_module.json | 4 +- .../crafting_terminal.json | 4 +- .../damage_filter_modifier.json | 4 +- .../filter_increase_modifier.json | 4 +- .../high_crafting_module.json | 4 +- .../high_extraction_module.json | 4 +- .../high_filter_module.json | 4 +- .../high_high_priority_module.json | 4 +- .../high_low_priority_module.json | 6 +-- .../high_retrieval_module.json | 4 +- .../high_speed_module.json | 4 +- .../{recipes => recipe}/item_terminal.json | 6 +-- .../low_crafting_module.json | 4 +- .../low_extraction_module.json | 4 +- .../low_filter_module.json | 4 +- .../low_high_priority_module.json | 4 +- .../low_low_priority_module.json | 6 +-- .../low_retrieval_module.json | 4 +- .../{recipes => recipe}/low_speed_module.json | 4 +- .../medium_crafting_module.json | 4 +- .../medium_extraction_module.json | 4 +- .../medium_filter_module.json | 4 +- .../medium_high_priority_module.json | 4 +- .../medium_low_priority_module.json | 6 +-- .../medium_retrieval_module.json | 4 +- .../medium_speed_module.json | 4 +- .../mod_filter_modifier.json | 4 +- .../{recipes => recipe}/module_clearing.json | 0 .../nbt_filter_modifier.json | 4 +- .../prettypipes/{recipes => recipe}/pipe.json | 6 +-- .../{recipes => recipe}/pipe_frame.json | 4 +- .../{recipes => recipe}/pressurizer.json | 4 +- .../random_sorting_modifier.json | 4 +- .../{recipes => recipe}/redstone_module.json | 4 +- .../round_robin_sorting_modifier.json | 4 +- .../stack_size_module.json | 4 +- .../tag_filter_modifier.json | 4 +- .../{recipes => recipe}/wrench.json | 6 +-- 46 files changed, 154 insertions(+), 107 deletions(-) rename src/main/resources/data/minecraft/tags/{blocks => block}/mineable/pickaxe.json (100%) rename src/main/resources/data/prettypipes/{loot_tables/blocks => loot_table/block}/crafting_terminal.json (100%) rename src/main/resources/data/prettypipes/{loot_tables/blocks => loot_table/block}/item_terminal.json (100%) rename src/main/resources/data/prettypipes/{loot_tables/blocks => loot_table/block}/pipe.json (100%) rename src/main/resources/data/prettypipes/{loot_tables/blocks => loot_table/block}/pressurizer.json (100%) rename src/main/resources/data/prettypipes/{recipes => recipe}/blank_module.json (90%) rename src/main/resources/data/prettypipes/{recipes => recipe}/crafting_terminal.json (88%) rename src/main/resources/data/prettypipes/{recipes => recipe}/damage_filter_modifier.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/filter_increase_modifier.json (86%) rename src/main/resources/data/prettypipes/{recipes => recipe}/high_crafting_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/high_extraction_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/high_filter_module.json (88%) rename src/main/resources/data/prettypipes/{recipes => recipe}/high_high_priority_module.json (84%) rename src/main/resources/data/prettypipes/{recipes => recipe}/high_low_priority_module.json (73%) rename src/main/resources/data/prettypipes/{recipes => recipe}/high_retrieval_module.json (89%) rename src/main/resources/data/prettypipes/{recipes => recipe}/high_speed_module.json (88%) rename src/main/resources/data/prettypipes/{recipes => recipe}/item_terminal.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/low_crafting_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/low_extraction_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/low_filter_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/low_high_priority_module.json (86%) rename src/main/resources/data/prettypipes/{recipes => recipe}/low_low_priority_module.json (77%) rename src/main/resources/data/prettypipes/{recipes => recipe}/low_retrieval_module.json (89%) rename src/main/resources/data/prettypipes/{recipes => recipe}/low_speed_module.json (88%) rename src/main/resources/data/prettypipes/{recipes => recipe}/medium_crafting_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/medium_extraction_module.json (84%) rename src/main/resources/data/prettypipes/{recipes => recipe}/medium_filter_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/medium_high_priority_module.json (83%) rename src/main/resources/data/prettypipes/{recipes => recipe}/medium_low_priority_module.json (72%) rename src/main/resources/data/prettypipes/{recipes => recipe}/medium_retrieval_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/medium_speed_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/mod_filter_modifier.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/module_clearing.json (100%) rename src/main/resources/data/prettypipes/{recipes => recipe}/nbt_filter_modifier.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/pipe.json (84%) rename src/main/resources/data/prettypipes/{recipes => recipe}/pipe_frame.json (86%) rename src/main/resources/data/prettypipes/{recipes => recipe}/pressurizer.json (89%) rename src/main/resources/data/prettypipes/{recipes => recipe}/random_sorting_modifier.json (86%) rename src/main/resources/data/prettypipes/{recipes => recipe}/redstone_module.json (88%) rename src/main/resources/data/prettypipes/{recipes => recipe}/round_robin_sorting_modifier.json (85%) rename src/main/resources/data/prettypipes/{recipes => recipe}/stack_size_module.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/tag_filter_modifier.json (87%) rename src/main/resources/data/prettypipes/{recipes => recipe}/wrench.json (80%) diff --git a/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java b/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java index b1f50fa..ef6b381 100644 --- a/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java +++ b/src/main/java/de/ellpeck/prettypipes/packets/PacketGhostSlot.java @@ -21,6 +21,7 @@ import net.neoforged.neoforge.network.handling.IPayloadContext; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; public record PacketGhostSlot(BlockPos pos, List stacks) implements CustomPacketPayload { @@ -43,28 +44,27 @@ public record PacketGhostSlot(BlockPos pos, List stacks) implements Custo tile.setGhostItems(message.stacks); } - public record Entry(List stacks, TagKey tag) { + public record Entry(Optional> stacks, Optional> tag) { public static final StreamCodec CODEC = StreamCodec.composite( - ItemStack.OPTIONAL_LIST_STREAM_CODEC, Entry::stacks, - ByteBufCodecs.fromCodec(TagKey.codec(Registries.ITEM)), Entry::tag, + ByteBufCodecs.optional(ItemStack.OPTIONAL_LIST_STREAM_CODEC), Entry::stacks, + ByteBufCodecs.optional(ByteBufCodecs.fromCodec(TagKey.codec(Registries.ITEM))), Entry::tag, Entry::new); public static Entry fromStacks(Level level, List stacks) { var tag = Entry.getTagForStacks(level, stacks); if (tag != null) { - return new Entry(null, tag); + return new Entry(Optional.empty(), Optional.of(tag)); } else { - return new Entry(stacks, null); + return new Entry(Optional.of(stacks), Optional.empty()); } } public List getStacks(Level level) { - if (this.stacks != null) - return this.stacks; - return Streams.stream(level.registryAccess().registry(Registries.ITEM).orElseThrow().getTagOrEmpty(this.tag).iterator()) - .filter(h -> h.value() != null & h.value() != Items.AIR) - .map(h -> new ItemStack(h.value())).collect(Collectors.toList()); + return this.stacks.orElseGet(() -> + Streams.stream(level.registryAccess().registry(Registries.ITEM).orElseThrow().getTagOrEmpty(this.tag.orElseThrow()).iterator()) + .filter(h -> h.value() != null & h.value() != Items.AIR) + .map(h -> new ItemStack(h.value())).collect(Collectors.toList())); } private static TagKey getTagForStacks(Level level, List stacks) { diff --git a/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java b/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java index fd35adb..a1b2611 100644 --- a/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java +++ b/src/main/java/de/ellpeck/prettypipes/terminal/containers/CraftingTerminalContainer.java @@ -9,7 +9,10 @@ import net.minecraft.world.Container; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.*; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingRecipe; +import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nullable; @@ -28,7 +31,7 @@ public class CraftingTerminalContainer extends ItemTerminalContainer { @Override protected void addOwnSlots(Player player) { - this.craftInventory = new WrappedCraftingInventory(this.getTile().craftItems, this, 3, 3); + this.craftInventory = new WrappedCraftingInventory(this.getTile().craftItems, this); this.craftResult = new ResultContainer() { @Override public void setChanged() { @@ -46,14 +49,7 @@ public class CraftingTerminalContainer extends ItemTerminalContainer { @Override public void slotsChanged(Container inventoryIn) { super.slotsChanged(inventoryIn); - if (!this.player.level().isClientSide) { - var ret = ItemStack.EMPTY; - var optional = this.player.level().getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, this.craftInventory.asCraftInput(), this.player.level()); - if (optional.isPresent()) - ret = optional.get().value().assemble(this.craftInventory.asCraftInput(), this.player.level().registryAccess()); - this.craftResult.setItem(0, ret); - ((ServerPlayer) this.player).connection.send(new ClientboundContainerSetSlotPacket(this.containerId, 0, 0, ret)); - } + CraftingTerminalContainer.slotChangedCraftingGrid(this, this.player.level(), this.player, this.craftInventory, this.craftResult, null); } @Override @@ -80,4 +76,28 @@ public class CraftingTerminalContainer extends ItemTerminalContainer { return (CraftingTerminalBlockEntity) this.tile; } + // copied from CraftingMenu + protected static void slotChangedCraftingGrid(AbstractContainerMenu menu, Level level, Player player, CraftingContainer craftSlots, ResultContainer resultSlots, @Nullable RecipeHolder recipe) { + if (!level.isClientSide) { + var craftinginput = craftSlots.asCraftInput(); + var serverplayer = (ServerPlayer) player; + var itemstack = ItemStack.EMPTY; + var optional = level.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftinginput, level, recipe); + if (optional.isPresent()) { + var recipeholder = optional.get(); + var craftingrecipe = recipeholder.value(); + if (resultSlots.setRecipeUsed(level, serverplayer, recipeholder)) { + var itemstack1 = craftingrecipe.assemble(craftinginput, level.registryAccess()); + if (itemstack1.isItemEnabled(level.enabledFeatures())) { + itemstack = itemstack1; + } + } + } + + resultSlots.setItem(0, itemstack); + menu.setRemoteSlot(0, itemstack); + serverplayer.connection.send(new ClientboundContainerSetSlotPacket(menu.containerId, menu.incrementStateId(), 0, itemstack)); + } + } + } diff --git a/src/main/java/de/ellpeck/prettypipes/terminal/containers/WrappedCraftingInventory.java b/src/main/java/de/ellpeck/prettypipes/terminal/containers/WrappedCraftingInventory.java index 6c02cba..9f99822 100644 --- a/src/main/java/de/ellpeck/prettypipes/terminal/containers/WrappedCraftingInventory.java +++ b/src/main/java/de/ellpeck/prettypipes/terminal/containers/WrappedCraftingInventory.java @@ -1,17 +1,20 @@ package de.ellpeck.prettypipes.terminal.containers; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.StackedContents; -import net.minecraft.world.inventory.TransientCraftingContainer; +import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.ItemStack; import net.neoforged.neoforge.items.ItemStackHandler; -public class WrappedCraftingInventory extends TransientCraftingContainer { +import java.util.List; +import java.util.stream.IntStream; + +public class WrappedCraftingInventory implements CraftingContainer { private final ItemStackHandler items; private final CraftingTerminalContainer eventHandler; - public WrappedCraftingInventory(ItemStackHandler items, CraftingTerminalContainer eventHandlerIn, int width, int height) { - super(eventHandlerIn, width, height); + public WrappedCraftingInventory(ItemStackHandler items, CraftingTerminalContainer eventHandlerIn) { this.eventHandler = eventHandlerIn; this.items = items; } @@ -47,8 +50,7 @@ public class WrappedCraftingInventory extends TransientCraftingContainer { var slotStack = this.items.getStackInSlot(index); var ret = !slotStack.isEmpty() && count > 0 ? slotStack.split(count) : ItemStack.EMPTY; if (!ret.isEmpty()) { - for (var player : this.eventHandler.getTile().getLookingPlayers()) - player.containerMenu.slotsChanged(this); + this.eventHandler.slotsChanged(this); } return ret; } @@ -56,8 +58,17 @@ public class WrappedCraftingInventory extends TransientCraftingContainer { @Override public void setItem(int index, ItemStack stack) { this.items.setStackInSlot(index, stack); - for (var player : this.eventHandler.getTile().getLookingPlayers()) - player.containerMenu.slotsChanged(this); + this.eventHandler.slotsChanged(this); + } + + @Override + public void setChanged() { + this.eventHandler.slotsChanged(this); + } + + @Override + public boolean stillValid(Player player) { + return true; } @Override @@ -71,4 +82,20 @@ public class WrappedCraftingInventory extends TransientCraftingContainer { for (var i = 0; i < this.items.getSlots(); i++) helper.accountStack(this.items.getStackInSlot(i)); } + + @Override + public int getWidth() { + return 3; + } + + @Override + public int getHeight() { + return 3; + } + + @Override + public List getItems() { + return IntStream.range(0, this.getContainerSize()).mapToObj(this::getItem).toList(); + } + } diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json similarity index 100% rename from src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json rename to src/main/resources/data/minecraft/tags/block/mineable/pickaxe.json diff --git a/src/main/resources/data/prettypipes/loot_tables/blocks/crafting_terminal.json b/src/main/resources/data/prettypipes/loot_table/block/crafting_terminal.json similarity index 100% rename from src/main/resources/data/prettypipes/loot_tables/blocks/crafting_terminal.json rename to src/main/resources/data/prettypipes/loot_table/block/crafting_terminal.json diff --git a/src/main/resources/data/prettypipes/loot_tables/blocks/item_terminal.json b/src/main/resources/data/prettypipes/loot_table/block/item_terminal.json similarity index 100% rename from src/main/resources/data/prettypipes/loot_tables/blocks/item_terminal.json rename to src/main/resources/data/prettypipes/loot_table/block/item_terminal.json diff --git a/src/main/resources/data/prettypipes/loot_tables/blocks/pipe.json b/src/main/resources/data/prettypipes/loot_table/block/pipe.json similarity index 100% rename from src/main/resources/data/prettypipes/loot_tables/blocks/pipe.json rename to src/main/resources/data/prettypipes/loot_table/block/pipe.json diff --git a/src/main/resources/data/prettypipes/loot_tables/blocks/pressurizer.json b/src/main/resources/data/prettypipes/loot_table/block/pressurizer.json similarity index 100% rename from src/main/resources/data/prettypipes/loot_tables/blocks/pressurizer.json rename to src/main/resources/data/prettypipes/loot_table/block/pressurizer.json diff --git a/src/main/resources/data/prettypipes/recipes/blank_module.json b/src/main/resources/data/prettypipes/recipe/blank_module.json similarity index 90% rename from src/main/resources/data/prettypipes/recipes/blank_module.json rename to src/main/resources/data/prettypipes/recipe/blank_module.json index 7839ee6..6d5f92c 100644 --- a/src/main/resources/data/prettypipes/recipes/blank_module.json +++ b/src/main/resources/data/prettypipes/recipe/blank_module.json @@ -20,6 +20,6 @@ } }, "result": { - "item": "prettypipes:blank_module" + "id": "prettypipes:blank_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/crafting_terminal.json b/src/main/resources/data/prettypipes/recipe/crafting_terminal.json similarity index 88% rename from src/main/resources/data/prettypipes/recipes/crafting_terminal.json rename to src/main/resources/data/prettypipes/recipe/crafting_terminal.json index 858e595..0389cd0 100644 --- a/src/main/resources/data/prettypipes/recipes/crafting_terminal.json +++ b/src/main/resources/data/prettypipes/recipe/crafting_terminal.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:crafting_terminal" + "id": "prettypipes:crafting_terminal" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/damage_filter_modifier.json b/src/main/resources/data/prettypipes/recipe/damage_filter_modifier.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/damage_filter_modifier.json rename to src/main/resources/data/prettypipes/recipe/damage_filter_modifier.json index 21a375c..cff0845 100644 --- a/src/main/resources/data/prettypipes/recipes/damage_filter_modifier.json +++ b/src/main/resources/data/prettypipes/recipe/damage_filter_modifier.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:damage_filter_modifier" + "id": "prettypipes:damage_filter_modifier" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/filter_increase_modifier.json b/src/main/resources/data/prettypipes/recipe/filter_increase_modifier.json similarity index 86% rename from src/main/resources/data/prettypipes/recipes/filter_increase_modifier.json rename to src/main/resources/data/prettypipes/recipe/filter_increase_modifier.json index 38340dc..069f184 100644 --- a/src/main/resources/data/prettypipes/recipes/filter_increase_modifier.json +++ b/src/main/resources/data/prettypipes/recipe/filter_increase_modifier.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:filter_increase_modifier" + "id": "prettypipes:filter_increase_modifier" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/high_crafting_module.json b/src/main/resources/data/prettypipes/recipe/high_crafting_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/high_crafting_module.json rename to src/main/resources/data/prettypipes/recipe/high_crafting_module.json index 85a1e7f..5f9e24a 100644 --- a/src/main/resources/data/prettypipes/recipes/high_crafting_module.json +++ b/src/main/resources/data/prettypipes/recipe/high_crafting_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:high_crafting_module" + "id": "prettypipes:high_crafting_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/high_extraction_module.json b/src/main/resources/data/prettypipes/recipe/high_extraction_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/high_extraction_module.json rename to src/main/resources/data/prettypipes/recipe/high_extraction_module.json index c6b72a5..c467512 100644 --- a/src/main/resources/data/prettypipes/recipes/high_extraction_module.json +++ b/src/main/resources/data/prettypipes/recipe/high_extraction_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:high_extraction_module" + "id": "prettypipes:high_extraction_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/high_filter_module.json b/src/main/resources/data/prettypipes/recipe/high_filter_module.json similarity index 88% rename from src/main/resources/data/prettypipes/recipes/high_filter_module.json rename to src/main/resources/data/prettypipes/recipe/high_filter_module.json index f16ca01..6c496da 100644 --- a/src/main/resources/data/prettypipes/recipes/high_filter_module.json +++ b/src/main/resources/data/prettypipes/recipe/high_filter_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:high_filter_module" + "id": "prettypipes:high_filter_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/high_high_priority_module.json b/src/main/resources/data/prettypipes/recipe/high_high_priority_module.json similarity index 84% rename from src/main/resources/data/prettypipes/recipes/high_high_priority_module.json rename to src/main/resources/data/prettypipes/recipe/high_high_priority_module.json index f78168c..2b48b4b 100644 --- a/src/main/resources/data/prettypipes/recipes/high_high_priority_module.json +++ b/src/main/resources/data/prettypipes/recipe/high_high_priority_module.json @@ -14,6 +14,6 @@ } }, "result": { - "item": "prettypipes:high_high_priority_module" + "id": "prettypipes:high_high_priority_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/high_low_priority_module.json b/src/main/resources/data/prettypipes/recipe/high_low_priority_module.json similarity index 73% rename from src/main/resources/data/prettypipes/recipes/high_low_priority_module.json rename to src/main/resources/data/prettypipes/recipe/high_low_priority_module.json index 9c2e5ed..86188cc 100644 --- a/src/main/resources/data/prettypipes/recipes/high_low_priority_module.json +++ b/src/main/resources/data/prettypipes/recipe/high_low_priority_module.json @@ -7,13 +7,13 @@ ], "key": { "C": { - "tag": "forge:cobblestone" + "tag": "c:cobblestones" }, "M": { "item": "prettypipes:medium_low_priority_module" } }, "result": { - "item": "prettypipes:high_low_priority_module" + "id": "prettypipes:high_low_priority_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/high_retrieval_module.json b/src/main/resources/data/prettypipes/recipe/high_retrieval_module.json similarity index 89% rename from src/main/resources/data/prettypipes/recipes/high_retrieval_module.json rename to src/main/resources/data/prettypipes/recipe/high_retrieval_module.json index aa1a141..3f3becd 100644 --- a/src/main/resources/data/prettypipes/recipes/high_retrieval_module.json +++ b/src/main/resources/data/prettypipes/recipe/high_retrieval_module.json @@ -20,6 +20,6 @@ } }, "result": { - "item": "prettypipes:high_retrieval_module" + "id": "prettypipes:high_retrieval_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/high_speed_module.json b/src/main/resources/data/prettypipes/recipe/high_speed_module.json similarity index 88% rename from src/main/resources/data/prettypipes/recipes/high_speed_module.json rename to src/main/resources/data/prettypipes/recipe/high_speed_module.json index 65b04b6..99d262c 100644 --- a/src/main/resources/data/prettypipes/recipes/high_speed_module.json +++ b/src/main/resources/data/prettypipes/recipe/high_speed_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:high_speed_module" + "id": "prettypipes:high_speed_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/item_terminal.json b/src/main/resources/data/prettypipes/recipe/item_terminal.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/item_terminal.json rename to src/main/resources/data/prettypipes/recipe/item_terminal.json index 9a9e8a7..71a142f 100644 --- a/src/main/resources/data/prettypipes/recipes/item_terminal.json +++ b/src/main/resources/data/prettypipes/recipe/item_terminal.json @@ -19,13 +19,13 @@ "item": "minecraft:iron_block" }, "C": { - "tag": "forge:chests" + "tag": "c:chests" }, "D": { "item": "minecraft:diamond" } }, "result": { - "item": "prettypipes:item_terminal" + "id": "prettypipes:item_terminal" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/low_crafting_module.json b/src/main/resources/data/prettypipes/recipe/low_crafting_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/low_crafting_module.json rename to src/main/resources/data/prettypipes/recipe/low_crafting_module.json index ed73023..a9071db 100644 --- a/src/main/resources/data/prettypipes/recipes/low_crafting_module.json +++ b/src/main/resources/data/prettypipes/recipe/low_crafting_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:low_crafting_module" + "id": "prettypipes:low_crafting_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/low_extraction_module.json b/src/main/resources/data/prettypipes/recipe/low_extraction_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/low_extraction_module.json rename to src/main/resources/data/prettypipes/recipe/low_extraction_module.json index 74062ed..33a8990 100644 --- a/src/main/resources/data/prettypipes/recipes/low_extraction_module.json +++ b/src/main/resources/data/prettypipes/recipe/low_extraction_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:low_extraction_module" + "id": "prettypipes:low_extraction_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/low_filter_module.json b/src/main/resources/data/prettypipes/recipe/low_filter_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/low_filter_module.json rename to src/main/resources/data/prettypipes/recipe/low_filter_module.json index 34b2e27..6db43e5 100644 --- a/src/main/resources/data/prettypipes/recipes/low_filter_module.json +++ b/src/main/resources/data/prettypipes/recipe/low_filter_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:low_filter_module" + "id": "prettypipes:low_filter_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/low_high_priority_module.json b/src/main/resources/data/prettypipes/recipe/low_high_priority_module.json similarity index 86% rename from src/main/resources/data/prettypipes/recipes/low_high_priority_module.json rename to src/main/resources/data/prettypipes/recipe/low_high_priority_module.json index 7778085..f9df85f 100644 --- a/src/main/resources/data/prettypipes/recipes/low_high_priority_module.json +++ b/src/main/resources/data/prettypipes/recipe/low_high_priority_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:low_high_priority_module" + "id": "prettypipes:low_high_priority_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/low_low_priority_module.json b/src/main/resources/data/prettypipes/recipe/low_low_priority_module.json similarity index 77% rename from src/main/resources/data/prettypipes/recipes/low_low_priority_module.json rename to src/main/resources/data/prettypipes/recipe/low_low_priority_module.json index ac41473..e6bf466 100644 --- a/src/main/resources/data/prettypipes/recipes/low_low_priority_module.json +++ b/src/main/resources/data/prettypipes/recipe/low_low_priority_module.json @@ -10,13 +10,13 @@ "item": "minecraft:redstone" }, "C": { - "tag": "forge:cobblestone" + "tag": "c:cobblestones" }, "M": { "item": "prettypipes:blank_module" } }, "result": { - "item": "prettypipes:low_low_priority_module" + "id": "prettypipes:low_low_priority_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/low_retrieval_module.json b/src/main/resources/data/prettypipes/recipe/low_retrieval_module.json similarity index 89% rename from src/main/resources/data/prettypipes/recipes/low_retrieval_module.json rename to src/main/resources/data/prettypipes/recipe/low_retrieval_module.json index 54a18d4..fc2b33a 100644 --- a/src/main/resources/data/prettypipes/recipes/low_retrieval_module.json +++ b/src/main/resources/data/prettypipes/recipe/low_retrieval_module.json @@ -20,6 +20,6 @@ } }, "result": { - "item": "prettypipes:low_retrieval_module" + "id": "prettypipes:low_retrieval_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/low_speed_module.json b/src/main/resources/data/prettypipes/recipe/low_speed_module.json similarity index 88% rename from src/main/resources/data/prettypipes/recipes/low_speed_module.json rename to src/main/resources/data/prettypipes/recipe/low_speed_module.json index 9ae0491..fdca1e3 100644 --- a/src/main/resources/data/prettypipes/recipes/low_speed_module.json +++ b/src/main/resources/data/prettypipes/recipe/low_speed_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:low_speed_module" + "id": "prettypipes:low_speed_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/medium_crafting_module.json b/src/main/resources/data/prettypipes/recipe/medium_crafting_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/medium_crafting_module.json rename to src/main/resources/data/prettypipes/recipe/medium_crafting_module.json index ddf9d07..1b8f588 100644 --- a/src/main/resources/data/prettypipes/recipes/medium_crafting_module.json +++ b/src/main/resources/data/prettypipes/recipe/medium_crafting_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:medium_crafting_module" + "id": "prettypipes:medium_crafting_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/medium_extraction_module.json b/src/main/resources/data/prettypipes/recipe/medium_extraction_module.json similarity index 84% rename from src/main/resources/data/prettypipes/recipes/medium_extraction_module.json rename to src/main/resources/data/prettypipes/recipe/medium_extraction_module.json index baf48ba..3695539 100644 --- a/src/main/resources/data/prettypipes/recipes/medium_extraction_module.json +++ b/src/main/resources/data/prettypipes/recipe/medium_extraction_module.json @@ -14,6 +14,6 @@ } }, "result": { - "item": "prettypipes:medium_extraction_module" + "id": "prettypipes:medium_extraction_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/medium_filter_module.json b/src/main/resources/data/prettypipes/recipe/medium_filter_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/medium_filter_module.json rename to src/main/resources/data/prettypipes/recipe/medium_filter_module.json index 20bd606..5310999 100644 --- a/src/main/resources/data/prettypipes/recipes/medium_filter_module.json +++ b/src/main/resources/data/prettypipes/recipe/medium_filter_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:medium_filter_module" + "id": "prettypipes:medium_filter_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/medium_high_priority_module.json b/src/main/resources/data/prettypipes/recipe/medium_high_priority_module.json similarity index 83% rename from src/main/resources/data/prettypipes/recipes/medium_high_priority_module.json rename to src/main/resources/data/prettypipes/recipe/medium_high_priority_module.json index f3be962..5c3ff37 100644 --- a/src/main/resources/data/prettypipes/recipes/medium_high_priority_module.json +++ b/src/main/resources/data/prettypipes/recipe/medium_high_priority_module.json @@ -14,6 +14,6 @@ } }, "result": { - "item": "prettypipes:medium_high_priority_module" + "id": "prettypipes:medium_high_priority_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/medium_low_priority_module.json b/src/main/resources/data/prettypipes/recipe/medium_low_priority_module.json similarity index 72% rename from src/main/resources/data/prettypipes/recipes/medium_low_priority_module.json rename to src/main/resources/data/prettypipes/recipe/medium_low_priority_module.json index 89319ca..239e726 100644 --- a/src/main/resources/data/prettypipes/recipes/medium_low_priority_module.json +++ b/src/main/resources/data/prettypipes/recipe/medium_low_priority_module.json @@ -7,13 +7,13 @@ ], "key": { "C": { - "tag": "forge:cobblestone" + "tag": "c:cobblestones" }, "M": { "item": "prettypipes:low_low_priority_module" } }, "result": { - "item": "prettypipes:medium_low_priority_module" + "id": "prettypipes:medium_low_priority_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/medium_retrieval_module.json b/src/main/resources/data/prettypipes/recipe/medium_retrieval_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/medium_retrieval_module.json rename to src/main/resources/data/prettypipes/recipe/medium_retrieval_module.json index 827e88c..35367f7 100644 --- a/src/main/resources/data/prettypipes/recipes/medium_retrieval_module.json +++ b/src/main/resources/data/prettypipes/recipe/medium_retrieval_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:medium_retrieval_module" + "id": "prettypipes:medium_retrieval_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/medium_speed_module.json b/src/main/resources/data/prettypipes/recipe/medium_speed_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/medium_speed_module.json rename to src/main/resources/data/prettypipes/recipe/medium_speed_module.json index 7e95139..3458804 100644 --- a/src/main/resources/data/prettypipes/recipes/medium_speed_module.json +++ b/src/main/resources/data/prettypipes/recipe/medium_speed_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:medium_speed_module" + "id": "prettypipes:medium_speed_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/mod_filter_modifier.json b/src/main/resources/data/prettypipes/recipe/mod_filter_modifier.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/mod_filter_modifier.json rename to src/main/resources/data/prettypipes/recipe/mod_filter_modifier.json index 3558171..ff23857 100644 --- a/src/main/resources/data/prettypipes/recipes/mod_filter_modifier.json +++ b/src/main/resources/data/prettypipes/recipe/mod_filter_modifier.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:mod_filter_modifier" + "id": "prettypipes:mod_filter_modifier" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/module_clearing.json b/src/main/resources/data/prettypipes/recipe/module_clearing.json similarity index 100% rename from src/main/resources/data/prettypipes/recipes/module_clearing.json rename to src/main/resources/data/prettypipes/recipe/module_clearing.json diff --git a/src/main/resources/data/prettypipes/recipes/nbt_filter_modifier.json b/src/main/resources/data/prettypipes/recipe/nbt_filter_modifier.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/nbt_filter_modifier.json rename to src/main/resources/data/prettypipes/recipe/nbt_filter_modifier.json index 7e69408..ec599af 100644 --- a/src/main/resources/data/prettypipes/recipes/nbt_filter_modifier.json +++ b/src/main/resources/data/prettypipes/recipe/nbt_filter_modifier.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:nbt_filter_modifier" + "id": "prettypipes:nbt_filter_modifier" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/pipe.json b/src/main/resources/data/prettypipes/recipe/pipe.json similarity index 84% rename from src/main/resources/data/prettypipes/recipes/pipe.json rename to src/main/resources/data/prettypipes/recipe/pipe.json index 4f5c002..1f80d8e 100644 --- a/src/main/resources/data/prettypipes/recipes/pipe.json +++ b/src/main/resources/data/prettypipes/recipe/pipe.json @@ -13,14 +13,14 @@ "item": "minecraft:iron_bars" }, "G": { - "tag": "forge:glass" + "tag": "c:glass_blocks" }, "C": { "item": "minecraft:copper_ingot" } }, "result": { - "item": "prettypipes:pipe", + "id": "prettypipes:pipe", "count": 4 } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/pipe_frame.json b/src/main/resources/data/prettypipes/recipe/pipe_frame.json similarity index 86% rename from src/main/resources/data/prettypipes/recipes/pipe_frame.json rename to src/main/resources/data/prettypipes/recipe/pipe_frame.json index eecaeae..082bad6 100644 --- a/src/main/resources/data/prettypipes/recipes/pipe_frame.json +++ b/src/main/resources/data/prettypipes/recipe/pipe_frame.json @@ -12,6 +12,6 @@ } ], "result": { - "item": "prettypipes:pipe_frame" + "id": "prettypipes:pipe_frame" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/pressurizer.json b/src/main/resources/data/prettypipes/recipe/pressurizer.json similarity index 89% rename from src/main/resources/data/prettypipes/recipes/pressurizer.json rename to src/main/resources/data/prettypipes/recipe/pressurizer.json index de99dc4..7588783 100644 --- a/src/main/resources/data/prettypipes/recipes/pressurizer.json +++ b/src/main/resources/data/prettypipes/recipe/pressurizer.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:pressurizer" + "id": "prettypipes:pressurizer" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/random_sorting_modifier.json b/src/main/resources/data/prettypipes/recipe/random_sorting_modifier.json similarity index 86% rename from src/main/resources/data/prettypipes/recipes/random_sorting_modifier.json rename to src/main/resources/data/prettypipes/recipe/random_sorting_modifier.json index 12eadd8..22166a3 100644 --- a/src/main/resources/data/prettypipes/recipes/random_sorting_modifier.json +++ b/src/main/resources/data/prettypipes/recipe/random_sorting_modifier.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:random_sorting_modifier" + "id": "prettypipes:random_sorting_modifier" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/redstone_module.json b/src/main/resources/data/prettypipes/recipe/redstone_module.json similarity index 88% rename from src/main/resources/data/prettypipes/recipes/redstone_module.json rename to src/main/resources/data/prettypipes/recipe/redstone_module.json index 0ca185b..a2c0e42 100644 --- a/src/main/resources/data/prettypipes/recipes/redstone_module.json +++ b/src/main/resources/data/prettypipes/recipe/redstone_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:redstone_module" + "id": "prettypipes:redstone_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/round_robin_sorting_modifier.json b/src/main/resources/data/prettypipes/recipe/round_robin_sorting_modifier.json similarity index 85% rename from src/main/resources/data/prettypipes/recipes/round_robin_sorting_modifier.json rename to src/main/resources/data/prettypipes/recipe/round_robin_sorting_modifier.json index 8bc9a67..f3e04ad 100644 --- a/src/main/resources/data/prettypipes/recipes/round_robin_sorting_modifier.json +++ b/src/main/resources/data/prettypipes/recipe/round_robin_sorting_modifier.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:round_robin_sorting_modifier" + "id": "prettypipes:round_robin_sorting_modifier" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/stack_size_module.json b/src/main/resources/data/prettypipes/recipe/stack_size_module.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/stack_size_module.json rename to src/main/resources/data/prettypipes/recipe/stack_size_module.json index 9e7eec4..4b0386a 100644 --- a/src/main/resources/data/prettypipes/recipes/stack_size_module.json +++ b/src/main/resources/data/prettypipes/recipe/stack_size_module.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:stack_size_module" + "id": "prettypipes:stack_size_module" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/tag_filter_modifier.json b/src/main/resources/data/prettypipes/recipe/tag_filter_modifier.json similarity index 87% rename from src/main/resources/data/prettypipes/recipes/tag_filter_modifier.json rename to src/main/resources/data/prettypipes/recipe/tag_filter_modifier.json index 5b6694b..c24a22e 100644 --- a/src/main/resources/data/prettypipes/recipes/tag_filter_modifier.json +++ b/src/main/resources/data/prettypipes/recipe/tag_filter_modifier.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "prettypipes:tag_filter_modifier" + "id": "prettypipes:tag_filter_modifier" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/prettypipes/recipes/wrench.json b/src/main/resources/data/prettypipes/recipe/wrench.json similarity index 80% rename from src/main/resources/data/prettypipes/recipes/wrench.json rename to src/main/resources/data/prettypipes/recipe/wrench.json index c73f60f..7c07ed3 100644 --- a/src/main/resources/data/prettypipes/recipes/wrench.json +++ b/src/main/resources/data/prettypipes/recipe/wrench.json @@ -13,10 +13,10 @@ "item": "minecraft:iron_ingot" }, "R": { - "tag": "forge:dyes/red" + "tag": "c:dyes/red" } }, "result": { - "item": "prettypipes:wrench" + "id": "prettypipes:wrench" } -} \ No newline at end of file +}