[NOT FIXED YET] Make a crop drop twice if broke with a specific tool

Started by StrawberryDab on

Topic category: Help with modding (Java Edition)

Last seen on 08:42, 13. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[NOT FIXED YET] Make a crop drop twice if broke with a specific tool
Thu, 02/11/2021 - 15:29 (edited)

Hi! I'm new to MCreator and I don't have understand how to code well, yet.
I made a sickle and I want that if you brake a crop with it, the crop will drop 2 more

(compared to how much it drops if broken with your hands).
Can someone help me with the code? I tried a lot, but nothing worked :(

 

(EDIT: that should work with all the crops, not just one. i can do that with a lot of IF-STATEMENT, but it would be very heavy).

Edited by StrawberryDab on Thu, 02/11/2021 - 15:29
Last seen on 08:42, 13. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tought: The procedure…
Tue, 02/09/2021 - 15:58

I tought:
The procedure start when a block gets left clicked (I put the procedure in the sickle creation-tab (trigger part)).
Then there's an if statementt that check if the left-clicked block was a block. (that works).
Then, if it's a crop, summon an item-entity of that crop in that place.

I can create a lot of if statement that check: "If it was wheat, spawn wheat, else, if it was carrots, spawn carrots" ecc ecc

But it's really weird. I tried to store the crop in a variable and summon that, but I don't know how to. Getting the block will return

the name, yeah, but also the age in the wrong place, so it don't work. I tried to do that re-spawning the entity ina certain range, but it don't work for the first crop and can spawn non-crop items...

Last seen on 08:42, 13. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
*It check if it's a CROP   …
Wed, 02/10/2021 - 08:47

*It check if it's a CROP

 

-sorry

Last seen on 08:42, 13. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please, help me
Thu, 02/11/2021 - 15:29

Please, help me

Last seen on 15:38, 4. Nov 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't think it's possible…
Fri, 02/12/2021 - 10:50

I don't think it's possible without coding, but I might be wrong.

Last seen on 15:38, 4. Nov 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually you could make a…
Fri, 02/12/2021 - 11:31

Actually you could make a clone of Potatoes, Carrots, and Beetroots (or whatever crops you wanna do), just get the pictures from Minecraft Wiki, then make a procedure so that if a normal vanilla crop enters a player's inventory, it will be replaced by the crop clone, then make the sickle, then make a procedure on the crop clone (when block is broken), then put this:

If:      item in main hand of event/target entity = Sickle

Do:      Spawn gem: Crop clone at x y z

 

This should work, but I haven't tested it yet because I'm on my phone, and I don't have MCreator on my phone.

 

Last seen on 15:38, 1. Dec 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a new procedure. Go…
Fri, 02/12/2021 - 14:20
  1. Create a new procedure.
  2. Go to your plant's/block's Trigger tab
  3. Use your, in Step 1 created procedure for the event trigger "When block/plant destroyed by player".
  • Btw, sry 4 for my grammar, if it's weird for you.
Last seen on 15:38, 1. Dec 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure blocks:   If [ …
Fri, 02/12/2021 - 14:25

Procedure blocks:

 

If [ [Get item in main-hand of entity] == [<your specific tool>] ]
do ( Spawn gem <your specific item> at X Y Z)

 

Last seen on 08:42, 13. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks a lot, now I'll test…
Sat, 02/13/2021 - 08:44

Thanks a lot, now I'll test it.