Interface LootModifierAction
- All Known Implementing Classes:
ConditionAddAction,EntryAddAction,EntryItemSetAction,EntryRemoveAction,PoolAddAction,PoolRemoveAction
public interface LootModifierAction
A loot modifier action
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for loot modifier actions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<LootModifierAction>Codec containing the type idstatic final intBitmask specifying that the action modified an entrystatic final intBitmask specifying that the action modified nothingstatic final intBitmask specifying that the action modified a poolstatic final intBitmask specifying that the action modified a table -
Method Summary
Modifier and TypeMethodDescriptionintapply(@NotNull LootModifierContext context) Applies this action to the provided contextgetType()Returns the type of this action.
-
Field Details
-
CODEC
Codec containing the type id -
MODIFIED_NONE
static final int MODIFIED_NONEBitmask specifying that the action modified nothing- See Also:
-
MODIFIED_TABLE
static final int MODIFIED_TABLEBitmask specifying that the action modified a table- See Also:
-
MODIFIED_POOL
static final int MODIFIED_POOLBitmask specifying that the action modified a pool- See Also:
-
MODIFIED_ENTRY
static final int MODIFIED_ENTRYBitmask specifying that the action modified an entry- See Also:
-
-
Method Details
-
getType
LootModifierActionType getType()Returns the type of this action.- Returns:
- the
typeof this action.
-
apply
Applies this action to the provided context- Parameters:
context- the context to apply to- Returns:
- the applied modification level
- See Also:
-