Class LootTableAnalyzer.LootDrop
java.lang.Object
com.minecolonies.core.colony.crafting.LootTableAnalyzer.LootDrop
- Enclosing class:
- LootTableAnalyzer
Represents a single possible drop from a loot table.
-
Constructor Summary
ConstructorsConstructorDescriptionLootDrop(@NotNull List<LootTableAnalyzer.LootDrop> drops) LootDrop(@NotNull List<net.minecraft.world.item.ItemStack> stacks, float probability, float quality, boolean conditional) -
Method Summary
Modifier and TypeMethodDescriptionstatic LootTableAnalyzer.LootDropdeserialize(@NotNull net.minecraft.network.FriendlyByteBuf buffer) Recover a LootDrop from a packet bufferbooleanIf true, there are special conditions on whether this will drop or not.@NotNull List<net.minecraft.world.item.ItemStack>The loot item for this drop (as alternatives).floatThe approximate probability that this item will drop.floatIf non-zero, the probability is affected by the citizen's skills (positively or negatively).inthashCode()This should be unique, covering all the properties except for the stacksvoidserialize(@NotNull net.minecraft.network.FriendlyByteBuf buffer) Copy a LootDrop to a packet buffer
-
Constructor Details
-
LootDrop
public LootDrop(@NotNull @NotNull List<net.minecraft.world.item.ItemStack> stacks, float probability, float quality, boolean conditional) -
LootDrop
-
-
Method Details
-
getItemStacks
The loot item for this drop (as alternatives). -
getProbability
public float getProbability()The approximate probability that this item will drop. -
getQuality
public float getQuality()If non-zero, the probability is affected by the citizen's skills (positively or negatively). -
getConditional
public boolean getConditional()If true, there are special conditions on whether this will drop or not. -
hashCode
public int hashCode()This should be unique, covering all the properties except for the stacks -
serialize
public void serialize(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buffer) Copy a LootDrop to a packet buffer -
deserialize
public static LootTableAnalyzer.LootDrop deserialize(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buffer) Recover a LootDrop from a packet buffer
-