Mob right hand item drop

Started by msrodrigues2000 on Sat, 06/13/2020 - 23:06

Topic category: Help with modding (Java Edition)

Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Mob right hand item drop
Sat, 06/13/2020 - 23:06

Is there a way to unable your biped mob to drop the item it is holding in its right hand?

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
@Override protected…
Sun, 06/14/2020 - 18:20
    @Override
    protected boolean canDropLoot() {
        return false;
    }

 

Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you tkroski, btw do…
Sun, 06/14/2020 - 22:20

Thank you tkroski, btw do you know the coding to add damage to an weapon according to global variable?

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Like, on player tick?
Sun, 06/14/2020 - 22:22

Like, on player tick?

Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yup
Sun, 06/14/2020 - 23:14

Yup

use the when mob is hit with…
Mon, 06/15/2020 - 00:45

use the when mob is hit with tool trigger, and deal extra damage using get global variable

Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Would work, but I'd like to…
Mon, 06/15/2020 - 01:24

Would work, but I'd like to have the damage shown in the item

Last seen on 17:22, 8. Jun 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
you can add strength potion…
Mon, 06/15/2020 - 07:14

you can add strength potion effect when holding the item

Last seen on 23:27, 4. Apr 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Again, that is very limited
Mon, 06/15/2020 - 21:05

Again, that is very limited

Last seen on 04:35, 17. Jan 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry for the waited…
Mon, 06/15/2020 - 21:14

Sorry for the waited response.

add damage to an weapon according to global variable?

For this, do what ShockingArtist said, should work fine.

@ShockingArtist

use the when mob is hit with tool trigger, and deal extra damage using get global variable

 

 

For this, just add to the list in the information method....

Would work, but I'd like to have the damage shown in the item

Something like this would work (in addInformation overrides from Item);

list.add(new StringTextComponent("Current Damage: " + WHATEVERGLOBALVARIABLE));

You can add more conditions and such, but that is the basis.