Class ModLootFunctions.BlockEntitySerializerFunction

java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
me.desht.pneumaticcraft.common.loot.ModLootFunctions.BlockEntitySerializerFunction
All Implemented Interfaces:
BiFunction<net.minecraft.world.item.ItemStack,net.minecraft.world.level.storage.loot.LootContext,net.minecraft.world.item.ItemStack>, net.minecraft.world.level.storage.loot.functions.LootItemFunction, net.minecraft.world.level.storage.loot.LootContextUser
Enclosing class:
ModLootFunctions

public static class ModLootFunctions.BlockEntitySerializerFunction extends net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
Handle the standard serialization of PNC block entity data to the dropped itemstack. Saved to the "BlockEntityTag" NBT tag, so will be copied directly back to the BE's NBT by BlockItem.updateCustomBlockEntityTag(Level, Player, BlockPos, ItemStack)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

    net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<T extends net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<T>>
  • Field Summary

    Fields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

    predicates
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?>
     
    net.minecraft.world.level.storage.loot.functions.LootItemFunctionType
     
    protected net.minecraft.world.item.ItemStack
    run(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext context)
     

    Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction

    apply, simpleBuilder, validate

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.util.function.BiFunction

    andThen

    Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser

    getReferencedContextParams
  • Method Details

    • run

      protected net.minecraft.world.item.ItemStack run(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.storage.loot.LootContext context)
      Specified by:
      run in class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
    • builder

      public static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> builder()
    • getType

      public net.minecraft.world.level.storage.loot.functions.LootItemFunctionType getType()