serveur minecraft multi

  • Auteur de la discussion Auteur de la discussion roro76
  • Date de début Date de début

roro76

Bucheron
2 Juillet 2020
12
1
13
25
Bonjour je ne sais pas si il fallait que je pose la question ici mais bon pas grave.
J ai ouvert un server minecraft mais j aimerais que les mobs qui spawn des spawner n est pas d IA et donc nous attaquent pas.
Je ne sais pas si c est possible mais voila.
 
Excuse moi de ma réponse tardive
Tu peux utiliser un plugin, en utilisant ceci:

@EventHandler public void onMobSpawn(CreatureSpawnEvent event) { noAI(event.getEntity()); } public void noAI(Entity bukkitEntity) { net.minecraft.server.v1_8_R1.Entity nmsEntity = ((CraftEntity) bukkitEntity).getHandle(); NBTTagCompound tag = nmsEntity.getNBTTag(); if (tag == null) { tag = new NBTTagCompound(); } nmsEntity.c(tag); tag.setInt("NoAI", 1); nmsEntity.f(tag); }

Je ne l’ai pas teste, mais ça devrait marcher
(N’oublie pas d’implémenter Listener)
 
Excuse moi de ma réponse tardive
Tu peux utiliser un plugin, en utilisant ceci:

@EventHandler public void onMobSpawn(CreatureSpawnEvent event) { noAI(event.getEntity()); } public void noAI(Entity bukkitEntity) { net.minecraft.server.v1_8_R1.Entity nmsEntity = ((CraftEntity) bukkitEntity).getHandle(); NBTTagCompound tag = nmsEntity.getNBTTag(); if (tag == null) { tag = new NBTTagCompound(); } nmsEntity.c(tag); tag.setInt("NoAI", 1); nmsEntity.f(tag); }

Je ne l’ai pas teste, mais ça devrait marcher
(N’oublie pas d’implémenter Listener)
merci tu gère