Crop Help!

Started by AOCAWOL on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Crop Help!

Hi! So I've been working on crops for a while and I finally have it working except one thing:

Example:

I right click a Strawberry on farmland and it works fine but if I remove the strawberry from my main hand it still does this. Does anyone have a procedure that would work or could tweak mine so that it only places the crop if it's in the main hand? Thanks in advance, here is the procedure I use:

https://m.imgur.com/gallery/C8WMvYq

The link does not seem to…
Sun, 05/12/2019 - 10:36

The link does not seem to work from me.

One idea would be to check for the item in players the main hand and make sure there is a crop and check that it is not in the offhand. You have procedures to get the current item in the main/off hand.

Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry for the late reply!…
Mon, 05/13/2019 - 04:26

Sorry for the late reply! Anyway, try this link https://i.imgur.com/D52lY4y.png I tried making where it said "Has provided Entity (Strawberry) = Main Hand" before but what it did was just place it even if I didn't have the strawberry in my inventory or main hand? If You could send some kind of visual of what to do that'd be appreciated!

Just add another if around…
Mon, 05/13/2019 - 15:14

Just add another if around the current one and do the same check as for checking block at, just check the item in hand. Could you show your screenshot of your current procedure with item in main hand checking too?

Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi! I actually figured it…
Tue, 05/14/2019 - 00:11

Hi! I actually figured it out! I was very stupid and didn't realize there was a template already for something like this (regarding my problem) thank you!