Package net.minecraft.server.commands
Class AttributeCommand
java.lang.Object
net.minecraft.server.commands.AttributeCommand
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static int
addModifier
(CommandSourceStack p_136470_, Entity p_136471_, Holder<Attribute> p_251636_, UUID p_136473_, String p_136474_, double p_136475_, AttributeModifier.Operation p_136476_) private static int
getAttributeBase
(CommandSourceStack p_248780_, Entity p_251083_, Holder<Attribute> p_250388_, double p_250194_) private static Component
getAttributeDescription
(Holder<Attribute> p_250602_) private static AttributeInstance
getAttributeInstance
(Entity p_252177_, Holder<Attribute> p_249942_) private static int
getAttributeModifier
(CommandSourceStack p_136464_, Entity p_136465_, Holder<Attribute> p_250680_, UUID p_136467_, double p_136468_) private static int
getAttributeValue
(CommandSourceStack p_251776_, Entity p_249647_, Holder<Attribute> p_250986_, double p_251395_) private static LivingEntity
getEntityWithAttribute
(Entity p_252105_, Holder<Attribute> p_248921_) private static LivingEntity
getLivingEntity
(Entity p_136440_) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_251026_, CommandBuildContext p_250936_) private static int
removeModifier
(CommandSourceStack p_136459_, Entity p_136460_, Holder<Attribute> p_250830_, UUID p_136462_) private static int
setAttributeBase
(CommandSourceStack p_248556_, Entity p_248620_, Holder<Attribute> p_249456_, double p_252212_)
-
Field Details
-
ERROR_NOT_LIVING_ENTITY
private static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_NOT_LIVING_ENTITY -
ERROR_NO_SUCH_ATTRIBUTE
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_NO_SUCH_ATTRIBUTE -
ERROR_NO_SUCH_MODIFIER
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_NO_SUCH_MODIFIER -
ERROR_MODIFIER_ALREADY_PRESENT
private static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_MODIFIER_ALREADY_PRESENT
-
-
Constructor Details
-
AttributeCommand
public AttributeCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_251026_, CommandBuildContext p_250936_) -
getAttributeInstance
private static AttributeInstance getAttributeInstance(Entity p_252177_, Holder<Attribute> p_249942_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLivingEntity
private static LivingEntity getLivingEntity(Entity p_136440_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getEntityWithAttribute
private static LivingEntity getEntityWithAttribute(Entity p_252105_, Holder<Attribute> p_248921_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeValue
private static int getAttributeValue(CommandSourceStack p_251776_, Entity p_249647_, Holder<Attribute> p_250986_, double p_251395_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeBase
private static int getAttributeBase(CommandSourceStack p_248780_, Entity p_251083_, Holder<Attribute> p_250388_, double p_250194_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeModifier
private static int getAttributeModifier(CommandSourceStack p_136464_, Entity p_136465_, Holder<Attribute> p_250680_, UUID p_136467_, double p_136468_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setAttributeBase
private static int setAttributeBase(CommandSourceStack p_248556_, Entity p_248620_, Holder<Attribute> p_249456_, double p_252212_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
addModifier
private static int addModifier(CommandSourceStack p_136470_, Entity p_136471_, Holder<Attribute> p_251636_, UUID p_136473_, String p_136474_, double p_136475_, AttributeModifier.Operation p_136476_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
removeModifier
private static int removeModifier(CommandSourceStack p_136459_, Entity p_136460_, Holder<Attribute> p_250830_, UUID p_136462_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeDescription
-