How to summon a mini wither

Discussion in 'Spigot Plugin Development' started by TanD, Jun 13, 2018 at 7:21 PM.

  1. Here I'm trying to summon at least a normal wither:
    Code (Java):
    EntityWither ew = new EntityWither(((CraftWorld)player.getWorld()).getHandle());
    Location loc = player.getLocation();
    ew.setLocation(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
    But it doesn't.
     
  2. You'll need to add it to the world. I don't remember the exact method name, but it's something like nmsWorld.addEntity.
     
    • Agree Agree x 1
  3. Now it spawns correctly but in normal size. How do I minimize it?
     
  4. Simply you cannot resize the wither. It s not supported by Minecraft Java Edition.
     
  5. It's possible. I saw it on Hypixel's MiniWalls.
     
  6. You can use a custom resource pack that contains a model for a small wither.
     
  7. iirc, you need to set the age to a low number.

    EDIT: Not age sorry, invulnerability. Lower the number is smaller the size. Make sure to call the wither Dinnerbone or Grumm depending on the size, since if the entity is too small it'll flip upside down (naming the wither one of the previous names will fix the issue) - https://hypixel.net/threads/mini-wither-how-did-you-do-that-for-devs.827242/
     
    • Winner Winner x 2
  8. It's getting bigger a bigger and then it resets to its normal size. How do I fix that?
     
  9. try a negative number for invulnerability
     
  10. It spawns with a normal size.
     
  11. Maybe it grows back if you don't update the value yourself? Try constantly setting it to what you want.
     
  12. That's exactly what I did. It's a little twitching, but it's not important.
     
  13. And the last question: How do I make wither that attacks only certain players?
     
  14. Can't you just use setTarget?
     
  15. This method doesn't exists.
     
  16. So you want it to only target certain players right?

    Make sure to check that the Entity that is targeting another Entity is your Wither first.
    When the Wither targets an Entity the EntityTargetEvent will be called so if the target is not null and is not one of your players that you want the wither to attack cancel the event but if it is one of the players you want it to attack don't cancel the event?
     

Share This Page