Dusting animation for mobs when procedure is set off?

Started by BlaBlaSillySheep on

Topic category: Help with modding (Java Edition)

Last seen on 12:27, 8. May 2023
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dusting animation for mobs when procedure is set off?

This may actually be impossible to do with mcreator but if it isnt then can someone help on how to make an animal get "Snapped" or "Dusted" like from infinity war or Endgame? If you could this would be verryyy helpfull :) 

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sure you could and I think…
Sun, 05/31/2020 - 20:54

Sure you could and I think it is possible with MCreator as well because I don't have access to MCreator right now. Here is a snippet I came up with;

    public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn)
    {
        ItemStack itemstack = playerIn.getHeldItem(handIn);
        List<LivingEntity> entities = playerIn.world.getEntitiesWithinAABB(LivingEntity.class, playerIn.getBoundingBox().grow(10));
        Iterator iterator = entities.iterator();
        while (iterator.hasNext())
        {
            LivingEntity entity = (LivingEntity) iterator.next();
            if (!(entity instanceof PlayerEntity)) {
                playerIn.world.addParticle(ParticleTypes.SMOKE, entity.getPosX(), entity.getPosY(), entity.getPosZ(), 0.5, 0.1, 0.0);
                entity.remove();
            }
        }
        return ActionResult.resultSuccess(itemstack);
    }

Keep in mind this snippet is for an item. But the principle is still there if you need help tell me what element you are using the code for. This code removes any entity that is not a player and creates a smoke particle.

ALSO FOR "grow(10));" THE 10 IS HOW BIG THE BOX IS SO CUSTOMIZE THAT TO YOUR LIKING

 

Keep in mind the snippet above is probably possible to recreate in MCreator.

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tbroski is the MVP of this…
Tue, 06/02/2020 - 15:47

Tbroski is the MVP of this website.

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tbroski is the MVP of this…
Tue, 06/02/2020 - 15:50

Tbroski is the MVP of this website.

You are too kind! I really appreciate that actually! Thanks this is why I came to this forum 🤗🤗🤗