2
Help with Block Displays
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)
Problem: I don't know how to do it
ty (On Java 1.20.1)
Create an account or sign in to comment.
5
2
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
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
holy christ
3
/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
will allow something to happen when a player gets near
2
I don't know how to move them though
2
Oh wow that was so helpful!
Ty
Ty