2

Help with Block Displays

TheyCallMeFatbird's Avatar TheyCallMeFatbird10/17/23 9:30 am
2 emeralds 187 5
10/22/2023 8:20 am
TheyCallMeFatbird's Avatar TheyCallMeFatbird
I want to make a glass pane sliding door like the automatic ones irl with /execute so when they go near the coord it opens
Problem: I don't know how to do it


ty (On Java 1.20.1)
Posted by TheyCallMeFatbird's Avatar
TheyCallMeFatbird
Level 18 : Journeyman Birb
16

Create an account or sign in to comment.

5

2
10/21/2023 6:30 pmhistory
Level 61 : High Grandmaster Sweetheart
imalittlhigh
imalittlhigh's Avatar
if you want to just move the display, you use translation "{width:1f,height:1f,transformation:{left_rotation:[​0f,0f,0f,1f],right_rotation:[​0f,0f,0f,1f],translation:[​90f,90f,90f],scale:[​1f,1f,1f]}}"

im not 100% sure what does what, but iirc translation is the offset of the display to the actual entity.
Scale is obv the scale (you can make them thin with it)

interpolation_duration:69

is how fast the display takes on the newly set translation (so opening the doors slowly with "animation"

you set the new translation by doing "/data modify entity @s ..." on the display entity

just trigger the opening if its not opened an a player is in range, trigger the closing if it isnt closed and no player is in range (how i would do it)

you can also set a specific nbt in the selector so: "/execute as @e[​type=minecraft:block_display] at @s if entity @a[​distance=..2] run"
would be "/execute as @e[​type=minecraft:block_display,nbt={width:1f,height:1f,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[​0f,0f,0f,1f],translation:[​90f,90f,90f],scale:[​1f,1f,1f]}}] at @s if entity @a[​distance=..2] run" would only run on the block displays that have that specific nbt ^^

if u need more help, feel free to hmu on disc


If youre having trouble with the nbt format, just summon entities with different values from mcstacker
1
10/22/2023 8:20 am
Level 18 : Journeyman Birb
TheyCallMeFatbird
TheyCallMeFatbird's Avatar
holy christ
3
10/21/2023 4:02 pm
Level 1 : New Explorer
WarnedCrayon509
WarnedCrayon509's Avatar
/execute as @e[type=minecraft:block_display] at @s if entity @a[distance=..2] run

will allow something to happen when a player gets near
2
10/21/2023 4:02 pm
Level 1 : New Explorer
WarnedCrayon509
WarnedCrayon509's Avatar
I don't know how to move them though
2
10/21/2023 5:30 pm
Level 18 : Journeyman Birb
TheyCallMeFatbird
TheyCallMeFatbird's Avatar
Oh wow that was so helpful!
Ty
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome