diff --git a/src/generated/resources/data/pneumaticcraft/recipe/one_probe_crafting.json b/src/generated/resources/data/pneumaticcraft/recipe/one_probe_crafting.json deleted file mode 100644 index 7c843cc51..000000000 --- a/src/generated/resources/data/pneumaticcraft/recipe/one_probe_crafting.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "neoforge:conditions": [ - { - "type": "neoforge:mod_loaded", - "modid": "theoneprobe" - } - ], - "type": "pneumaticcraft:one_probe_helmet_crafting", - "category": "misc" -} \ No newline at end of file diff --git a/src/main/java/me/desht/pneumaticcraft/common/recipes/special/OneProbeCrafting.java b/src/main/java/me/desht/pneumaticcraft/common/recipes/special/OneProbeCrafting.java deleted file mode 100644 index 79a717121..000000000 --- a/src/main/java/me/desht/pneumaticcraft/common/recipes/special/OneProbeCrafting.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of pnc-repressurized. - * - * pnc-repressurized is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * pnc-repressurized is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with pnc-repressurized. If not, see . - */ - -package me.desht.pneumaticcraft.common.recipes.special; - -import com.google.common.base.Suppliers; -import me.desht.pneumaticcraft.common.recipes.ModCraftingHelper; -import me.desht.pneumaticcraft.common.registry.ModItems; -import me.desht.pneumaticcraft.common.registry.ModRecipeSerializers; -import me.desht.pneumaticcraft.common.thirdparty.theoneprobe.ProbeHelmet; -import me.desht.pneumaticcraft.common.thirdparty.theoneprobe.TheOneProbe; -import me.desht.pneumaticcraft.lib.ModIds; -import net.minecraft.core.HolderLookup; -import net.minecraft.core.NonNullList; -import net.minecraft.core.registries.BuiltInRegistries; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.*; -import net.minecraft.world.level.Level; - -import java.util.List; -import java.util.function.Predicate; -import java.util.function.Supplier; - -public class OneProbeCrafting extends ShapelessRecipe { - private static final Supplier oneProbeItem - = Suppliers.memoize(() -> BuiltInRegistries.ITEM.get(ResourceLocation.fromNamespaceAndPath(ModIds.THE_ONE_PROBE, "probe"))); - - protected static final List> ITEM_PREDICATE = List.of( - stack -> stack.getItem() == ModItems.PNEUMATIC_HELMET.get(), - stack -> stack.getItem() == oneProbeItem.get() && !stack.isEmpty() - ); - - public OneProbeCrafting(CraftingBookCategory category) { - super("", category, - TheOneProbe.oneProbeEnabled ? ProbeHelmet.PNEUMATIC_HELMET_PROBE.toStack() : ModItems.PNEUMATIC_HELMET.toStack(), - NonNullList.of(Ingredient.EMPTY, Ingredient.of(ModItems.PNEUMATIC_HELMET.get()), Ingredient.of(oneProbeItem.get())) - ); - } - - @Override - public boolean matches(CraftingInput inv, Level worldIn) { - return TheOneProbe.oneProbeEnabled && ModCraftingHelper.allPresent(inv, ITEM_PREDICATE); - } - - @Override - public ItemStack assemble(CraftingInput inv, HolderLookup.Provider registryAccess) { - List stacks = ModCraftingHelper.findItems(inv, ITEM_PREDICATE); - return TheOneProbe.oneProbeEnabled && stacks.size() == 2 ? - new ItemStack(ProbeHelmet.PNEUMATIC_HELMET_PROBE, 1, stacks.getFirst().getComponentsPatch()) : - ItemStack.EMPTY; - } - - @Override - public boolean canCraftInDimensions(int w, int h) { - return w * h >= 2; - } - - @Override - public RecipeSerializer getSerializer() { - return ModRecipeSerializers.ONE_PROBE_HELMET_CRAFTING.get(); - } - - public static boolean isOneProbeEnabled(ItemStack helmetStack) { - return TheOneProbe.oneProbeEnabled && helmetStack.getItem() == ProbeHelmet.PNEUMATIC_HELMET_PROBE.get(); - } -} diff --git a/src/main/java/me/desht/pneumaticcraft/common/registry/ModRecipeSerializers.java b/src/main/java/me/desht/pneumaticcraft/common/registry/ModRecipeSerializers.java index 8e7a518c3..19d91b593 100644 --- a/src/main/java/me/desht/pneumaticcraft/common/registry/ModRecipeSerializers.java +++ b/src/main/java/me/desht/pneumaticcraft/common/registry/ModRecipeSerializers.java @@ -86,8 +86,6 @@ public class ModRecipeSerializers { = RECIPE_SERIALIZERS.register(PneumaticCraftRecipeTypes.HEAT_PROPERTIES, () -> new HeatPropertiesRecipeImpl.Serializer<>(HeatPropertiesRecipeImpl::new)); - public static final Supplier> ONE_PROBE_HELMET_CRAFTING - = RECIPE_SERIALIZERS.register("one_probe_helmet_crafting", () -> new SimpleCraftingRecipeSerializer<>(OneProbeCrafting::new)); public static final Supplier> GUN_AMMO_POTION_CRAFTING = RECIPE_SERIALIZERS.register("gun_ammo_potion_crafting", () -> new SimpleCraftingRecipeSerializer<>(GunAmmoPotionCrafting::new)); public static final Supplier> DRONE_UPGRADE_CRAFTING diff --git a/src/main/java/me/desht/pneumaticcraft/common/thirdparty/theoneprobe/ProbeHelmet.java b/src/main/java/me/desht/pneumaticcraft/common/thirdparty/theoneprobe/ProbeHelmet.java deleted file mode 100644 index 2e76c5d53..000000000 --- a/src/main/java/me/desht/pneumaticcraft/common/thirdparty/theoneprobe/ProbeHelmet.java +++ /dev/null @@ -1,14 +0,0 @@ -package me.desht.pneumaticcraft.common.thirdparty.theoneprobe; - -import me.desht.pneumaticcraft.common.item.PneumaticArmorItem; -import me.desht.pneumaticcraft.common.registry.ModItems; -import net.minecraft.world.item.ArmorItem; -import net.neoforged.neoforge.registries.DeferredItem; - -public class ProbeHelmet { - public static final DeferredItem PNEUMATIC_HELMET_PROBE - = ModItems.register("pneumatic_helmet_probe", () -> new PneumaticArmorItem(ArmorItem.Type.HELMET)); - - public static void init() { - } -} diff --git a/src/main/java/me/desht/pneumaticcraft/common/thirdparty/theoneprobe/TheOneProbe.java b/src/main/java/me/desht/pneumaticcraft/common/thirdparty/theoneprobe/TheOneProbe.java index a36481d40..417c94d05 100644 --- a/src/main/java/me/desht/pneumaticcraft/common/thirdparty/theoneprobe/TheOneProbe.java +++ b/src/main/java/me/desht/pneumaticcraft/common/thirdparty/theoneprobe/TheOneProbe.java @@ -27,14 +27,12 @@ public class TheOneProbe implements IThirdParty { public static boolean oneProbeEnabled = false; public static boolean isProbeEnabled(ItemStack stack) { - return oneProbeEnabled && stack.getItem() == ProbeHelmet.PNEUMATIC_HELMET_PROBE.get(); + return false; } @Override public void preInit(IEventBus modBus) { oneProbeEnabled = true; - - ProbeHelmet.init(); } @Override diff --git a/src/main/java/me/desht/pneumaticcraft/datagen/ModRecipeProvider.java b/src/main/java/me/desht/pneumaticcraft/datagen/ModRecipeProvider.java index e0c3395ae..7f24dcbd5 100644 --- a/src/main/java/me/desht/pneumaticcraft/datagen/ModRecipeProvider.java +++ b/src/main/java/me/desht/pneumaticcraft/datagen/ModRecipeProvider.java @@ -15,7 +15,6 @@ import me.desht.pneumaticcraft.common.recipes.special.DroneColorCrafting; import me.desht.pneumaticcraft.common.recipes.special.DroneUpgradeCrafting; import me.desht.pneumaticcraft.common.recipes.special.GunAmmoPotionCrafting; -import me.desht.pneumaticcraft.common.recipes.special.OneProbeCrafting; import me.desht.pneumaticcraft.common.registry.ModBlocks; import me.desht.pneumaticcraft.common.registry.ModFluids; import me.desht.pneumaticcraft.common.registry.ModItems; @@ -1306,8 +1305,6 @@ protected void buildRecipes(RecipeOutput consumer) { .save(consumer, getId("drone_upgrade")); SpecialRecipeBuilder.special(GunAmmoPotionCrafting::new) .save(consumer, getId("gun_ammo_potion_crafting")); - SpecialRecipeBuilder.special(OneProbeCrafting::new) - .save(consumer.withConditions(new ModLoadedCondition(ModIds.THE_ONE_PROBE)), getId("one_probe_crafting")); SpecialRecipeBuilder.special(PressureEnchantingRecipe::new) .save(consumer, getId("pressure_chamber/pressure_chamber_enchanting"));