Class ItemHelper

java.lang.Object
team.lodestar.lodestone.helpers.ItemHelper

public class ItemHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    applyEnchantments(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.entity.Entity target, net.minecraft.world.item.ItemStack stack)
     
    static ArrayList<net.minecraft.world.item.ItemStack>
    copyWithNewCount(List<net.minecraft.world.item.ItemStack> stacks, int newCount)
     
    static net.minecraft.world.item.ItemStack
    copyWithNewCount(net.minecraft.world.item.ItemStack stack, int newCount)
     
    static <T extends net.minecraft.world.entity.LivingEntity>
    boolean
    damageItem(net.minecraft.world.item.ItemStack stack, int amount, T entityIn, Consumer<T> onBroken)
     
    static <T extends net.minecraft.world.entity.Entity>
    net.minecraft.world.entity.Entity
    getClosestEntity(List<T> entities, net.minecraft.world.phys.Vec3 pos)
     
    static ArrayList<net.minecraft.world.item.ItemStack>
    getEventResponders(net.minecraft.world.entity.LivingEntity attacker)
     
    static void
    giveItemToEntity(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
     
    static ArrayList<net.minecraft.world.item.ItemStack>
    nonEmptyStackList(ArrayList<net.minecraft.world.item.ItemStack> stacks)
     
    static void
    quietlyGiveItemToPlayer(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack)
     
    static void
    spawnItemOnEntity(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ItemHelper

      public ItemHelper()
  • Method Details

    • copyWithNewCount

      public static ArrayList<net.minecraft.world.item.ItemStack> copyWithNewCount(List<net.minecraft.world.item.ItemStack> stacks, int newCount)
    • copyWithNewCount

      public static net.minecraft.world.item.ItemStack copyWithNewCount(net.minecraft.world.item.ItemStack stack, int newCount)
    • damageItem

      public static <T extends net.minecraft.world.entity.LivingEntity> boolean damageItem(net.minecraft.world.item.ItemStack stack, int amount, T entityIn, Consumer<T> onBroken)
    • getClosestEntity

      public static <T extends net.minecraft.world.entity.Entity> net.minecraft.world.entity.Entity getClosestEntity(List<T> entities, net.minecraft.world.phys.Vec3 pos)
    • nonEmptyStackList

      public static ArrayList<net.minecraft.world.item.ItemStack> nonEmptyStackList(ArrayList<net.minecraft.world.item.ItemStack> stacks)
    • getEventResponders

      public static ArrayList<net.minecraft.world.item.ItemStack> getEventResponders(net.minecraft.world.entity.LivingEntity attacker)
    • applyEnchantments

      public static void applyEnchantments(net.minecraft.world.entity.LivingEntity user, net.minecraft.world.entity.Entity target, net.minecraft.world.item.ItemStack stack)
    • giveItemToEntity

      public static void giveItemToEntity(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
    • quietlyGiveItemToPlayer

      public static void quietlyGiveItemToPlayer(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack)
    • spawnItemOnEntity

      public static void spawnItemOnEntity(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)