Interface IAffinityItem
public interface IAffinityItem
Represents an item that has an affinity in the stack
-
Method Summary
Modifier and TypeMethodDescriptiondefault IAffinitygetAffinity(net.minecraft.world.item.ItemStack stack) default net.minecraft.world.item.ItemStacksetAffinity(net.minecraft.world.item.ItemStack stack, IAffinity affinity)
-
Method Details
-
getAffinity
- Parameters:
stack- The stack to get the affinity from.- Returns:
- The affinity stored in the stack, or the NONE affinity if the stack does not contain one.
-
setAffinity
default net.minecraft.world.item.ItemStack setAffinity(net.minecraft.world.item.ItemStack stack, IAffinity affinity) - Parameters:
stack- The item stack to set the affinity on.affinity- The affinity to set.- Returns:
- The stack, now with the given affinity set on it.
-