diff --git a/gradle.properties b/gradle.properties index 9f77c982e..da4fdccba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.daemon=false mod_id=sophisticatedstorage mod_group_id=sophisticatedstorage -mod_version=0.10.46 +mod_version=0.10.47 sonar_project_key=sophisticatedstorage:SophisticatedStorage github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedStorage @@ -30,6 +30,6 @@ jade_cf_file_id=4614153 chipped_cf_file_id=5077656 resourcefullib_cf_file_id=5070629 athena_cf_file_id=4764357 -sc_version=[1.20.1-0.6.34,1.20.4) +sc_version=[1.20.1-0.6.36,1.20.4) sb_version=[1.20.1-3.20.5,1.20.4) parchment_version=1.19.3-2023.03.12-1.20 diff --git a/src/generated/resources/data/minecraft/recipes/shulker_box_from_vanilla_shulker_box.json b/src/generated/resources/data/minecraft/recipes/shulker_box_from_vanilla_shulker_box.json index 5eb42de12..257532c15 100644 --- a/src/generated/resources/data/minecraft/recipes/shulker_box_from_vanilla_shulker_box.json +++ b/src/generated/resources/data/minecraft/recipes/shulker_box_from_vanilla_shulker_box.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/black_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/black_shulker_box_to_sophisticated.json index 8a755e099..ba9f98f83 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/black_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/black_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/blue_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/blue_shulker_box_to_sophisticated.json index 9f937a47a..2819fa7a1 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/blue_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/blue_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/brown_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/brown_shulker_box_to_sophisticated.json index 0bf8fdae4..df4ea8274 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/brown_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/brown_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/cyan_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/cyan_shulker_box_to_sophisticated.json index 8063503c6..57ed8f6e7 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/cyan_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/cyan_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/gray_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/gray_shulker_box_to_sophisticated.json index 0e372a00b..05de38c08 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/gray_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/gray_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/green_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/green_shulker_box_to_sophisticated.json index 3234fb971..cb08460bd 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/green_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/green_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/light_blue_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/light_blue_shulker_box_to_sophisticated.json index 5cd1c2b33..78516d253 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/light_blue_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/light_blue_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/light_gray_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/light_gray_shulker_box_to_sophisticated.json index 9840361e5..2967edf3e 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/light_gray_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/light_gray_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/lime_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/lime_shulker_box_to_sophisticated.json index 0fd4c69fe..8f500d74b 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/lime_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/lime_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/magenta_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/magenta_shulker_box_to_sophisticated.json index 975755f06..eda1d475f 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/magenta_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/magenta_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/orange_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/orange_shulker_box_to_sophisticated.json index 0568a9a37..9d5f40b37 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/orange_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/orange_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/pink_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/pink_shulker_box_to_sophisticated.json index 1508f707a..9deae3692 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/pink_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/pink_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/purple_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/purple_shulker_box_to_sophisticated.json index e9e9ff4ce..1eefb089d 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/purple_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/purple_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/red_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/red_shulker_box_to_sophisticated.json index e2dea540d..32b615da2 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/red_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/red_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/white_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/white_shulker_box_to_sophisticated.json index bafa2ca46..7855e48de 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/white_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/white_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/generated/resources/data/sophisticatedstorage/recipes/yellow_shulker_box_to_sophisticated.json b/src/generated/resources/data/sophisticatedstorage/recipes/yellow_shulker_box_to_sophisticated.json index ac310e250..882d9de3c 100644 --- a/src/generated/resources/data/sophisticatedstorage/recipes/yellow_shulker_box_to_sophisticated.json +++ b/src/generated/resources/data/sophisticatedstorage/recipes/yellow_shulker_box_to_sophisticated.json @@ -1,5 +1,5 @@ { - "type": "minecraft:crafting_shapeless", + "type": "sophisticatedstorage:shulker_box_from_vanilla_shapeless", "conditions": [ { "type": "sophisticatedcore:item_enabled", diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/compat/jei/StoragePlugin.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/compat/jei/StoragePlugin.java index 9535ceb30..c7fb17961 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/compat/jei/StoragePlugin.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/compat/jei/StoragePlugin.java @@ -12,7 +12,11 @@ import net.minecraft.client.renderer.Rect2i; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.ShapedRecipe; +import net.minecraft.world.item.crafting.ShapelessRecipe; +import net.p3pp3rf1y.sophisticatedbackpacks.crafting.BackpackUpgradeRecipe; import net.p3pp3rf1y.sophisticatedcore.client.gui.SettingsScreen; +import net.p3pp3rf1y.sophisticatedcore.compat.jei.ClientRecipeHelper; import net.p3pp3rf1y.sophisticatedcore.compat.jei.CraftingContainerRecipeTransferHandlerBase; import net.p3pp3rf1y.sophisticatedcore.compat.jei.SettingsGhostIngredientHandler; import net.p3pp3rf1y.sophisticatedcore.compat.jei.StorageGhostIngredientHandler; @@ -20,6 +24,7 @@ import net.p3pp3rf1y.sophisticatedstorage.client.gui.StorageScreen; import net.p3pp3rf1y.sophisticatedstorage.client.gui.StorageSettingsScreen; import net.p3pp3rf1y.sophisticatedstorage.common.gui.StorageContainerMenu; +import net.p3pp3rf1y.sophisticatedstorage.crafting.ShulkerBoxFromVanillaShapelessRecipe; import net.p3pp3rf1y.sophisticatedstorage.init.ModBlocks; import net.p3pp3rf1y.sophisticatedstorage.init.ModItems; import net.p3pp3rf1y.sophisticatedstorage.item.BarrelBlockItem; @@ -142,6 +147,7 @@ public void registerRecipes(IRecipeRegistration registration) { registration.addRecipes(RecipeTypes.CRAFTING, DyeRecipesMaker.getRecipes()); registration.addRecipes(RecipeTypes.CRAFTING, TierUpgradeRecipesMaker.getShapedCraftingRecipes()); registration.addRecipes(RecipeTypes.CRAFTING, TierUpgradeRecipesMaker.getShapelessCraftingRecipes()); + registration.addRecipes(RecipeTypes.CRAFTING, ClientRecipeHelper.getAndTransformAvailableRecipes(ShulkerBoxFromVanillaShapelessRecipe.REGISTERED_RECIPES, ShulkerBoxFromVanillaShapelessRecipe.class, ClientRecipeHelper::copyShapelessRecipe)); registration.addRecipes(RecipeTypes.CRAFTING, ShulkerBoxFromChestRecipesMaker.getRecipes()); registration.addRecipes(RecipeTypes.CRAFTING, FlatBarrelRecipesMaker.getRecipes()); } diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/crafting/ShulkerBoxFromVanillaShapelessRecipe.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/crafting/ShulkerBoxFromVanillaShapelessRecipe.java new file mode 100644 index 000000000..0772b6fbd --- /dev/null +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/crafting/ShulkerBoxFromVanillaShapelessRecipe.java @@ -0,0 +1,87 @@ +package net.p3pp3rf1y.sophisticatedstorage.crafting; + +import net.minecraft.core.RegistryAccess; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.inventory.CraftingContainer; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.ShapelessRecipe; +import net.minecraft.world.level.Level; +import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.p3pp3rf1y.sophisticatedcore.crafting.IWrapperRecipe; +import net.p3pp3rf1y.sophisticatedcore.crafting.RecipeWrapperSerializer; +import net.p3pp3rf1y.sophisticatedcore.util.InventoryHelper; +import net.p3pp3rf1y.sophisticatedstorage.init.ModBlocks; +import net.p3pp3rf1y.sophisticatedstorage.item.CapabilityStorageWrapper; +import net.p3pp3rf1y.sophisticatedstorage.item.WoodStorageBlockItem; + +import java.util.LinkedHashSet; +import java.util.Optional; +import java.util.Set; + +public class ShulkerBoxFromVanillaShapelessRecipe extends ShapelessRecipe implements IWrapperRecipe { + public static final Set REGISTERED_RECIPES = new LinkedHashSet<>(); + private final ShapelessRecipe compose; + + public ShulkerBoxFromVanillaShapelessRecipe(ShapelessRecipe compose) { + super(compose.getId(), compose.getGroup(), compose.category(), compose.result, compose.getIngredients()); + this.compose = compose; + REGISTERED_RECIPES.add(compose.getId()); + } + + @Override + public boolean matches(CraftingContainer inventory, Level level) { + return super.matches(inventory, level) && getVanillaShulkerBox(inventory).map(storage -> !(storage.getItem() instanceof WoodStorageBlockItem) || !WoodStorageBlockItem.isPacked(storage)).orElse(false); + } + + @Override + public ShapelessRecipe getCompose() { + return compose; + } + + @Override + public ItemStack assemble(CraftingContainer input, RegistryAccess registries) { + ItemStack upgradedStorage = super.assemble(input, registries); + getVanillaShulkerBox(input).ifPresent(vanillaShulkerBox -> { + + vanillaShulkerBox.getCapability(ForgeCapabilities.ITEM_HANDLER).ifPresent(itemCap -> { + upgradedStorage.getCapability(CapabilityStorageWrapper.getCapabilityInstance()).ifPresent(wrapper -> { + InventoryHelper.iterate(itemCap, (slot, stack) -> { + if (!stack.isEmpty()) { + wrapper.getInventoryHandler().insertItem(stack, false); + } + }); + }); + }); + }); + return upgradedStorage; + } + + @Override + public boolean isSpecial() { + return true; + } + + private Optional getVanillaShulkerBox(CraftingContainer input) { + for (int slot = 0; slot < input.getContainerSize(); slot++) { + ItemStack slotStack = input.getItem(slot); + if (slotStack.getItem() instanceof BlockItem blockItem && blockItem.getBlock() instanceof net.minecraft.world.level.block.ShulkerBoxBlock) { + return Optional.of(slotStack); + } + } + + return Optional.empty(); + } + + @Override + public RecipeSerializer getSerializer() { + return ModBlocks.SHULKER_BOX_FROM_VANILLA_SHAPELESS_RECIPE_SERIALIZER.get(); + } + + public static class Serializer extends RecipeWrapperSerializer { + public Serializer() { + super(ShulkerBoxFromVanillaShapelessRecipe::new, RecipeSerializer.SHAPELESS_RECIPE); + } + } +} diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/data/StorageRecipeProvider.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/data/StorageRecipeProvider.java index 254d59566..eb7384885 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/data/StorageRecipeProvider.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/data/StorageRecipeProvider.java @@ -349,7 +349,7 @@ private void addShulkerBoxRecipes(Consumer consumer) { .unlockedBy("has_shulker_shell", has(Items.SHULKER_SHELL)) .save(consumer); - ShapelessBasedRecipeBuilder.shapeless(ModBlocks.SHULKER_BOX_ITEM.get()) + ShapelessBasedRecipeBuilder.shapeless(ModBlocks.SHULKER_BOX_ITEM.get(), ModBlocks.SHULKER_BOX_FROM_VANILLA_SHAPELESS_RECIPE_SERIALIZER.get()) .requires(Items.SHULKER_BOX).requires(Items.REDSTONE_TORCH) .save(consumer, "shulker_box_from_vanilla_shulker_box"); @@ -1143,7 +1143,7 @@ private void woodChestRecipe(Consumer consumer, WoodType woodTyp private void tintedShulkerBoxRecipe(Consumer consumer, Block vanillaShulkerBox, DyeColor dyeColor) { //noinspection ConstantConditions String vanillaShulkerBoxName = ForgeRegistries.BLOCKS.getKey(vanillaShulkerBox).getPath(); - ShapelessBasedRecipeBuilder.shapeless(ModBlocks.SHULKER_BOX.get().getTintedStack(dyeColor)).requires(vanillaShulkerBox).requires(Items.REDSTONE_TORCH) + ShapelessBasedRecipeBuilder.shapeless(ModBlocks.SHULKER_BOX.get().getTintedStack(dyeColor), ModBlocks.SHULKER_BOX_FROM_VANILLA_SHAPELESS_RECIPE_SERIALIZER.get()).requires(vanillaShulkerBox).requires(Items.REDSTONE_TORCH) .unlockedBy("has_" + vanillaShulkerBoxName, has(vanillaShulkerBox)) .save(consumer, SophisticatedStorage.getRL(vanillaShulkerBoxName + "_to_sophisticated")); } diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/init/ModBlocks.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/init/ModBlocks.java index 8bcd6eac3..b7d2e99c5 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/init/ModBlocks.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/init/ModBlocks.java @@ -56,6 +56,8 @@ import net.p3pp3rf1y.sophisticatedstorage.item.ShulkerBoxItem; import net.p3pp3rf1y.sophisticatedstorage.item.WoodStorageBlockItem; +import java.util.function.Supplier; + public class ModBlocks { private static final String LIMITED_BARREL_NAME = "limited_barrel"; @@ -285,6 +287,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { public static final RegistryObject> STORAGE_DYE_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register("storage_dye", () -> new SimpleCraftingRecipeSerializer<>(StorageDyeRecipe::new)); public static final RegistryObject> STORAGE_TIER_UPGRADE_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register("storage_tier_upgrade", StorageTierUpgradeRecipe.Serializer::new); public static final RegistryObject> STORAGE_TIER_UPGRADE_SHAPELESS_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register("storage_tier_upgrade_shapeless", StorageTierUpgradeShapelessRecipe.Serializer::new); + public static final Supplier> SHULKER_BOX_FROM_VANILLA_SHAPELESS_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register("shulker_box_from_vanilla_shapeless", ShulkerBoxFromVanillaShapelessRecipe.Serializer::new); public static final RegistryObject> SHULKER_BOX_FROM_CHEST_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register("shulker_box_from_chest", ShulkerBoxFromChestRecipe.Serializer::new); public static final RegistryObject> FLAT_TOP_BARREL_TOGGLE_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register("flat_top_barrel_toggle", () -> new SimpleCraftingRecipeSerializer<>(FlatTopBarrelToggleRecipe::new)); public static final RegistryObject> BARREL_MATERIAL_RECIPE_SERIALIZER = RECIPE_SERIALIZERS.register("barrel_material", () -> new SimpleCraftingRecipeSerializer<>(BarrelMaterialRecipe::new));