User Tools

Site Tools


tutorial:mixin_redirectors_methods

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
tutorial:mixin_redirectors_methods [2020/08/18 23:19] – abstract user11681tutorial:mixin_redirectors_methods [2021/01/15 03:11] – Fix the mixin example to target the right class obw
Line 17: Line 17:
  
 <code java [enable_line_numbers=true]> <code java [enable_line_numbers=true]>
-@Mixin(ItemStack.class) +@Mixin(SimpleInventory.class) 
-abstract class ItemStackMixin {+abstract class SimpleInventoryMixin {
     @Redirect(method = "readTags",     @Redirect(method = "readTags",
               at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/item/ItemStack;fromTag(Lnet/minecraft/nbt/ListTag;)Lnet/minecraft/item/ItemStack;"))               at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/item/ItemStack;fromTag(Lnet/minecraft/nbt/ListTag;)Lnet/minecraft/item/ItemStack;"))
tutorial/mixin_redirectors_methods.txt · Last modified: 2021/01/15 04:20 by obw