Mob right hand item drop

Started by msrodrigues2000 on

Topic category: Help with modding (Java Edition)

Last seen on 04:13, 19. Jun 2023
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob right hand item drop

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:
  • MCreator plugins:
  • Comments:
@Override protected…
Sun, 06/14/2020 - 18:20
    @Override
    protected boolean canDropLoot() {
        return false;
    }

 

Last seen on 04:13, 19. Jun 2023
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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:
  • MCreator plugins:
  • Comments:
Like, on player tick?
Sun, 06/14/2020 - 22:22

Like, on player tick?

Last seen on 17:16, 16. Mar 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 04:13, 19. Jun 2023
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 04:13, 19. Jun 2023
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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:
  • 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.