Jump to content
  • 0

pomoc Zmraziť Moba na spawnutie


Invouk

Dotaz

Ahojte,


Chcem sa spýtať ako by sa dalo spraviť freez mobov na spawnutie neviem si s tým rady mám akurát spawn moba:
 

if(e.getCurrentItem().getItemMeta().getDisplayName().contains("§rOpen Chest"))
   {
    e.setCancelled(true);
    World w = Bukkit.getServer().getWorld("lobby2");
    Location loc = new Location(w, -735, 93, 479);
    e.getWhoClicked().getWorld().spawnEntity(loc, EntityType.ELDER_GUARDIAN);


    e.getWhoClicked().closeInventory();
   }

ale po spawnutí sa začne hýbať všade kade icon_e_biggrin.gif
Pozeral som, že mám moba ( entitu ) nejako attachnuť na nejaký predmet ako pr. arrow alebo niečo.

ešte som to skúšal cez toto:

	public static void spawnElder(Player p) {
		WitherSkull skull = (WitherSkull) p.getWorld().spawn(p.getLocation(), WitherSkull.class);
		skull.setDirection(new Vector(0, 0, 0));
		skull.setVelocity(new Vector(0, 0, 0));
		Witch witch = (Witch) p.getWorld().spawnEntity(p.getLocation(), EntityType.WITCH);
		witch.setCustomName("§6Ultra Witch");
		witch.setCustomNameVisible(true);
		skull.setPassenger(witch);
		}

Predom Ďakujem za všetký odpovede.

Edited by XpresS
Link to comment
Share on other sites

0 odpovědí na tuto otázku

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...