Class SmeltItemFunction
java.lang.Object
net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction
net.minecraft.world.level.storage.loot.functions.SmeltItemFunction
- All Implemented Interfaces:
BiFunction<ItemStack, LootContext, ItemStack>, LootItemFunction, LootContextUser, Validatable
LootItemFunction that tries to smelt any items using
.
invalid reference
RecipeType.SMELTING
-
Nested Class Summary
Nested classes/interfaces inherited from class LootItemConditionalFunction
LootItemConditionalFunction.Builder<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerstatic final com.mojang.serialization.MapCodec<SmeltItemFunction> private final booleanFields inherited from class LootItemConditionalFunction
predicates -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSmeltItemFunction(List<LootItemCondition> predicates, boolean useInputCount) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<SmeltItemFunction> codec()run(ItemStack itemStack, LootContext context) Called to perform the actual action of this function, after conditions have been checked.static LootItemConditionalFunction.Builder<?> smelted()static LootItemConditionalFunction.Builder<?> smelted(boolean useInputCount) Methods inherited from class LootItemConditionalFunction
apply, commonFields, simpleBuilder, validateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThenMethods inherited from interface LootContextUser
getReferencedContextParams
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
useInputCount
private final boolean useInputCount -
MAP_CODEC
-
-
Constructor Details
-
SmeltItemFunction
-
-
Method Details
-
codec
- Specified by:
codecin interfaceLootItemFunction- Specified by:
codecin classLootItemConditionalFunction
-
run
Description copied from class:LootItemConditionalFunctionCalled to perform the actual action of this function, after conditions have been checked.- Specified by:
runin classLootItemConditionalFunction
-
smelted
-
smelted
-