diff --git a/src/main/java/io/wispforest/owo/mixin/ext/ItemStackMixin.java b/src/main/java/io/wispforest/owo/mixin/ext/ItemStackMixin.java index 612a3644..b4b8baaa 100644 --- a/src/main/java/io/wispforest/owo/mixin/ext/ItemStackMixin.java +++ b/src/main/java/io/wispforest/owo/mixin/ext/ItemStackMixin.java @@ -22,13 +22,13 @@ public class ItemStackMixin { @Inject(method = "(Lnet/minecraft/world/level/ItemLike;ILnet/minecraft/core/component/PatchedDataComponentMap;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/Item;verifyComponentsAfterLoad(Lnet/minecraft/world/item/ItemStack;)V")) private void injectDerivedComponentMap(ItemLike item, int count, PatchedDataComponentMap components, CallbackInfo ci) { - var base = ((ComponentMapImplAccessor)(Object) this.components).owo$getBaseComponents(); + var base = ((PatchedDataComponentMapAccessor)(Object) this.components).owo$getPrototype(); if (base instanceof DerivedComponentMap derived) { owo$derivedMap = derived; } else { owo$derivedMap = new DerivedComponentMap(base); - ((ComponentMapImplAccessor)(Object) this.components).owo$setBaseComponents(owo$derivedMap); + ((PatchedDataComponentMapAccessor)(Object) this.components).owo$setPrototype(owo$derivedMap); } } diff --git a/src/main/java/io/wispforest/owo/mixin/ext/ComponentMapImplAccessor.java b/src/main/java/io/wispforest/owo/mixin/ext/PatchedDataComponentMapAccessor.java similarity index 71% rename from src/main/java/io/wispforest/owo/mixin/ext/ComponentMapImplAccessor.java rename to src/main/java/io/wispforest/owo/mixin/ext/PatchedDataComponentMapAccessor.java index 9912f26d..5b265b03 100644 --- a/src/main/java/io/wispforest/owo/mixin/ext/ComponentMapImplAccessor.java +++ b/src/main/java/io/wispforest/owo/mixin/ext/PatchedDataComponentMapAccessor.java @@ -7,11 +7,11 @@ import org.spongepowered.asm.mixin.gen.Accessor; @Mixin(PatchedDataComponentMap.class) -public interface ComponentMapImplAccessor { +public interface PatchedDataComponentMapAccessor { @Accessor("prototype") - DataComponentMap owo$getBaseComponents(); + DataComponentMap owo$getPrototype(); @Accessor("prototype") @Mutable - void owo$setBaseComponents(DataComponentMap baseComponents); + void owo$setPrototype(DataComponentMap prototype); } diff --git a/src/main/resources/owo.mixins.json b/src/main/resources/owo.mixins.json index 56603258..dcff2263 100644 --- a/src/main/resources/owo.mixins.json +++ b/src/main/resources/owo.mixins.json @@ -11,7 +11,7 @@ "DataResultMixin", "DataResultMixin$DataResultErrorMixin", "DelegatingOpsAccessor", - "ext.ComponentMapImplAccessor", + "ext.PatchedDataComponentMapAccessor", "ext.ComponentMapImplMixin", "ext.ItemMixin", "ext.ItemStackMixin",