public class BuffHelper
extends java.lang.Object
| Constructor and Description |
|---|
BuffHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
addBuff(net.minecraft.world.World world,
net.minecraft.entity.EntityLivingBase entity,
BuffEffect effect)
Updates a BuffEffect on an entity.
|
static void |
cureBuffs(net.minecraft.entity.EntityLivingBase entity,
net.minecraft.item.ItemStack stack)
Attempts to cure all buff effects using the ItemStack passed.
|
static BuffEffect |
getEntityBuffEffect(net.minecraft.entity.EntityLivingBase entity,
Buff buff)
Retrieves a BuffEffect from the passed entity, that represents the passed Buff.
|
static java.util.List<BuffEffect> |
getEntityEffects(net.minecraft.entity.EntityLivingBase entity)
Retrieves a List of BuffEffects from a living Entity.
|
static boolean |
hasBuff(net.minecraft.entity.EntityLivingBase entity,
Buff buff)
A check to see if an Entity has a certain buff.
|
static java.util.List<BuffEffect> |
readNBT(net.minecraft.nbt.NBTTagList list)
Reads a list of BuffEffects from an NBTTagList.
|
static net.minecraft.nbt.NBTTagList |
writeNBT(java.util.List<BuffEffect> buffs)
Writes a list of BuffEffect to an NBTTagCompound.
|
public static java.util.List<BuffEffect> getEntityEffects(net.minecraft.entity.EntityLivingBase entity)
entity: - The entity to retrieve the effects from.public static BuffEffect getEntityBuffEffect(net.minecraft.entity.EntityLivingBase entity, Buff buff)
entity: - The entity to find the BuffEffect on.buff: - The Buff you are looking for.public static boolean addBuff(net.minecraft.world.World world,
net.minecraft.entity.EntityLivingBase entity,
BuffEffect effect)
world: - The world the entity is in.entity: - The Entity to update on.effect: - The effect to update.public static boolean hasBuff(net.minecraft.entity.EntityLivingBase entity,
Buff buff)
entity: - The entity to check.buff: - The Buff to check for.public static void cureBuffs(net.minecraft.entity.EntityLivingBase entity,
net.minecraft.item.ItemStack stack)
entity: - The entity trying to be cured.stack: - The cure ItemStack being used.public static net.minecraft.nbt.NBTTagList writeNBT(java.util.List<BuffEffect> buffs)
buffs: - A List of buffs to write to a tag.public static java.util.List<BuffEffect> readNBT(net.minecraft.nbt.NBTTagList list)
list: - The NBTTagList to read from.