- Fix diving armor being trimmable
This commit is contained in:
IThundxr 2025-02-07 11:35:31 -05:00
parent 5358b30c16
commit 4a49259d20
No known key found for this signature in database
6 changed files with 42 additions and 9 deletions

View file

@ -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 60bbdf92d2ac9824ea6144955c74043a6005f79d assets/create/blockstates/acacia_window.json
6a67703c2697d81b7dc83e9d72a66f9c9ff08383 assets/create/blockstates/acacia_window_pane.json 6a67703c2697d81b7dc83e9d72a66f9c9ff08383 assets/create/blockstates/acacia_window_pane.json
c3ae87b62e81d8e9476eccd793bb1548d74c66a1 assets/create/blockstates/adjustable_chain_gearshift.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 d371dfd35e49a7bef19f59c03e7f4ae20992f03d data/create/tags/item/create_ingots.json
910d0f5ccbc4c84b224eca1f1588b1695f41447b data/create/tags/item/crushed_raw_materials.json 910d0f5ccbc4c84b224eca1f1588b1695f41447b data/create/tags/item/crushed_raw_materials.json
0fa526e7e742573b603ad26b09526cf724efa1dc data/create/tags/item/deployable_drink.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 ebd7b09daf2f64c0c04d821696b0e145683d8693 data/create/tags/item/dyed_table_cloths.json
d2bb65d893d71d2d9871f81f430c233a93adb4bb data/create/tags/item/invalid_for_track_paving.json d2bb65d893d71d2d9871f81f430c233a93adb4bb data/create/tags/item/invalid_for_track_paving.json
cebf5fd98eddf5c14befdd47052be678eea79542 data/create/tags/item/packages.json cebf5fd98eddf5c14befdd47052be678eea79542 data/create/tags/item/packages.json

View file

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

View file

@ -290,7 +290,7 @@ public class AllItems {
p -> new BacktankItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving"), p -> new BacktankItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving"),
COPPER_BACKTANK_PLACEABLE)) COPPER_BACKTANK_PLACEABLE))
.model(AssetLookup.customGenericItemModel("_", "item")) .model(AssetLookup.customGenericItemModel("_", "item"))
.tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag) .tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag, AllItemTags.DIVING_ARMOR.tag)
.tag(ItemTags.CHEST_ARMOR) .tag(ItemTags.CHEST_ARMOR)
.register(), .register(),
@ -300,7 +300,7 @@ public class AllItems {
NETHERITE_BACKTANK_PLACEABLE)) NETHERITE_BACKTANK_PLACEABLE))
.model(AssetLookup.customGenericItemModel("_", "item")) .model(AssetLookup.customGenericItemModel("_", "item"))
.properties(p -> p.fireResistant()) .properties(p -> p.fireResistant())
.tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag) .tag(AllItemTags.PRESSURIZED_AIR_SOURCES.tag, AllItemTags.DIVING_ARMOR.tag)
.tag(ItemTags.CHEST_ARMOR) .tag(ItemTags.CHEST_ARMOR)
.register(); .register();
@ -311,14 +311,14 @@ public class AllItems {
.item("copper_diving_helmet", .item("copper_diving_helmet",
p -> new DivingHelmetItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving"))) p -> new DivingHelmetItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving")))
.properties(p -> p.durability(Type.HELMET.getDurability(7))) .properties(p -> p.durability(Type.HELMET.getDurability(7)))
.tag(ItemTags.HEAD_ARMOR) .tag(ItemTags.HEAD_ARMOR, AllItemTags.DIVING_ARMOR.tag)
.register(), .register(),
NETHERITE_DIVING_HELMET = REGISTRATE NETHERITE_DIVING_HELMET = REGISTRATE
.item("netherite_diving_helmet", .item("netherite_diving_helmet",
p -> new DivingHelmetItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving"))) p -> new DivingHelmetItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving")))
.properties(p -> p.fireResistant().durability(Type.HELMET.getDurability(37))) .properties(p -> p.fireResistant().durability(Type.HELMET.getDurability(37)))
.tag(ItemTags.HEAD_ARMOR) .tag(ItemTags.HEAD_ARMOR, AllItemTags.DIVING_ARMOR.tag)
.register(); .register();
public static final ItemEntry<? extends DivingBootsItem> public static final ItemEntry<? extends DivingBootsItem>
@ -328,14 +328,14 @@ public class AllItems {
.item("copper_diving_boots", .item("copper_diving_boots",
p -> new DivingBootsItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving"))) p -> new DivingBootsItem(AllArmorMaterials.COPPER, p, Create.asResource("copper_diving")))
.properties(p -> p.durability(Type.BOOTS.getDurability(7))) .properties(p -> p.durability(Type.BOOTS.getDurability(7)))
.tag(ItemTags.FOOT_ARMOR) .tag(ItemTags.FOOT_ARMOR, AllItemTags.DIVING_ARMOR.tag)
.register(), .register(),
NETHERITE_DIVING_BOOTS = REGISTRATE NETHERITE_DIVING_BOOTS = REGISTRATE
.item("netherite_diving_boots", .item("netherite_diving_boots",
p -> new DivingBootsItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving"))) p -> new DivingBootsItem(ArmorMaterials.NETHERITE, p, Create.asResource("netherite_diving")))
.properties(p -> p.fireResistant().durability(Type.BOOTS.getDurability(37))) .properties(p -> p.fireResistant().durability(Type.BOOTS.getDurability(37)))
.tag(ItemTags.FOOT_ARMOR) .tag(ItemTags.FOOT_ARMOR, AllItemTags.DIVING_ARMOR.tag)
.register(); .register();
public static final ItemEntry<? extends BaseArmorItem> public static final ItemEntry<? extends BaseArmorItem>

View file

@ -171,6 +171,7 @@ public class AllTags {
CONTRAPTION_CONTROLLED, CONTRAPTION_CONTROLLED,
CREATE_INGOTS, CREATE_INGOTS,
CRUSHED_RAW_MATERIALS, CRUSHED_RAW_MATERIALS,
DIVING_ARMOR,
INVALID_FOR_TRACK_PAVING, INVALID_FOR_TRACK_PAVING,
DEPLOYABLE_DRINK, DEPLOYABLE_DRINK,
PRESSURIZED_AIR_SOURCES, PRESSURIZED_AIR_SOURCES,

View file

@ -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<Boolean> cir) {
if (stack.is(AllItemTags.DIVING_ARMOR.tag))
cir.setReturnValue(false);
}
}

View file

@ -15,11 +15,12 @@
"EntityMixin", "EntityMixin",
"LavaSwimmingMixin", "LavaSwimmingMixin",
"MapItemSavedDataMixin", "MapItemSavedDataMixin",
"MobMixin",
"PlayerMixin", "PlayerMixin",
"ShulkerBoxBlockMixin", "ShulkerBoxBlockMixin",
"SmithingMenuMixin", "SmithingMenuMixin",
"SmithingTrimRecipeMixin",
"TestCommandMixin", "TestCommandMixin",
"MobMixin",
"WaterWheelFluidSpreadMixin", "WaterWheelFluidSpreadMixin",
"accessor.AbstractRegistrateAccessor", "accessor.AbstractRegistrateAccessor",
"accessor.BlockBehaviourAccessor", "accessor.BlockBehaviourAccessor",
@ -32,6 +33,7 @@
"accessor.ItemStackHandlerAccessor", "accessor.ItemStackHandlerAccessor",
"accessor.LivingEntityAccessor", "accessor.LivingEntityAccessor",
"accessor.MappedRegistryAccessor", "accessor.MappedRegistryAccessor",
"accessor.MinecartFurnaceAccessor",
"accessor.NbtAccounterAccessor", "accessor.NbtAccounterAccessor",
"accessor.PotionBrewingAccessor", "accessor.PotionBrewingAccessor",
"accessor.ProjectileDispenseBehaviorAccessor", "accessor.ProjectileDispenseBehaviorAccessor",
@ -39,7 +41,6 @@
"accessor.ShapedRecipeAccessor", "accessor.ShapedRecipeAccessor",
"accessor.SystemReportAccessor", "accessor.SystemReportAccessor",
"accessor.UseOnContextAccessor", "accessor.UseOnContextAccessor",
"accessor.MinecartFurnaceAccessor",
"compat.journeymap.MapRendererAccessor", "compat.journeymap.MapRendererAccessor",
"datafixer.BlockPosFormatAndRenamesFixMixin", "datafixer.BlockPosFormatAndRenamesFixMixin",
"datafixer.ItemStackComponentizationFixMixin", "datafixer.ItemStackComponentizationFixMixin",