Class LootTableAnalyzer.LootDrop

java.lang.Object
com.minecolonies.core.colony.crafting.LootTableAnalyzer.LootDrop
Enclosing class:
LootTableAnalyzer

public static class LootTableAnalyzer.LootDrop extends Object
Represents a single possible drop from a loot table.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    LootDrop(@NotNull List<net.minecraft.world.item.ItemStack> stacks, float probability, float quality, boolean conditional)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(@NotNull net.minecraft.network.FriendlyByteBuf buffer)
    Recover a LootDrop from a packet buffer
    boolean
    If 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).
    float
    The approximate probability that this item will drop.
    float
    If non-zero, the probability is affected by the citizen's skills (positively or negatively).
    int
    This should be unique, covering all the properties except for the stacks
    void
    serialize(@NotNull net.minecraft.network.FriendlyByteBuf buffer)
    Copy a LootDrop to a packet buffer

    Methods inherited from class java.lang.Object

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

    • LootDrop

      public LootDrop(@NotNull @NotNull List<net.minecraft.world.item.ItemStack> stacks, float probability, float quality, boolean conditional)
    • LootDrop

      public LootDrop(@NotNull @NotNull List<LootTableAnalyzer.LootDrop> drops)
  • Method Details

    • getItemStacks

      @NotNull public @NotNull List<net.minecraft.world.item.ItemStack> 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
      Overrides:
      hashCode in class Object
    • 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