blocks can only be placed on certain blocks help

Started by acrylic_eater2 on Tue, 08/04/2015 - 07:56
Last seen on 15:45, 2. Apr 2016
Joined Aug 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
blocks can only be placed on certain blocks help
Tue, 08/04/2015 - 07:56

hi i would like to create a crops mod so of course the crops would need to only be planted on farmland can anyone help me?

Last seen on 14:11, 15. Aug 2018
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
If you want have "seed" item
Tue, 08/04/2015 - 10:03

If you want have "seed" item you can make it like this.

In your "seed" item in event "When right click on block"  add stacked event.

to stacked event add 2 events.

1st - add your crop block

2nd - consume in inventory 1 "seed" item

In the main event you must set confition to : blockAt[i, j, k] == Blocks.farmland

Last seen on 21:02, 27. Feb 2018
Joined Feb 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:If you want have "seed" item
Sun, 09/03/2017 - 14:12

@#1 How do you get one seed to be consumed?

Last seen on 21:02, 27. Feb 2018
Joined Feb 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Nevermind...
Sun, 09/03/2017 - 14:15

Nevermind...

Last seen on 21:02, 27. Feb 2018
Joined Feb 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Okay, nevermind to that
Sun, 09/03/2017 - 14:26

Okay, nevermind to that nevermind. I thought I had this figured, but nope. Just so I have this clear- when right click on block, blockAt[i,j,k]==Blocks.FARMLAND, correct? Then x y z should have the item to be planted? And you consume the item in the next step?

Last seen on 21:02, 27. Feb 2018
Joined Feb 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
AND, does the item have to be
Sun, 09/03/2017 - 14:29

AND, does the item have to be an item, block, plant, or what?