Package team.lodestar.lodestone.helpers
Class ItemHelper
java.lang.Object
team.lodestar.lodestone.helpers.ItemHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyEnchantments(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.ItemStackcopyWithNewCount(net.minecraft.world.item.ItemStack stack, int newCount) static <T extends net.minecraft.world.entity.LivingEntity>
booleandamageItem(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.EntitygetClosestEntity(List<T> entities, net.minecraft.world.phys.Vec3 pos) static ArrayList<net.minecraft.world.item.ItemStack>getEventResponders(net.minecraft.world.entity.LivingEntity attacker) static voidgiveItemToEntity(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 voidquietlyGiveItemToPlayer(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack) static voidspawnItemOnEntity(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
-
Constructor Details
-
ItemHelper
public ItemHelper()
-
-
Method Details
-
copyWithNewCount
-
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
-
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)
-