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

Started by Hey_itz_Jim on Wed, 07/19/2017 - 18:58

Topic category: Advanced modding

Last seen on 00:01, 8. Aug 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How do i make a block that can only be placed on a certain block
Wed, 07/19/2017 - 18:58

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

Last seen on 23:11, 12. Jul 2019
Joined Jun 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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?

Last seen on 00:01, 8. Aug 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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

Last seen on 00:01, 8. Aug 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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

Last seen on 23:11, 12. Jul 2019
Joined Jun 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.

Last seen on 00:01, 8. Aug 2019
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:Try this:
Sat, 07/22/2017 - 00:28

@#2 thank you