#Paintings and Pots

1 messages · Page 1 of 1 (latest)

white hare
#

Gamemode: Adventure
Version:1.21.4

Is there any way to prevent players from knocking down painting or removing plants from potted plants?

Barriers are not an option without some major rebuilding.

plucky arch
#

I'm not an official helper but I think you can make paintings invulnerable through their data

#

{Invulnerable:1b}

white hare
#

That's right... I'm kind of hoping there's another way because the summon command is too long... wait... hold on

plucky arch
#

Maybe /data merge entity will help

snow kite
#

you can /data modify an entity I think, can't do it with players but I think you can with every other entity yea

plucky arch
#

Hmm

#

One sec

#

@e[type=painting,limit=1,sort=nearest]

#

It says 'only one entity is allowed' so this will only select the single nearest painting

plucky arch
#

Not sure, hopefully an official helper or someone else knows

snow kite
#

set

#

either set or merge will work

plucky arch
#

I was thinking set might break the rotation

white hare
#

/data modify entity @e[type=painting,limit=1,sort=nearest] {Invulnerable:1b,variant:"rpanon:birthed_from_tech"} merge from entity @e[type=painting,limit=1,sort=nearest]

#

I did this and got "Nothing Changed. The specified properities already have these values." but I can still knock it down

#

Summoning the paint as invulnerable works and is less effort at this point.

I can just F3 + I and edit the command down and run it.

#

Now... I just need to figure out flower pots

plucky arch
#

Nice

#

I don't have any ideas for flower pots

fast pumice
plucky arch
#

Maybe summoning an invisible medium slime with no AI, so the hitbox would block access to the flower pot?

fast pumice
#

Either works but they accept different syntax

fast pumice
plucky arch
#

What's an interaction entity?

white hare
fast pumice
#

An invisible entity that doesn't tick (like markers and display entities) but has a hitbox and can be left/right clicked

stone frigate
plucky arch
#

Interesting

fast pumice
plucky arch
#

Interaction entities width and height defaults to 1 by 1 (according to MCStacker) so it should cover the flower pot with just /summon interaction ~ ~ ~ I think

fast pumice
#

And you can just modify the width and height of course

plucky arch
#

I assume using commands to make interactions glowing would work to see the hitboxes

stone frigate
#

Interaction entities are good but not perfect solution. You can accidentally create un-interactable zone behind the wall

white hare
#

WOOT! That works! It also works for decorated pots that I was just giving up on at this point

plucky arch
white hare
plucky arch
#

Invulnerable works for paintings

stone frigate
#

oh, flower pots

#

yes, for flower pots it's a perfect solution

white hare
#

this is going to be a long week... LOL

stone frigate
plucky arch
white hare
stone frigate
#

this will block only the pot + 1 pixel on each side and +2 pixels on top

white hare
#

Paintings and Item Frames:
[where x equals the target type]
/data modify entity @n[type=x] Invulnerable set value 1b

Flower and Decorated Pots
/summon interaction ~ ~ ~

stone frigate
white hare
stone frigate
#

are you familiar with what /execute does?

white hare
#

wait

#

yeah... it's just the align xyz that I've never used before

stone frigate
#

explain only aling xyz?

#

it executes command at your coordinates but at .0 .0 .0

white hare
#

in the command I know execute and everything from run to the end

stone frigate
#

and you can choose at which axes

#

align xz = .0 ~ .0

white hare
#

ok cool!

stone frigate
#

align xy = .0 .0 ~

#

I think you understand

white hare
#

But let me try something

#

execute align xyz run summon minecraft:interaction ~1 ~1 ~ {height:2,width:1}

I get my axis's mixed up when I don't have my game open to walk back and forth, but this command would allow me to stand next to a specific side of the potted plant/decorated pot combo and summon the interaction around it, right?

stone frigate
white hare
#

~-1 ~ ~ west
~1 ~ ~ east
~ ~ ~1 south
~ ~ ~-1 north

[edited to correct]

stone frigate
fast pumice
stone frigate
fast pumice
#

Ah the rest of the conversation finally loaded for me

white hare
stone frigate
white hare
#

the northwest one correct?

stone frigate
#

here, got you a command. It summons tall interaction entity 1 block above your legs
execute align xyz positioned ~0.5 ~1 ~0.5 run summon minecraft:interaction ~os ~os ~os {height:2,width:1}
os stands for offset

white hare
#

I don't think that's going to work

#

it didn't work for a different reason than I expected.

stone frigate
#

for example
execute align xyz positioned ~0.5 ~1 ~0.5 run summon minecraft:interaction ~ ~ ~-1 {height:2,width:1}
summons this:

white hare
#

But let me send you a picture

stone frigate
white hare
stone frigate
#

oh

#

what direction are you looking?

white hare
#

south for this one

stone frigate
#

try this execute align xyz positioned ~0.5 ~ ~0.5 run summon minecraft:interaction ~ ~ ~1 {height:2,width:1}

white hare
#

bingo

#

Paintings and Item Frames:
[where x equals the target type]
/data modify entity @n[type=x] Invulnerable set value 1b

Flower and Decorated Pots
/summon interaction ~ ~ ~

  • More specific commands:
    [Provided by @stone frigate ]
    Flower Pots Alone
    step on top of the pot and type this command:
    execute align xyz run summon minecraft:interaction ~0.5 ~ ~0.5 {height:0.4375,width:0.4375}

Potted Plant and Decorated Pots combo:
[when the pot is to the south of you]
execute align xyz positioned ~0.5 ~ ~0.5 run summon minecraft:interaction ~ ~ ~1 {height:2,width:1}

West: ~-1 ~ ~
East: ~1 ~ ~
South: ~ ~ ~1
North: ~ ~ ~-1

#

sorry for the ping. but I wanted to make sure your extra work was credited

stone frigate
fast pumice
#

Why wouldn't you just go into spectator and position your feet inside the block you want to place inside of, so you don't need to worry about offset?

#

also who suggested interactions in the first place

white hare
white hare
#

Thank you guys again for all the help!

digital falconBOT
digital falconBOT