#(Dangles) Adjust player jump height
75 messages · Page 1 of 1 (latest)
(Dangles) Adjust player jump height
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
Hmmm.
- adjust <player> jump_strength:X throws an error
Can the player take jump_strength attribute?
but using gear to change it works fine lol
Jump strength mech is for horses.
It states the attribute can take "Every other mob" too.
So maybe try changing the attribute of the player?
like add attribute?
im guessing it would be -adjust <player> add_attribute_modifiers?
then feed it a map tag
Sets the attribute modifiers of an entity.
This is a SET operation, meaning pre-existing modifiers are removed.
For input format details, refer to !language attribute modifiers.
EntityTag
MapTag
<EntityTag.has_attribute> Returns whether the entity has the named attribute. Valid attribute name...
<EntityTag.attribute_modifiers> Returns a map of all attribute modifiers on the entity, with key a...
<EntityTag.attribute_default_value> Returns the default value of the named attribute for the entit...
<EntityTag.attribute_base_value> Returns the base value of the named attribute for the entity. See...
<EntityTag.attribute_value> Returns the final calculated value of the named attribute for the enti...
Granted it's a set operation.
What does that mean?
It removes any existing attribute modifiers.
So if you've given players attribute modifiers, may not wanna use that.
!m entitytag.add_attribute_modifiers
Adds attribute modifiers to an entity without altering existing modifiers.
For input format details, refer to !language attribute modifiers.
EntityTag
MapTag
<EntityTag.has_attribute> Returns whether the entity has the named attribute. Valid attribute name...
<EntityTag.attribute_modifiers> Returns a map of all attribute modifiers on the entity, with key a...
<EntityTag.attribute_default_value> Returns the default value of the named attribute for the entit...
<EntityTag.attribute_base_value> Returns the base value of the named attribute for the entity. See...
<EntityTag.attribute_value> Returns the final calculated value of the named attribute for the enti...
ah I see, I have not added any others anywhere else.
Either way, give the mechs a try to see if the player can use it.
im curious how I would format the command for lets say, altering jump_Strength
Didn't you make item scripts before with attribute modifiers?
A MapTag represents a mapping of keys to values.
Keys are plain text, case-insensitive.
Values can be anything, even lists or maps themselves.
Any given key can only appear in a map once (ie, no duplicate keys).
Values can be duplicated into multiple keys without issue.
Order of keys is preserved. Casing in keys is preserved in the object but ignored for map lookups.
map
ElementTag
The identity format for MapTags is a replica of property syntax - square brackets surrounded a semi-colon separated list of key=value pairs.
For example, a map of "taco" to "food", "chicken" to "animal", and "bob" to "person" would be "map@[taco=food;chicken=animal;bob=person]"
A map with zero items in it is simply 'map@[]'.
If the semicolon symbol ";" appears in a key or value, it will be replaced by "&sc", an equal sign "=" will become "&eq",
a left bracket "[" will become "&lb", a right brac...
Tag parse results for <map[key=value;doublekey=doublevalue;deepkey=<map[deepestkey=deepestvalue]>]>: https://paste.denizenscript.com/View/133074
map@[key=value;doublekey=doublevalue;deepkey=map@[deepestkey=deepestvalue]]
queue
definemap [<name>] [<key>:<value> ...]
Creates a MapTag definition with key/value pairs constructed from the input arguments.
Creates a MapTag definition with key/value pairs constructed from the input arguments.
It really depends where you use them
You can also just put [key=value;anotherkey=anothervalue] in places where denizen expects a map
You can also put a data key and call that
data_script:
type: data
data:
key: value
/ex narrate <script[data_script].data_key[data]>
So I'm curious, when I run /ex narrate <player.attributes> it returns this:
li@FALL_DAMAGE_MULTIPLIER/1.0|ATTACK_SPEED/4.0|MOVEMENT_SPEED/0.10000000149011612|ENTITY_INTERACTION_RANGE/3.0/creative_mode_entity_range/2.0/ADD_NUMBER/any|MAX_HEALTH/20.0|SWEEPING_DAMAGE_RATIO/0.0|SUBMERGED_MINING_SPEED/0.2|OXYGEN_BONUS/0.0|LUCK/0.0|ARMOR_TOUGHNESS/0.0|GRAVITY/0.08|BURNING_TIME/1.0|MAX_ABSORPTION/0.0|MOVEMENT_EFFICIENCY/0.0|ATTACK_KNOCKBACK/0.0|SNEAKING_SPEED/0.3|KNOCKBACK_RESISTANCE/0.0|ARMOR/10.0|MINING_EFFICIENCY/0.0|SAFE_FALL_DISTANCE/3.0|BLOCK_INTERACTION_RANGE/4.5/creative_mode_block_range/0.5/ADD_NUMBER/any|JUMP_STRENGTH/0.41999998688697815|WATER_MOVEMENT_EFFICIENCY/0.0|BLOCK_BREAK_SPEED/1.0|ATTACK_DAMAGE/1.0|EXPLOSION_KNOCKBACK_RESISTANCE/0.0|STEP_HEIGHT/0.6|SCALE/1.0|'
Which cool, seems to be all my attributes right. Why am I able to easily change attributes like movement speed with /ex adjust <player> speed:X but not with other attributes?
!m playertag.speed
Did you mean to search for playertag.level?
!m entitytag.speed
Sets how fast the entity can move.
Compatible with minecarts, boats, and living entities.
EntityTag
ElementTag(Decimal)
<EntityTag.speed> Returns how fast the entity can move. Compatible with minecarts, boats, and living entities.
Some of them don't have mechs.
But jump_strength does...and it is not modifiable with adjust
Sets the power of the horse's jump.
Also applies to horse-like mobs, such as donkeys and mules.
EntityTag
ElementTag(Number)
<EntityTag.jump_strength> Returns the power of a horse's jump. Also applies to horse-like mobs, such as donkeys and mules.
Theres a lot of new attributes and stuff that need mechs since I think 1.20.6?
yes, but if you read the output...jump strength was an attribute I had
which confuses me a bit
Error Message: The 'attribute' properties are deprecated in favor of the 'attribute_modifiers' properties which more fully implement the attribute system.
fair lol
ah, so this returns a map tag that contains all of them, I am guessing add_attribute_modifiers just sets the value in that map?
In minecraft, the "attributes" system defined certain core numerical values on entities, such as max health or attack damage.
The value of an "attribute" is determined by its "base value" modified mathematically by each of its "attribute modififers".
"Attribute modifiers" can be added either directly to the entity, or onto items - when on an item, an entity can equip it into the correct slot to automatically apply the modifier.
These can be read via such tags as !tag EntityTag.attribute_modifiers, !tag ItemTag.attribute_modifiers,
!tag EntityTag.has_attribute, !tag EntityTag.attribute_value, !tag EntityTag.attribute_base_value, !tag EntityTag.attribute_default_value, ...
These can be modified by such mechanisms as <@link mechanism EntityTag.attri...
Properties
I've never used this before so let's see.
Alright so it works, at least through a data script. I'm trying to figure it out through a map construction.
Well I can't seem to figure out how to apply if via constructions yet, but for the sake of getting it to work...
scripty:
type: data
data:
jump_strength:
1:
key: jumping
operation: ADD_NUMBER
amount: 2
I called the datakey of data and it accepted it, and I can jump higher now. This is an example of it taking in a maptag properly for attributes.
And also shows that the attribute does take players.
That amount is a bit absurd, but yeah.
/ex adjust <player> add_attribute_modifiers:[jump_strength=<list[<map[key=jumpy;operation=ADD_NUMBER;amount=0.2]>]>]
Yeah okay, this seemed to have been a good test and is working. This is definitely one of those moments where using [] instead of a map constructor is acceptable.
Thank you so much
that was irking me
I wasn't sure if i wasn't understanding the assignement sort of speak
Feel free to ask if you need any more help, otherwise -
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@hard lion