Package net.minecraft.server.command
Class AttributeCommand
java.lang.Object
net.minecraft.server.command.AttributeCommand
public class AttributeCommand extends Object
-
Field Summary
Fields Modifier and Type Field Description private static com.mojang.brigadier.exceptions.DynamicCommandExceptionTypeENTITY_FAILED_EXCEPTIONprivate static com.mojang.brigadier.exceptions.Dynamic3CommandExceptionTypeMODIFIER_ALREADY_PRESENT_EXCEPTIONprivate static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionTypeNO_ATTRIBUTE_EXCEPTIONprivate static com.mojang.brigadier.exceptions.Dynamic3CommandExceptionTypeNO_MODIFIER_EXCEPTIONprivate static com.mojang.brigadier.suggestion.SuggestionProvider<ServerCommandSource>SUGGESTION_PROVIDER -
Constructor Summary
Constructors Constructor Description AttributeCommand() -
Method Summary
Modifier and Type Method Description private static intexecuteBaseValueGet(ServerCommandSource source, Entity target, EntityAttribute attribute, double multiplier)private static intexecuteBaseValueSet(ServerCommandSource source, Entity target, EntityAttribute attribute, double value)private static intexecuteModifierAdd(ServerCommandSource source, Entity target, EntityAttribute attribute, UUID uuid, String name, double value, EntityAttributeModifier.Operation operation)private static intexecuteModifierRemove(ServerCommandSource source, Entity target, EntityAttribute attribute, UUID uuid)private static intexecuteModifierValueGet(ServerCommandSource source, Entity target, EntityAttribute attribute, UUID uuid, double multiplier)private static intexecuteValueGet(ServerCommandSource source, Entity target, EntityAttribute attribute, double multiplier)private static EntityAttributeInstancegetAttributeInstance(Entity entity, EntityAttribute attribute)private static LivingEntitygetLivingEntity(Entity entity)private static LivingEntitygetLivingEntityWithAttribute(Entity entity, EntityAttribute attribute)static voidregister(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher)
-
Field Details
-
SUGGESTION_PROVIDER
private static final com.mojang.brigadier.suggestion.SuggestionProvider<ServerCommandSource> SUGGESTION_PROVIDER -
ENTITY_FAILED_EXCEPTION
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ENTITY_FAILED_EXCEPTION -
NO_ATTRIBUTE_EXCEPTION
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType NO_ATTRIBUTE_EXCEPTION -
NO_MODIFIER_EXCEPTION
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType NO_MODIFIER_EXCEPTION -
MODIFIER_ALREADY_PRESENT_EXCEPTION
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType MODIFIER_ALREADY_PRESENT_EXCEPTION
-
-
Constructor Details
-
AttributeCommand
public AttributeCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher) -
getAttributeInstance
private static EntityAttributeInstance getAttributeInstance(Entity entity, EntityAttribute attribute) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLivingEntity
private static LivingEntity getLivingEntity(Entity entity) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLivingEntityWithAttribute
private static LivingEntity getLivingEntityWithAttribute(Entity entity, EntityAttribute attribute) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
executeValueGet
private static int executeValueGet(ServerCommandSource source, Entity target, EntityAttribute attribute, double multiplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
executeBaseValueGet
private static int executeBaseValueGet(ServerCommandSource source, Entity target, EntityAttribute attribute, double multiplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
executeModifierValueGet
private static int executeModifierValueGet(ServerCommandSource source, Entity target, EntityAttribute attribute, UUID uuid, double multiplier) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
executeBaseValueSet
private static int executeBaseValueSet(ServerCommandSource source, Entity target, EntityAttribute attribute, double value) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
executeModifierAdd
private static int executeModifierAdd(ServerCommandSource source, Entity target, EntityAttribute attribute, UUID uuid, String name, double value, EntityAttributeModifier.Operation operation) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
executeModifierRemove
private static int executeModifierRemove(ServerCommandSource source, Entity target, EntityAttribute attribute, UUID uuid) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-