Started by
StrawberryDab
on
Topic category: Help with Minecraft modding (Java Edition)
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
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...
*It check if it's a CROP
-sorry
Please, help me
I don't think it's possible without coding, but I might be wrong.
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.
Procedure blocks:
Thanks a lot, now I'll test it.