#(doxaaaa) quick question - getting opposite of <player.location.direction>
45 messages · Page 1 of 1 (latest)
(doxaaaa) quick question - getting opposite of <player.location.direction>
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.
!command rotate
entity
rotate (cancel) (<entity>|...) (yaw:<#.#>) (pitch:<#.#>) (infinite/duration:<duration>) (frequency:<duration>)
Rotates a list of entities.
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...
(<entity>|...) can be any entity or list of entities
how about blocks
oh, you said something different at first lol
soz if u miss understood
[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.
!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".
properties
ElementTag
MaterialTag.direction
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
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
so you need chest location, but facing backwards?
I can't understand why are you trying to rotate yaw AFTER grabbing direction
and wth is this 🙄
so my goal here is to simply
rotate a chest the player is looking at
Isn't it by default in vanilla?
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
ty
that helps
Thread closed as resolved.
🤕
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?
Thread was manually reopened by @karmic goblet.
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>
👌
