How to make block dispenser

Started by GotorFI on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make block dispenser

Hey,

 

I want to make a block dispenser but the problem is that how I can check if item in a Gui slot is a block and it's placeable? Like for example when I place dirt block, it should check if dirt is a block and if it is a block then it places dirt block and removes one dirt block form the Gui slot. Just like a dispenser but instead of dropping items, it drops blocks. It should also allow only blocks inside this dispenser because items aren't placeable.

How can I do this? I don't want to do if checks for every block because there are hundreds of different blocks in the game.

 

I would like to get answers as soon as possible!