From a402bcf00ea751500ccfbebb55d8c9b2b2b7d0f3 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Tue, 30 Jun 2026 16:39:08 +0200 Subject: [PATCH 01/10] Port to 25w16a --- gradle.properties | 6 +- .../access/client/MinecraftClientAccess.java | 4 +- .../mixin/client/gui/DrawContextExtender.java | 48 +++---- .../recipe/brewing/BrewingRecipeBuilder.java | 2 +- .../data/server/ModifiedRecipeProvider.java | 6 +- .../data/server/tag/ItemTagProvider.java | 17 +++ .../data/minecraft/item/black_harness.json | 16 +++ .../data/minecraft/item/blue_harness.json | 16 +++ .../data/minecraft/item/brown_harness.json | 16 +++ .../data/minecraft/item/carved_pumpkin.json | 12 ++ .../data/minecraft/item/chainmail_boots.json | 3 + .../minecraft/item/chainmail_chestplate.json | 3 + .../data/minecraft/item/chainmail_helmet.json | 3 + .../minecraft/item/chainmail_leggings.json | 3 + .../data/minecraft/item/creeper_head.json | 12 ++ .../data/minecraft/item/cyan_harness.json | 16 +++ .../data/minecraft/item/diamond_boots.json | 6 + .../minecraft/item/diamond_chestplate.json | 6 + .../data/minecraft/item/diamond_helmet.json | 6 + .../minecraft/item/diamond_horse_armor.json | 6 + .../data/minecraft/item/diamond_leggings.json | 6 + .../data/minecraft/item/dragon_head.json | 12 ++ .../data/minecraft/item/dried_ghast.json | 13 ++ .../data/minecraft/item/golden_boots.json | 3 + .../minecraft/item/golden_chestplate.json | 3 + .../data/minecraft/item/golden_helmet.json | 3 + .../minecraft/item/golden_horse_armor.json | 3 + .../data/minecraft/item/golden_leggings.json | 3 + .../data/minecraft/item/gray_harness.json | 16 +++ .../data/minecraft/item/green_harness.json | 16 +++ .../minecraft/item/happy_ghast_spawn_egg.json | 24 ++++ .../data/minecraft/item/iron_boots.json | 3 + .../data/minecraft/item/iron_chestplate.json | 3 + .../data/minecraft/item/iron_helmet.json | 3 + .../data/minecraft/item/iron_horse_armor.json | 3 + .../data/minecraft/item/iron_leggings.json | 3 + .../data/minecraft/item/leather_boots.json | 3 + .../minecraft/item/leather_chestplate.json | 3 + .../data/minecraft/item/leather_helmet.json | 3 + .../minecraft/item/leather_horse_armor.json | 3 + .../data/minecraft/item/leather_leggings.json | 3 + .../minecraft/item/light_blue_harness.json | 16 +++ .../minecraft/item/light_gray_harness.json | 16 +++ .../data/minecraft/item/lime_harness.json | 16 +++ .../data/minecraft/item/magenta_harness.json | 16 +++ .../data/minecraft/item/netherite_boots.json | 9 ++ .../minecraft/item/netherite_chestplate.json | 9 ++ .../data/minecraft/item/netherite_helmet.json | 9 ++ .../minecraft/item/netherite_leggings.json | 9 ++ .../data/minecraft/item/orange_harness.json | 16 +++ .../data/minecraft/item/piglin_head.json | 12 ++ .../data/minecraft/item/pink_harness.json | 16 +++ .../data/minecraft/item/player_head.json | 12 ++ .../data/minecraft/item/purple_harness.json | 16 +++ .../data/minecraft/item/red_harness.json | 16 +++ .../data/minecraft/item/skeleton_skull.json | 12 ++ .../data/minecraft/item/turtle_helmet.json | 3 + .../data/minecraft/item/white_harness.json | 16 +++ .../minecraft/item/wither_skeleton_skull.json | 12 ++ .../data/minecraft/item/wolf_armor.json | 3 + .../data/minecraft/item/yellow_harness.json | 16 +++ .../data/minecraft/item/zombie_head.json | 12 ++ .../natural_blocks.json | 1 + .../item_group_entry_provider/spawn_eggs.json | 1 + .../tools_and_utilities.json | 4 + .../tags/item/item_group/harnesses.json | 20 +++ .../attribute/AttributeContainerAccess.java | 5 +- .../DefaultAttributeContainerAccess.java | 4 +- .../EntityAttributeInstanceAccess.java | 4 +- .../errorcraft/itematic/block/BlockKeys.java | 1 + .../itematic/entity/EntityTypeKeys.java | 1 + .../itematic/item/AttributeModifiers.java | 12 ++ .../errorcraft/itematic/item/ItemKeys.java | 18 +++ .../errorcraft/itematic/item/ItemUtil.java | 136 ++++++++++++++++++ .../itematic/item/ItematicItemTags.java | 1 + .../components/EquipmentItemComponent.java | 12 ++ .../provider/ItemGroupEntryProviders.java | 3 + .../mixin/entity/LivingEntityExtender.java | 4 +- .../attribute/AttributeContainerExtender.java | 13 +- .../DefaultAttributeContainerExtender.java | 3 +- .../EntityAttributeInstanceExtender.java | 1 + .../recipe/brewing/AmplifyBrewingRecipe.java | 2 +- .../recipe/brewing/ModifyBrewingRecipe.java | 2 +- .../itematic/sound/SoundEventKeys.java | 1 + src/main/resources/itematic.classtweaker | 4 + 85 files changed, 796 insertions(+), 58 deletions(-) create mode 100644 src/main/generated/data/minecraft/item/black_harness.json create mode 100644 src/main/generated/data/minecraft/item/blue_harness.json create mode 100644 src/main/generated/data/minecraft/item/brown_harness.json create mode 100644 src/main/generated/data/minecraft/item/cyan_harness.json create mode 100644 src/main/generated/data/minecraft/item/dried_ghast.json create mode 100644 src/main/generated/data/minecraft/item/gray_harness.json create mode 100644 src/main/generated/data/minecraft/item/green_harness.json create mode 100644 src/main/generated/data/minecraft/item/happy_ghast_spawn_egg.json create mode 100644 src/main/generated/data/minecraft/item/light_blue_harness.json create mode 100644 src/main/generated/data/minecraft/item/light_gray_harness.json create mode 100644 src/main/generated/data/minecraft/item/lime_harness.json create mode 100644 src/main/generated/data/minecraft/item/magenta_harness.json create mode 100644 src/main/generated/data/minecraft/item/orange_harness.json create mode 100644 src/main/generated/data/minecraft/item/pink_harness.json create mode 100644 src/main/generated/data/minecraft/item/purple_harness.json create mode 100644 src/main/generated/data/minecraft/item/red_harness.json create mode 100644 src/main/generated/data/minecraft/item/white_harness.json create mode 100644 src/main/generated/data/minecraft/item/yellow_harness.json create mode 100644 src/main/generated/data/minecraft/tags/item/item_group/harnesses.json diff --git a/gradle.properties b/gradle.properties index cfb66705..87978540 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.21.5 - yarn_mappings=1.21.5+build.1 + minecraft_version=25w16a + yarn_mappings=25w16a+build.5 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.128.2+1.21.5 + fabric_version=0.121.0+1.21.6 diff --git a/src/client/java/net/errorcraft/itematic/access/client/MinecraftClientAccess.java b/src/client/java/net/errorcraft/itematic/access/client/MinecraftClientAccess.java index d43cb542..ed444c65 100644 --- a/src/client/java/net/errorcraft/itematic/access/client/MinecraftClientAccess.java +++ b/src/client/java/net/errorcraft/itematic/access/client/MinecraftClientAccess.java @@ -3,5 +3,7 @@ import net.errorcraft.itematic.client.item.bar.ItemBarStyleLoader; public interface MinecraftClientAccess { - ItemBarStyleLoader itematic$itemBarStyles(); + default ItemBarStyleLoader itematic$itemBarStyles() { + return null; + } } diff --git a/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java b/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java index 13ffbb85..a89b33eb 100644 --- a/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java +++ b/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java @@ -2,17 +2,16 @@ import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.sugar.Local; -import net.errorcraft.itematic.access.client.MinecraftClientAccess; +import com.mojang.blaze3d.pipeline.RenderPipeline; import net.errorcraft.itematic.client.item.bar.ItemBarStyleLoader; import net.errorcraft.itematic.component.ItematicDataComponentTypes; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gl.RenderPipelines; import net.minecraft.client.gui.DrawContext; -import net.minecraft.client.render.RenderLayer; -import net.minecraft.client.render.VertexConsumerProvider; -import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.gui.render.state.GuiRenderState; import net.minecraft.item.ItemStack; import net.minecraft.util.Identifier; -import org.spongepowered.asm.mixin.Final; +import org.joml.Matrix3x2fStack; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; @@ -22,26 +21,20 @@ import org.spongepowered.asm.mixin.injection.Slice; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.function.Function; - @Mixin(DrawContext.class) public abstract class DrawContextExtender { @Shadow - @Final - private MatrixStack matrices; - - @Shadow - public abstract void drawGuiTexture(Function function, Identifier identifier, int i, int j, int k, int l, int m); + public abstract void drawGuiTexture(RenderPipeline pipeline, Identifier sprite, int x, int y, int width, int height, int color); @Unique private ItemBarStyleLoader itemBarStyles; @Inject( - method = "(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;)V", + method = "(Lnet/minecraft/client/MinecraftClient;Lorg/joml/Matrix3x2fStack;Lnet/minecraft/client/gui/render/state/GuiRenderState;)V", at = @At("TAIL") ) - private void setItemBarStyles(MinecraftClient client, MatrixStack matrices, VertexConsumerProvider.Immediate vertexConsumers, CallbackInfo info) { - this.itemBarStyles = ((MinecraftClientAccess) client).itematic$itemBarStyles(); + private void setItemBarStyles(MinecraftClient client, Matrix3x2fStack matrices, GuiRenderState state, CallbackInfo ci) { + this.itemBarStyles = client.itematic$itemBarStyles(); } @ModifyExpressionValue( @@ -75,25 +68,22 @@ private void renderItemBarFromDataComponent(ItemStack stack, int x, int y, Callb return; } - this.itemBarStyles.get(itemBarStyleId).ifPresent(itemBarStyle -> { - this.matrices.translate(0.0f, 0.0f, 200.0f); - this.drawGuiTexture( - RenderLayer::getGuiTextured, - itemBarStyle.progressTexture(stack), - x, - y, - 16, - 16, - itemBarStyle.color(stack) - ); - }); + this.itemBarStyles.get(itemBarStyleId).ifPresent(itemBarStyle -> this.drawGuiTexture( + RenderPipelines.GUI_TEXTURED, + itemBarStyle.progressTexture(stack), + x, + y, + 16, + 16, + itemBarStyle.color(stack) + )); } @Redirect( method = "drawItemBar", at = @At( value = "INVOKE", - target = "Lnet/minecraft/client/gui/DrawContext;fill(Lnet/minecraft/client/render/RenderLayer;IIIIII)V" + target = "Lnet/minecraft/client/gui/DrawContext;fill(Lcom/mojang/blaze3d/pipeline/RenderPipeline;IIIII)V" ), slice = @Slice( from = @At( @@ -102,5 +92,5 @@ private void renderItemBarFromDataComponent(ItemStack stack, int x, int y, Callb ) ) ) - private void doNotRenderOriginalItemBar(DrawContext instance, RenderLayer layer, int x1, int y1, int x2, int y2, int z, int color) {} + private void doNotRenderOriginalItemBar(DrawContext instance, RenderPipeline pipeline, int x1, int y1, int x2, int y2, int z) {} } diff --git a/src/datagen/java/net/errorcraft/itematic/data/recipe/brewing/BrewingRecipeBuilder.java b/src/datagen/java/net/errorcraft/itematic/data/recipe/brewing/BrewingRecipeBuilder.java index 7d4dcf55..6088d805 100644 --- a/src/datagen/java/net/errorcraft/itematic/data/recipe/brewing/BrewingRecipeBuilder.java +++ b/src/datagen/java/net/errorcraft/itematic/data/recipe/brewing/BrewingRecipeBuilder.java @@ -60,7 +60,7 @@ public void save(RecipeExporter exporter) { protected abstract BrewingRecipe createRecipe(); protected Ingredient reagent() { - Ingredient reagent = Ingredient.fromTag(this.reagent); + Ingredient reagent = Ingredient.ofTag(this.reagent); reagent.itematic$setRemainder(Optional.ofNullable(this.remainder).map(ItemStack::new)); return reagent; } diff --git a/src/datagen/java/net/errorcraft/itematic/data/server/ModifiedRecipeProvider.java b/src/datagen/java/net/errorcraft/itematic/data/server/ModifiedRecipeProvider.java index ef74cced..54c76d73 100644 --- a/src/datagen/java/net/errorcraft/itematic/data/server/ModifiedRecipeProvider.java +++ b/src/datagen/java/net/errorcraft/itematic/data/server/ModifiedRecipeProvider.java @@ -93,7 +93,7 @@ public ShapelessRecipe build() { public ShapelessRecipeBuilder input(RegistryEntry input, int count, RegistryEntry remainder) { for (int i = 0; i < count; i++) { - Ingredient ingredient = Ingredient.fromTag(RegistryEntryList.of(input)); + Ingredient ingredient = Ingredient.ofTag(RegistryEntryList.of(input)); ingredient.itematic$setRemainder(Optional.of(new ItemStack(remainder))); this.inputs.add(ingredient); } @@ -124,12 +124,12 @@ public ShapedRecipe build() { } public ShapedRecipeBuilder input(char key, RegistryEntry input) { - this.inputs.put(key, Ingredient.fromTag(RegistryEntryList.of(input))); + this.inputs.put(key, Ingredient.ofTag(RegistryEntryList.of(input))); return this; } public ShapedRecipeBuilder input(char key, RegistryEntry input, RegistryEntry remainder) { - Ingredient ingredient = Ingredient.fromTag(RegistryEntryList.of(input)); + Ingredient ingredient = Ingredient.ofTag(RegistryEntryList.of(input)); ingredient.itematic$setRemainder(Optional.of(new ItemStack(remainder))); this.inputs.put(key, ingredient); return this; diff --git a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java index 8c2c9781..b3c7e23a 100644 --- a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java +++ b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java @@ -1181,6 +1181,23 @@ protected void configure(RegistryWrapper.WrapperLookup lookup) { .add(ItemKeys.PURPLE_BUNDLE) .add(ItemKeys.MAGENTA_BUNDLE) .add(ItemKeys.PINK_BUNDLE); + this.getOrCreateTagBuilder(ItematicItemTags.HARNESSES) + .add(ItemKeys.WHITE_HARNESS) + .add(ItemKeys.LIGHT_GRAY_HARNESS) + .add(ItemKeys.GRAY_HARNESS) + .add(ItemKeys.BLACK_HARNESS) + .add(ItemKeys.BROWN_HARNESS) + .add(ItemKeys.RED_HARNESS) + .add(ItemKeys.ORANGE_HARNESS) + .add(ItemKeys.YELLOW_HARNESS) + .add(ItemKeys.LIME_HARNESS) + .add(ItemKeys.GREEN_HARNESS) + .add(ItemKeys.CYAN_HARNESS) + .add(ItemKeys.LIGHT_BLUE_HARNESS) + .add(ItemKeys.BLUE_HARNESS) + .add(ItemKeys.PURPLE_HARNESS) + .add(ItemKeys.MAGENTA_HARNESS) + .add(ItemKeys.PINK_HARNESS); this.getOrCreateTagBuilder(ItematicItemTags.BOATS) .add(ItemKeys.OAK_BOAT) .add(ItemKeys.OAK_CHEST_BOAT) diff --git a/src/main/generated/data/minecraft/item/black_harness.json b/src/main/generated/data/minecraft/item/black_harness.json new file mode 100644 index 00000000..40082ab5 --- /dev/null +++ b/src/main/generated/data/minecraft/item/black_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:black_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:black_harness", + "translation_key": "item.minecraft.black_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/blue_harness.json b/src/main/generated/data/minecraft/item/blue_harness.json new file mode 100644 index 00000000..eeb714f1 --- /dev/null +++ b/src/main/generated/data/minecraft/item/blue_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:blue_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:blue_harness", + "translation_key": "item.minecraft.blue_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/brown_harness.json b/src/main/generated/data/minecraft/item/brown_harness.json new file mode 100644 index 00000000..d6e4b1f5 --- /dev/null +++ b/src/main/generated/data/minecraft/item/brown_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:brown_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:brown_harness", + "translation_key": "item.minecraft.brown_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/carved_pumpkin.json b/src/main/generated/data/minecraft/item/carved_pumpkin.json index 2a41c112..b9ed65c6 100644 --- a/src/main/generated/data/minecraft/item/carved_pumpkin.json +++ b/src/main/generated/data/minecraft/item/carved_pumpkin.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": "minecraft:carved_pumpkin" diff --git a/src/main/generated/data/minecraft/item/chainmail_boots.json b/src/main/generated/data/minecraft/item/chainmail_boots.json index 0d67b086..0ef45122 100644 --- a/src/main/generated/data/minecraft/item/chainmail_boots.json +++ b/src/main/generated/data/minecraft/item/chainmail_boots.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 1.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/chainmail_chestplate.json b/src/main/generated/data/minecraft/item/chainmail_chestplate.json index 4ba6dbc9..05033846 100644 --- a/src/main/generated/data/minecraft/item/chainmail_chestplate.json +++ b/src/main/generated/data/minecraft/item/chainmail_chestplate.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 5.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/chainmail_helmet.json b/src/main/generated/data/minecraft/item/chainmail_helmet.json index 2d13079f..dfe9a1fc 100644 --- a/src/main/generated/data/minecraft/item/chainmail_helmet.json +++ b/src/main/generated/data/minecraft/item/chainmail_helmet.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/chainmail_leggings.json b/src/main/generated/data/minecraft/item/chainmail_leggings.json index 5334d86b..8a12abd3 100644 --- a/src/main/generated/data/minecraft/item/chainmail_leggings.json +++ b/src/main/generated/data/minecraft/item/chainmail_leggings.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 4.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/creeper_head.json b/src/main/generated/data/minecraft/item/creeper_head.json index 53c5b50e..faf91eb8 100644 --- a/src/main/generated/data/minecraft/item/creeper_head.json +++ b/src/main/generated/data/minecraft/item/creeper_head.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": { diff --git a/src/main/generated/data/minecraft/item/cyan_harness.json b/src/main/generated/data/minecraft/item/cyan_harness.json new file mode 100644 index 00000000..b8651304 --- /dev/null +++ b/src/main/generated/data/minecraft/item/cyan_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:cyan_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:cyan_harness", + "translation_key": "item.minecraft.cyan_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/diamond_boots.json b/src/main/generated/data/minecraft/item/diamond_boots.json index 80727180..1c0a737e 100644 --- a/src/main/generated/data/minecraft/item/diamond_boots.json +++ b/src/main/generated/data/minecraft/item/diamond_boots.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor_toughness", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/diamond_chestplate.json b/src/main/generated/data/minecraft/item/diamond_chestplate.json index aa699720..de5fcb06 100644 --- a/src/main/generated/data/minecraft/item/diamond_chestplate.json +++ b/src/main/generated/data/minecraft/item/diamond_chestplate.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 8.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor_toughness", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/diamond_helmet.json b/src/main/generated/data/minecraft/item/diamond_helmet.json index 86c60694..359afe49 100644 --- a/src/main/generated/data/minecraft/item/diamond_helmet.json +++ b/src/main/generated/data/minecraft/item/diamond_helmet.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor_toughness", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/diamond_horse_armor.json b/src/main/generated/data/minecraft/item/diamond_horse_armor.json index 8f204e45..e366ad88 100644 --- a/src/main/generated/data/minecraft/item/diamond_horse_armor.json +++ b/src/main/generated/data/minecraft/item/diamond_horse_armor.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 11.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "body" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.body", "type": "minecraft:armor_toughness", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/diamond_leggings.json b/src/main/generated/data/minecraft/item/diamond_leggings.json index a677692d..b6ba4398 100644 --- a/src/main/generated/data/minecraft/item/diamond_leggings.json +++ b/src/main/generated/data/minecraft/item/diamond_leggings.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 6.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor_toughness", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/dragon_head.json b/src/main/generated/data/minecraft/item/dragon_head.json index 9a019542..9260fea1 100644 --- a/src/main/generated/data/minecraft/item/dragon_head.json +++ b/src/main/generated/data/minecraft/item/dragon_head.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": { diff --git a/src/main/generated/data/minecraft/item/dried_ghast.json b/src/main/generated/data/minecraft/item/dried_ghast.json new file mode 100644 index 00000000..271a80c4 --- /dev/null +++ b/src/main/generated/data/minecraft/item/dried_ghast.json @@ -0,0 +1,13 @@ +{ + "behavior": { + "minecraft:block": { + "block": "minecraft:dried_ghast" + }, + "minecraft:stackable": 64 + }, + "display": { + "model": "minecraft:dried_ghast", + "rarity": "uncommon", + "translation_key": "block.minecraft.dried_ghast" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/golden_boots.json b/src/main/generated/data/minecraft/item/golden_boots.json index cfe3c12e..117b377b 100644 --- a/src/main/generated/data/minecraft/item/golden_boots.json +++ b/src/main/generated/data/minecraft/item/golden_boots.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 1.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/golden_chestplate.json b/src/main/generated/data/minecraft/item/golden_chestplate.json index 0c35e21d..78fdae6a 100644 --- a/src/main/generated/data/minecraft/item/golden_chestplate.json +++ b/src/main/generated/data/minecraft/item/golden_chestplate.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 5.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/golden_helmet.json b/src/main/generated/data/minecraft/item/golden_helmet.json index 6568f129..e03e74b7 100644 --- a/src/main/generated/data/minecraft/item/golden_helmet.json +++ b/src/main/generated/data/minecraft/item/golden_helmet.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/golden_horse_armor.json b/src/main/generated/data/minecraft/item/golden_horse_armor.json index d5297ad8..3621e27e 100644 --- a/src/main/generated/data/minecraft/item/golden_horse_armor.json +++ b/src/main/generated/data/minecraft/item/golden_horse_armor.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 7.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/golden_leggings.json b/src/main/generated/data/minecraft/item/golden_leggings.json index e330bd71..bec9c08c 100644 --- a/src/main/generated/data/minecraft/item/golden_leggings.json +++ b/src/main/generated/data/minecraft/item/golden_leggings.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/gray_harness.json b/src/main/generated/data/minecraft/item/gray_harness.json new file mode 100644 index 00000000..163e3123 --- /dev/null +++ b/src/main/generated/data/minecraft/item/gray_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:gray_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:gray_harness", + "translation_key": "item.minecraft.gray_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/green_harness.json b/src/main/generated/data/minecraft/item/green_harness.json new file mode 100644 index 00000000..f6761c32 --- /dev/null +++ b/src/main/generated/data/minecraft/item/green_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:green_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:green_harness", + "translation_key": "item.minecraft.green_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/happy_ghast_spawn_egg.json b/src/main/generated/data/minecraft/item/happy_ghast_spawn_egg.json new file mode 100644 index 00000000..c0911eed --- /dev/null +++ b/src/main/generated/data/minecraft/item/happy_ghast_spawn_egg.json @@ -0,0 +1,24 @@ +{ + "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:spawn_entity_from_item" + }, + "minecraft:entity": { + "allow_spawner_modification": true, + "entity": { + "allow_item_data": true, + "entity": "minecraft:happy_ghast" + }, + "passes": [ + "block", + "fluid" + ] + }, + "minecraft:spawn_egg": {}, + "minecraft:stackable": 64 + }, + "display": { + "model": "minecraft:happy_ghast_spawn_egg", + "translation_key": "item.minecraft.happy_ghast_spawn_egg" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/iron_boots.json b/src/main/generated/data/minecraft/item/iron_boots.json index 62d68120..83fe5e75 100644 --- a/src/main/generated/data/minecraft/item/iron_boots.json +++ b/src/main/generated/data/minecraft/item/iron_boots.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/iron_chestplate.json b/src/main/generated/data/minecraft/item/iron_chestplate.json index 840b9575..0af09095 100644 --- a/src/main/generated/data/minecraft/item/iron_chestplate.json +++ b/src/main/generated/data/minecraft/item/iron_chestplate.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 6.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/iron_helmet.json b/src/main/generated/data/minecraft/item/iron_helmet.json index b0626ba6..4a89917b 100644 --- a/src/main/generated/data/minecraft/item/iron_helmet.json +++ b/src/main/generated/data/minecraft/item/iron_helmet.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/iron_horse_armor.json b/src/main/generated/data/minecraft/item/iron_horse_armor.json index eea89d8a..c2281a9f 100644 --- a/src/main/generated/data/minecraft/item/iron_horse_armor.json +++ b/src/main/generated/data/minecraft/item/iron_horse_armor.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 5.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/iron_leggings.json b/src/main/generated/data/minecraft/item/iron_leggings.json index e2cb3d3a..4be583a5 100644 --- a/src/main/generated/data/minecraft/item/iron_leggings.json +++ b/src/main/generated/data/minecraft/item/iron_leggings.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 5.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/leather_boots.json b/src/main/generated/data/minecraft/item/leather_boots.json index cbfce9cb..002a9560 100644 --- a/src/main/generated/data/minecraft/item/leather_boots.json +++ b/src/main/generated/data/minecraft/item/leather_boots.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 1.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/leather_chestplate.json b/src/main/generated/data/minecraft/item/leather_chestplate.json index 066444a8..a4181ac9 100644 --- a/src/main/generated/data/minecraft/item/leather_chestplate.json +++ b/src/main/generated/data/minecraft/item/leather_chestplate.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/leather_helmet.json b/src/main/generated/data/minecraft/item/leather_helmet.json index 2ace084b..cbb0a673 100644 --- a/src/main/generated/data/minecraft/item/leather_helmet.json +++ b/src/main/generated/data/minecraft/item/leather_helmet.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 1.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/leather_horse_armor.json b/src/main/generated/data/minecraft/item/leather_horse_armor.json index 84ee190a..e775c498 100644 --- a/src/main/generated/data/minecraft/item/leather_horse_armor.json +++ b/src/main/generated/data/minecraft/item/leather_horse_armor.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/leather_leggings.json b/src/main/generated/data/minecraft/item/leather_leggings.json index 3cc9a5bd..0f71809a 100644 --- a/src/main/generated/data/minecraft/item/leather_leggings.json +++ b/src/main/generated/data/minecraft/item/leather_leggings.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/light_blue_harness.json b/src/main/generated/data/minecraft/item/light_blue_harness.json new file mode 100644 index 00000000..5e324fe6 --- /dev/null +++ b/src/main/generated/data/minecraft/item/light_blue_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:light_blue_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:light_blue_harness", + "translation_key": "item.minecraft.light_blue_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/light_gray_harness.json b/src/main/generated/data/minecraft/item/light_gray_harness.json new file mode 100644 index 00000000..f10fd105 --- /dev/null +++ b/src/main/generated/data/minecraft/item/light_gray_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:light_gray_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:light_gray_harness", + "translation_key": "item.minecraft.light_gray_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/lime_harness.json b/src/main/generated/data/minecraft/item/lime_harness.json new file mode 100644 index 00000000..b2f0f24e --- /dev/null +++ b/src/main/generated/data/minecraft/item/lime_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:lime_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:lime_harness", + "translation_key": "item.minecraft.lime_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/magenta_harness.json b/src/main/generated/data/minecraft/item/magenta_harness.json new file mode 100644 index 00000000..ec907d8c --- /dev/null +++ b/src/main/generated/data/minecraft/item/magenta_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:magenta_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:magenta_harness", + "translation_key": "item.minecraft.magenta_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/netherite_boots.json b/src/main/generated/data/minecraft/item/netherite_boots.json index 4434fd9c..668ac302 100644 --- a/src/main/generated/data/minecraft/item/netherite_boots.json +++ b/src/main/generated/data/minecraft/item/netherite_boots.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor_toughness", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" }, @@ -18,6 +24,9 @@ "id": "minecraft:armor.boots", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/netherite_chestplate.json b/src/main/generated/data/minecraft/item/netherite_chestplate.json index 77120fcc..14fa8f45 100644 --- a/src/main/generated/data/minecraft/item/netherite_chestplate.json +++ b/src/main/generated/data/minecraft/item/netherite_chestplate.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 8.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor_toughness", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" }, @@ -18,6 +24,9 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/netherite_helmet.json b/src/main/generated/data/minecraft/item/netherite_helmet.json index f1637ad8..f785ffa4 100644 --- a/src/main/generated/data/minecraft/item/netherite_helmet.json +++ b/src/main/generated/data/minecraft/item/netherite_helmet.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor_toughness", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" }, @@ -18,6 +24,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/netherite_leggings.json b/src/main/generated/data/minecraft/item/netherite_leggings.json index 002bdc6b..844acff7 100644 --- a/src/main/generated/data/minecraft/item/netherite_leggings.json +++ b/src/main/generated/data/minecraft/item/netherite_leggings.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 6.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" }, @@ -11,6 +14,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor_toughness", "amount": 3.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" }, @@ -18,6 +24,9 @@ "id": "minecraft:armor.leggings", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/orange_harness.json b/src/main/generated/data/minecraft/item/orange_harness.json new file mode 100644 index 00000000..4fb4825d --- /dev/null +++ b/src/main/generated/data/minecraft/item/orange_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:orange_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:orange_harness", + "translation_key": "item.minecraft.orange_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/piglin_head.json b/src/main/generated/data/minecraft/item/piglin_head.json index 8d4363fa..ae2701a1 100644 --- a/src/main/generated/data/minecraft/item/piglin_head.json +++ b/src/main/generated/data/minecraft/item/piglin_head.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": { diff --git a/src/main/generated/data/minecraft/item/pink_harness.json b/src/main/generated/data/minecraft/item/pink_harness.json new file mode 100644 index 00000000..5192fd41 --- /dev/null +++ b/src/main/generated/data/minecraft/item/pink_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:pink_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:pink_harness", + "translation_key": "item.minecraft.pink_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/player_head.json b/src/main/generated/data/minecraft/item/player_head.json index 6e2d777c..70124492 100644 --- a/src/main/generated/data/minecraft/item/player_head.json +++ b/src/main/generated/data/minecraft/item/player_head.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": { diff --git a/src/main/generated/data/minecraft/item/purple_harness.json b/src/main/generated/data/minecraft/item/purple_harness.json new file mode 100644 index 00000000..80353680 --- /dev/null +++ b/src/main/generated/data/minecraft/item/purple_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:purple_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:purple_harness", + "translation_key": "item.minecraft.purple_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/red_harness.json b/src/main/generated/data/minecraft/item/red_harness.json new file mode 100644 index 00000000..6da712ab --- /dev/null +++ b/src/main/generated/data/minecraft/item/red_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:red_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:red_harness", + "translation_key": "item.minecraft.red_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/skeleton_skull.json b/src/main/generated/data/minecraft/item/skeleton_skull.json index 526dfcb8..63a283b3 100644 --- a/src/main/generated/data/minecraft/item/skeleton_skull.json +++ b/src/main/generated/data/minecraft/item/skeleton_skull.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": { diff --git a/src/main/generated/data/minecraft/item/turtle_helmet.json b/src/main/generated/data/minecraft/item/turtle_helmet.json index 03c6a89d..b87ae5ce 100644 --- a/src/main/generated/data/minecraft/item/turtle_helmet.json +++ b/src/main/generated/data/minecraft/item/turtle_helmet.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/white_harness.json b/src/main/generated/data/minecraft/item/white_harness.json new file mode 100644 index 00000000..fa078bd9 --- /dev/null +++ b/src/main/generated/data/minecraft/item/white_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:white_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:white_harness", + "translation_key": "item.minecraft.white_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/wither_skeleton_skull.json b/src/main/generated/data/minecraft/item/wither_skeleton_skull.json index 099f47ef..829cbfa0 100644 --- a/src/main/generated/data/minecraft/item/wither_skeleton_skull.json +++ b/src/main/generated/data/minecraft/item/wither_skeleton_skull.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": { diff --git a/src/main/generated/data/minecraft/item/wolf_armor.json b/src/main/generated/data/minecraft/item/wolf_armor.json index 7896dadc..52622932 100644 --- a/src/main/generated/data/minecraft/item/wolf_armor.json +++ b/src/main/generated/data/minecraft/item/wolf_armor.json @@ -4,6 +4,9 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 11.0, + "display": { + "type": "default" + }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/yellow_harness.json b/src/main/generated/data/minecraft/item/yellow_harness.json new file mode 100644 index 00000000..788586c4 --- /dev/null +++ b/src/main/generated/data/minecraft/item/yellow_harness.json @@ -0,0 +1,16 @@ +{ + "behavior": { + "minecraft:equipment": { + "allowed_entities": "#minecraft:can_equip_harness", + "asset_id": "minecraft:yellow_harness", + "equip_on_interact": true, + "equip_sound": "minecraft:entity.happy_ghast.equip", + "slot": "body" + }, + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:yellow_harness", + "translation_key": "item.minecraft.yellow_harness" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/zombie_head.json b/src/main/generated/data/minecraft/item/zombie_head.json index 534ca7bd..e592a84c 100644 --- a/src/main/generated/data/minecraft/item/zombie_head.json +++ b/src/main/generated/data/minecraft/item/zombie_head.json @@ -1,4 +1,16 @@ { + "attribute_modifiers": [ + { + "id": "minecraft:waypoint_transmit_range_hide", + "type": "minecraft:waypoint_transmit_range", + "amount": -1.0, + "display": { + "type": "hidden" + }, + "operation": "add_multiplied_total", + "slot": "head" + } + ], "behavior": { "minecraft:block": { "block": { diff --git a/src/main/generated/data/minecraft/item_group_entry_provider/natural_blocks.json b/src/main/generated/data/minecraft/item_group_entry_provider/natural_blocks.json index dc9161be..e8572114 100644 --- a/src/main/generated/data/minecraft/item_group_entry_provider/natural_blocks.json +++ b/src/main/generated/data/minecraft/item_group_entry_provider/natural_blocks.json @@ -67,6 +67,7 @@ "type": "tag", "tag": "minecraft:item_group/egg_like_blocks" }, + "minecraft:dried_ghast", { "type": "tag", "tag": "minecraft:item_group/seeds" diff --git a/src/main/generated/data/minecraft/item_group_entry_provider/spawn_eggs.json b/src/main/generated/data/minecraft/item_group_entry_provider/spawn_eggs.json index 41184b14..a4c1a691 100644 --- a/src/main/generated/data/minecraft/item_group_entry_provider/spawn_eggs.json +++ b/src/main/generated/data/minecraft/item_group_entry_provider/spawn_eggs.json @@ -34,6 +34,7 @@ "minecraft:glow_squid_spawn_egg", "minecraft:goat_spawn_egg", "minecraft:guardian_spawn_egg", + "minecraft:happy_ghast_spawn_egg", "minecraft:hoglin_spawn_egg", "minecraft:horse_spawn_egg", "minecraft:husk_spawn_egg", diff --git a/src/main/generated/data/minecraft/item_group_entry_provider/tools_and_utilities.json b/src/main/generated/data/minecraft/item_group_entry_provider/tools_and_utilities.json index fe80eb39..f617191a 100644 --- a/src/main/generated/data/minecraft/item_group_entry_provider/tools_and_utilities.json +++ b/src/main/generated/data/minecraft/item_group_entry_provider/tools_and_utilities.json @@ -58,6 +58,10 @@ "item": "minecraft:firework_rocket" }, "minecraft:saddle", + { + "type": "tag", + "tag": "minecraft:item_group/harnesses" + }, "minecraft:carrot_on_a_stick", "minecraft:warped_fungus_on_a_stick", { diff --git a/src/main/generated/data/minecraft/tags/item/item_group/harnesses.json b/src/main/generated/data/minecraft/tags/item/item_group/harnesses.json new file mode 100644 index 00000000..4d74b1f6 --- /dev/null +++ b/src/main/generated/data/minecraft/tags/item/item_group/harnesses.json @@ -0,0 +1,20 @@ +{ + "values": [ + "minecraft:white_harness", + "minecraft:light_gray_harness", + "minecraft:gray_harness", + "minecraft:black_harness", + "minecraft:brown_harness", + "minecraft:red_harness", + "minecraft:orange_harness", + "minecraft:yellow_harness", + "minecraft:lime_harness", + "minecraft:green_harness", + "minecraft:cyan_harness", + "minecraft:light_blue_harness", + "minecraft:blue_harness", + "minecraft:purple_harness", + "minecraft:magenta_harness", + "minecraft:pink_harness" + ] +} \ No newline at end of file diff --git a/src/main/java/net/errorcraft/itematic/access/entity/attribute/AttributeContainerAccess.java b/src/main/java/net/errorcraft/itematic/access/entity/attribute/AttributeContainerAccess.java index c0901e37..bf0bd5bc 100644 --- a/src/main/java/net/errorcraft/itematic/access/entity/attribute/AttributeContainerAccess.java +++ b/src/main/java/net/errorcraft/itematic/access/entity/attribute/AttributeContainerAccess.java @@ -5,6 +5,7 @@ import org.jetbrains.annotations.Nullable; public interface AttributeContainerAccess { - double itematic$getTrueBaseValue(RegistryEntry attribute); - double itematic$getValue(RegistryEntry attribute, @Nullable Double possibleBase); + default double itematic$getValue(RegistryEntry attribute, @Nullable Double possibleBase) { + return 0.0d; + } } diff --git a/src/main/java/net/errorcraft/itematic/access/entity/attribute/DefaultAttributeContainerAccess.java b/src/main/java/net/errorcraft/itematic/access/entity/attribute/DefaultAttributeContainerAccess.java index d877ea62..8be67700 100644 --- a/src/main/java/net/errorcraft/itematic/access/entity/attribute/DefaultAttributeContainerAccess.java +++ b/src/main/java/net/errorcraft/itematic/access/entity/attribute/DefaultAttributeContainerAccess.java @@ -4,5 +4,7 @@ import net.minecraft.registry.entry.RegistryEntry; public interface DefaultAttributeContainerAccess { - double itematic$getValue(RegistryEntry attribute, double base); + default double itematic$getValue(RegistryEntry attribute, double base) { + return 0.0d; + } } diff --git a/src/main/java/net/errorcraft/itematic/access/entity/attribute/EntityAttributeInstanceAccess.java b/src/main/java/net/errorcraft/itematic/access/entity/attribute/EntityAttributeInstanceAccess.java index 2f46eee3..dc762ae7 100644 --- a/src/main/java/net/errorcraft/itematic/access/entity/attribute/EntityAttributeInstanceAccess.java +++ b/src/main/java/net/errorcraft/itematic/access/entity/attribute/EntityAttributeInstanceAccess.java @@ -1,5 +1,7 @@ package net.errorcraft.itematic.access.entity.attribute; public interface EntityAttributeInstanceAccess { - double itematic$getValue(double base); + default double itematic$getValue(double base) { + return 0.0d; + } } diff --git a/src/main/java/net/errorcraft/itematic/block/BlockKeys.java b/src/main/java/net/errorcraft/itematic/block/BlockKeys.java index 11038326..efb04520 100644 --- a/src/main/java/net/errorcraft/itematic/block/BlockKeys.java +++ b/src/main/java/net/errorcraft/itematic/block/BlockKeys.java @@ -707,6 +707,7 @@ public class BlockKeys { public static final RegistryKey DRIED_KELP_BLOCK = of("dried_kelp_block"); public static final RegistryKey TURTLE_EGG = of("turtle_egg"); public static final RegistryKey SNIFFER_EGG = of("sniffer_egg"); + public static final RegistryKey DRIED_GHAST = of("dried_ghast"); public static final RegistryKey DEAD_TUBE_CORAL_BLOCK = of("dead_tube_coral_block"); public static final RegistryKey DEAD_BRAIN_CORAL_BLOCK = of("dead_brain_coral_block"); public static final RegistryKey DEAD_BUBBLE_CORAL_BLOCK = of("dead_bubble_coral_block"); diff --git a/src/main/java/net/errorcraft/itematic/entity/EntityTypeKeys.java b/src/main/java/net/errorcraft/itematic/entity/EntityTypeKeys.java index c38c7f4b..7357a733 100644 --- a/src/main/java/net/errorcraft/itematic/entity/EntityTypeKeys.java +++ b/src/main/java/net/errorcraft/itematic/entity/EntityTypeKeys.java @@ -58,6 +58,7 @@ public class EntityTypeKeys { public static final RegistryKey> GLOW_SQUID = of("glow_squid"); public static final RegistryKey> GOAT = of("goat"); public static final RegistryKey> GUARDIAN = of("guardian"); + public static final RegistryKey> HAPPY_GHAST = of("happy_ghast"); public static final RegistryKey> HOGLIN = of("hoglin"); public static final RegistryKey> HOPPER_MINECART = of("hopper_minecart"); public static final RegistryKey> HORSE = of("horse"); diff --git a/src/main/java/net/errorcraft/itematic/item/AttributeModifiers.java b/src/main/java/net/errorcraft/itematic/item/AttributeModifiers.java index f91d9504..fee82f93 100644 --- a/src/main/java/net/errorcraft/itematic/item/AttributeModifiers.java +++ b/src/main/java/net/errorcraft/itematic/item/AttributeModifiers.java @@ -7,6 +7,7 @@ import net.minecraft.item.equipment.ArmorMaterial; import net.minecraft.item.equipment.EquipmentType; import net.minecraft.util.Identifier; +import net.minecraft.world.waypoint.Waypoint; public class AttributeModifiers { private AttributeModifiers() {} @@ -52,4 +53,15 @@ public static AttributeModifiersComponent armor(ArmorMaterial material, Equipmen return builder.build(); } + + public static AttributeModifiersComponent hideFromLocatorBar() { + return AttributeModifiersComponent.builder() + .add( + EntityAttributes.WAYPOINT_TRANSMIT_RANGE, + Waypoint.DISABLE_TRACKING, + AttributeModifierSlot.HEAD, + AttributeModifiersComponent.Display.getHidden() + ) + .build(); + } } diff --git a/src/main/java/net/errorcraft/itematic/item/ItemKeys.java b/src/main/java/net/errorcraft/itematic/item/ItemKeys.java index aac3921c..35ad633d 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemKeys.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemKeys.java @@ -625,6 +625,7 @@ public class ItemKeys { public static final RegistryKey BLACK_CONCRETE_POWDER = register("black_concrete_powder"); public static final RegistryKey TURTLE_EGG = register("turtle_egg"); public static final RegistryKey SNIFFER_EGG = register("sniffer_egg"); + public static final RegistryKey DRIED_GHAST = register("dried_ghast"); public static final RegistryKey DEAD_TUBE_CORAL_BLOCK = register("dead_tube_coral_block"); public static final RegistryKey DEAD_BRAIN_CORAL_BLOCK = register("dead_brain_coral_block"); public static final RegistryKey DEAD_BUBBLE_CORAL_BLOCK = register("dead_bubble_coral_block"); @@ -807,6 +808,22 @@ public class ItemKeys { public static final RegistryKey RAIL = register("rail"); public static final RegistryKey ACTIVATOR_RAIL = register("activator_rail"); public static final RegistryKey SADDLE = register("saddle"); + public static final RegistryKey WHITE_HARNESS = register("white_harness"); + public static final RegistryKey ORANGE_HARNESS = register("orange_harness"); + public static final RegistryKey MAGENTA_HARNESS = register("magenta_harness"); + public static final RegistryKey LIGHT_BLUE_HARNESS = register("light_blue_harness"); + public static final RegistryKey YELLOW_HARNESS = register("yellow_harness"); + public static final RegistryKey LIME_HARNESS = register("lime_harness"); + public static final RegistryKey PINK_HARNESS = register("pink_harness"); + public static final RegistryKey GRAY_HARNESS = register("gray_harness"); + public static final RegistryKey LIGHT_GRAY_HARNESS = register("light_gray_harness"); + public static final RegistryKey CYAN_HARNESS = register("cyan_harness"); + public static final RegistryKey PURPLE_HARNESS = register("purple_harness"); + public static final RegistryKey BLUE_HARNESS = register("blue_harness"); + public static final RegistryKey BROWN_HARNESS = register("brown_harness"); + public static final RegistryKey GREEN_HARNESS = register("green_harness"); + public static final RegistryKey RED_HARNESS = register("red_harness"); + public static final RegistryKey BLACK_HARNESS = register("black_harness"); public static final RegistryKey MINECART = register("minecart"); public static final RegistryKey CHEST_MINECART = register("chest_minecart"); public static final RegistryKey FURNACE_MINECART = register("furnace_minecart"); @@ -1099,6 +1116,7 @@ public class ItemKeys { public static final RegistryKey FOX_SPAWN_EGG = register("fox_spawn_egg"); public static final RegistryKey FROG_SPAWN_EGG = register("frog_spawn_egg"); public static final RegistryKey GHAST_SPAWN_EGG = register("ghast_spawn_egg"); + public static final RegistryKey HAPPY_GHAST_SPAWN_EGG = register("happy_ghast_spawn_egg"); public static final RegistryKey GLOW_SQUID_SPAWN_EGG = register("glow_squid_spawn_egg"); public static final RegistryKey GOAT_SPAWN_EGG = register("goat_spawn_egg"); public static final RegistryKey GUARDIAN_SPAWN_EGG = register("guardian_spawn_egg"); diff --git a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java index 765ffec4..6f263204 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java @@ -2709,6 +2709,15 @@ private void bootstrapBlocks() { .with(BlockItemComponent.of(this.blocks.getOrThrow(BlockKeys.SNIFFER_EGG))) .build() )); + this.registerable.register(ItemKeys.DRIED_GHAST, create( + ItemDisplay.Builder.forBlock(ItemKeys.DRIED_GHAST) + .rarity(Rarity.UNCOMMON) + .build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(64)) + .with(BlockItemComponent.of(this.blocks.getOrThrow(BlockKeys.DRIED_GHAST))) + .build() + )); this.registerable.register(ItemKeys.DEAD_TUBE_CORAL_BLOCK, create( ItemDisplay.Builder.forBlock(ItemKeys.DEAD_TUBE_CORAL_BLOCK).build(), ItemComponentSet.builder() @@ -6113,6 +6122,13 @@ private void bootstrapSpawnEggs() { .with(EntityItemComponent.spawnEgg(this.entityTypes.getOrThrow(EntityTypeKeys.GHAST), this.dispenseBehaviors)) .build() )); + this.registerable.register(ItemKeys.HAPPY_GHAST_SPAWN_EGG, create( + ItemDisplay.Builder.forItem(ItemKeys.HAPPY_GHAST_SPAWN_EGG).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(64)) + .with(EntityItemComponent.spawnEgg(this.entityTypes.getOrThrow(EntityTypeKeys.HAPPY_GHAST), this.dispenseBehaviors)) + .build() + )); this.registerable.register(ItemKeys.GLOW_SQUID_SPAWN_EGG, create( ItemDisplay.Builder.forItem(ItemKeys.GLOW_SQUID_SPAWN_EGG).build(), ItemComponentSet.builder() @@ -6980,6 +6996,7 @@ private void bootstrapCompostables() { )); this.registerable.register(ItemKeys.CARVED_PUMPKIN, create( ItemDisplay.Builder.forBlock(ItemKeys.CARVED_PUMPKIN).build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(BlockItemComponent.of(this.blocks.getOrThrow(BlockKeys.CARVED_PUMPKIN))) @@ -7855,6 +7872,118 @@ private void bootstrapArmor() { .with(DyeableItemComponent.of(0x000000)) .build() )); + this.registerable.register(ItemKeys.WHITE_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.WHITE_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.WHITE, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.ORANGE_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.ORANGE_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.ORANGE, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.MAGENTA_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.MAGENTA_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.MAGENTA, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.LIGHT_BLUE_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.LIGHT_BLUE_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.LIGHT_BLUE, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.YELLOW_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.YELLOW_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.YELLOW, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.LIME_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.LIME_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.LIME, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.PINK_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.PINK_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.PINK, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.GRAY_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.GRAY_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.GRAY, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.LIGHT_GRAY_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.LIGHT_GRAY_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.LIGHT_GRAY, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.CYAN_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.CYAN_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.CYAN, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.PURPLE_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.PURPLE_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.PURPLE, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.BLUE_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.BLUE_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.BLUE, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.BROWN_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.BROWN_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.BROWN, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.GREEN_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.GREEN_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.GREEN, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.RED_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.RED_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.RED, this.soundEvents, this.entityTypes)) + .build() + )); + this.registerable.register(ItemKeys.BLACK_HARNESS, create( + ItemDisplay.Builder.forItem(ItemKeys.BLACK_HARNESS).build(), + ItemComponentSet.builder() + .with(StackableItemComponent.of(1)) + .with(EquipmentItemComponent.ofHarness(DyeColor.BLACK, this.soundEvents, this.entityTypes)) + .build() + )); } private void bootstrapSkulls() { @@ -7862,6 +7991,7 @@ private void bootstrapSkulls() { ItemDisplay.Builder.forBlock(ItemKeys.SKELETON_SKULL) .rarity(Rarity.UNCOMMON) .build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(EquipmentItemComponent.forSkull( @@ -7875,6 +8005,7 @@ private void bootstrapSkulls() { ItemDisplay.Builder.forBlock(ItemKeys.WITHER_SKELETON_SKULL) .rarity(Rarity.UNCOMMON) .build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(EquipmentItemComponent.forSkull( @@ -7888,6 +8019,7 @@ private void bootstrapSkulls() { ItemDisplay.Builder.forBlock(ItemKeys.PLAYER_HEAD) .rarity(Rarity.UNCOMMON) .build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(EquipmentItemComponent.forSkull( @@ -7901,6 +8033,7 @@ private void bootstrapSkulls() { ItemDisplay.Builder.forBlock(ItemKeys.ZOMBIE_HEAD) .rarity(Rarity.UNCOMMON) .build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(EquipmentItemComponent.forSkull( @@ -7914,6 +8047,7 @@ private void bootstrapSkulls() { ItemDisplay.Builder.forBlock(ItemKeys.CREEPER_HEAD) .rarity(Rarity.UNCOMMON) .build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(EquipmentItemComponent.forSkull( @@ -7927,6 +8061,7 @@ private void bootstrapSkulls() { ItemDisplay.Builder.forBlock(ItemKeys.DRAGON_HEAD) .rarity(Rarity.RARE) .build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(EquipmentItemComponent.forSkull( @@ -7940,6 +8075,7 @@ private void bootstrapSkulls() { ItemDisplay.Builder.forBlock(ItemKeys.PIGLIN_HEAD) .rarity(Rarity.UNCOMMON) .build(), + AttributeModifiers.hideFromLocatorBar(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(EquipmentItemComponent.forSkull( diff --git a/src/main/java/net/errorcraft/itematic/item/ItematicItemTags.java b/src/main/java/net/errorcraft/itematic/item/ItematicItemTags.java index c4ebe5ff..4eea9a39 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItematicItemTags.java +++ b/src/main/java/net/errorcraft/itematic/item/ItematicItemTags.java @@ -133,6 +133,7 @@ public class ItematicItemTags { public static final TagKey TOOLS = of("item_group/tools"); public static final TagKey BUCKETS = of("item_group/buckets"); public static final TagKey BUNDLES = of("item_group/bundles"); + public static final TagKey HARNESSES = of("item_group/harnesses"); public static final TagKey BOATS = of("item_group/boats"); public static final TagKey MUSIC_DISCS = of("item_group/music_discs"); public static final TagKey SWORDS = of("item_group/swords"); diff --git a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java index ed61870c..4299db95 100644 --- a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java +++ b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java @@ -22,6 +22,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.equipment.ArmorMaterial; +import net.minecraft.item.equipment.EquipmentAssetKeys; import net.minecraft.item.equipment.EquipmentType; import net.minecraft.loot.context.LootContextParameters; import net.minecraft.registry.RegistryEntryLookup; @@ -30,6 +31,7 @@ import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundEvent; import net.minecraft.util.ActionResult; +import net.minecraft.util.DyeColor; import net.minecraft.util.Hand; import net.minecraft.util.math.Direction; import net.minecraft.world.World; @@ -51,6 +53,16 @@ public static EquipmentItemComponent ofHorseArmor(ArmorMaterial material, Regist ); } + public static EquipmentItemComponent ofHarness(DyeColor color, RegistryEntryLookup soundEvents, RegistryEntryLookup> entityTypes) { + return of(EquippableComponent.builder(EquipmentSlot.BODY) + .equipSound(soundEvents.getOrThrow(SoundEventKeys.HAPPY_GHAST_EQUIP)) + .model(EquipmentAssetKeys.HARNESS_FROM_COLOR.get(color)) + .allowedEntities(entityTypes.getOrThrow(EntityTypeTags.CAN_EQUIP_HARNESS)) + .equipOnInteract(true) + .build() + ); + } + public static ItemComponent[] forArmor(ArmorMaterial material, EquipmentType type) { return new ItemComponent[] { StackableItemComponent.of(1), diff --git a/src/main/java/net/errorcraft/itematic/item/group/entry/provider/ItemGroupEntryProviders.java b/src/main/java/net/errorcraft/itematic/item/group/entry/provider/ItemGroupEntryProviders.java index f2a34071..04858c73 100644 --- a/src/main/java/net/errorcraft/itematic/item/group/entry/provider/ItemGroupEntryProviders.java +++ b/src/main/java/net/errorcraft/itematic/item/group/entry/provider/ItemGroupEntryProviders.java @@ -82,6 +82,7 @@ public static void bootstrap(Registerable registerable) ItemGroupEntry.tag(ItematicItemTags.SAPLINGS), ItemGroupEntry.tag(ItematicItemTags.PLANTS), ItemGroupEntry.tag(ItematicItemTags.EGG_LIKE_BLOCKS), + ItemGroupEntry.simple(items.getOrThrow(ItemKeys.DRIED_GHAST)), ItemGroupEntry.tag(ItematicItemTags.SEEDS), ItemGroupEntry.tag(ItematicItemTags.WATER_BLOCKS), ItemGroupEntry.simple(items.getOrThrow(ItemKeys.SPONGE)), @@ -252,6 +253,7 @@ public static void bootstrap(Registerable registerable) .add(items.getOrThrow(ItemKeys.ELYTRA)) .add(flightDuration(items.getOrThrow(ItemKeys.FIREWORK_ROCKET))) .add(items.getOrThrow(ItemKeys.SADDLE)) + .add(ItemGroupEntry.tag(ItematicItemTags.HARNESSES)) .add(items.getOrThrow(ItemKeys.CARROT_ON_A_STICK)) .add(items.getOrThrow(ItemKeys.WARPED_FUNGUS_ON_A_STICK)) .add(ItemGroupEntry.tag(ItematicItemTags.BOATS)) @@ -397,6 +399,7 @@ public static void bootstrap(Registerable registerable) ItemGroupEntry.simple(items.getOrThrow(ItemKeys.GLOW_SQUID_SPAWN_EGG)), ItemGroupEntry.simple(items.getOrThrow(ItemKeys.GOAT_SPAWN_EGG)), ItemGroupEntry.simple(items.getOrThrow(ItemKeys.GUARDIAN_SPAWN_EGG)), + ItemGroupEntry.simple(items.getOrThrow(ItemKeys.HAPPY_GHAST_SPAWN_EGG)), ItemGroupEntry.simple(items.getOrThrow(ItemKeys.HOGLIN_SPAWN_EGG)), ItemGroupEntry.simple(items.getOrThrow(ItemKeys.HORSE_SPAWN_EGG)), ItemGroupEntry.simple(items.getOrThrow(ItemKeys.HUSK_SPAWN_EGG)), diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/LivingEntityExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/LivingEntityExtender.java index ebb467c4..1eaa69e1 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/LivingEntityExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/LivingEntityExtender.java @@ -6,7 +6,6 @@ import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.sugar.Local; import net.errorcraft.itematic.access.entity.LivingEntityAccess; -import net.errorcraft.itematic.access.entity.attribute.AttributeContainerAccess; import net.errorcraft.itematic.component.ItematicDataComponentTypes; import net.errorcraft.itematic.component.type.WeaponAttackDamageDataComponent; import net.errorcraft.itematic.item.ItemKeys; @@ -454,8 +453,7 @@ private int getItemUseTimeUseField(int original) { @Override public double itematic$getAttackDamage() { Double baseAttackDamage = this.getBaseAttackDamage(this.getMainHandStack()); - return ((AttributeContainerAccess) this.getAttributes()) - .itematic$getValue(EntityAttributes.ATTACK_DAMAGE, baseAttackDamage); + return this.getAttributes().itematic$getValue(EntityAttributes.ATTACK_DAMAGE, baseAttackDamage); } @Unique diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/AttributeContainerExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/AttributeContainerExtender.java index 4c1c6863..1e617a7f 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/AttributeContainerExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/AttributeContainerExtender.java @@ -1,8 +1,6 @@ package net.errorcraft.itematic.mixin.entity.attribute; import net.errorcraft.itematic.access.entity.attribute.AttributeContainerAccess; -import net.errorcraft.itematic.access.entity.attribute.DefaultAttributeContainerAccess; -import net.errorcraft.itematic.access.entity.attribute.EntityAttributeInstanceAccess; import net.minecraft.entity.attribute.AttributeContainer; import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttribute; @@ -19,7 +17,7 @@ public abstract class AttributeContainerExtender implements AttributeContainerAccess { @Shadow @Final - private DefaultAttributeContainer fallback; + private DefaultAttributeContainer defaultAttributes; @Shadow @Final @@ -28,11 +26,6 @@ public abstract class AttributeContainerExtender implements AttributeContainerAc @Shadow public abstract double getValue(RegistryEntry attribute); - @Override - public double itematic$getTrueBaseValue(RegistryEntry attribute) { - return this.fallback.getBaseValue(attribute); - } - @Override public double itematic$getValue(RegistryEntry attribute, @Nullable Double possibleBase) { if (possibleBase == null) { @@ -41,7 +34,7 @@ public abstract class AttributeContainerExtender implements AttributeContainerAc EntityAttributeInstance instance = this.custom.get(attribute); return instance != null ? - ((EntityAttributeInstanceAccess) instance).itematic$getValue(possibleBase) : - ((DefaultAttributeContainerAccess) this.fallback).itematic$getValue(attribute, possibleBase); + instance.itematic$getValue(possibleBase) : + this.defaultAttributes.itematic$getValue(attribute, possibleBase); } } diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/DefaultAttributeContainerExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/DefaultAttributeContainerExtender.java index cdde3a7b..bd400aef 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/DefaultAttributeContainerExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/DefaultAttributeContainerExtender.java @@ -1,7 +1,6 @@ package net.errorcraft.itematic.mixin.entity.attribute; import net.errorcraft.itematic.access.entity.attribute.DefaultAttributeContainerAccess; -import net.errorcraft.itematic.access.entity.attribute.EntityAttributeInstanceAccess; import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttribute; import net.minecraft.entity.attribute.EntityAttributeInstance; @@ -16,6 +15,6 @@ public abstract class DefaultAttributeContainerExtender implements DefaultAttrib @Override public double itematic$getValue(RegistryEntry attribute, double base) { - return ((EntityAttributeInstanceAccess) this.require(attribute)).itematic$getValue(base); + return this.require(attribute).itematic$getValue(base); } } diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/EntityAttributeInstanceExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/EntityAttributeInstanceExtender.java index 13369517..3d47f673 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/EntityAttributeInstanceExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/attribute/EntityAttributeInstanceExtender.java @@ -21,6 +21,7 @@ public abstract class EntityAttributeInstanceExtender implements EntityAttribute if (this.baseValue == base) { return this.getValue(); } + // Temporarily update the base value without sending any updates by directly modifying the field double originalBase = this.baseValue; this.baseValue = base; diff --git a/src/main/java/net/errorcraft/itematic/recipe/brewing/AmplifyBrewingRecipe.java b/src/main/java/net/errorcraft/itematic/recipe/brewing/AmplifyBrewingRecipe.java index 7d451e27..40a36eca 100644 --- a/src/main/java/net/errorcraft/itematic/recipe/brewing/AmplifyBrewingRecipe.java +++ b/src/main/java/net/errorcraft/itematic/recipe/brewing/AmplifyBrewingRecipe.java @@ -54,7 +54,7 @@ public RecipeSerializer> getSerializer() { @Override public IngredientPlacement getIngredientPlacement() { return IngredientPlacement.forMultipleSlots(List.of( - Optional.of(Ingredient.fromTag(RegistryEntryList.of(this.base()))), + Optional.of(Ingredient.ofTag(RegistryEntryList.of(this.base()))), Optional.of(this.reagent()) )); } diff --git a/src/main/java/net/errorcraft/itematic/recipe/brewing/ModifyBrewingRecipe.java b/src/main/java/net/errorcraft/itematic/recipe/brewing/ModifyBrewingRecipe.java index b58a44ab..0b974739 100644 --- a/src/main/java/net/errorcraft/itematic/recipe/brewing/ModifyBrewingRecipe.java +++ b/src/main/java/net/errorcraft/itematic/recipe/brewing/ModifyBrewingRecipe.java @@ -63,7 +63,7 @@ public IngredientPlacement getIngredientPlacement() { @Override public IngredientPlacement itematic$ingredientPlacement(RegistryEntryLookup items) { return IngredientPlacement.forMultipleSlots(List.of( - items.getOptional(ItematicItemTags.BREWING_INPUTS).map(Ingredient::fromTag), + items.getOptional(ItematicItemTags.BREWING_INPUTS).map(Ingredient::ofTag), Optional.of(this.reagent()) )); } diff --git a/src/main/java/net/errorcraft/itematic/sound/SoundEventKeys.java b/src/main/java/net/errorcraft/itematic/sound/SoundEventKeys.java index eeac7f98..4b8e69a2 100644 --- a/src/main/java/net/errorcraft/itematic/sound/SoundEventKeys.java +++ b/src/main/java/net/errorcraft/itematic/sound/SoundEventKeys.java @@ -26,6 +26,7 @@ public class SoundEventKeys { public static final RegistryKey FIRE_EXTINGUISH = of("block.fire.extinguish"); public static final RegistryKey FLINT_AND_STEEL_USE = of("item.flintandsteel.use"); public static final RegistryKey GENERIC_SPLASH = of("entity.generic.splash"); + public static final RegistryKey HAPPY_GHAST_EQUIP = of("entity.happy_ghast.equip"); public static final RegistryKey HOE_TILL = of("item.hoe.till"); public static final RegistryKey HONEY_BOTTLE_DRINK = of("item.honey_bottle.drink"); public static final RegistryKey HORSE_ARMOR = of("entity.horse.armor"); diff --git a/src/main/resources/itematic.classtweaker b/src/main/resources/itematic.classtweaker index 742d52bf..d5efb6c9 100644 --- a/src/main/resources/itematic.classtweaker +++ b/src/main/resources/itematic.classtweaker @@ -26,6 +26,10 @@ inject-interface net/minecraft/village/VillagerProfession net/errorcraft/i inject-interface net/minecraft/client/gui/screen/GameModeSwitcherScreen$GameModeSelection net/errorcraft/itematic/access/client/gui/screen/GameModeSwitcherScreenAccess$GameModeSelectionAccess inject-interface net/minecraft/item/ItemPlacementContext net/errorcraft/itematic/access/item/ItemPlacementContextAccess inject-interface net/minecraft/predicate/StatePredicate$Builder net/errorcraft/itematic/access/predicate/StatePredicateAccess$BuilderAccess +inject-interface net/minecraft/entity/attribute/AttributeContainer net/errorcraft/itematic/access/entity/attribute/AttributeContainerAccess +inject-interface net/minecraft/entity/attribute/EntityAttributeInstance net/errorcraft/itematic/access/entity/attribute/EntityAttributeInstanceAccess +inject-interface net/minecraft/entity/attribute/DefaultAttributeContainer net/errorcraft/itematic/access/entity/attribute/DefaultAttributeContainerAccess +inject-interface net/minecraft/client/MinecraftClient net/errorcraft/itematic/access/client/MinecraftClientAccess extend-enum net/minecraft/recipe/book/RecipeBookType ITEMATIC_BREWING extend-enum net/minecraft/client/recipebook/RecipeBookType ITEMATIC_BREWING From 57aac36e7c2c14154623578d4878f3149108491e Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Wed, 1 Jul 2026 15:05:05 +0200 Subject: [PATCH 02/10] Port to 25w17a --- gradle.properties | 6 ++-- .../data/minecraft/item/black_harness.json | 3 ++ .../data/minecraft/item/blue_harness.json | 3 ++ .../data/minecraft/item/brown_harness.json | 3 ++ .../data/minecraft/item/chainmail_boots.json | 3 -- .../minecraft/item/chainmail_chestplate.json | 3 -- .../data/minecraft/item/chainmail_helmet.json | 3 -- .../minecraft/item/chainmail_leggings.json | 3 -- .../data/minecraft/item/cyan_harness.json | 3 ++ .../data/minecraft/item/diamond_boots.json | 6 ---- .../minecraft/item/diamond_chestplate.json | 6 ---- .../data/minecraft/item/diamond_helmet.json | 6 ---- .../minecraft/item/diamond_horse_armor.json | 6 ---- .../data/minecraft/item/diamond_leggings.json | 6 ---- .../data/minecraft/item/dried_ghast.json | 1 - .../data/minecraft/item/golden_boots.json | 3 -- .../minecraft/item/golden_chestplate.json | 3 -- .../data/minecraft/item/golden_helmet.json | 3 -- .../minecraft/item/golden_horse_armor.json | 3 -- .../data/minecraft/item/golden_leggings.json | 3 -- .../data/minecraft/item/gray_harness.json | 3 ++ .../data/minecraft/item/green_harness.json | 3 ++ .../data/minecraft/item/iron_boots.json | 3 -- .../data/minecraft/item/iron_chestplate.json | 3 -- .../data/minecraft/item/iron_helmet.json | 3 -- .../data/minecraft/item/iron_horse_armor.json | 3 -- .../data/minecraft/item/iron_leggings.json | 3 -- .../data/minecraft/item/leather_boots.json | 3 -- .../minecraft/item/leather_chestplate.json | 3 -- .../data/minecraft/item/leather_helmet.json | 3 -- .../minecraft/item/leather_horse_armor.json | 3 -- .../data/minecraft/item/leather_leggings.json | 3 -- .../minecraft/item/light_blue_harness.json | 3 ++ .../minecraft/item/light_gray_harness.json | 3 ++ .../data/minecraft/item/lime_harness.json | 3 ++ .../data/minecraft/item/magenta_harness.json | 3 ++ .../data/minecraft/item/netherite_boots.json | 9 ----- .../minecraft/item/netherite_chestplate.json | 9 ----- .../data/minecraft/item/netherite_helmet.json | 9 ----- .../minecraft/item/netherite_leggings.json | 9 ----- .../data/minecraft/item/orange_harness.json | 3 ++ .../data/minecraft/item/pink_harness.json | 3 ++ .../data/minecraft/item/purple_harness.json | 3 ++ .../data/minecraft/item/red_harness.json | 3 ++ .../data/minecraft/item/turtle_helmet.json | 3 -- .../data/minecraft/item/white_harness.json | 3 ++ .../data/minecraft/item/wolf_armor.json | 3 -- .../data/minecraft/item/yellow_harness.json | 3 ++ .../errorcraft/itematic/item/ItemUtil.java | 36 +++++++++---------- .../components/EquipmentItemComponent.java | 21 ++++++----- .../components/FireworkItemComponent.java | 5 +++ 51 files changed, 85 insertions(+), 161 deletions(-) diff --git a/gradle.properties b/gradle.properties index 87978540..c8811d69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=25w16a - yarn_mappings=25w16a+build.5 + minecraft_version=25w17a + yarn_mappings=25w17a+build.4 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.121.0+1.21.6 + fabric_version=0.121.1+1.21.6 diff --git a/src/main/generated/data/minecraft/item/black_harness.json b/src/main/generated/data/minecraft/item/black_harness.json index 40082ab5..5c452517 100644 --- a/src/main/generated/data/minecraft/item/black_harness.json +++ b/src/main/generated/data/minecraft/item/black_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:black_harness", diff --git a/src/main/generated/data/minecraft/item/blue_harness.json b/src/main/generated/data/minecraft/item/blue_harness.json index eeb714f1..b5626d00 100644 --- a/src/main/generated/data/minecraft/item/blue_harness.json +++ b/src/main/generated/data/minecraft/item/blue_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:blue_harness", diff --git a/src/main/generated/data/minecraft/item/brown_harness.json b/src/main/generated/data/minecraft/item/brown_harness.json index d6e4b1f5..ee6ac88b 100644 --- a/src/main/generated/data/minecraft/item/brown_harness.json +++ b/src/main/generated/data/minecraft/item/brown_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:brown_harness", diff --git a/src/main/generated/data/minecraft/item/chainmail_boots.json b/src/main/generated/data/minecraft/item/chainmail_boots.json index 0ef45122..0d67b086 100644 --- a/src/main/generated/data/minecraft/item/chainmail_boots.json +++ b/src/main/generated/data/minecraft/item/chainmail_boots.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 1.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/chainmail_chestplate.json b/src/main/generated/data/minecraft/item/chainmail_chestplate.json index 05033846..4ba6dbc9 100644 --- a/src/main/generated/data/minecraft/item/chainmail_chestplate.json +++ b/src/main/generated/data/minecraft/item/chainmail_chestplate.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 5.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/chainmail_helmet.json b/src/main/generated/data/minecraft/item/chainmail_helmet.json index dfe9a1fc..2d13079f 100644 --- a/src/main/generated/data/minecraft/item/chainmail_helmet.json +++ b/src/main/generated/data/minecraft/item/chainmail_helmet.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/chainmail_leggings.json b/src/main/generated/data/minecraft/item/chainmail_leggings.json index 8a12abd3..5334d86b 100644 --- a/src/main/generated/data/minecraft/item/chainmail_leggings.json +++ b/src/main/generated/data/minecraft/item/chainmail_leggings.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 4.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/cyan_harness.json b/src/main/generated/data/minecraft/item/cyan_harness.json index b8651304..48dac707 100644 --- a/src/main/generated/data/minecraft/item/cyan_harness.json +++ b/src/main/generated/data/minecraft/item/cyan_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:cyan_harness", diff --git a/src/main/generated/data/minecraft/item/diamond_boots.json b/src/main/generated/data/minecraft/item/diamond_boots.json index 1c0a737e..80727180 100644 --- a/src/main/generated/data/minecraft/item/diamond_boots.json +++ b/src/main/generated/data/minecraft/item/diamond_boots.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor_toughness", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/diamond_chestplate.json b/src/main/generated/data/minecraft/item/diamond_chestplate.json index de5fcb06..aa699720 100644 --- a/src/main/generated/data/minecraft/item/diamond_chestplate.json +++ b/src/main/generated/data/minecraft/item/diamond_chestplate.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 8.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor_toughness", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/diamond_helmet.json b/src/main/generated/data/minecraft/item/diamond_helmet.json index 359afe49..86c60694 100644 --- a/src/main/generated/data/minecraft/item/diamond_helmet.json +++ b/src/main/generated/data/minecraft/item/diamond_helmet.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor_toughness", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/diamond_horse_armor.json b/src/main/generated/data/minecraft/item/diamond_horse_armor.json index e366ad88..8f204e45 100644 --- a/src/main/generated/data/minecraft/item/diamond_horse_armor.json +++ b/src/main/generated/data/minecraft/item/diamond_horse_armor.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 11.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "body" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.body", "type": "minecraft:armor_toughness", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/diamond_leggings.json b/src/main/generated/data/minecraft/item/diamond_leggings.json index b6ba4398..a677692d 100644 --- a/src/main/generated/data/minecraft/item/diamond_leggings.json +++ b/src/main/generated/data/minecraft/item/diamond_leggings.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 6.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor_toughness", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/dried_ghast.json b/src/main/generated/data/minecraft/item/dried_ghast.json index 271a80c4..159b9981 100644 --- a/src/main/generated/data/minecraft/item/dried_ghast.json +++ b/src/main/generated/data/minecraft/item/dried_ghast.json @@ -7,7 +7,6 @@ }, "display": { "model": "minecraft:dried_ghast", - "rarity": "uncommon", "translation_key": "block.minecraft.dried_ghast" } } \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/golden_boots.json b/src/main/generated/data/minecraft/item/golden_boots.json index 117b377b..cfe3c12e 100644 --- a/src/main/generated/data/minecraft/item/golden_boots.json +++ b/src/main/generated/data/minecraft/item/golden_boots.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 1.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/golden_chestplate.json b/src/main/generated/data/minecraft/item/golden_chestplate.json index 78fdae6a..0c35e21d 100644 --- a/src/main/generated/data/minecraft/item/golden_chestplate.json +++ b/src/main/generated/data/minecraft/item/golden_chestplate.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 5.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/golden_helmet.json b/src/main/generated/data/minecraft/item/golden_helmet.json index e03e74b7..6568f129 100644 --- a/src/main/generated/data/minecraft/item/golden_helmet.json +++ b/src/main/generated/data/minecraft/item/golden_helmet.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/golden_horse_armor.json b/src/main/generated/data/minecraft/item/golden_horse_armor.json index 3621e27e..d5297ad8 100644 --- a/src/main/generated/data/minecraft/item/golden_horse_armor.json +++ b/src/main/generated/data/minecraft/item/golden_horse_armor.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 7.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/golden_leggings.json b/src/main/generated/data/minecraft/item/golden_leggings.json index bec9c08c..e330bd71 100644 --- a/src/main/generated/data/minecraft/item/golden_leggings.json +++ b/src/main/generated/data/minecraft/item/golden_leggings.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/gray_harness.json b/src/main/generated/data/minecraft/item/gray_harness.json index 163e3123..e3f1738f 100644 --- a/src/main/generated/data/minecraft/item/gray_harness.json +++ b/src/main/generated/data/minecraft/item/gray_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:gray_harness", diff --git a/src/main/generated/data/minecraft/item/green_harness.json b/src/main/generated/data/minecraft/item/green_harness.json index f6761c32..91da7bcc 100644 --- a/src/main/generated/data/minecraft/item/green_harness.json +++ b/src/main/generated/data/minecraft/item/green_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:green_harness", diff --git a/src/main/generated/data/minecraft/item/iron_boots.json b/src/main/generated/data/minecraft/item/iron_boots.json index 83fe5e75..62d68120 100644 --- a/src/main/generated/data/minecraft/item/iron_boots.json +++ b/src/main/generated/data/minecraft/item/iron_boots.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/iron_chestplate.json b/src/main/generated/data/minecraft/item/iron_chestplate.json index 0af09095..840b9575 100644 --- a/src/main/generated/data/minecraft/item/iron_chestplate.json +++ b/src/main/generated/data/minecraft/item/iron_chestplate.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 6.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/iron_helmet.json b/src/main/generated/data/minecraft/item/iron_helmet.json index 4a89917b..b0626ba6 100644 --- a/src/main/generated/data/minecraft/item/iron_helmet.json +++ b/src/main/generated/data/minecraft/item/iron_helmet.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/iron_horse_armor.json b/src/main/generated/data/minecraft/item/iron_horse_armor.json index c2281a9f..eea89d8a 100644 --- a/src/main/generated/data/minecraft/item/iron_horse_armor.json +++ b/src/main/generated/data/minecraft/item/iron_horse_armor.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 5.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/iron_leggings.json b/src/main/generated/data/minecraft/item/iron_leggings.json index 4be583a5..e2cb3d3a 100644 --- a/src/main/generated/data/minecraft/item/iron_leggings.json +++ b/src/main/generated/data/minecraft/item/iron_leggings.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 5.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/leather_boots.json b/src/main/generated/data/minecraft/item/leather_boots.json index 002a9560..cbfce9cb 100644 --- a/src/main/generated/data/minecraft/item/leather_boots.json +++ b/src/main/generated/data/minecraft/item/leather_boots.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 1.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/leather_chestplate.json b/src/main/generated/data/minecraft/item/leather_chestplate.json index a4181ac9..066444a8 100644 --- a/src/main/generated/data/minecraft/item/leather_chestplate.json +++ b/src/main/generated/data/minecraft/item/leather_chestplate.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/leather_helmet.json b/src/main/generated/data/minecraft/item/leather_helmet.json index cbb0a673..2ace084b 100644 --- a/src/main/generated/data/minecraft/item/leather_helmet.json +++ b/src/main/generated/data/minecraft/item/leather_helmet.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 1.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/leather_horse_armor.json b/src/main/generated/data/minecraft/item/leather_horse_armor.json index e775c498..84ee190a 100644 --- a/src/main/generated/data/minecraft/item/leather_horse_armor.json +++ b/src/main/generated/data/minecraft/item/leather_horse_armor.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/leather_leggings.json b/src/main/generated/data/minecraft/item/leather_leggings.json index 0f71809a..3cc9a5bd 100644 --- a/src/main/generated/data/minecraft/item/leather_leggings.json +++ b/src/main/generated/data/minecraft/item/leather_leggings.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/light_blue_harness.json b/src/main/generated/data/minecraft/item/light_blue_harness.json index 5e324fe6..c9038205 100644 --- a/src/main/generated/data/minecraft/item/light_blue_harness.json +++ b/src/main/generated/data/minecraft/item/light_blue_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:light_blue_harness", diff --git a/src/main/generated/data/minecraft/item/light_gray_harness.json b/src/main/generated/data/minecraft/item/light_gray_harness.json index f10fd105..42702bd2 100644 --- a/src/main/generated/data/minecraft/item/light_gray_harness.json +++ b/src/main/generated/data/minecraft/item/light_gray_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:light_gray_harness", diff --git a/src/main/generated/data/minecraft/item/lime_harness.json b/src/main/generated/data/minecraft/item/lime_harness.json index b2f0f24e..8db9170e 100644 --- a/src/main/generated/data/minecraft/item/lime_harness.json +++ b/src/main/generated/data/minecraft/item/lime_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:lime_harness", diff --git a/src/main/generated/data/minecraft/item/magenta_harness.json b/src/main/generated/data/minecraft/item/magenta_harness.json index ec907d8c..9c911833 100644 --- a/src/main/generated/data/minecraft/item/magenta_harness.json +++ b/src/main/generated/data/minecraft/item/magenta_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:magenta_harness", diff --git a/src/main/generated/data/minecraft/item/netherite_boots.json b/src/main/generated/data/minecraft/item/netherite_boots.json index 668ac302..4434fd9c 100644 --- a/src/main/generated/data/minecraft/item/netherite_boots.json +++ b/src/main/generated/data/minecraft/item/netherite_boots.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:armor_toughness", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" }, @@ -24,9 +18,6 @@ "id": "minecraft:armor.boots", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "feet" } diff --git a/src/main/generated/data/minecraft/item/netherite_chestplate.json b/src/main/generated/data/minecraft/item/netherite_chestplate.json index 14fa8f45..77120fcc 100644 --- a/src/main/generated/data/minecraft/item/netherite_chestplate.json +++ b/src/main/generated/data/minecraft/item/netherite_chestplate.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor", "amount": 8.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:armor_toughness", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" }, @@ -24,9 +18,6 @@ "id": "minecraft:armor.chestplate", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "chest" } diff --git a/src/main/generated/data/minecraft/item/netherite_helmet.json b/src/main/generated/data/minecraft/item/netherite_helmet.json index f785ffa4..f1637ad8 100644 --- a/src/main/generated/data/minecraft/item/netherite_helmet.json +++ b/src/main/generated/data/minecraft/item/netherite_helmet.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor_toughness", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" }, @@ -24,9 +18,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/netherite_leggings.json b/src/main/generated/data/minecraft/item/netherite_leggings.json index 844acff7..002bdc6b 100644 --- a/src/main/generated/data/minecraft/item/netherite_leggings.json +++ b/src/main/generated/data/minecraft/item/netherite_leggings.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor", "amount": 6.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" }, @@ -14,9 +11,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:armor_toughness", "amount": 3.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" }, @@ -24,9 +18,6 @@ "id": "minecraft:armor.leggings", "type": "minecraft:knockback_resistance", "amount": 0.10000000149011612, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "legs" } diff --git a/src/main/generated/data/minecraft/item/orange_harness.json b/src/main/generated/data/minecraft/item/orange_harness.json index 4fb4825d..97085963 100644 --- a/src/main/generated/data/minecraft/item/orange_harness.json +++ b/src/main/generated/data/minecraft/item/orange_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:orange_harness", diff --git a/src/main/generated/data/minecraft/item/pink_harness.json b/src/main/generated/data/minecraft/item/pink_harness.json index 5192fd41..c331b056 100644 --- a/src/main/generated/data/minecraft/item/pink_harness.json +++ b/src/main/generated/data/minecraft/item/pink_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:pink_harness", diff --git a/src/main/generated/data/minecraft/item/purple_harness.json b/src/main/generated/data/minecraft/item/purple_harness.json index 80353680..3e75ad02 100644 --- a/src/main/generated/data/minecraft/item/purple_harness.json +++ b/src/main/generated/data/minecraft/item/purple_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:purple_harness", diff --git a/src/main/generated/data/minecraft/item/red_harness.json b/src/main/generated/data/minecraft/item/red_harness.json index 6da712ab..381a23b3 100644 --- a/src/main/generated/data/minecraft/item/red_harness.json +++ b/src/main/generated/data/minecraft/item/red_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:red_harness", diff --git a/src/main/generated/data/minecraft/item/turtle_helmet.json b/src/main/generated/data/minecraft/item/turtle_helmet.json index b87ae5ce..03c6a89d 100644 --- a/src/main/generated/data/minecraft/item/turtle_helmet.json +++ b/src/main/generated/data/minecraft/item/turtle_helmet.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.helmet", "type": "minecraft:armor", "amount": 2.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "head" } diff --git a/src/main/generated/data/minecraft/item/white_harness.json b/src/main/generated/data/minecraft/item/white_harness.json index fa078bd9..0d46b3d1 100644 --- a/src/main/generated/data/minecraft/item/white_harness.json +++ b/src/main/generated/data/minecraft/item/white_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:white_harness", diff --git a/src/main/generated/data/minecraft/item/wolf_armor.json b/src/main/generated/data/minecraft/item/wolf_armor.json index 52622932..7896dadc 100644 --- a/src/main/generated/data/minecraft/item/wolf_armor.json +++ b/src/main/generated/data/minecraft/item/wolf_armor.json @@ -4,9 +4,6 @@ "id": "minecraft:armor.body", "type": "minecraft:armor", "amount": 11.0, - "display": { - "type": "default" - }, "operation": "add_value", "slot": "body" } diff --git a/src/main/generated/data/minecraft/item/yellow_harness.json b/src/main/generated/data/minecraft/item/yellow_harness.json index 788586c4..843c4d98 100644 --- a/src/main/generated/data/minecraft/item/yellow_harness.json +++ b/src/main/generated/data/minecraft/item/yellow_harness.json @@ -1,5 +1,8 @@ { "behavior": { + "minecraft:dispensable": { + "behavior": "minecraft:equip_entity" + }, "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:yellow_harness", diff --git a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java index 6f263204..ceb26cb2 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java @@ -2710,9 +2710,7 @@ private void bootstrapBlocks() { .build() )); this.registerable.register(ItemKeys.DRIED_GHAST, create( - ItemDisplay.Builder.forBlock(ItemKeys.DRIED_GHAST) - .rarity(Rarity.UNCOMMON) - .build(), + ItemDisplay.Builder.forBlock(ItemKeys.DRIED_GHAST).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(64)) .with(BlockItemComponent.of(this.blocks.getOrThrow(BlockKeys.DRIED_GHAST))) @@ -7876,112 +7874,112 @@ private void bootstrapArmor() { ItemDisplay.Builder.forItem(ItemKeys.WHITE_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.WHITE, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.WHITE, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.ORANGE_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.ORANGE_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.ORANGE, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.ORANGE, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.MAGENTA_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.MAGENTA_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.MAGENTA, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.MAGENTA, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.LIGHT_BLUE_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.LIGHT_BLUE_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.LIGHT_BLUE, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.LIGHT_BLUE, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.YELLOW_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.YELLOW_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.YELLOW, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.YELLOW, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.LIME_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.LIME_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.LIME, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.LIME, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.PINK_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.PINK_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.PINK, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.PINK, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.GRAY_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.GRAY_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.GRAY, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.GRAY, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.LIGHT_GRAY_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.LIGHT_GRAY_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.LIGHT_GRAY, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.LIGHT_GRAY, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.CYAN_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.CYAN_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.CYAN, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.CYAN, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.PURPLE_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.PURPLE_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.PURPLE, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.PURPLE, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.BLUE_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.BLUE_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.BLUE, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.BLUE, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.BROWN_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.BROWN_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.BROWN, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.BROWN, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.GREEN_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.GREEN_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.GREEN, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.GREEN, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.RED_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.RED_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.RED, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.RED, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); this.registerable.register(ItemKeys.BLACK_HARNESS, create( ItemDisplay.Builder.forItem(ItemKeys.BLACK_HARNESS).build(), ItemComponentSet.builder() .with(StackableItemComponent.of(1)) - .with(EquipmentItemComponent.ofHarness(DyeColor.BLACK, this.soundEvents, this.entityTypes)) + .with(EquipmentItemComponent.ofHarness(DyeColor.BLACK, this.soundEvents, this.entityTypes, this.dispenseBehaviors)) .build() )); } diff --git a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java index 4299db95..c67e4e82 100644 --- a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java +++ b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java @@ -53,14 +53,17 @@ public static EquipmentItemComponent ofHorseArmor(ArmorMaterial material, Regist ); } - public static EquipmentItemComponent ofHarness(DyeColor color, RegistryEntryLookup soundEvents, RegistryEntryLookup> entityTypes) { - return of(EquippableComponent.builder(EquipmentSlot.BODY) - .equipSound(soundEvents.getOrThrow(SoundEventKeys.HAPPY_GHAST_EQUIP)) - .model(EquipmentAssetKeys.HARNESS_FROM_COLOR.get(color)) - .allowedEntities(entityTypes.getOrThrow(EntityTypeTags.CAN_EQUIP_HARNESS)) - .equipOnInteract(true) - .build() - ); + public static ItemComponent[] ofHarness(DyeColor color, RegistryEntryLookup soundEvents, RegistryEntryLookup> entityTypes, RegistryEntryLookup dispenseBehaviors) { + return new ItemComponent[] { + of(EquippableComponent.builder(EquipmentSlot.BODY) + .equipSound(soundEvents.getOrThrow(SoundEventKeys.HAPPY_GHAST_EQUIP)) + .model(EquipmentAssetKeys.HARNESS_FROM_COLOR.get(color)) + .allowedEntities(entityTypes.getOrThrow(EntityTypeTags.CAN_EQUIP_HARNESS)) + .equipOnInteract(true) + .build() + ), + DispensableItemComponent.of(dispenseBehaviors.getOrThrow(DispenseBehaviors.EQUIP_ENTITY)) + }; } public static ItemComponent[] forArmor(ArmorMaterial material, EquipmentType type) { @@ -78,7 +81,7 @@ public static ItemComponent[] forArmor(ArmorMaterial material, EquipmentType public static ItemComponent[] forSkull(RegistryEntry attachedBlock, RegistryEntry otherBlock, RegistryEntryLookup dispenseBehaviors) { return new ItemComponent[] { BlockItemComponent.attachedToSide(attachedBlock, otherBlock, Direction.DOWN), - new EquipmentItemComponent(EquippableComponent.builder(EquipmentSlot.HEAD) + of(EquippableComponent.builder(EquipmentSlot.HEAD) .swappable(false) .build()), DispensableItemComponent.of(dispenseBehaviors.getOrThrow(DispenseBehaviors.EQUIP_ENTITY_HEAD)), diff --git a/src/main/java/net/errorcraft/itematic/item/component/components/FireworkItemComponent.java b/src/main/java/net/errorcraft/itematic/item/component/components/FireworkItemComponent.java index c062f77d..d1e4d86e 100644 --- a/src/main/java/net/errorcraft/itematic/item/component/components/FireworkItemComponent.java +++ b/src/main/java/net/errorcraft/itematic/item/component/components/FireworkItemComponent.java @@ -56,6 +56,11 @@ public ItemResult use(World world, PlayerEntity user, Hand hand, ItemStack stack @Override public ItemResult useOnBlock(ItemUsageContext context, ItemStackExchanger stackExchanger) { + PlayerEntity player = context.getPlayer(); + if (player != null && player.isGliding()) { + return ItemResult.PASS; + } + World world = context.getWorld(); ItemStack stack = context.getStack(); if (world.isClient()) { From c4e08e186804fd11ca45b8f6f87accb7210faff2 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Wed, 1 Jul 2026 16:25:38 +0200 Subject: [PATCH 03/10] Port to 25w18a --- gradle.properties | 6 +- .../mixin/client/gui/DrawContextExtender.java | 2 +- .../data/server/tag/ActionTagProvider.java | 4 +- .../data/server/tag/BlockTagProvider.java | 6 +- .../ItemGroupEntryProviderTagProvider.java | 22 +- .../data/server/tag/ItemTagProvider.java | 287 +++++++++--------- .../data/server/tag/PotionTagProvider.java | 10 +- .../data/server/tag/TradeTagProvider.java | 136 ++++----- .../recipe/book/RecipeBookOptionsAccess.java | 10 + .../DecoratedPotBlockEntityExtender.java | 46 --- .../FireworkRocketEntityExtender.java | 2 +- .../thrown/ThrownItemEntityExtender.java | 5 +- .../book/RecipeBookOptionsAccessor.java | 16 + .../book/RecipeBookOptionsExtender.java | 108 ++++++- .../book/ItematicRecipeBookOptions.java | 14 + src/main/resources/itematic.classtweaker | 1 + src/main/resources/itematic.mixins.json | 2 +- 17 files changed, 378 insertions(+), 299 deletions(-) create mode 100644 src/main/java/net/errorcraft/itematic/access/recipe/book/RecipeBookOptionsAccess.java delete mode 100644 src/main/java/net/errorcraft/itematic/mixin/block/entity/DecoratedPotBlockEntityExtender.java create mode 100644 src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsAccessor.java create mode 100644 src/main/java/net/errorcraft/itematic/recipe/book/ItematicRecipeBookOptions.java diff --git a/gradle.properties b/gradle.properties index c8811d69..bec1b3bf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=25w17a - yarn_mappings=25w17a+build.4 + minecraft_version=25w18a + yarn_mappings=25w18a+build.7 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.121.1+1.21.6 + fabric_version=0.123.0+1.21.6 diff --git a/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java b/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java index a89b33eb..17791f6c 100644 --- a/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java +++ b/src/client/java/net/errorcraft/itematic/mixin/client/gui/DrawContextExtender.java @@ -33,7 +33,7 @@ public abstract class DrawContextExtender { method = "(Lnet/minecraft/client/MinecraftClient;Lorg/joml/Matrix3x2fStack;Lnet/minecraft/client/gui/render/state/GuiRenderState;)V", at = @At("TAIL") ) - private void setItemBarStyles(MinecraftClient client, Matrix3x2fStack matrices, GuiRenderState state, CallbackInfo ci) { + private void setItemBarStyles(MinecraftClient client, Matrix3x2fStack matrices, GuiRenderState state, CallbackInfo info) { this.itemBarStyles = client.itematic$itemBarStyles(); } diff --git a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ActionTagProvider.java b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ActionTagProvider.java index 091fed97..d440c9cc 100644 --- a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ActionTagProvider.java +++ b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ActionTagProvider.java @@ -17,11 +17,11 @@ public ActionTagProvider(FabricDataOutput output, CompletableFuture { public PotionTagProvider(FabricDataOutput output, CompletableFuture registriesFuture) { @@ -24,15 +24,13 @@ public PotionTagProvider(FabricDataOutput output, CompletableFuture potions = lookup.getOrThrow(RegistryKeys.POTION); BrewingRecipeRegistry brewingRecipeRegistry = BrewingRecipeRegistry.create(FeatureFlags.VANILLA_FEATURES); - this.getOrCreateTagBuilder(PotionTags.TRADEABLE) + this.builder(PotionTags.TRADEABLE) .add(getAll(potions, potion -> !potion.value().getEffects().isEmpty() && brewingRecipeRegistry.isBrewable(potion))); } - private static Identifier[] getAll(RegistryWrapper.Impl registry, Predicate> predicate) { + private static Stream> getAll(RegistryWrapper.Impl registry, Predicate> predicate) { return registry.streamEntries() .filter(predicate) - .map(RegistryEntry.Reference::registryKey) - .map(RegistryKey::getValue) - .toArray(Identifier[]::new); + .map(RegistryEntry.Reference::registryKey); } } diff --git a/src/datagen/java/net/errorcraft/itematic/data/server/tag/TradeTagProvider.java b/src/datagen/java/net/errorcraft/itematic/data/server/tag/TradeTagProvider.java index 1f25f09a..0cf25a4a 100644 --- a/src/datagen/java/net/errorcraft/itematic/data/server/tag/TradeTagProvider.java +++ b/src/datagen/java/net/errorcraft/itematic/data/server/tag/TradeTagProvider.java @@ -17,20 +17,20 @@ public TradeTagProvider(FabricDataOutput output, CompletableFuture type, BlockPos pos, BlockState state) { - super(type, pos, state); - } - - @Redirect( - method = "readNbt", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/nbt/NbtCompound;get(Ljava/lang/String;Lcom/mojang/serialization/Codec;)Ljava/util/Optional;" - ) - ) - private Optional getUseRegistryOps(NbtCompound instance, String key, Codec codec, @Local(argsOnly = true) RegistryWrapper.WrapperLookup lookup) { - return instance.get(key, codec, lookup.getOps(NbtOps.INSTANCE)); - } - - @Redirect( - method = "writeNbt", - at = @At( - value = "INVOKE", - target = "Lnet/minecraft/nbt/NbtCompound;put(Ljava/lang/String;Lcom/mojang/serialization/Codec;Ljava/lang/Object;)V" - ) - ) - private void putUseRegistryOps(NbtCompound instance, String key, Codec codec, T value, @Local(argsOnly = true) RegistryWrapper.WrapperLookup lookup) { - instance.put(key, codec, lookup.getOps(NbtOps.INSTANCE), value); - } -} diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/FireworkRocketEntityExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/FireworkRocketEntityExtender.java index e98f74b8..8a9801a4 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/FireworkRocketEntityExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/FireworkRocketEntityExtender.java @@ -32,7 +32,7 @@ private Item getHandPosOffsetUseRegistryEntry(Item item) { @Redirect( method = { "initDataTracker", - "readCustomDataFromNbt" + "readCustomData" }, at = @At( value = "INVOKE", diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/thrown/ThrownItemEntityExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/thrown/ThrownItemEntityExtender.java index 62120cfb..0d8e4582 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/thrown/ThrownItemEntityExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/projectile/thrown/ThrownItemEntityExtender.java @@ -21,7 +21,10 @@ protected ThrownItemEntityExtender(EntityType entityType } @Redirect( - method = { "initDataTracker", "readCustomDataFromNbt", "method_57319" }, + method = { + "initDataTracker", + "method_57319" + }, at = @At( value = "NEW", target = "(Lnet/minecraft/item/ItemConvertible;)Lnet/minecraft/item/ItemStack;" diff --git a/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsAccessor.java b/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsAccessor.java new file mode 100644 index 00000000..f3d07488 --- /dev/null +++ b/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsAccessor.java @@ -0,0 +1,16 @@ +package net.errorcraft.itematic.mixin.recipe.book; + +import com.mojang.serialization.MapCodec; +import net.minecraft.recipe.book.RecipeBookOptions; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Invoker; + +public interface RecipeBookOptionsAccessor { + @Mixin(RecipeBookOptions.CategoryOption.class) + interface CategoryOptionAccessor { + @Invoker("createCodec") + static MapCodec createCodec(String guiOpenField, String filteringCraftableField) { + throw new AssertionError(); + } + } +} diff --git a/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java b/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java index b2d4c553..4711aeab 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java @@ -1,30 +1,112 @@ package net.errorcraft.itematic.mixin.recipe.book; -import com.google.common.collect.ImmutableMap; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; -import com.mojang.datafixers.util.Pair; +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.errorcraft.itematic.access.recipe.book.RecipeBookOptionsAccess; +import net.errorcraft.itematic.recipe.book.ItematicRecipeBookOptions; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.network.codec.PacketCodec; import net.minecraft.recipe.book.RecipeBookOptions; import net.minecraft.recipe.book.RecipeBookType; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.function.Function; +import java.util.function.UnaryOperator; @Mixin(RecipeBookOptions.class) -public class RecipeBookOptionsExtender { +public class RecipeBookOptionsExtender implements RecipeBookOptionsAccess { + @Unique + private RecipeBookOptions.CategoryOption brewing = RecipeBookOptions.CategoryOption.DEFAULT; + + @ModifyExpressionValue( + method = "", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/network/codec/PacketCodec;tuple(Lnet/minecraft/network/codec/PacketCodec;Ljava/util/function/Function;Lnet/minecraft/network/codec/PacketCodec;Ljava/util/function/Function;Lnet/minecraft/network/codec/PacketCodec;Ljava/util/function/Function;Lnet/minecraft/network/codec/PacketCodec;Ljava/util/function/Function;Lcom/mojang/datafixers/util/Function4;)Lnet/minecraft/network/codec/PacketCodec;" + ) + ) + private static PacketCodec addBrewingFieldPacketCodec(PacketCodec original) { + return PacketCodec.tuple( + original, Function.identity(), + RecipeBookOptions.CategoryOption.PACKET_CODEC, RecipeBookOptions::itematic$brewing, + RecipeBookOptionsExtender::setFields + ); + } + @ModifyExpressionValue( method = "", at = @At( value = "INVOKE", - target = "Lcom/google/common/collect/ImmutableMap;of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;", - remap = false + target = "Lcom/mojang/serialization/codecs/RecordCodecBuilder;mapCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;" ) ) - private static ImmutableMap> addCustomEntries(ImmutableMap> original) { - return ImmutableMap.>builder() - .putAll(original) - .put( - RecipeBookType.ITEMATIC_BREWING, - Pair.of("isBrewingStandGuiOpen", "isBrewingStandFilteringCraftable") - ) - .build(); + private static MapCodec addBrewingFieldCodec(MapCodec original) { + return RecordCodecBuilder.mapCodec(instance -> instance.group( + original.forGetter(Function.identity()), + ItematicRecipeBookOptions.BREWING_CODEC.forGetter(RecipeBookOptions::itematic$brewing) + ).apply(instance, RecipeBookOptionsExtender::setFields)); + } + + @Inject( + method = "getOption", + at = @At("HEAD"), + cancellable = true + ) + private void getOptionCheckBrewing(RecipeBookType type, CallbackInfoReturnable info) { + if (type == RecipeBookType.ITEMATIC_BREWING) { + info.setReturnValue(this.brewing); + } + } + + @Inject( + method = "apply", + at = @At("HEAD"), + cancellable = true + ) + private void applyCheckBrewing(RecipeBookType type, UnaryOperator modifier, CallbackInfo info) { + if (type == RecipeBookType.ITEMATIC_BREWING) { + this.brewing = modifier.apply(this.brewing); + info.cancel(); + } + } + + @ModifyReturnValue( + method = "copy", + at = @At("TAIL") + ) + private RecipeBookOptions setBrewingField(RecipeBookOptions original) { + original.itematic$setBrewing(this.brewing); + return original; + } + + @Inject( + method = "copyFrom", + at = @At("TAIL") + ) + private void copyBrewingField(RecipeBookOptions other, CallbackInfo info) { + this.brewing = other.itematic$brewing(); + } + + @Override + public RecipeBookOptions.CategoryOption itematic$brewing() { + return this.brewing; + } + + @Override + public void itematic$setBrewing(RecipeBookOptions.CategoryOption brewing) { + this.brewing = brewing; + } + + @Unique + private static RecipeBookOptions setFields(RecipeBookOptions recipeBookOptions, RecipeBookOptions.CategoryOption brewing) { + recipeBookOptions.itematic$setBrewing(brewing); + return recipeBookOptions; } } diff --git a/src/main/java/net/errorcraft/itematic/recipe/book/ItematicRecipeBookOptions.java b/src/main/java/net/errorcraft/itematic/recipe/book/ItematicRecipeBookOptions.java new file mode 100644 index 00000000..d6179dae --- /dev/null +++ b/src/main/java/net/errorcraft/itematic/recipe/book/ItematicRecipeBookOptions.java @@ -0,0 +1,14 @@ +package net.errorcraft.itematic.recipe.book; + +import com.mojang.serialization.MapCodec; +import net.errorcraft.itematic.mixin.recipe.book.RecipeBookOptionsAccessor; +import net.minecraft.recipe.book.RecipeBookOptions; + +public class ItematicRecipeBookOptions { + public static final MapCodec BREWING_CODEC = RecipeBookOptionsAccessor.CategoryOptionAccessor.createCodec( + "isBrewingStandGuiOpen", + "isBrewingStandFilteringCraftable" + ); + + private ItematicRecipeBookOptions() {} +} diff --git a/src/main/resources/itematic.classtweaker b/src/main/resources/itematic.classtweaker index d5efb6c9..bee6be3b 100644 --- a/src/main/resources/itematic.classtweaker +++ b/src/main/resources/itematic.classtweaker @@ -30,6 +30,7 @@ inject-interface net/minecraft/entity/attribute/AttributeContainer net/err inject-interface net/minecraft/entity/attribute/EntityAttributeInstance net/errorcraft/itematic/access/entity/attribute/EntityAttributeInstanceAccess inject-interface net/minecraft/entity/attribute/DefaultAttributeContainer net/errorcraft/itematic/access/entity/attribute/DefaultAttributeContainerAccess inject-interface net/minecraft/client/MinecraftClient net/errorcraft/itematic/access/client/MinecraftClientAccess +inject-interface net/minecraft/recipe/book/RecipeBookOptions net/errorcraft/itematic/access/recipe/book/RecipeBookOptionsAccess extend-enum net/minecraft/recipe/book/RecipeBookType ITEMATIC_BREWING extend-enum net/minecraft/client/recipebook/RecipeBookType ITEMATIC_BREWING diff --git a/src/main/resources/itematic.mixins.json b/src/main/resources/itematic.mixins.json index 53907f40..84e107bf 100644 --- a/src/main/resources/itematic.mixins.json +++ b/src/main/resources/itematic.mixins.json @@ -71,7 +71,6 @@ "block.entity.BannerBlockEntityExtender", "block.entity.BrewingStandBlockEntityExtender", "block.entity.BrewingStandBlockEntityExtender$PropertyDelegateExtender", - "block.entity.DecoratedPotBlockEntityExtender", "block.entity.LecternBlockEntityExtender", "block.entity.SherdsAccessor", "block.entity.SherdsExtender", @@ -342,6 +341,7 @@ "recipe.TippedArrowRecipeExtender", "recipe.TransmuteRecipeExtender", "recipe.TransmuteRecipeResultExtender", + "recipe.book.RecipeBookOptionsAccessor$CategoryOptionAccessor", "recipe.book.RecipeBookOptionsExtender", "recipe.book.RecipeBookTypeExtender", "recipe.display.SlotDisplayExtender$AnyFuelSlotDisplayExtender", From 6459fe5526d3ba53aa551b9340e2c68131e0d7c6 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Wed, 1 Jul 2026 16:48:17 +0200 Subject: [PATCH 04/10] Port to 25w19a --- gradle.properties | 6 +++--- .../initializers/EyeOfEnderEntityInitializer.java | 2 +- .../mixin/recipe/book/RecipeBookOptionsExtender.java | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index bec1b3bf..75a8efe6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=25w18a - yarn_mappings=25w18a+build.7 + minecraft_version=25w19a + yarn_mappings=25w19a+build.4 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.123.0+1.21.6 + fabric_version=0.124.0+1.21.6 diff --git a/src/main/java/net/errorcraft/itematic/entity/initializer/initializers/EyeOfEnderEntityInitializer.java b/src/main/java/net/errorcraft/itematic/entity/initializer/initializers/EyeOfEnderEntityInitializer.java index 31f668e0..74e62922 100644 --- a/src/main/java/net/errorcraft/itematic/entity/initializer/initializers/EyeOfEnderEntityInitializer.java +++ b/src/main/java/net/errorcraft/itematic/entity/initializer/initializers/EyeOfEnderEntityInitializer.java @@ -77,7 +77,7 @@ private EyeOfEnderEntity createEntity(ServerWorld world, Vec3d pos, ItemStack st entity.setItem(stack); } - entity.initTargetPos(strongholdPos); + entity.initTargetPos(Vec3d.of(strongholdPos)); return entity; } } diff --git a/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java b/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java index 4711aeab..aee22375 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/recipe/book/RecipeBookOptionsExtender.java @@ -44,7 +44,8 @@ private static PacketCodec addBrewingFieldPack method = "", at = @At( value = "INVOKE", - target = "Lcom/mojang/serialization/codecs/RecordCodecBuilder;mapCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;" + target = "Lcom/mojang/serialization/codecs/RecordCodecBuilder;mapCodec(Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec;", + remap = false ) ) private static MapCodec addBrewingFieldCodec(MapCodec original) { From a1ae642301817e9ceb2ffa900b179c95aa667083 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Sat, 4 Jul 2026 01:45:11 +0200 Subject: [PATCH 05/10] Port to 25w20a --- gradle.properties | 6 +- .../data/server/tag/ItemTagProvider.java | 7 +- .../errorcraft/itematic/assertion/Assert.java | 5 + .../itematic/assertion/EntityTypeAssert.java | 6 + .../itematic/assertion/ItemEntityAssert.java | 17 ++ .../itematic/assertion/ItemStackAssert.java | 2 +- .../gametest/item/ShearsTestSuite.java | 174 ++++++++++++++++++ .../errorcraft/itematic/util/TestUtil.java | 20 ++ .../resources/assets/itematic/lang/en_us.json | 1 + .../structure/item.shears.platform.nbt | Bin 0 -> 217 bytes src/gametest/resources/fabric.mod.json | 1 + .../data/minecraft/item/black_carpet.json | 1 + .../data/minecraft/item/black_harness.json | 1 + .../data/minecraft/item/blue_carpet.json | 1 + .../data/minecraft/item/blue_harness.json | 1 + .../data/minecraft/item/brown_carpet.json | 1 + .../data/minecraft/item/brown_harness.json | 1 + .../data/minecraft/item/cyan_carpet.json | 1 + .../data/minecraft/item/cyan_harness.json | 1 + .../minecraft/item/diamond_horse_armor.json | 1 + .../minecraft/item/golden_horse_armor.json | 1 + .../data/minecraft/item/gray_carpet.json | 1 + .../data/minecraft/item/gray_harness.json | 1 + .../data/minecraft/item/green_carpet.json | 1 + .../data/minecraft/item/green_harness.json | 1 + .../data/minecraft/item/iron_horse_armor.json | 1 + .../minecraft/item/leather_horse_armor.json | 1 + .../minecraft/item/light_blue_carpet.json | 1 + .../minecraft/item/light_blue_harness.json | 1 + .../minecraft/item/light_gray_carpet.json | 1 + .../minecraft/item/light_gray_harness.json | 1 + .../data/minecraft/item/lime_carpet.json | 1 + .../data/minecraft/item/lime_harness.json | 1 + .../data/minecraft/item/magenta_carpet.json | 1 + .../data/minecraft/item/magenta_harness.json | 1 + .../data/minecraft/item/music_disc_tears.json | 11 ++ .../data/minecraft/item/orange_carpet.json | 1 + .../data/minecraft/item/orange_harness.json | 1 + .../data/minecraft/item/pink_carpet.json | 1 + .../data/minecraft/item/pink_harness.json | 1 + .../data/minecraft/item/purple_carpet.json | 1 + .../data/minecraft/item/purple_harness.json | 1 + .../data/minecraft/item/red_carpet.json | 1 + .../data/minecraft/item/red_harness.json | 1 + .../generated/data/minecraft/item/saddle.json | 1 + .../data/minecraft/item/white_carpet.json | 1 + .../data/minecraft/item/white_harness.json | 1 + .../data/minecraft/item/wolf_armor.json | 1 + .../data/minecraft/item/yellow_carpet.json | 1 + .../data/minecraft/item/yellow_harness.json | 1 + .../tags/item/item_group/music_discs.json | 7 +- .../errorcraft/itematic/item/ItemKeys.java | 1 + .../errorcraft/itematic/item/ItemUtil.java | 10 + .../components/EquipmentItemComponent.java | 5 +- .../itematic/mixin/entity/EntityExtender.java | 32 ++++ .../entity/passive/WolfEntityExtender.java | 20 -- 56 files changed, 331 insertions(+), 32 deletions(-) create mode 100644 src/gametest/java/net/errorcraft/itematic/assertion/ItemEntityAssert.java create mode 100644 src/gametest/java/net/errorcraft/itematic/gametest/item/ShearsTestSuite.java create mode 100644 src/gametest/resources/data/itematic/structure/item.shears.platform.nbt create mode 100644 src/main/generated/data/minecraft/item/music_disc_tears.json diff --git a/gradle.properties b/gradle.properties index 75a8efe6..9324328a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=25w19a - yarn_mappings=25w19a+build.4 + minecraft_version=25w20a + yarn_mappings=25w20a+build.6 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.124.0+1.21.6 + fabric_version=0.124.2+1.21.6 diff --git a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java index 799df5d5..3f6fa8ad 100644 --- a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java +++ b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java @@ -1225,8 +1225,6 @@ protected void configure(RegistryWrapper.WrapperLookup lookup) { .add(ItemKeys.MUSIC_DISC_CAT) .add(ItemKeys.MUSIC_DISC_BLOCKS) .add(ItemKeys.MUSIC_DISC_CHIRP) - .add(ItemKeys.MUSIC_DISC_CREATOR) - .add(ItemKeys.MUSIC_DISC_CREATOR_MUSIC_BOX) .add(ItemKeys.MUSIC_DISC_FAR) .add(ItemKeys.MUSIC_DISC_MALL) .add(ItemKeys.MUSIC_DISC_MELLOHI) @@ -1234,12 +1232,15 @@ protected void configure(RegistryWrapper.WrapperLookup lookup) { .add(ItemKeys.MUSIC_DISC_STRAD) .add(ItemKeys.MUSIC_DISC_WARD) .add(ItemKeys.MUSIC_DISC_11) + .add(ItemKeys.MUSIC_DISC_CREATOR_MUSIC_BOX) .add(ItemKeys.MUSIC_DISC_WAIT) + .add(ItemKeys.MUSIC_DISC_CREATOR) + .add(ItemKeys.MUSIC_DISC_PRECIPICE) .add(ItemKeys.MUSIC_DISC_OTHERSIDE) .add(ItemKeys.MUSIC_DISC_RELIC) .add(ItemKeys.MUSIC_DISC_5) .add(ItemKeys.MUSIC_DISC_PIGSTEP) - .add(ItemKeys.MUSIC_DISC_PRECIPICE); + .add(ItemKeys.MUSIC_DISC_TEARS); this.builder(ItematicItemTags.SWORDS) .add(ItemKeys.WOODEN_SWORD) .add(ItemKeys.STONE_SWORD) diff --git a/src/gametest/java/net/errorcraft/itematic/assertion/Assert.java b/src/gametest/java/net/errorcraft/itematic/assertion/Assert.java index b7b5d030..32d97dcb 100644 --- a/src/gametest/java/net/errorcraft/itematic/assertion/Assert.java +++ b/src/gametest/java/net/errorcraft/itematic/assertion/Assert.java @@ -6,6 +6,7 @@ import net.minecraft.block.entity.BlockEntityType; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; +import net.minecraft.entity.ItemEntity; import net.minecraft.entity.LivingEntity; import net.minecraft.fluid.FluidState; import net.minecraft.item.ItemStack; @@ -101,6 +102,10 @@ public static LivingEntityAssert livingEntity(TestCo return new LivingEntityAssert<>(helper, entity); } + public static ItemEntityAssert itemEntity(TestContext helper, ItemEntity entity) { + return new ItemEntityAssert(helper, entity); + } + public static ItemStackAssert itemStack(TestContext helper, ItemStack stack) { return new ItemStackAssert(helper, stack); } diff --git a/src/gametest/java/net/errorcraft/itematic/assertion/EntityTypeAssert.java b/src/gametest/java/net/errorcraft/itematic/assertion/EntityTypeAssert.java index cf250477..4c9cc933 100644 --- a/src/gametest/java/net/errorcraft/itematic/assertion/EntityTypeAssert.java +++ b/src/gametest/java/net/errorcraft/itematic/assertion/EntityTypeAssert.java @@ -17,6 +17,12 @@ public class EntityTypeAssert { this.entityType = entityType; } + public > EntityTypeAssert exists(AssertionSupplier assertionSupplier, Consumer entityAssertion) { + E entity = TestUtil.getSingleEntity(this.helper, this.entityType); + entityAssertion.accept(assertionSupplier.get(this.helper, entity)); + return this; + } + public EntityTypeAssert existsAt(BlockPos pos) { TestUtil.getSingleEntityAt(this.helper, this.entityType, pos); return this; diff --git a/src/gametest/java/net/errorcraft/itematic/assertion/ItemEntityAssert.java b/src/gametest/java/net/errorcraft/itematic/assertion/ItemEntityAssert.java new file mode 100644 index 00000000..9fdc0584 --- /dev/null +++ b/src/gametest/java/net/errorcraft/itematic/assertion/ItemEntityAssert.java @@ -0,0 +1,17 @@ +package net.errorcraft.itematic.assertion; + +import net.minecraft.entity.ItemEntity; +import net.minecraft.test.TestContext; + +import java.util.function.Consumer; + +public class ItemEntityAssert extends BaseEntityAssert { + ItemEntityAssert(TestContext helper, ItemEntity entity) { + super(helper, entity); + } + + public ItemEntityAssert itemStack(Consumer stackAssertion) { + stackAssertion.accept(Assert.itemStack(this.helper, this.entity.getStack())); + return this; + } +} diff --git a/src/gametest/java/net/errorcraft/itematic/assertion/ItemStackAssert.java b/src/gametest/java/net/errorcraft/itematic/assertion/ItemStackAssert.java index fc43e792..3a1529c5 100644 --- a/src/gametest/java/net/errorcraft/itematic/assertion/ItemStackAssert.java +++ b/src/gametest/java/net/errorcraft/itematic/assertion/ItemStackAssert.java @@ -82,7 +82,7 @@ public ItemStackAssert isDamaged() { } throw this.helper.createError( - "test.error.item_stack.damaged", + "test.error.item_stack.expected_damaged", this.name ); } diff --git a/src/gametest/java/net/errorcraft/itematic/gametest/item/ShearsTestSuite.java b/src/gametest/java/net/errorcraft/itematic/gametest/item/ShearsTestSuite.java new file mode 100644 index 00000000..9fc68aa0 --- /dev/null +++ b/src/gametest/java/net/errorcraft/itematic/gametest/item/ShearsTestSuite.java @@ -0,0 +1,174 @@ +package net.errorcraft.itematic.gametest.item; + +import net.errorcraft.itematic.assertion.Assert; +import net.errorcraft.itematic.item.ItemKeys; +import net.fabricmc.fabric.api.gametest.v1.GameTest; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.EquipmentSlot; +import net.minecraft.entity.passive.HorseEntity; +import net.minecraft.entity.passive.PigEntity; +import net.minecraft.entity.passive.WolfEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.test.TestContext; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.GameMode; + +public class ShearsTestSuite { + private static final BlockPos SPAWN_POSITION = new BlockPos(1, 1, 1); + + @GameTest(structure = "itematic:item.shears.platform") + public void usingShearsOnSaddledPigRemovesSaddle(TestContext context) { + ServerWorld world = context.getWorld(); + PlayerEntity player = context.createMockPlayer(GameMode.SURVIVAL); + ItemStack shears = world.itematic$createStack(ItemKeys.SHEARS); + player.setStackInHand(Hand.MAIN_HAND, shears); + PigEntity target = context.spawnEntity(EntityType.PIG, SPAWN_POSITION); + target.equipStack(EquipmentSlot.SADDLE, world.itematic$createStack(ItemKeys.SADDLE)); + context.addFinalTask(() -> { + ActionResult result = target.interact(player, Hand.MAIN_HAND); + Assert.isTrue( + context, + result.isAccepted(), + () -> "Expected Shears usage on Pig to be successful" + ); + Assert.itemStack(context, shears) + .isDamaged(); + Assert.isFalse( + context, + target.hasSaddleEquipped(), + () -> "Expected Pig not to be saddled" + ); + Assert.entityType(context, EntityType.ITEM) + .exists( + Assert::itemEntity, + itemEntity -> itemEntity.itemStack(heldStack -> heldStack + .is(ItemKeys.SADDLE)) + ); + }); + } + + @GameTest(structure = "itematic:item.shears.platform") + public void usingShearsOnSaddledHorseRemovesSaddle(TestContext context) { + ServerWorld world = context.getWorld(); + PlayerEntity player = context.createMockPlayer(GameMode.SURVIVAL); + ItemStack shears = world.itematic$createStack(ItemKeys.SHEARS); + player.setStackInHand(Hand.MAIN_HAND, shears); + HorseEntity target = context.spawnEntity(EntityType.HORSE, SPAWN_POSITION); + target.equipStack(EquipmentSlot.SADDLE, world.itematic$createStack(ItemKeys.SADDLE)); + context.addFinalTask(() -> { + ActionResult result = target.interact(player, Hand.MAIN_HAND); + Assert.isTrue( + context, + result.isAccepted(), + () -> "Expected Shears usage on Horse to be successful" + ); + Assert.itemStack(context, shears) + .isDamaged(); + Assert.isFalse( + context, + target.hasSaddleEquipped(), + () -> "Expected Horse not to be saddled" + ); + Assert.entityType(context, EntityType.ITEM) + .exists( + Assert::itemEntity, + itemEntity -> itemEntity.itemStack(heldStack -> heldStack + .is(ItemKeys.SADDLE)) + ); + }); + } + + @GameTest(structure = "itematic:item.shears.platform") + public void usingShearsOnHorseWithHorseArmorRemovesHorseArmor(TestContext context) { + ServerWorld world = context.getWorld(); + PlayerEntity player = context.createMockPlayer(GameMode.SURVIVAL); + ItemStack shears = world.itematic$createStack(ItemKeys.SHEARS); + player.setStackInHand(Hand.MAIN_HAND, shears); + HorseEntity target = context.spawnEntity(EntityType.HORSE, SPAWN_POSITION); + target.equipStack(EquipmentSlot.BODY, world.itematic$createStack(ItemKeys.IRON_HORSE_ARMOR)); + context.addFinalTask(() -> { + ActionResult result = target.interact(player, Hand.MAIN_HAND); + Assert.isTrue( + context, + result.isAccepted(), + () -> "Expected Shears usage on Horse to be successful" + ); + Assert.itemStack(context, shears) + .isDamaged(); + Assert.isFalse( + context, + target.isWearingBodyArmor(), + () -> "Expected Horse not to be wearing Horse Armor" + ); + Assert.entityType(context, EntityType.ITEM) + .exists( + Assert::itemEntity, + itemEntity -> itemEntity.itemStack(heldStack -> heldStack + .is(ItemKeys.IRON_HORSE_ARMOR)) + ); + }); + } + + @GameTest(structure = "itematic:item.shears.platform") + public void usingShearsOnWolfWithCorrectOwnerRemovesWolfArmor(TestContext context) { + ServerWorld world = context.getWorld(); + PlayerEntity player = context.createMockPlayer(GameMode.SURVIVAL); + ItemStack shears = world.itematic$createStack(ItemKeys.SHEARS); + player.setStackInHand(Hand.MAIN_HAND, shears); + WolfEntity target = context.spawnEntity(EntityType.WOLF, SPAWN_POSITION); + target.equipStack(EquipmentSlot.BODY, world.itematic$createStack(ItemKeys.WOLF_ARMOR)); + target.setOwner(player); + context.addFinalTask(() -> { + ActionResult result = target.interact(player, Hand.MAIN_HAND); + Assert.isTrue( + context, + result.isAccepted(), + () -> "Expected Shears usage on Wolf to be successful" + ); + Assert.itemStack(context, shears) + .isDamaged(); + Assert.isFalse( + context, + target.isWearingBodyArmor(), + () -> "Expected Wolf not to be wearing Wolf Armor" + ); + Assert.entityType(context, EntityType.ITEM) + .exists( + Assert::itemEntity, + itemEntity -> itemEntity.itemStack(heldStack -> heldStack + .is(ItemKeys.WOLF_ARMOR)) + ); + }); + } + + @GameTest(structure = "itematic:item.shears.platform") + public void usingShearsOnWolfWithIncorrectOwnerDoesNotRemoveWolfArmor(TestContext context) { + ServerWorld world = context.getWorld(); + PlayerEntity player = context.createMockPlayer(GameMode.SURVIVAL); + ItemStack shears = world.itematic$createStack(ItemKeys.SHEARS); + player.setStackInHand(Hand.MAIN_HAND, shears); + WolfEntity target = context.spawnEntity(EntityType.WOLF, SPAWN_POSITION); + target.equipStack(EquipmentSlot.BODY, world.itematic$createStack(ItemKeys.WOLF_ARMOR)); + context.addFinalTask(() -> { + ActionResult result = target.interact(player, Hand.MAIN_HAND); + Assert.isFalse( + context, + result.isAccepted(), + () -> "Expected Shears usage on Wolf to be unsuccessful" + ); + Assert.itemStack(context, shears) + .isNotDamaged(); + Assert.isTrue( + context, + target.isWearingBodyArmor(), + () -> "Expected Wolf to be wearing Wolf Armor" + ); + Assert.entityType(context, EntityType.ITEM) + .doesNotExist(); + }); + } +} diff --git a/src/gametest/java/net/errorcraft/itematic/util/TestUtil.java b/src/gametest/java/net/errorcraft/itematic/util/TestUtil.java index 8da08b0b..010be451 100644 --- a/src/gametest/java/net/errorcraft/itematic/util/TestUtil.java +++ b/src/gametest/java/net/errorcraft/itematic/util/TestUtil.java @@ -88,6 +88,26 @@ public static T getBlockEntity(TestContext context, Bloc )); } + public static E getSingleEntity(TestContext context, EntityType type) { + List entities = context.getEntities(type); + if (entities.isEmpty()) { + throw context.createError( + "test.error.expected_entity", + type.getName() + ); + } + + if (entities.size() > 1) { + throw context.createError( + "test.error.entity.too_many_entities", + type.getUntranslatedName(), + entities.size() + ); + } + + return entities.getFirst(); + } + public static E getSingleEntityAt(TestContext context, EntityType type, BlockPos pos) { List entities = getEntitiesAt(context, type, pos); if (entities.isEmpty()) { diff --git a/src/gametest/resources/assets/itematic/lang/en_us.json b/src/gametest/resources/assets/itematic/lang/en_us.json index 8e0d163b..ec74068b 100644 --- a/src/gametest/resources/assets/itematic/lang/en_us.json +++ b/src/gametest/resources/assets/itematic/lang/en_us.json @@ -6,6 +6,7 @@ "test.error.did_not_expect_type": "Expected %s not to be %s", "test.error.expected_tag": "Expected %s to be #%s", "test.error.block_entity.expected_block_entity_type": "Expected block entity type to be %s", + "test.error.entity.too_many_entities": "Expected only one %s to exist, but found %s", "test.error.entity.expected_effect": "Expected entity %s to have effect %s", "test.error.entity.did_not_expect_effect": "Expected entity %s not to have effect %s", "test.error.entity_type.cannot_create_entity": "Cannot create entity with type %s", diff --git a/src/gametest/resources/data/itematic/structure/item.shears.platform.nbt b/src/gametest/resources/data/itematic/structure/item.shears.platform.nbt new file mode 100644 index 0000000000000000000000000000000000000000..dceb8c7c446a0526853c7fc69e658b3a6be95ee8 GIT binary patch literal 217 zcmb2|=3oGW|Gk$_a~(1eXnkmWxoYL3LtFD7-CDY%Wd19TgKN zKrf$(Q^ZQiO)VRyfZ>F5U#^|#ck6Itmr~RLK~*qZ5-EIkzoeGo;reL;Kqv%+|2C+J zhe!65?Z0K^y03U^V&v~*d~>ajmS!GbxBr(%bocdXpJV^O{&~!G`*yt_+Zd-s-(g^0 Lns+vmg@FM87NluK literal 0 HcmV?d00001 diff --git a/src/gametest/resources/fabric.mod.json b/src/gametest/resources/fabric.mod.json index a537a0b9..5a7d6f54 100644 --- a/src/gametest/resources/fabric.mod.json +++ b/src/gametest/resources/fabric.mod.json @@ -44,6 +44,7 @@ "net.errorcraft.itematic.gametest.item.LeadTestSuite", "net.errorcraft.itematic.gametest.item.MinecartTestSuite", "net.errorcraft.itematic.gametest.item.PaintingTestSuite", + "net.errorcraft.itematic.gametest.item.ShearsTestSuite", "net.errorcraft.itematic.gametest.item.SignTestSuite", "net.errorcraft.itematic.gametest.item.TotemOfUndyingTestSuite", "net.errorcraft.itematic.gametest.item.component.BlockItemComponentTestSuite", diff --git a/src/main/generated/data/minecraft/item/black_carpet.json b/src/main/generated/data/minecraft/item/black_carpet.json index 5edbfdf4..068800b5 100644 --- a/src/main/generated/data/minecraft/item/black_carpet.json +++ b/src/main/generated/data/minecraft/item/black_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:black_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/black_harness.json b/src/main/generated/data/minecraft/item/black_harness.json index 5c452517..acce750f 100644 --- a/src/main/generated/data/minecraft/item/black_harness.json +++ b/src/main/generated/data/minecraft/item/black_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:black_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/blue_carpet.json b/src/main/generated/data/minecraft/item/blue_carpet.json index 66cadc57..dcc48ab2 100644 --- a/src/main/generated/data/minecraft/item/blue_carpet.json +++ b/src/main/generated/data/minecraft/item/blue_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:blue_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/blue_harness.json b/src/main/generated/data/minecraft/item/blue_harness.json index b5626d00..a7b474fc 100644 --- a/src/main/generated/data/minecraft/item/blue_harness.json +++ b/src/main/generated/data/minecraft/item/blue_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:blue_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/brown_carpet.json b/src/main/generated/data/minecraft/item/brown_carpet.json index aec18e24..1972b8fd 100644 --- a/src/main/generated/data/minecraft/item/brown_carpet.json +++ b/src/main/generated/data/minecraft/item/brown_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:brown_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/brown_harness.json b/src/main/generated/data/minecraft/item/brown_harness.json index ee6ac88b..6d7d47bd 100644 --- a/src/main/generated/data/minecraft/item/brown_harness.json +++ b/src/main/generated/data/minecraft/item/brown_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:brown_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/cyan_carpet.json b/src/main/generated/data/minecraft/item/cyan_carpet.json index a4ce3cf3..1873438a 100644 --- a/src/main/generated/data/minecraft/item/cyan_carpet.json +++ b/src/main/generated/data/minecraft/item/cyan_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:cyan_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/cyan_harness.json b/src/main/generated/data/minecraft/item/cyan_harness.json index 48dac707..52da488e 100644 --- a/src/main/generated/data/minecraft/item/cyan_harness.json +++ b/src/main/generated/data/minecraft/item/cyan_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:cyan_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/diamond_horse_armor.json b/src/main/generated/data/minecraft/item/diamond_horse_armor.json index 8f204e45..546d2810 100644 --- a/src/main/generated/data/minecraft/item/diamond_horse_armor.json +++ b/src/main/generated/data/minecraft/item/diamond_horse_armor.json @@ -22,6 +22,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_wear_horse_armor", "asset_id": "minecraft:diamond", + "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/golden_horse_armor.json b/src/main/generated/data/minecraft/item/golden_horse_armor.json index d5297ad8..f3ff07ee 100644 --- a/src/main/generated/data/minecraft/item/golden_horse_armor.json +++ b/src/main/generated/data/minecraft/item/golden_horse_armor.json @@ -15,6 +15,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_wear_horse_armor", "asset_id": "minecraft:gold", + "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/gray_carpet.json b/src/main/generated/data/minecraft/item/gray_carpet.json index 9aba5685..58f460b7 100644 --- a/src/main/generated/data/minecraft/item/gray_carpet.json +++ b/src/main/generated/data/minecraft/item/gray_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:gray_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/gray_harness.json b/src/main/generated/data/minecraft/item/gray_harness.json index e3f1738f..4f77b788 100644 --- a/src/main/generated/data/minecraft/item/gray_harness.json +++ b/src/main/generated/data/minecraft/item/gray_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:gray_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/green_carpet.json b/src/main/generated/data/minecraft/item/green_carpet.json index 4549961e..5b836f7c 100644 --- a/src/main/generated/data/minecraft/item/green_carpet.json +++ b/src/main/generated/data/minecraft/item/green_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:green_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/green_harness.json b/src/main/generated/data/minecraft/item/green_harness.json index 91da7bcc..5f1a91bf 100644 --- a/src/main/generated/data/minecraft/item/green_harness.json +++ b/src/main/generated/data/minecraft/item/green_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:green_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/iron_horse_armor.json b/src/main/generated/data/minecraft/item/iron_horse_armor.json index eea89d8a..440a4b0d 100644 --- a/src/main/generated/data/minecraft/item/iron_horse_armor.json +++ b/src/main/generated/data/minecraft/item/iron_horse_armor.json @@ -15,6 +15,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_wear_horse_armor", "asset_id": "minecraft:iron", + "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/leather_horse_armor.json b/src/main/generated/data/minecraft/item/leather_horse_armor.json index 84ee190a..43ff18b8 100644 --- a/src/main/generated/data/minecraft/item/leather_horse_armor.json +++ b/src/main/generated/data/minecraft/item/leather_horse_armor.json @@ -18,6 +18,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_wear_horse_armor", "asset_id": "minecraft:leather", + "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/light_blue_carpet.json b/src/main/generated/data/minecraft/item/light_blue_carpet.json index 38f5bcf5..d45285cc 100644 --- a/src/main/generated/data/minecraft/item/light_blue_carpet.json +++ b/src/main/generated/data/minecraft/item/light_blue_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:light_blue_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/light_blue_harness.json b/src/main/generated/data/minecraft/item/light_blue_harness.json index c9038205..d889a546 100644 --- a/src/main/generated/data/minecraft/item/light_blue_harness.json +++ b/src/main/generated/data/minecraft/item/light_blue_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:light_blue_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/light_gray_carpet.json b/src/main/generated/data/minecraft/item/light_gray_carpet.json index ca00694f..78fbb77f 100644 --- a/src/main/generated/data/minecraft/item/light_gray_carpet.json +++ b/src/main/generated/data/minecraft/item/light_gray_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:light_gray_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/light_gray_harness.json b/src/main/generated/data/minecraft/item/light_gray_harness.json index 42702bd2..d2fb130a 100644 --- a/src/main/generated/data/minecraft/item/light_gray_harness.json +++ b/src/main/generated/data/minecraft/item/light_gray_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:light_gray_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/lime_carpet.json b/src/main/generated/data/minecraft/item/lime_carpet.json index 6b6ec9f7..53c122f8 100644 --- a/src/main/generated/data/minecraft/item/lime_carpet.json +++ b/src/main/generated/data/minecraft/item/lime_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:lime_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/lime_harness.json b/src/main/generated/data/minecraft/item/lime_harness.json index 8db9170e..1b3963f9 100644 --- a/src/main/generated/data/minecraft/item/lime_harness.json +++ b/src/main/generated/data/minecraft/item/lime_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:lime_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/magenta_carpet.json b/src/main/generated/data/minecraft/item/magenta_carpet.json index 3221d874..fb08eba2 100644 --- a/src/main/generated/data/minecraft/item/magenta_carpet.json +++ b/src/main/generated/data/minecraft/item/magenta_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:magenta_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/magenta_harness.json b/src/main/generated/data/minecraft/item/magenta_harness.json index 9c911833..35ad9ec0 100644 --- a/src/main/generated/data/minecraft/item/magenta_harness.json +++ b/src/main/generated/data/minecraft/item/magenta_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:magenta_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/music_disc_tears.json b/src/main/generated/data/minecraft/item/music_disc_tears.json new file mode 100644 index 00000000..8c89e9bb --- /dev/null +++ b/src/main/generated/data/minecraft/item/music_disc_tears.json @@ -0,0 +1,11 @@ +{ + "behavior": { + "minecraft:playable_song": "minecraft:tears", + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:music_disc_tears", + "rarity": "uncommon", + "translation_key": "item.minecraft.music_disc_tears" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/item/orange_carpet.json b/src/main/generated/data/minecraft/item/orange_carpet.json index 499b6036..49bf72e7 100644 --- a/src/main/generated/data/minecraft/item/orange_carpet.json +++ b/src/main/generated/data/minecraft/item/orange_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:orange_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/orange_harness.json b/src/main/generated/data/minecraft/item/orange_harness.json index 97085963..8cd42196 100644 --- a/src/main/generated/data/minecraft/item/orange_harness.json +++ b/src/main/generated/data/minecraft/item/orange_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:orange_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/pink_carpet.json b/src/main/generated/data/minecraft/item/pink_carpet.json index 783c7546..a38918de 100644 --- a/src/main/generated/data/minecraft/item/pink_carpet.json +++ b/src/main/generated/data/minecraft/item/pink_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:pink_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/pink_harness.json b/src/main/generated/data/minecraft/item/pink_harness.json index c331b056..93b9523a 100644 --- a/src/main/generated/data/minecraft/item/pink_harness.json +++ b/src/main/generated/data/minecraft/item/pink_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:pink_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/purple_carpet.json b/src/main/generated/data/minecraft/item/purple_carpet.json index 2581274a..9851ca66 100644 --- a/src/main/generated/data/minecraft/item/purple_carpet.json +++ b/src/main/generated/data/minecraft/item/purple_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:purple_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/purple_harness.json b/src/main/generated/data/minecraft/item/purple_harness.json index 3e75ad02..ea43d61f 100644 --- a/src/main/generated/data/minecraft/item/purple_harness.json +++ b/src/main/generated/data/minecraft/item/purple_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:purple_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/red_carpet.json b/src/main/generated/data/minecraft/item/red_carpet.json index e3a32171..9ed719df 100644 --- a/src/main/generated/data/minecraft/item/red_carpet.json +++ b/src/main/generated/data/minecraft/item/red_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:red_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/red_harness.json b/src/main/generated/data/minecraft/item/red_harness.json index 381a23b3..10d838a7 100644 --- a/src/main/generated/data/minecraft/item/red_harness.json +++ b/src/main/generated/data/minecraft/item/red_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:red_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/saddle.json b/src/main/generated/data/minecraft/item/saddle.json index 81944b62..d6f2b9ec 100644 --- a/src/main/generated/data/minecraft/item/saddle.json +++ b/src/main/generated/data/minecraft/item/saddle.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_saddle", "asset_id": "minecraft:saddle", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.horse.saddle", "slot": "saddle" diff --git a/src/main/generated/data/minecraft/item/white_carpet.json b/src/main/generated/data/minecraft/item/white_carpet.json index 0a9f0daf..1d0289ec 100644 --- a/src/main/generated/data/minecraft/item/white_carpet.json +++ b/src/main/generated/data/minecraft/item/white_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:white_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/white_harness.json b/src/main/generated/data/minecraft/item/white_harness.json index 0d46b3d1..37b8a229 100644 --- a/src/main/generated/data/minecraft/item/white_harness.json +++ b/src/main/generated/data/minecraft/item/white_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:white_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/item/wolf_armor.json b/src/main/generated/data/minecraft/item/wolf_armor.json index 7896dadc..bd0ac6c9 100644 --- a/src/main/generated/data/minecraft/item/wolf_armor.json +++ b/src/main/generated/data/minecraft/item/wolf_armor.json @@ -19,6 +19,7 @@ "minecraft:equipment": { "allowed_entities": "minecraft:wolf", "asset_id": "minecraft:armadillo_scute", + "can_be_sheared": true, "equip_sound": "minecraft:item.armor.equip_wolf", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/yellow_carpet.json b/src/main/generated/data/minecraft/item/yellow_carpet.json index 15904095..c8564ff4 100644 --- a/src/main/generated/data/minecraft/item/yellow_carpet.json +++ b/src/main/generated/data/minecraft/item/yellow_carpet.json @@ -12,6 +12,7 @@ "minecraft:trader_llama" ], "asset_id": "minecraft:yellow_carpet", + "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", "slot": "body" }, diff --git a/src/main/generated/data/minecraft/item/yellow_harness.json b/src/main/generated/data/minecraft/item/yellow_harness.json index 843c4d98..70e5259c 100644 --- a/src/main/generated/data/minecraft/item/yellow_harness.json +++ b/src/main/generated/data/minecraft/item/yellow_harness.json @@ -6,6 +6,7 @@ "minecraft:equipment": { "allowed_entities": "#minecraft:can_equip_harness", "asset_id": "minecraft:yellow_harness", + "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", "slot": "body" diff --git a/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json b/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json index b70fbefc..20eddb3c 100644 --- a/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json +++ b/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json @@ -4,8 +4,6 @@ "minecraft:music_disc_cat", "minecraft:music_disc_blocks", "minecraft:music_disc_chirp", - "minecraft:music_disc_creator", - "minecraft:music_disc_creator_music_box", "minecraft:music_disc_far", "minecraft:music_disc_mall", "minecraft:music_disc_mellohi", @@ -13,11 +11,14 @@ "minecraft:music_disc_strad", "minecraft:music_disc_ward", "minecraft:music_disc_11", + "minecraft:music_disc_creator_music_box", "minecraft:music_disc_wait", + "minecraft:music_disc_creator", + "minecraft:music_disc_precipice", "minecraft:music_disc_otherside", "minecraft:music_disc_relic", "minecraft:music_disc_5", "minecraft:music_disc_pigstep", - "minecraft:music_disc_precipice" + "minecraft:music_disc_tears" ] } \ No newline at end of file diff --git a/src/main/java/net/errorcraft/itematic/item/ItemKeys.java b/src/main/java/net/errorcraft/itematic/item/ItemKeys.java index 35ad633d..bbc99e04 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemKeys.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemKeys.java @@ -1272,6 +1272,7 @@ public class ItemKeys { public static final RegistryKey MUSIC_DISC_5 = register("music_disc_5"); public static final RegistryKey MUSIC_DISC_PIGSTEP = register("music_disc_pigstep"); public static final RegistryKey MUSIC_DISC_PRECIPICE = register("music_disc_precipice"); + public static final RegistryKey MUSIC_DISC_TEARS = register("music_disc_tears"); public static final RegistryKey DISC_FRAGMENT_5 = register("disc_fragment_5"); public static final RegistryKey TRIDENT = register("trident"); public static final RegistryKey NAUTILUS_SHELL = register("nautilus_shell"); diff --git a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java index ceb26cb2..2ff40f3e 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java @@ -7865,6 +7865,7 @@ private void bootstrapArmor() { .allowedEntities(RegistryEntryList.of( this.entityTypes.getOrThrow(EntityTypeKeys.WOLF) )) + .canBeSheared(true) .build() )) .with(DyeableItemComponent.of(0x000000)) @@ -10306,6 +10307,14 @@ private void bootstrapRecords() { .with(StackableItemComponent.of(64)) .build() )); + this.registerable.register(ItemKeys.MUSIC_DISC_TEARS, create( + ItemDisplay.Builder.forItem(ItemKeys.MUSIC_DISC_TEARS) + .rarity(Rarity.UNCOMMON) + .build(), + ItemComponentSet.builder() + .with(PlayableSongItemComponent.of(this.jukeboxSongs.getOrThrow(JukeboxSongs.TEARS))) + .build() + )); } private void bootstrapBuckets() { @@ -11118,6 +11127,7 @@ private void bootstrapMiscellaneous() { .model(EquipmentAssetKeys.SADDLE) .allowedEntities(this.entityTypes.getOrThrow(EntityTypeTags.CAN_EQUIP_SADDLE)) .equipOnInteract(true) + .canBeSheared(true) .build() )) .with(DispensableItemComponent.of(this.dispenseBehaviors.getOrThrow(DispenseBehaviors.EQUIP_ENTITY))) diff --git a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java index c67e4e82..92e172f2 100644 --- a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java +++ b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java @@ -49,6 +49,7 @@ public static EquipmentItemComponent ofHorseArmor(ArmorMaterial material, Regist .model(material.assetId()) .allowedEntities(entityTypes.getOrThrow(EntityTypeTags.CAN_WEAR_HORSE_ARMOR)) .damageOnHurt(false) + .canBeSheared(true) .build() ); } @@ -60,8 +61,8 @@ public static ItemComponent[] ofHarness(DyeColor color, RegistryEntryLookup Date: Sun, 5 Jul 2026 23:33:30 +0200 Subject: [PATCH 06/10] Port to 25w21a --- gradle.properties | 6 +++--- .../data/minecraft/item/black_carpet.json | 1 + .../data/minecraft/item/black_harness.json | 1 + .../data/minecraft/item/blue_carpet.json | 1 + .../data/minecraft/item/blue_harness.json | 1 + .../data/minecraft/item/brown_carpet.json | 1 + .../data/minecraft/item/brown_harness.json | 1 + .../data/minecraft/item/cyan_carpet.json | 1 + .../data/minecraft/item/cyan_harness.json | 1 + .../minecraft/item/diamond_horse_armor.json | 1 + .../minecraft/item/golden_horse_armor.json | 1 + .../data/minecraft/item/gray_carpet.json | 1 + .../data/minecraft/item/gray_harness.json | 1 + .../data/minecraft/item/green_carpet.json | 1 + .../data/minecraft/item/green_harness.json | 1 + .../data/minecraft/item/iron_horse_armor.json | 1 + .../minecraft/item/leather_horse_armor.json | 1 + .../minecraft/item/light_blue_carpet.json | 1 + .../minecraft/item/light_blue_harness.json | 1 + .../minecraft/item/light_gray_carpet.json | 1 + .../minecraft/item/light_gray_harness.json | 1 + .../data/minecraft/item/lime_carpet.json | 1 + .../data/minecraft/item/lime_harness.json | 1 + .../data/minecraft/item/magenta_carpet.json | 1 + .../data/minecraft/item/magenta_harness.json | 1 + .../data/minecraft/item/orange_carpet.json | 1 + .../data/minecraft/item/orange_harness.json | 1 + .../data/minecraft/item/pink_carpet.json | 1 + .../data/minecraft/item/pink_harness.json | 1 + .../data/minecraft/item/purple_carpet.json | 1 + .../data/minecraft/item/purple_harness.json | 1 + .../data/minecraft/item/red_carpet.json | 1 + .../data/minecraft/item/red_harness.json | 1 + .../generated/data/minecraft/item/saddle.json | 1 + .../data/minecraft/item/white_carpet.json | 1 + .../data/minecraft/item/white_harness.json | 1 + .../data/minecraft/item/wolf_armor.json | 1 + .../data/minecraft/item/yellow_carpet.json | 1 + .../data/minecraft/item/yellow_harness.json | 1 + .../errorcraft/itematic/item/ItemUtil.java | 5 +++-- .../components/EquipmentItemComponent.java | 2 ++ .../passive/AbstractHorseEntityExtender.java | 19 +++++++++++++++++++ .../itematic/sound/SoundEventKeys.java | 5 +++++ 43 files changed, 70 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9324328a..d876d777 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=25w20a - yarn_mappings=25w20a+build.6 + minecraft_version=25w21a + yarn_mappings=25w21a+build.4 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.124.2+1.21.6 + fabric_version=0.125.0+1.21.6 diff --git a/src/main/generated/data/minecraft/item/black_carpet.json b/src/main/generated/data/minecraft/item/black_carpet.json index 068800b5..d51f4b0f 100644 --- a/src/main/generated/data/minecraft/item/black_carpet.json +++ b/src/main/generated/data/minecraft/item/black_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:black_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/black_harness.json b/src/main/generated/data/minecraft/item/black_harness.json index acce750f..fcfc2d1f 100644 --- a/src/main/generated/data/minecraft/item/black_harness.json +++ b/src/main/generated/data/minecraft/item/black_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/blue_carpet.json b/src/main/generated/data/minecraft/item/blue_carpet.json index dcc48ab2..446035ea 100644 --- a/src/main/generated/data/minecraft/item/blue_carpet.json +++ b/src/main/generated/data/minecraft/item/blue_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:blue_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/blue_harness.json b/src/main/generated/data/minecraft/item/blue_harness.json index a7b474fc..7575ba72 100644 --- a/src/main/generated/data/minecraft/item/blue_harness.json +++ b/src/main/generated/data/minecraft/item/blue_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/brown_carpet.json b/src/main/generated/data/minecraft/item/brown_carpet.json index 1972b8fd..83d88772 100644 --- a/src/main/generated/data/minecraft/item/brown_carpet.json +++ b/src/main/generated/data/minecraft/item/brown_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:brown_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/brown_harness.json b/src/main/generated/data/minecraft/item/brown_harness.json index 6d7d47bd..53393018 100644 --- a/src/main/generated/data/minecraft/item/brown_harness.json +++ b/src/main/generated/data/minecraft/item/brown_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/cyan_carpet.json b/src/main/generated/data/minecraft/item/cyan_carpet.json index 1873438a..3843cfac 100644 --- a/src/main/generated/data/minecraft/item/cyan_carpet.json +++ b/src/main/generated/data/minecraft/item/cyan_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:cyan_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/cyan_harness.json b/src/main/generated/data/minecraft/item/cyan_harness.json index 52da488e..276995cd 100644 --- a/src/main/generated/data/minecraft/item/cyan_harness.json +++ b/src/main/generated/data/minecraft/item/cyan_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/diamond_horse_armor.json b/src/main/generated/data/minecraft/item/diamond_horse_armor.json index 546d2810..991c9094 100644 --- a/src/main/generated/data/minecraft/item/diamond_horse_armor.json +++ b/src/main/generated/data/minecraft/item/diamond_horse_armor.json @@ -25,6 +25,7 @@ "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", + "shearing_sound": "minecraft:item.horse_armor.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/golden_horse_armor.json b/src/main/generated/data/minecraft/item/golden_horse_armor.json index f3ff07ee..a141d875 100644 --- a/src/main/generated/data/minecraft/item/golden_horse_armor.json +++ b/src/main/generated/data/minecraft/item/golden_horse_armor.json @@ -18,6 +18,7 @@ "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", + "shearing_sound": "minecraft:item.horse_armor.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/gray_carpet.json b/src/main/generated/data/minecraft/item/gray_carpet.json index 58f460b7..0e7b9e81 100644 --- a/src/main/generated/data/minecraft/item/gray_carpet.json +++ b/src/main/generated/data/minecraft/item/gray_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:gray_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/gray_harness.json b/src/main/generated/data/minecraft/item/gray_harness.json index 4f77b788..767485a5 100644 --- a/src/main/generated/data/minecraft/item/gray_harness.json +++ b/src/main/generated/data/minecraft/item/gray_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/green_carpet.json b/src/main/generated/data/minecraft/item/green_carpet.json index 5b836f7c..f0bbe75a 100644 --- a/src/main/generated/data/minecraft/item/green_carpet.json +++ b/src/main/generated/data/minecraft/item/green_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:green_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/green_harness.json b/src/main/generated/data/minecraft/item/green_harness.json index 5f1a91bf..d36966e4 100644 --- a/src/main/generated/data/minecraft/item/green_harness.json +++ b/src/main/generated/data/minecraft/item/green_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/iron_horse_armor.json b/src/main/generated/data/minecraft/item/iron_horse_armor.json index 440a4b0d..f8894b72 100644 --- a/src/main/generated/data/minecraft/item/iron_horse_armor.json +++ b/src/main/generated/data/minecraft/item/iron_horse_armor.json @@ -18,6 +18,7 @@ "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", + "shearing_sound": "minecraft:item.horse_armor.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/leather_horse_armor.json b/src/main/generated/data/minecraft/item/leather_horse_armor.json index 43ff18b8..40c6004e 100644 --- a/src/main/generated/data/minecraft/item/leather_horse_armor.json +++ b/src/main/generated/data/minecraft/item/leather_horse_armor.json @@ -21,6 +21,7 @@ "can_be_sheared": true, "damage_on_hurt": false, "equip_sound": "minecraft:entity.horse.armor", + "shearing_sound": "minecraft:item.horse_armor.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/light_blue_carpet.json b/src/main/generated/data/minecraft/item/light_blue_carpet.json index d45285cc..5283fda9 100644 --- a/src/main/generated/data/minecraft/item/light_blue_carpet.json +++ b/src/main/generated/data/minecraft/item/light_blue_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:light_blue_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/light_blue_harness.json b/src/main/generated/data/minecraft/item/light_blue_harness.json index d889a546..ce316c10 100644 --- a/src/main/generated/data/minecraft/item/light_blue_harness.json +++ b/src/main/generated/data/minecraft/item/light_blue_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/light_gray_carpet.json b/src/main/generated/data/minecraft/item/light_gray_carpet.json index 78fbb77f..f179ae36 100644 --- a/src/main/generated/data/minecraft/item/light_gray_carpet.json +++ b/src/main/generated/data/minecraft/item/light_gray_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:light_gray_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/light_gray_harness.json b/src/main/generated/data/minecraft/item/light_gray_harness.json index d2fb130a..c60c8e75 100644 --- a/src/main/generated/data/minecraft/item/light_gray_harness.json +++ b/src/main/generated/data/minecraft/item/light_gray_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/lime_carpet.json b/src/main/generated/data/minecraft/item/lime_carpet.json index 53c122f8..5781859e 100644 --- a/src/main/generated/data/minecraft/item/lime_carpet.json +++ b/src/main/generated/data/minecraft/item/lime_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:lime_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/lime_harness.json b/src/main/generated/data/minecraft/item/lime_harness.json index 1b3963f9..9da133fe 100644 --- a/src/main/generated/data/minecraft/item/lime_harness.json +++ b/src/main/generated/data/minecraft/item/lime_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/magenta_carpet.json b/src/main/generated/data/minecraft/item/magenta_carpet.json index fb08eba2..79f6dbc4 100644 --- a/src/main/generated/data/minecraft/item/magenta_carpet.json +++ b/src/main/generated/data/minecraft/item/magenta_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:magenta_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/magenta_harness.json b/src/main/generated/data/minecraft/item/magenta_harness.json index 35ad9ec0..9d8199df 100644 --- a/src/main/generated/data/minecraft/item/magenta_harness.json +++ b/src/main/generated/data/minecraft/item/magenta_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/orange_carpet.json b/src/main/generated/data/minecraft/item/orange_carpet.json index 49bf72e7..8bb89d4b 100644 --- a/src/main/generated/data/minecraft/item/orange_carpet.json +++ b/src/main/generated/data/minecraft/item/orange_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:orange_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/orange_harness.json b/src/main/generated/data/minecraft/item/orange_harness.json index 8cd42196..cb952d5e 100644 --- a/src/main/generated/data/minecraft/item/orange_harness.json +++ b/src/main/generated/data/minecraft/item/orange_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/pink_carpet.json b/src/main/generated/data/minecraft/item/pink_carpet.json index a38918de..11e89660 100644 --- a/src/main/generated/data/minecraft/item/pink_carpet.json +++ b/src/main/generated/data/minecraft/item/pink_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:pink_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/pink_harness.json b/src/main/generated/data/minecraft/item/pink_harness.json index 93b9523a..0d0ef5d4 100644 --- a/src/main/generated/data/minecraft/item/pink_harness.json +++ b/src/main/generated/data/minecraft/item/pink_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/purple_carpet.json b/src/main/generated/data/minecraft/item/purple_carpet.json index 9851ca66..679c6a95 100644 --- a/src/main/generated/data/minecraft/item/purple_carpet.json +++ b/src/main/generated/data/minecraft/item/purple_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:purple_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/purple_harness.json b/src/main/generated/data/minecraft/item/purple_harness.json index ea43d61f..f85a6fa2 100644 --- a/src/main/generated/data/minecraft/item/purple_harness.json +++ b/src/main/generated/data/minecraft/item/purple_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/red_carpet.json b/src/main/generated/data/minecraft/item/red_carpet.json index 9ed719df..721136b4 100644 --- a/src/main/generated/data/minecraft/item/red_carpet.json +++ b/src/main/generated/data/minecraft/item/red_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:red_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/red_harness.json b/src/main/generated/data/minecraft/item/red_harness.json index 10d838a7..4a9ba1dc 100644 --- a/src/main/generated/data/minecraft/item/red_harness.json +++ b/src/main/generated/data/minecraft/item/red_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/saddle.json b/src/main/generated/data/minecraft/item/saddle.json index d6f2b9ec..1af9ef5f 100644 --- a/src/main/generated/data/minecraft/item/saddle.json +++ b/src/main/generated/data/minecraft/item/saddle.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.horse.saddle", + "shearing_sound": "minecraft:item.saddle.unequip", "slot": "saddle" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/white_carpet.json b/src/main/generated/data/minecraft/item/white_carpet.json index 1d0289ec..2c29ff81 100644 --- a/src/main/generated/data/minecraft/item/white_carpet.json +++ b/src/main/generated/data/minecraft/item/white_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:white_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/white_harness.json b/src/main/generated/data/minecraft/item/white_harness.json index 37b8a229..c0b8a35f 100644 --- a/src/main/generated/data/minecraft/item/white_harness.json +++ b/src/main/generated/data/minecraft/item/white_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/generated/data/minecraft/item/wolf_armor.json b/src/main/generated/data/minecraft/item/wolf_armor.json index bd0ac6c9..2c2c00c3 100644 --- a/src/main/generated/data/minecraft/item/wolf_armor.json +++ b/src/main/generated/data/minecraft/item/wolf_armor.json @@ -21,6 +21,7 @@ "asset_id": "minecraft:armadillo_scute", "can_be_sheared": true, "equip_sound": "minecraft:item.armor.equip_wolf", + "shearing_sound": "minecraft:item.armor.unequip_wolf", "slot": "body" }, "minecraft:repairable": { diff --git a/src/main/generated/data/minecraft/item/yellow_carpet.json b/src/main/generated/data/minecraft/item/yellow_carpet.json index c8564ff4..765e0345 100644 --- a/src/main/generated/data/minecraft/item/yellow_carpet.json +++ b/src/main/generated/data/minecraft/item/yellow_carpet.json @@ -14,6 +14,7 @@ "asset_id": "minecraft:yellow_carpet", "can_be_sheared": true, "equip_sound": "minecraft:entity.llama.swag", + "shearing_sound": "minecraft:item.llama_carpet.unequip", "slot": "body" }, "minecraft:fuel": { diff --git a/src/main/generated/data/minecraft/item/yellow_harness.json b/src/main/generated/data/minecraft/item/yellow_harness.json index 70e5259c..cc090cd5 100644 --- a/src/main/generated/data/minecraft/item/yellow_harness.json +++ b/src/main/generated/data/minecraft/item/yellow_harness.json @@ -9,6 +9,7 @@ "can_be_sheared": true, "equip_on_interact": true, "equip_sound": "minecraft:entity.happy_ghast.equip", + "shearing_sound": "minecraft:entity.happy_ghast.unequip", "slot": "body" }, "minecraft:stackable": 1 diff --git a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java index 2ff40f3e..ef3ecdd2 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java @@ -86,7 +86,6 @@ import net.minecraft.registry.tag.*; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvent; -import net.minecraft.sound.SoundEvents; import net.minecraft.state.property.Properties; import net.minecraft.text.Text; import net.minecraft.util.DyeColor; @@ -7866,6 +7865,7 @@ private void bootstrapArmor() { this.entityTypes.getOrThrow(EntityTypeKeys.WOLF) )) .canBeSheared(true) + .shearingSound(this.soundEvents.getOrThrow(SoundEventKeys.ARMOR_UNEQUIP_WOLF)) .build() )) .with(DyeableItemComponent.of(0x000000)) @@ -11123,11 +11123,12 @@ private void bootstrapMiscellaneous() { ItemComponentSet.builder() .with(StackableItemComponent.of(1)) .with(EquipmentItemComponent.of(EquippableComponent.builder(EquipmentSlot.SADDLE) - .equipSound(SoundEvents.ENTITY_HORSE_SADDLE) + .equipSound(this.soundEvents.getOrThrow(SoundEventKeys.HORSE_SADDLE)) .model(EquipmentAssetKeys.SADDLE) .allowedEntities(this.entityTypes.getOrThrow(EntityTypeTags.CAN_EQUIP_SADDLE)) .equipOnInteract(true) .canBeSheared(true) + .shearingSound(this.soundEvents.getOrThrow(SoundEventKeys.SADDLE_UNEQUIP)) .build() )) .with(DispensableItemComponent.of(this.dispenseBehaviors.getOrThrow(DispenseBehaviors.EQUIP_ENTITY))) diff --git a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java index 92e172f2..c152532c 100644 --- a/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java +++ b/src/main/java/net/errorcraft/itematic/item/component/components/EquipmentItemComponent.java @@ -50,6 +50,7 @@ public static EquipmentItemComponent ofHorseArmor(ArmorMaterial material, Regist .allowedEntities(entityTypes.getOrThrow(EntityTypeTags.CAN_WEAR_HORSE_ARMOR)) .damageOnHurt(false) .canBeSheared(true) + .shearingSound(soundEvents.getOrThrow(SoundEventKeys.HORSE_ARMOR_UNEQUIP)) .build() ); } @@ -62,6 +63,7 @@ public static ItemComponent[] ofHarness(DyeColor color, RegistryEntryLookup ARMOR_EQUIP_ELYTRA = of("item.armor.equip_elytra"); public static final RegistryKey ARMOR_EQUIP_GENERIC = of("item.armor.equip_generic"); public static final RegistryKey ARMOR_STAND_PLACE = of("entity.armor_stand.place"); + public static final RegistryKey ARMOR_UNEQUIP_WOLF = of("item.armor.unequip_wolf"); public static final RegistryKey BOTTLE_EMPTY = of("item.bottle.empty"); public static final RegistryKey BOTTLE_FILL = of("item.bottle.fill"); public static final RegistryKey BUCKET_EMPTY = of("item.bucket.empty"); @@ -27,9 +28,12 @@ public class SoundEventKeys { public static final RegistryKey FLINT_AND_STEEL_USE = of("item.flintandsteel.use"); public static final RegistryKey GENERIC_SPLASH = of("entity.generic.splash"); public static final RegistryKey HAPPY_GHAST_EQUIP = of("entity.happy_ghast.equip"); + public static final RegistryKey HAPPY_GHAST_UNEQUIP = of("entity.happy_ghast.unequip"); public static final RegistryKey HOE_TILL = of("item.hoe.till"); public static final RegistryKey HONEY_BOTTLE_DRINK = of("item.honey_bottle.drink"); public static final RegistryKey HORSE_ARMOR = of("entity.horse.armor"); + public static final RegistryKey HORSE_ARMOR_UNEQUIP = of("item.horse_armor.unequip"); + public static final RegistryKey HORSE_SADDLE = of("entity.horse.saddle"); public static final RegistryKey LODESTONE_COMPASS_LOCK = of("item.lodestone_compass.lock"); public static final RegistryKey MUSIC_DISC_5 = of("music_disc.5"); public static final RegistryKey MUSIC_DISC_11 = of("music_disc.11"); @@ -51,6 +55,7 @@ public class SoundEventKeys { public static final RegistryKey MUSIC_DISC_WAIT = of("music_disc.wait"); public static final RegistryKey MUSIC_DISC_WARD = of("music_disc.ward"); public static final RegistryKey OMINOUS_BOTTLE_DISPOSE = of("item.ominous_bottle.dispose"); + public static final RegistryKey SADDLE_UNEQUIP = of("item.saddle.unequip"); public static final RegistryKey SHIELD_BLOCK = of("item.shield.block"); public static final RegistryKey SHIELD_BREAK = of("item.shield.break"); public static final RegistryKey SHOVEL_FLATTEN = of("item.shovel.flatten"); From 42a97c59637d63857ae54bcaf1faed1a7986ebb9 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Sun, 5 Jul 2026 23:59:45 +0200 Subject: [PATCH 07/10] Port to 1.21.6 pre-release 1 --- gradle.properties | 6 +++--- .../client/network/AbstractClientPlayerEntityExtender.java | 5 ++--- .../mixin/entity/player/ServerPlayerEntityExtender.java | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gradle.properties b/gradle.properties index d876d777..b77a3cf9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=25w21a - yarn_mappings=25w21a+build.4 + minecraft_version=1.21.6-pre1 + yarn_mappings=1.21.6-pre1+build.2 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.125.0+1.21.6 + fabric_version=0.125.3+1.21.6 diff --git a/src/client/java/net/errorcraft/itematic/mixin/client/network/AbstractClientPlayerEntityExtender.java b/src/client/java/net/errorcraft/itematic/mixin/client/network/AbstractClientPlayerEntityExtender.java index e81a3455..7bbdaa39 100644 --- a/src/client/java/net/errorcraft/itematic/mixin/client/network/AbstractClientPlayerEntityExtender.java +++ b/src/client/java/net/errorcraft/itematic/mixin/client/network/AbstractClientPlayerEntityExtender.java @@ -8,7 +8,6 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -18,8 +17,8 @@ @Mixin(AbstractClientPlayerEntity.class) public abstract class AbstractClientPlayerEntityExtender extends PlayerEntity { - public AbstractClientPlayerEntityExtender(World world, BlockPos pos, float yaw, GameProfile gameProfile) { - super(world, pos, yaw, gameProfile); + public AbstractClientPlayerEntityExtender(World world, GameProfile profile) { + super(world, profile); } @Redirect( diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/player/ServerPlayerEntityExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/player/ServerPlayerEntityExtender.java index dd9d4de8..f2cc563d 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/player/ServerPlayerEntityExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/player/ServerPlayerEntityExtender.java @@ -11,7 +11,6 @@ import net.minecraft.stat.Stat; import net.minecraft.stat.StatType; import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -21,8 +20,8 @@ @Mixin(ServerPlayerEntity.class) public abstract class ServerPlayerEntityExtender extends PlayerEntity { - public ServerPlayerEntityExtender(World world, BlockPos pos, float yaw, GameProfile gameProfile) { - super(world, pos, yaw, gameProfile); + public ServerPlayerEntityExtender(World world, GameProfile profile) { + super(world, profile); } @Inject( From 2e61b3e26566a3107dd23d1a79ca0369455314f0 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Mon, 6 Jul 2026 02:28:12 +0200 Subject: [PATCH 08/10] Port to 1.21.6 pre-release 3 --- gradle.properties | 6 ++-- .../itematic/mixin/entity/EntityExtender.java | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index b77a3cf9..e0dd5e9a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.21.6-pre1 - yarn_mappings=1.21.6-pre1+build.2 + minecraft_version=1.21.6-pre3 + yarn_mappings=1.21.6-pre3+build.5 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.125.3+1.21.6 + fabric_version=0.126.1+1.21.6 diff --git a/src/main/java/net/errorcraft/itematic/mixin/entity/EntityExtender.java b/src/main/java/net/errorcraft/itematic/mixin/entity/EntityExtender.java index 96b54043..4ea264cd 100644 --- a/src/main/java/net/errorcraft/itematic/mixin/entity/EntityExtender.java +++ b/src/main/java/net/errorcraft/itematic/mixin/entity/EntityExtender.java @@ -1,13 +1,22 @@ package net.errorcraft.itematic.mixin.entity; +import com.llamalad7.mixinextras.expression.Definition; +import com.llamalad7.mixinextras.expression.Expression; +import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import com.llamalad7.mixinextras.sugar.Local; import net.errorcraft.itematic.access.entity.EntityAccess; import net.errorcraft.itematic.item.ItemKeys; +import net.minecraft.advancement.criterion.PlayerInteractedWithEntityCriterion; import net.minecraft.entity.Entity; import net.minecraft.entity.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; import org.jetbrains.annotations.Nullable; import org.objectweb.asm.Opcodes; @@ -68,6 +77,28 @@ private boolean isOfForLeadUseRegistryKeyCheck(ItemStack instance, Item item) { return instance.itematic$isOf(ItemKeys.LEAD); } + @Definition(id = "ServerPlayerEntity", type = ServerPlayerEntity.class) + @Definition(id = "player", local = @Local(type = PlayerEntity.class)) + @Expression("(ServerPlayerEntity) player") + @WrapOperation( + method = "shearEquipment", + at = @At("MIXINEXTRAS:EXPRESSION") + ) + private ServerPlayerEntity checkForServerPlayer(Object obj, Operation original) { + return obj instanceof ServerPlayerEntity serverPlayer ? serverPlayer : null; + } + + @WrapWithCondition( + method = "shearEquipment", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/advancement/criterion/PlayerInteractedWithEntityCriterion;trigger(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;)V" + ) + ) + private boolean checkForServerPlayer(PlayerInteractedWithEntityCriterion instance, ServerPlayerEntity player, ItemStack stack, Entity entity) { + return player != null; + } + @Override public ItemEntity itematic$dropItem(ServerWorld world, RegistryKey key) { return this.dropStack(world, world.itematic$createStack(key)); From cd3e023eeae5994f685b6ecbb3a8e12bed523a61 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Mon, 6 Jul 2026 02:56:38 +0200 Subject: [PATCH 09/10] Port to 1.21.7 release candidate 1 --- gradle.properties | 6 +++--- .../itematic/data/server/tag/ItemTagProvider.java | 3 ++- .../data/minecraft/item/music_disc_lava_chicken.json | 11 +++++++++++ .../minecraft/tags/item/item_group/music_discs.json | 3 ++- .../java/net/errorcraft/itematic/item/ItemKeys.java | 1 + .../java/net/errorcraft/itematic/item/ItemUtil.java | 8 ++++++++ 6 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 src/main/generated/data/minecraft/item/music_disc_lava_chicken.json diff --git a/gradle.properties b/gradle.properties index e0dd5e9a..3d97c25b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.21.6-pre3 - yarn_mappings=1.21.6-pre3+build.5 + minecraft_version=1.21.7-rc1 + yarn_mappings=1.21.7-rc1+build.1 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.126.1+1.21.6 + fabric_version=0.128.0+1.21.7 diff --git a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java index 3f6fa8ad..92dc9c6e 100644 --- a/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java +++ b/src/datagen/java/net/errorcraft/itematic/data/server/tag/ItemTagProvider.java @@ -1240,7 +1240,8 @@ protected void configure(RegistryWrapper.WrapperLookup lookup) { .add(ItemKeys.MUSIC_DISC_RELIC) .add(ItemKeys.MUSIC_DISC_5) .add(ItemKeys.MUSIC_DISC_PIGSTEP) - .add(ItemKeys.MUSIC_DISC_TEARS); + .add(ItemKeys.MUSIC_DISC_TEARS) + .add(ItemKeys.MUSIC_DISC_LAVA_CHICKEN); this.builder(ItematicItemTags.SWORDS) .add(ItemKeys.WOODEN_SWORD) .add(ItemKeys.STONE_SWORD) diff --git a/src/main/generated/data/minecraft/item/music_disc_lava_chicken.json b/src/main/generated/data/minecraft/item/music_disc_lava_chicken.json new file mode 100644 index 00000000..42d5e134 --- /dev/null +++ b/src/main/generated/data/minecraft/item/music_disc_lava_chicken.json @@ -0,0 +1,11 @@ +{ + "behavior": { + "minecraft:playable_song": "minecraft:lava_chicken", + "minecraft:stackable": 1 + }, + "display": { + "model": "minecraft:music_disc_lava_chicken", + "rarity": "rare", + "translation_key": "item.minecraft.music_disc_lava_chicken" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json b/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json index 20eddb3c..58a4619d 100644 --- a/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json +++ b/src/main/generated/data/minecraft/tags/item/item_group/music_discs.json @@ -19,6 +19,7 @@ "minecraft:music_disc_relic", "minecraft:music_disc_5", "minecraft:music_disc_pigstep", - "minecraft:music_disc_tears" + "minecraft:music_disc_tears", + "minecraft:music_disc_lava_chicken" ] } \ No newline at end of file diff --git a/src/main/java/net/errorcraft/itematic/item/ItemKeys.java b/src/main/java/net/errorcraft/itematic/item/ItemKeys.java index bbc99e04..01c0c2cb 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemKeys.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemKeys.java @@ -1260,6 +1260,7 @@ public class ItemKeys { public static final RegistryKey MUSIC_DISC_CREATOR = register("music_disc_creator"); public static final RegistryKey MUSIC_DISC_CREATOR_MUSIC_BOX = register("music_disc_creator_music_box"); public static final RegistryKey MUSIC_DISC_FAR = register("music_disc_far"); + public static final RegistryKey MUSIC_DISC_LAVA_CHICKEN = register("music_disc_lava_chicken"); public static final RegistryKey MUSIC_DISC_MALL = register("music_disc_mall"); public static final RegistryKey MUSIC_DISC_MELLOHI = register("music_disc_mellohi"); public static final RegistryKey MUSIC_DISC_STAL = register("music_disc_stal"); diff --git a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java index ef3ecdd2..482509c5 100644 --- a/src/main/java/net/errorcraft/itematic/item/ItemUtil.java +++ b/src/main/java/net/errorcraft/itematic/item/ItemUtil.java @@ -10315,6 +10315,14 @@ private void bootstrapRecords() { .with(PlayableSongItemComponent.of(this.jukeboxSongs.getOrThrow(JukeboxSongs.TEARS))) .build() )); + this.registerable.register(ItemKeys.MUSIC_DISC_LAVA_CHICKEN, create( + ItemDisplay.Builder.forItem(ItemKeys.MUSIC_DISC_LAVA_CHICKEN) + .rarity(Rarity.RARE) + .build(), + ItemComponentSet.builder() + .with(PlayableSongItemComponent.of(this.jukeboxSongs.getOrThrow(JukeboxSongs.LAVA_CHICKEN))) + .build() + )); } private void bootstrapBuckets() { From 635ff2daaa2416be1bc349b809ad1cad9ebfdcd1 Mon Sep 17 00:00:00 2001 From: ErrorCraft Date: Mon, 6 Jul 2026 03:03:19 +0200 Subject: [PATCH 10/10] Update to 1.21.8 --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3d97c25b..68038cb4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.21.7-rc1 - yarn_mappings=1.21.7-rc1+build.1 + minecraft_version=1.21.8 + yarn_mappings=1.21.8+build.1 loader_version=0.19.3 # Mod Properties @@ -13,4 +13,4 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = itematic # Dependencies - fabric_version=0.128.0+1.21.7 + fabric_version=0.136.1+1.21.8