Package net.minecraft.loot.functions
Class CopyNbt
- java.lang.Object
-
- net.minecraft.loot.LootFunction
-
- net.minecraft.loot.functions.CopyNbt
-
- All Implemented Interfaces:
java.util.function.BiFunction<ItemStack,LootContext,ItemStack>
,ILootFunction
,IParameterized
public class CopyNbt extends LootFunction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CopyNbt.Action
static class
CopyNbt.Builder
(package private) static class
CopyNbt.Operation
static class
CopyNbt.Serializer
static class
CopyNbt.Source
-
Nested classes/interfaces inherited from interface net.minecraft.loot.functions.ILootFunction
ILootFunction.IBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.function.Function<TileEntity,INBT>
BLOCK_ENTITY_GETTER
private static java.util.function.Function<Entity,INBT>
ENTITY_GETTER
private java.util.List<CopyNbt.Operation>
operations
private CopyNbt.Source
source
-
Fields inherited from class net.minecraft.loot.LootFunction
predicates
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CopyNbt(ILootCondition[] p_i51240_1_, CopyNbt.Source p_i51240_2_, java.util.List<CopyNbt.Operation> p_i51240_3_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static NBTPathArgument.NBTPath
compileNbtPath(java.lang.String p_215880_0_)
static CopyNbt.Builder
copyData(CopyNbt.Source p_215881_0_)
java.util.Set<LootParameter<?>>
getReferencedContextParams()
LootFunctionType
getType()
ItemStack
run(ItemStack p_215859_1_, LootContext p_215859_2_)
-
Methods inherited from class net.minecraft.loot.LootFunction
apply, simpleBuilder, validate
-
-
-
-
Field Detail
-
source
private final CopyNbt.Source source
-
operations
private final java.util.List<CopyNbt.Operation> operations
-
BLOCK_ENTITY_GETTER
private static final java.util.function.Function<TileEntity,INBT> BLOCK_ENTITY_GETTER
-
-
Constructor Detail
-
CopyNbt
private CopyNbt(ILootCondition[] p_i51240_1_, CopyNbt.Source p_i51240_2_, java.util.List<CopyNbt.Operation> p_i51240_3_)
-
-
Method Detail
-
getType
public LootFunctionType getType()
-
compileNbtPath
private static NBTPathArgument.NBTPath compileNbtPath(java.lang.String p_215880_0_)
-
getReferencedContextParams
public java.util.Set<LootParameter<?>> getReferencedContextParams()
-
run
public ItemStack run(ItemStack p_215859_1_, LootContext p_215859_2_)
- Specified by:
run
in classLootFunction
-
copyData
public static CopyNbt.Builder copyData(CopyNbt.Source p_215881_0_)
-
-