Class CommonItemStackMixin

java.lang.Object
de.cech12.usefulhats.mixin.CommonItemStackMixin
All Implemented Interfaces:
net.minecraft.core.component.DataComponentGetter, net.minecraft.core.component.DataComponentHolder, net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension

public abstract class CommonItemStackMixin extends Object implements net.minecraft.core.component.DataComponentHolder
Mixin for the Item class to enable the possibility to configure the item's durability and hook into other hidden functionality.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract net.minecraft.world.item.Item
     
    void
    getMaxDamageProxy(org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir)
     
    void
    isDamageableItemProxy(org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Boolean> cir)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.core.component.DataComponentGetter

    get, getOrDefault, getTyped, has

    Methods inherited from interface net.minecraft.core.component.DataComponentHolder

    get, getAllOfType, getComponents, getOrDefault, has

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension

    addToTooltip, addToTooltip
  • Constructor Details

    • CommonItemStackMixin

      public CommonItemStackMixin()
  • Method Details

    • getItem

      public abstract net.minecraft.world.item.Item getItem()
    • getMaxDamageProxy

      public void getMaxDamageProxy(org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Integer> cir)
      Parameters:
      cir - CallbackInfoReturnable
    • isDamageableItemProxy

      public void isDamageableItemProxy(org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<Boolean> cir)
      Parameters:
      cir - CallbackInfoReturnable