Is there a way to make a block placeable in adventure mode

Started by dantedominico on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to make a block placeable in adventure mode

I'm trying to make a mod where you are in adventure mode and only place certain blocks. Is there a way how?

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, even in vanilla, you…
Thu, 12/26/2024 - 07:11

Yes, even in vanilla, you can use the “execute command /<string>” block with the /give <player selector> <item>[minecraft:can_place_on:<param>] <number of item> command. This command will give the player a block that can be placed on other blocks, or all of them. You can also make it appear, instead of giving it directly to the player, it's cleaner. You can find more information here : https://minecraft.wiki/w/Data_component_format?section=15#can_place_on