How do i make a block that can only be placed on a certain block

Started by Hey_itz_Jim on

Topic category: Advanced modding

Active 3 years ago
Joined Jul 2017
Points:
750

User statistics:

  • Modifications: 2
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
How do i make a block that can only be placed on a certain block

So i need some help im making this mod and theres gonna be a block that can only be placed on endstone but I dont know how to do that can anyone help me plz

Active 3 years ago
Joined Jun 2017
Points:
772

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 109
You can do it using events:
Wed, 07/19/2017 - 20:13

You can do it using events: Do when block added event ​ten you can use conditions, use the condition BlockAt[i,j,k] == item/block and set the block as endstone and put a -1 after the j. Do the result add block. Does this work?

Active 3 years ago
Joined Jul 2017
Points:
750

User statistics:

  • Modifications: 2
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
RE:You can do it using events:
Wed, 07/19/2017 - 23:46

@#1 thanks man that helped alot that will be in the next update of the mod im making now can you guys keep this post up as a reference for me and anyone else that has this problem thank you

Active 3 years ago
Joined Jul 2017
Points:
750

User statistics:

  • Modifications: 2
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
RE:You can do it using events:
Fri, 07/21/2017 - 01:31

@#1 hey man I thought it worked but its not working for me any other ideas

Active 3 years ago
Joined Jun 2017
Points:
772

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 109
Try this:
Fri, 07/21/2017 - 17:08

Try this:

Event:Block placed

Condition:BlockAt[i,j-1,k] != item/block  Put a ! in place of the first =.

Result:Remove block with or without drop.

And delete the other event. I tested it, it works.

Active 3 years ago
Joined Jul 2017
Points:
750

User statistics:

  • Modifications: 2
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
RE:Try this:
Sat, 07/22/2017 - 00:28

@#2 thank you