Custom Drops

Started by Multavit on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Feb 2021
Points:
607

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
Custom Drops

Hi, I want to make a special arrow that spawns 2-5 milk bottles (new item) near a cow whenever I hit it using the special arrow. Right now I’m thinking of making a procedure that activates when it hits a mob, but I don’t know the thingies to specify a cow and to drop milk. Help please?

Active 3 years ago
Joined Apr 2020
Points:
660

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 23
You’ll want to trigger the…
Fri, 05/14/2021 - 11:10

You’ll want to trigger the procedure using the trigger in the arrow element for when it hits a mob. Make the procedure check for a cow by using and “If” block and a “Event Target Entity is mob” block in the if block condition. Then, in the if block output, put a repeat block and make the condition an math based “+” block with a “1” in the second slot and round block in the first slot. In the round block, place a “times by” block with a “4” in the second slot and a “random (0,1)” block in the first slot. Place a “Spawn Gem” block in the repeat block output and set the item to spawn to “Milk Bottle” and leave the positions to X, Y and Z.

Active 4 years ago
Joined Feb 2021
Points:
607

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
Thanks!
Sat, 05/15/2021 - 08:08

Thanks!

Active 4 years ago
Joined Feb 2021
Points:
607

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
Sorry if this seems stupid,…
Wed, 05/19/2021 - 03:11

Sorry if this seems stupid, but where is the if block? Can’t find it

Active 2 months ago
Joined Aug 2020
Points:
934

User statistics:

  • Modifications: 3
  • Forum topics: 20
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 379
all if blocks are stored in…
Wed, 05/19/2021 - 03:36

all if blocks are stored in the "flow control" category

Active 4 years ago
Joined Feb 2021
Points:
607

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
sorry to bother you, I'm…
Wed, 05/19/2021 - 09:59

sorry to bother you, I'm horrible at this. Could you please send a picture of all the blocks hunterben talked about and where to find them? thanks.

Active 4 years ago
Joined Feb 2021
Points:
607

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
I am on 2021.1 version by…
Wed, 05/19/2021 - 10:11

I am on 2021.1 version by the way.

Active 2 months ago
Joined Aug 2020
Points:
934

User statistics:

  • Modifications: 3
  • Forum topics: 20
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 379
oh, sorry for the delay…
Thu, 05/20/2021 - 12:54

oh, sorry for the delay... but yeah, it's not too easy visualizing procedures or representing them in plain text, especially when some maths are involved, so here I visualized it in the procedure system to save you time! the procedure should look like this:

https://i.imgur.com/4dHoM0q.png

 

Active 2 months ago
Joined Aug 2020
Points:
934

User statistics:

  • Modifications: 3
  • Forum topics: 20
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 379
here's where each one can be…
Thu, 05/20/2021 - 13:06

here's where each one can be found just for convenience:

  • Is [event/target entity] (sub)type of [entitytype] - doesn't seem to have a place, so search for "sub" in search bar instead and you will see this in the 2nd result
  • repeat [x] times, do [procedure] - Flow Control
  • Spawn item/gem [item] at x y z - World Management
  • round[value] - Math
  • Random[0,1) - Math
  • +, -, *, /, and other arithmetic operations - Math
Active 4 years ago
Joined Feb 2021
Points:
607

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
Omg thanks, big help. No…
Thu, 05/20/2021 - 22:16

Omg thanks, big help. No idea why I couldn’t see repeat before, I checked flow control 5 times XD