#(doxaaaa) quick question - getting opposite of <player.location.direction>

45 messages · Page 1 of 1 (latest)

next ridge
#

how do you change the direction of the player so it faces them
I just need to make it change the value +180 if possible or opposite of <player.location.direction>

/exs adjustblock <player.cursor_on> direction:<player.location.direction>

wooden sealBOT
#

(doxaaaa) quick question - getting opposite of <player.location.direction>

wooden sealBOT
#

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.

mental bluff
#

!command rotate

coarse masonBOT
# mental bluff !command rotate
Group

entity

Syntax

rotate (cancel) (<entity>|...) (yaw:<#.#>) (pitch:<#.#>) (infinite/duration:<duration>) (frequency:<duration>)

Short Description

Rotates a list of entities.

Description

Induces incremental rotation on a list of entities over a period of time.

The yaw and pitch arguments specify how much the entity will rotate each step. Default to 10 and 0 respectively.

The frequency argument specifies how long it takes between each rotation step. Defaults to 1t.

The duration argument specifies how long the whole rotation process will last. Defaults to 1s.
Alternatively, use "infinite" if you want the entity to spin forever.

You can use "cancel" to prematurely stop the ongo...

next ridge
#

this rotates the player only doesn't it?

#

im looking to rotate a chest

mental bluff
#

(<entity>|...) can be any entity or list of entities

next ridge
#

how about blocks

mental bluff
#

oh, you said something different at first lol

next ridge
#

soz if u miss understood

mental bluff
#

how do you change the direction of the player so it faces them
kekw_dog

#

!search chest

coarse masonBOT
# mental bluff !search chest
Search Results

[Partial Name Match] !Command animatechest, !Tag playertag.enderchest, !Mechanism entitytag.carries_chest, !Tag entitytag.carries_chest, !Event player equips|unequips armor|helmet|chestplate|leggings|boots,
[Semi-Strong Match] !Command inventory, !Event loot generates, !Event player closes inventory, !Event player opens inventory,
[Semi-Decent Match] !ObjectType inventorytag, !Language slot inputs, !Language command syntax, !Mechanism materialtag.half, !Tag materialtag.half, !Mechanism inventorytag.size, !Tag inventorytag.size, !Property inventorytag.size, !Language entity color types, !Mechanism entitytag.equipment, !Tag entitytag.equipment, !Language attribute modifiers, !Tag enchantmenttag.category, !Language item script containers, !Tag inventorytag.equipment, !Tag locationtag.other_block, !Tag locationtag.custom_name, !Mechanism entitytag.disabled_slots, !Tag entitytag.equipment_map, !Mechanism playertag.item_on_cursor, !Mechanism playertag.fake_equipment, !Tag locationtag.block_facing, !Tag locationtag.has_loot_table, !Tag playertag.item_on_cursor, !Tag locationtag.loot_table_id, !Tag inventorytag.equipment_map, !Language enchantment script containers, !Language inventory script containers, !Mechanism locationtag.clear_loot_table, !Tag locationtag.with_facing_direction, !Tag itemtag.default_attribute_modifiers,
[Just Barely Matched] !Command equip, !Command take, !Command fakeequip.

mental bluff
#

!tag materialtag.direction

coarse masonBOT
# mental bluff !tag materialtag.direction

Returns the current facing direction for a directional material (like a door or a bed).
This includes materials that Spigot classifies as "directional", "orientable", or "rotatable", as well as rails, dripstone, and jigsaw blocks.
Output is a direction name like "NORTH", or an axis like "X", or a rail direction like "ASCENDING_NORTH".

Group

properties

Returns

ElementTag

Mechanism

MaterialTag.direction

next ridge
#

would using something like
direction:<player.location.direction.rotate_yaw[180]>
help

#

but then it doesn't work for the mechanism because of the output not being NESW

mental bluff
#

for blocks you could grab the material property and use something like

- define material_direction <[chest_location].material.direction>
- definemap directions:
    north: south
    east: west
    south: north
    west: east
- define opposite_direction <[directions].get[<[material_direction]>]>```
#

but if you're taking an entity's yaw, you can just go above 360 and it recalculates it after zero for you

#

vise versa in some cases

#

in the cases it doesn't,

  • if <[yaw]> > 180:
    • yaw minus 180
  • else:
    • yaw plus 180
#

that way when you take >180 + 180, you dont exceed 360

karmic goblet
next ridge
#

ah yeah that makes sense

#

and i need the chest to face the player when placed

karmic goblet
next ridge
#

so my goal here is to simply
rotate a chest the player is looking at

karmic goblet
next ridge
#

but i feel like there is a more compact way to do this within like one line

#

nah like for example im using a script that already replaces a block with a chest

#

but it replaces it randomly and never towards the player

stiff nestBOT
#
Resolved

Thread closed as resolved.

karmic goblet
#

🤕
It doesn't use player yaw. it's just rotates chest
And it still bad

it should be
<[chest_location].with_facing_direction.rotate_yaw[180].direction>

but is this what you want?

stiff nestBOT
#
Thread Reopened

Thread was manually reopened by @karmic goblet.

next ridge
#

uh lemme try

#

oh but that wont work because when you adjustblock
wont it default face a direction

#

wait a min

#

i over looked a problem

#

alright nvm i fixed it, i just used players location again because i define material_direction without <player.location.direction>

karmic goblet
#

👌