#(Dangles) Adjust player jump height

75 messages · Page 1 of 1 (latest)

hard lion
#

I know it can be done with equipment with mechanisms, but is there anyway to use the jump strength mechanism to adjust a players inherent jump strength?

eternal boltBOT
#

(Dangles) Adjust player jump height

eternal boltBOT
#

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.

summer thicket
#

Hmmm.

hard lion
#

- adjust <player> jump_strength:X throws an error

summer thicket
#

Can the player take jump_strength attribute?

hard lion
#

but using gear to change it works fine lol

summer thicket
#

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?

hard lion
#

like add attribute?

#

im guessing it would be -adjust <player> add_attribute_modifiers?

#

then feed it a map tag

summer thicket
#

Or uh.

#

!m entitytag.attribute_modifiers

gleaming hullBOT
# summer thicket !m entitytag.attribute_modifiers

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.

Object

EntityTag

Input

MapTag

Tags

<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...

summer thicket
#

Granted it's a set operation.

hard lion
#

What does that mean?

summer thicket
#

It removes any existing attribute modifiers.

#

So if you've given players attribute modifiers, may not wanna use that.

#

!m entitytag.add_attribute_modifiers

gleaming hullBOT
# summer thicket !m entitytag.add_attribute_modifiers

Adds attribute modifiers to an entity without altering existing modifiers.
For input format details, refer to !language attribute modifiers.

Object

EntityTag

Input

MapTag

Tags

<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...

hard lion
#

ah I see, I have not added any others anywhere else.

summer thicket
#

Either way, give the mechs a try to see if the player can use it.

hard lion
#

im curious how I would format the command for lets say, altering jump_Strength

summer thicket
#

Didn't you make item scripts before with attribute modifiers?

hard lion
#

I have lol

#

I am curious how to format the map tag in a line

summer thicket
#

Oh like

#

!o maptag

#

Eh

#

!object maptag

gleaming hullBOT
# summer thicket !object maptag

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.

Prefix

map

Base Type

ElementTag

Format

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...

golden cometBOT
#

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]]
summer thicket
#

Or, alternatively.

#

!c definemap

gleaming hullBOT
shrewd lichen
#

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]>

hard lion
#

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?

summer thicket
#

!m playertag.speed

gleaming hullBOT
#
Possible Confusion

Did you mean to search for playertag.level?

summer thicket
#

!m entitytag.speed

gleaming hullBOT
# summer thicket !m entitytag.speed

Sets how fast the entity can move.
Compatible with minecarts, boats, and living entities.

Object

EntityTag

Input

ElementTag(Decimal)

Tags

<EntityTag.speed> Returns how fast the entity can move. Compatible with minecarts, boats, and living entities.

summer thicket
#

Some of them don't have mechs.

hard lion
#

But jump_strength does...and it is not modifiable with adjust

summer thicket
#

Jump strength is for horses.

#

!m entitytag.jump_strength

gleaming hullBOT
summer thicket
#

Theres a lot of new attributes and stuff that need mechs since I think 1.20.6?

hard lion
#

yes, but if you read the output...jump strength was an attribute I had

#

which confuses me a bit

summer thicket
#

Error Message: The 'attribute' properties are deprecated in favor of the 'attribute_modifiers' properties which more fully implement the attribute system.

hard lion
#

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?

summer thicket
#

Hmm

#

!l attribute modifiers

gleaming hullBOT
# summer thicket !l attribute modifiers

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...

Group

Properties

summer thicket
#

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.

hard lion
#

Thank you so much

#

that was irking me

#

I wasn't sure if i wasn't understanding the assignement sort of speak

uncut dove
#

Feel free to ask if you need any more help, otherwise -

icy nymphBOT
#
Thread Closing Reminder

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