Making a Vanilla Block Unplaceable (SOLVED)

Started by UraniumCruncher on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making a Vanilla Block Unplaceable (SOLVED)
Fri, 10/10/2025 - 23:16 (edited)

I would like to create a new way of placing the sweet berry bush, requiring you to extract seeds from the berries prior to planting them, but I would need to remove the ability to place a sweet berry bush using sweet berries. Is there any way I can do this?

Edited by UraniumCruncher on Fri, 10/10/2025 - 23:16
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you would need to check if…
Mon, 10/06/2025 - 02:21

you would need to check if the player is holding sweet berries when a sweet berry bush is placed and then cancel the event

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know if I am doing…
Mon, 10/06/2025 - 20:29

I don't know if I am doing this wrong, but the berry bush shows for a second and it gives me duplicates sweet berries in item form.

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
for the duplicate berries I…
Tue, 10/07/2025 - 01:02

for the duplicate berries I would just remove 1 sweet berry from the player's inventory. not too sure about the bush showing for a second

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It blinks because you're…
Tue, 10/07/2025 - 08:42

It blinks because you're only cancelling it server-side. 

If you want it to look like this,

you have to do a tiny bit of "custom code" because for some reason mcreator thought it'd be a great idea to only trigger the "Player right clicks block" event when you right click with your main hand......

 

so make your procedure like,

and then lock it, and reopen it

in here remove these lines,

and change this,

to,

event instanceof PlayerInteractEvent.RightClickBlock _event ? _event.getItemStack()
Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much friyes!…
Fri, 10/10/2025 - 23:08

Thank you so much friyes! That worked!