diff --git a/src/generated/resources/.cache/dc4224e5ed0ee367217e022442da0b7476174a87 b/src/generated/resources/.cache/dc4224e5ed0ee367217e022442da0b7476174a87 index 360409e0dd..3eb46bff2f 100644 --- a/src/generated/resources/.cache/dc4224e5ed0ee367217e022442da0b7476174a87 +++ b/src/generated/resources/.cache/dc4224e5ed0ee367217e022442da0b7476174a87 @@ -1,4 +1,4 @@ -// 1.21.1 2025-02-03T11:20:43.485719 Registrate Provider for create [Registries, Data Maps, Recipes, Advancements, Loot Tables, Tags (enchantments), Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), generic_server_provider, Blockstates, Item models, Lang (en_us/en_ud), generic_client_provider] +// 1.21.1 2025-02-07T11:33:14.361841 Registrate Provider for create [Registries, Data Maps, Recipes, Advancements, Loot Tables, Tags (enchantments), Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), generic_server_provider, Blockstates, Item models, Lang (en_us/en_ud), generic_client_provider] 60bbdf92d2ac9824ea6144955c74043a6005f79d assets/create/blockstates/acacia_window.json 6a67703c2697d81b7dc83e9d72a66f9c9ff08383 assets/create/blockstates/acacia_window_pane.json c3ae87b62e81d8e9476eccd793bb1548d74c66a1 assets/create/blockstates/adjustable_chain_gearshift.json @@ -4781,6 +4781,7 @@ f43cac8216e2a9347e48cf93a43de95dd810ca20 data/create/tags/item/contraption_contr d371dfd35e49a7bef19f59c03e7f4ae20992f03d data/create/tags/item/create_ingots.json 910d0f5ccbc4c84b224eca1f1588b1695f41447b data/create/tags/item/crushed_raw_materials.json 0fa526e7e742573b603ad26b09526cf724efa1dc data/create/tags/item/deployable_drink.json +01652011251c3fb39bba3ad02fc4bb2c1883f865 data/create/tags/item/diving_armor.json ebd7b09daf2f64c0c04d821696b0e145683d8693 data/create/tags/item/dyed_table_cloths.json d2bb65d893d71d2d9871f81f430c233a93adb4bb data/create/tags/item/invalid_for_track_paving.json cebf5fd98eddf5c14befdd47052be678eea79542 data/create/tags/item/packages.json diff --git a/src/generated/resources/data/create/tags/item/diving_armor.json b/src/generated/resources/data/create/tags/item/diving_armor.json new file mode 100644 index 0000000000..f3ad7e6ba4 --- /dev/null +++ b/src/generated/resources/data/create/tags/item/diving_armor.json @@ -0,0 +1,10 @@ +{ + "values": [ + "create:copper_backtank", + "create:netherite_backtank", + "create:copper_diving_helmet", + "create:netherite_diving_helmet", + "create:copper_diving_boots", + "create:netherite_diving_boots" + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 0d8973469a..26f381a992 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -290,7 +290,7 @@ public class AllItems { p -> new BacktankItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving"), COPPER_BACKTANK_PLACEABLE)) .model(AssetLookup.customGenericItemModel("_", "item")) - .tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag) + .tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag, AllItemTags.DIVING_ARMOR.tag) .tag(ItemTags.CHEST_ARMOR) .register(), @@ -300,7 +300,7 @@ public class AllItems { NETHERITE_BACKTANK_PLACEABLE)) .model(AssetLookup.customGenericItemModel("_", "item")) .properties(p -> p.fireResistant()) - .tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag) + .tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag, AllItemTags.DIVING_ARMOR.tag) .tag(ItemTags.CHEST_ARMOR) .register(); @@ -311,14 +311,14 @@ public class AllItems { .item("copper_diving_helmet", p -> new DivingHelmetItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving"))) .properties(p -> p.durability(Type.HELMET.getDurability(7))) - .tag(ItemTags.HEAD_ARMOR) + .tag(ItemTags.HEAD_ARMOR, AllItemTags.DIVING_ARMOR.tag) .register(), NETHERITE_DIVING_HELMET = REGISTRATE .item("netherite_diving_helmet", p -> new DivingHelmetItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving"))) .properties(p -> p.fireResistant().durability(Type.HELMET.getDurability(37))) - .tag(ItemTags.HEAD_ARMOR) + .tag(ItemTags.HEAD_ARMOR, AllItemTags.DIVING_ARMOR.tag) .register(); public static final ItemEntry @@ -328,14 +328,14 @@ public class AllItems { .item("copper_diving_boots", p -> new DivingBootsItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving"))) .properties(p -> p.durability(Type.BOOTS.getDurability(7))) - .tag(ItemTags.FOOT_ARMOR) + .tag(ItemTags.FOOT_ARMOR, AllItemTags.DIVING_ARMOR.tag) .register(), NETHERITE_DIVING_BOOTS = REGISTRATE .item("netherite_diving_boots", p -> new DivingBootsItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving"))) .properties(p -> p.fireResistant().durability(Type.BOOTS.getDurability(37))) - .tag(ItemTags.FOOT_ARMOR) + .tag(ItemTags.FOOT_ARMOR, AllItemTags.DIVING_ARMOR.tag) .register(); public static final ItemEntry diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index 5f3ce2f29d..7adaae2603 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -171,6 +171,7 @@ public class AllTags { CONTRAPTION_CONTROLLED, CREATE_INGOTS, CRUSHED_RAW_MATERIALS, + DIVING_ARMOR, INVALID_FOR_TRACK_PAVING, DEPLOYABLE_DRINK, PRESSURIZED_AIR_SOURCES, diff --git a/src/main/java/com/simibubi/create/foundation/mixin/SmithingTrimRecipeMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/SmithingTrimRecipeMixin.java new file mode 100644 index 0000000000..6c61f28e5d --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/mixin/SmithingTrimRecipeMixin.java @@ -0,0 +1,20 @@ +package com.simibubi.create.foundation.mixin; + +import com.simibubi.create.AllTags.AllItemTags; + +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.SmithingTrimRecipe; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(SmithingTrimRecipe.class) +public class SmithingTrimRecipeMixin { + @Inject(method = "isBaseIngredient", at = @At("HEAD"), cancellable = true) + private void create$preventTrimmingDivingArmor(ItemStack stack, CallbackInfoReturnable cir) { + if (stack.is(AllItemTags.DIVING_ARMOR.tag)) + cir.setReturnValue(false); + } +} diff --git a/src/main/resources/create.mixins.json b/src/main/resources/create.mixins.json index 53f1e897e1..8d3debe0de 100644 --- a/src/main/resources/create.mixins.json +++ b/src/main/resources/create.mixins.json @@ -15,11 +15,12 @@ "EntityMixin", "LavaSwimmingMixin", "MapItemSavedDataMixin", + "MobMixin", "PlayerMixin", "ShulkerBoxBlockMixin", "SmithingMenuMixin", + "SmithingTrimRecipeMixin", "TestCommandMixin", - "MobMixin", "WaterWheelFluidSpreadMixin", "accessor.AbstractRegistrateAccessor", "accessor.BlockBehaviourAccessor", @@ -32,6 +33,7 @@ "accessor.ItemStackHandlerAccessor", "accessor.LivingEntityAccessor", "accessor.MappedRegistryAccessor", + "accessor.MinecartFurnaceAccessor", "accessor.NbtAccounterAccessor", "accessor.PotionBrewingAccessor", "accessor.ProjectileDispenseBehaviorAccessor", @@ -39,7 +41,6 @@ "accessor.ShapedRecipeAccessor", "accessor.SystemReportAccessor", "accessor.UseOnContextAccessor", - "accessor.MinecartFurnaceAccessor", "compat.journeymap.MapRendererAccessor", "datafixer.BlockPosFormatAndRenamesFixMixin", "datafixer.ItemStackComponentizationFixMixin",