Help with procedures

Started by Axle 'The Reap… on Wed, 03/20/2019 - 14:14

Topic category: Advanced modding

Last seen on 21:40, 16. Apr 2019
Joined Sep 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Help with procedures
Wed, 03/20/2019 - 14:14

Two things:

  1. How would you add a procedure that checks if the player has an item in their inventory when you punch a mob, then removes previously mentioned item and causes an explosion at the mob that was hit?
  2. how would you create a stacking effect the increases whenever you take damage?
Last seen on 21:40, 16. Apr 2019
Joined Sep 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Also, with #2, you have to…
Wed, 03/20/2019 - 14:15

Also, with #2, you have to be holding a specific item.

Last seen on 13:38, 21. Apr 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
1. Do you have to punch any…
Wed, 03/20/2019 - 16:05

1. Do you have to punch any mob or a specific mob?

I don't remember if there global triggers/procedure triggers for this, anyway to check for an item in inventory use this:

 

If has player item in inventory (item)

do something

 

And to remove it

Remove (item) from player's inventory

 

I think you know how to cause an explosion... Just use the "explode" procedure block

 

2. This will be possible with MCreator 1.8.3. Anyway, to check if the player has an item in hand, use this:

If [(item in entity main hand) = (item)]

do something

Last seen on 21:40, 16. Apr 2019
Joined Sep 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Causing an explosion and…
Wed, 03/20/2019 - 16:55

Causing an explosion and removing items I know how to do, but the problem arises with checking for the item. It checks the inventory of the mob you hit instead of your own. As for the off-hand/main-hand, it does the same as checking the entity you're fighting.

Last seen on 13:38, 21. Apr 2019
Joined Jun 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Then I have no ideas :(
Wed, 03/20/2019 - 18:44

Then I have no ideas :(

Last seen on 21:40, 16. Apr 2019
Joined Sep 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
how about the stacking…
Wed, 03/20/2019 - 21:27

how about the stacking strength effect?