类 AttributeCommand
java.lang.Object
net.minecraft.server.commands.AttributeCommand
-
字段概要
字段修饰符和类型字段说明private 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
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static int
addModifier
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, UUID pUuid, String pName, double pAmount, AttributeModifier.Operation pOperation) private static int
getAttributeBase
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) private static Component
getAttributeDescription
(Holder<Attribute> pAttribute) private static AttributeInstance
getAttributeInstance
(Entity pEntity, Holder<Attribute> pAttribute) private static int
getAttributeModifier
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, UUID pUuid, double pScale) private static int
getAttributeValue
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) private static LivingEntity
getEntityWithAttribute
(Entity pEntity, Holder<Attribute> pAttribute) private static LivingEntity
getLivingEntity
(Entity pTarget) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pContext) private static int
removeModifier
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, UUID pUuid) private static int
setAttributeBase
(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pValue)
-
字段详细资料
-
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
-
-
构造器详细资料
-
AttributeCommand
public AttributeCommand()
-
-
方法详细资料
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pContext) -
getAttributeInstance
private static AttributeInstance getAttributeInstance(Entity pEntity, Holder<Attribute> pAttribute) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getLivingEntity
private static LivingEntity getLivingEntity(Entity pTarget) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getEntityWithAttribute
private static LivingEntity getEntityWithAttribute(Entity pEntity, Holder<Attribute> pAttribute) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeValue
private static int getAttributeValue(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeBase
private static int getAttributeBase(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pScale) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeModifier
private static int getAttributeModifier(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, UUID pUuid, double pScale) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setAttributeBase
private static int setAttributeBase(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, double pValue) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
addModifier
private static int addModifier(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, UUID pUuid, String pName, double pAmount, AttributeModifier.Operation pOperation) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
removeModifier
private static int removeModifier(CommandSourceStack pSource, Entity pEntity, Holder<Attribute> pAttribute, UUID pUuid) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAttributeDescription
-