Package jeresources.api.drop
Class LootDrop
java.lang.Object
jeresources.api.drop.LootDrop
- All Implemented Interfaces:
Comparable<LootDrop>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloatbooleanintnet.minecraft.world.item.ItemStackintintnet.minecraft.world.item.ItemStack -
Constructor Summary
ConstructorsConstructorDescriptionLootDrop(net.minecraft.world.item.Item item, float chance, net.minecraft.world.level.storage.loot.functions.LootItemFunction... lootFunctions)LootDrop(net.minecraft.world.item.Item item, float chance, net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] lootConditions, net.minecraft.world.level.storage.loot.functions.LootItemFunction... lootFunctions)LootDrop(net.minecraft.world.item.Item item, int minDrop, int maxDrop, float chance, Conditional... conditionals)LootDrop(net.minecraft.world.item.Item item, int minDrop, int maxDrop, Conditional... conditionals)LootDrop(net.minecraft.world.item.Item item, net.minecraft.nbt.CompoundTag tag, int minDrop, int maxDrop, float chance, Conditional... conditionals)LootDrop(net.minecraft.world.item.Item item, net.minecraft.nbt.CompoundTag tag, int minDrop, int maxDrop, Conditional... conditionals)LootDrop(net.minecraft.world.item.ItemStack item)LootDrop(net.minecraft.world.item.ItemStack item, float chance)LootDrop(net.minecraft.world.item.ItemStack item, float chance, int fortuneLevel)LootDrop(net.minecraft.world.item.ItemStack item, int minDrop, int maxDrop, float chance, int fortuneLevel, Conditional... conditionals)LootDrop(net.minecraft.world.item.ItemStack item, int minDrop, int maxDrop, float chance, Conditional... conditionals)LootDrop(net.minecraft.world.item.ItemStack item, int minDrop, int maxDrop, Conditional... conditionals) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConditional(Conditional conditional)voidaddConditionals(List<Conditional> conditionals)addLootCondition(net.minecraft.world.level.storage.loot.predicates.LootItemCondition condition)addLootConditions(Collection<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> lootConditions)addLootConditions(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] lootConditions)addLootFunction(net.minecraft.world.level.storage.loot.functions.LootItemFunction lootFunction)addLootFunctions(Collection<net.minecraft.world.level.storage.loot.functions.LootItemFunction> lootFunctions)addLootFunctions(net.minecraft.world.level.storage.loot.functions.LootItemFunction[] lootFunctions)booleanintList<net.minecraft.world.item.ItemStack>getDrops()floatList<net.minecraft.network.chat.Component>List<net.minecraft.network.chat.Component>getTooltipText(boolean smelted)toString()net.minecraft.network.chat.TextComponent
-
Field Details
-
minDrop
public int minDrop -
maxDrop
public int maxDrop -
item
public net.minecraft.world.item.ItemStack item -
smeltedItem
public net.minecraft.world.item.ItemStack smeltedItem -
chance
public float chance -
fortuneLevel
public int fortuneLevel -
enchanted
public boolean enchanted
-
-
Constructor Details
-
LootDrop
public LootDrop(net.minecraft.world.item.ItemStack item) -
LootDrop
public LootDrop(net.minecraft.world.item.ItemStack item, float chance) -
LootDrop
public LootDrop(net.minecraft.world.item.ItemStack item, float chance, int fortuneLevel)- Parameters:
item- the droppedItemStackchance- chance of drop, can be above 1 to indicate more than 1 dropsfortuneLevel- the fortune level needed for these results
-
LootDrop
public LootDrop(net.minecraft.world.item.ItemStack item, int minDrop, int maxDrop, Conditional... conditionals)- Parameters:
item- The droppedItemStack(chance for drop will be 100%)minDrop- the maximum amount droppedmaxDrop- the minimum amount droppedconditionals- a list of conditionals for this drop
-
LootDrop
public LootDrop(net.minecraft.world.item.ItemStack item, int minDrop, int maxDrop, float chance, int fortuneLevel, Conditional... conditionals)- Parameters:
item- The droppedItemStackminDrop- the maximum amount droppedmaxDrop- the minimum amount droppedchance- the chance the item gets droppedfortuneLevel- the level of fortune neededconditionals- a list of conditionals for this drop
-
LootDrop
public LootDrop(net.minecraft.world.item.Item item, int minDrop, int maxDrop, Conditional... conditionals)- Parameters:
item- The droppedItem(chance for drop will be 100% and the itemDamage will be default)minDrop- the maximum amount droppedmaxDrop- the minimum amount droppedconditionals- a list of conditionals for this drop
-
LootDrop
public LootDrop(net.minecraft.world.item.Item item, net.minecraft.nbt.CompoundTag tag, int minDrop, int maxDrop, Conditional... conditionals)- Parameters:
item- The droppedItem(chance for drop will be 100%)tag-CompoundTagof the ItemminDrop- the maximum amount droppedmaxDrop- the minimum amount droppedconditionals- a list of conditionals for this drop
-
LootDrop
public LootDrop(net.minecraft.world.item.Item item, int minDrop, int maxDrop, float chance, Conditional... conditionals)- Parameters:
item- The droppedItemminDrop- the maximum amount droppedmaxDrop- the minimum amount droppedchance- the chance the item gets droppedconditionals- a list of conditionals for this drop
-
LootDrop
public LootDrop(net.minecraft.world.item.Item item, net.minecraft.nbt.CompoundTag tag, int minDrop, int maxDrop, float chance, Conditional... conditionals)- Parameters:
item- The droppedItemtag-CompoundTagof the ItemminDrop- the maximum amount droppedmaxDrop- the minimum amount droppedchance- the chance the item gets droppedconditionals- a list of conditionals for this drop
-
LootDrop
public LootDrop(net.minecraft.world.item.ItemStack item, int minDrop, int maxDrop, float chance, Conditional... conditionals)- Parameters:
item- The droppedItemStackminDrop- the maximum amount droppedmaxDrop- the minimum amount droppedchance- the chance the item gets droppedconditionals- a list of conditionals for this drop
-
LootDrop
public LootDrop(net.minecraft.world.item.Item item, float chance, net.minecraft.world.level.storage.loot.functions.LootItemFunction... lootFunctions) -
LootDrop
public LootDrop(net.minecraft.world.item.Item item, float chance, net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] lootConditions, net.minecraft.world.level.storage.loot.functions.LootItemFunction... lootFunctions)
-
-
Method Details
-
addLootConditions
public LootDrop addLootConditions(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] lootConditions) -
addLootConditions
public LootDrop addLootConditions(Collection<net.minecraft.world.level.storage.loot.predicates.LootItemCondition> lootConditions) -
addLootCondition
public LootDrop addLootCondition(net.minecraft.world.level.storage.loot.predicates.LootItemCondition condition) -
addLootFunctions
public LootDrop addLootFunctions(net.minecraft.world.level.storage.loot.functions.LootItemFunction[] lootFunctions) -
addLootFunctions
public LootDrop addLootFunctions(Collection<net.minecraft.world.level.storage.loot.functions.LootItemFunction> lootFunctions) -
addLootFunction
public LootDrop addLootFunction(net.minecraft.world.level.storage.loot.functions.LootItemFunction lootFunction) -
canBeCooked
public boolean canBeCooked() -
getDrops
-
toString
-
chanceString
-
getTooltipText
-
getTooltipText
-
addConditional
-
addConditionals
-
getSortIndex
public float getSortIndex() -
toStringTextComponent
public net.minecraft.network.chat.TextComponent toStringTextComponent() -
compareTo
- Specified by:
compareToin interfaceComparable<LootDrop>
-