How do I add a fake CanPlaceOn tag in the chest using /data merge block?



  • I already tried

    /execute if block 221 100 68 chest{Items:[{id:"minecraft:book"}]} run data merge block 221 100 68 {Items:[{id:"minecraft:air",Count:1b,Slot:11b},{id:"minecraft:lever",Count:1b,Slot:13b,HideFlags:24,display:{Lore:['[{"text":"","italic":false}]','[{"text":"Can be placed on:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Crafting Table","italic":false,"color":"dark_gray"}]']},tag:{CanPlaceOn:["green_terracotta"]}}]}
    

    but it still shows "Can be placed on: green_terracotta" can someone help me?



  • I Think

    /execute if block 221 100 68 chest{Items:[{id:"minecraft:book"}]} run data merge block 221 100 68 {Items:[{id:"minecraft:air",Count:1b,Slot:11b},{id:"minecraft:lever",Count:1b,Slot:13b,tag:{display:{Lore:['{"text":""}','{"text":"Can be Placed On:","italic":"false","color":"gray"}','{"text":"Crafting Table","color":"dark_gray","italic":"false"}']},HideFlags:63,CanPlaceOn:["green_terracotta"]}}]}

    Is What You Want, It Displays "Can Be Placed On: (Line 2)Crafting Table" But It Can Actually Only Be Placed On Green Terracotta




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2