Class ExplorationMapFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction
- All Implemented Interfaces:
BiFunction<ItemStack,,LootContext, ItemStack> LootItemFunction,LootContextUser
Convert any empty maps into explorer maps that lead to a structure that is nearest to the current
, if present.
invalid reference
LootContextParams.ORIGIN
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
LootItemConditionalFunction.DummyBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ExplorationMapFunction> static final Holder<MapDecorationType> static final intstatic final booleanstatic final byteprivate final Holder<MapDecorationType> private final intprivate final booleanprivate final byteFields inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsConstructorDescriptionExplorationMapFunction(List<LootItemCondition> pConditions, TagKey<Structure> pDestination, Holder<MapDecorationType> pMapDecoration, byte pZoom, int pSearchRadius, boolean pSkipKnownStructures) -
Method Summary
Modifier and TypeMethodDescriptionSet<ContextKey<?>> getType()run(ItemStack pStack, LootContext pContext) Called to perform the actual action of this function, after conditions have been checked.Methods inherited from class net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
apply, commonFields, simpleBuilder, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
DEFAULT_DESTINATION
-
DEFAULT_DECORATION
-
DEFAULT_ZOOM
public static final byte DEFAULT_ZOOM- See Also:
-
DEFAULT_SEARCH_RADIUS
public static final int DEFAULT_SEARCH_RADIUS- See Also:
-
DEFAULT_SKIP_EXISTING
public static final boolean DEFAULT_SKIP_EXISTING- See Also:
-
CODEC
-
destination
-
mapDecoration
-
zoom
private final byte zoom -
searchRadius
private final int searchRadius -
skipKnownStructures
private final boolean skipKnownStructures
-
-
Constructor Details
-
ExplorationMapFunction
ExplorationMapFunction(List<LootItemCondition> pConditions, TagKey<Structure> pDestination, Holder<MapDecorationType> pMapDecoration, byte pZoom, int pSearchRadius, boolean pSkipKnownStructures)
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceLootItemFunction- Specified by:
getTypein classLootItemConditionalFunction
-
getReferencedContextParams
-
run
Description copied from class:LootItemConditionalFunctionCalled to perform the actual action of this function, after conditions have been checked.- Specified by:
runin classLootItemConditionalFunction
-
makeExplorationMap
-