Class LootItemStack

java.lang.Object
net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer
net.minecraft.world.level.storage.loot.entries.UniformContainerBase
net.minecraft.world.level.storage.loot.entries.SingleEntryContainerBase
net.darkhax.bookshelf.common.impl.data.loot.entries.LootItemStack
All Implemented Interfaces:
net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer, net.minecraft.world.level.storage.loot.Validatable

public class LootItemStack extends net.minecraft.world.level.storage.loot.entries.SingleEntryContainerBase
A LootPool entry type that produces copies of predefined ItemStack.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.entries.UniformContainerBase

    net.minecraft.world.level.storage.loot.entries.UniformContainerBase.Builder<T>, net.minecraft.world.level.storage.loot.entries.UniformContainerBase.EntryBase, net.minecraft.world.level.storage.loot.entries.UniformContainerBase.EntryConstructor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<LootItemStack>
     

    Fields inherited from class net.minecraft.world.level.storage.loot.entries.UniformContainerBase

    DEFAULT_QUALITY, DEFAULT_WEIGHT, quality, weight

    Fields inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer

    condition, modifier

    Fields inherited from interface net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer

    ALWAYS_FALSE, ALWAYS_TRUE
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull com.mojang.serialization.MapCodec<? extends net.minecraft.world.level.storage.loot.entries.SingleEntryContainerBase>
     
    protected void
    createItemStack(Consumer<net.minecraft.world.item.ItemStack> consumer, @NotNull net.minecraft.world.level.storage.loot.LootContext context)
     
    net.minecraft.world.item.ItemStackTemplate
     
    of(net.minecraft.world.item.ItemStackTemplate template, int weight)
     
    of(net.minecraft.world.item.ItemStackTemplate template, int weight, int quality)
     

    Methods inherited from class net.minecraft.world.level.storage.loot.entries.SingleEntryContainerBase

    expandRaw

    Methods inherited from class net.minecraft.world.level.storage.loot.entries.UniformContainerBase

    simpleBuilder, uniformFields, validate

    Methods inherited from class net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer

    commonFields, expand

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.level.storage.loot.entries.ComposableEntryContainer

    and, or
  • Field Details

    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<LootItemStack> MAP_CODEC
  • Method Details

    • getTemplate

      public net.minecraft.world.item.ItemStackTemplate getTemplate()
    • codec

      public @NonNull com.mojang.serialization.MapCodec<? extends net.minecraft.world.level.storage.loot.entries.SingleEntryContainerBase> codec()
      Specified by:
      codec in class net.minecraft.world.level.storage.loot.entries.SingleEntryContainerBase
    • createItemStack

      protected void createItemStack(Consumer<net.minecraft.world.item.ItemStack> consumer, @NotNull @NotNull net.minecraft.world.level.storage.loot.LootContext context)
      Specified by:
      createItemStack in class net.minecraft.world.level.storage.loot.entries.SingleEntryContainerBase
    • of

      public static LootItemStack of(net.minecraft.world.item.ItemStackTemplate template, int weight, int quality)
    • of

      public static LootItemStack of(net.minecraft.world.item.ItemStackTemplate template, int weight)