How do I place a block only in another specific block?

Started by Invavine on

Topic category: Help with Minecraft modding (Java Edition)

Active 6 years ago
Joined Sep 2018
Points:
682

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
How do I place a block only in another specific block?

I want to create crops, but I want to allow them to grow only in dirty blocks.

I can't understand procedures very well... ._.

Anybody can help me?

Sorry for bad english. :(

Active 3 hours ago
Joined Apr 2014
Points:
1228

User statistics:

  • Modifications: 2
  • Forum topics: 27
  • Wiki pages: 1
  • MCreator plugins: 0
  • Comments: 663
Here I have made it for you …
Fri, 09/14/2018 - 17:47

Here I have made it for you 
This will check when you try to place it if there is Dirt or Coarse Dirt under if no than it will instantly break this plant also 
when you will try to place it in Survival it will spawn you its sapling or what ever you want just replace the popy from my example to something that you want or if you don't want it to spawn item when you break it on survival than remove that second If method :)
also place make this run on "Block Placed By Player" Event trigger to make it work and check Wiki for information's about Procedures :)

Here

Active 5 years ago
Joined Oct 2019
Points:
649

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Wes i just wanted to thank…
Sat, 10/12/2019 - 22:24

Wes i just wanted to thank you for sharing that code, i was having a hard time finding a way to specify block placement then i looked at this. Thanks a lot.

Active 3 months ago
Joined Mar 2022
Points:
508

User statistics:

  • Modifications: 1
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 19
is there an update for this…
Sat, 02/04/2023 - 05:01

is there an update for this for 2023? sides of blocks like my Tree Tapper?

Active 11 months ago
Joined Feb 2023
Points:
362

User statistics:

  • Modifications: 1
  • Forum topics: 16
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 17
Hey TheRTGGaming, funny…
Sun, 03/12/2023 - 19:01

Hey TheRTGGaming, funny enough im making the same thing for my mod, and i figured out how to make it placeable on sides, you can copy the image ill put below, Basically i made an item for the block instead of directly placing it and set this code to the ITEM FORM of it, Note that it uses orange "=" blocks