Monture apprivoisable par 1 personne
-
@‘Superloup10’:
La fonction func_152115_b : ```java
public void func_152115_b(String p_152115_1_)
{
this.dataWatcher.updateObject(17, p_152115_1_);
}Et elle est utilisée dans la fonction interact de l'ocelot et du loup.Tu la pris dans [size=x-smallEntityTameable ?]
-
Oui
-
Si j’ai bien compris sa doit ressembler a sa
@SideOnly(Side.CLIENT) public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { if(!world.isRemote) { EntityDragonDindeSauvage entity = new EntityDragonDindeSauvage(world); entity.setTamed(true); entity.func_152115_b(player.getUniqueID().toString()); entity.setPosition(x, y + 1, z); world.spawnEntityInWorld(entity); } return true; }et dans ma class entity j’ajoute sa
public void func_152115_b(String string) { this.dataWatcher.updateObject(17, string); } -
Tu n’as pas besoin d’ajouter func_152115_b dans la class de ton entité.
-
@‘Superloup10’:
Tu n’as pas besoin d’ajouter func_152115_b dans la class de ton entité.
Le probleme c’est que comme sa le mobs spawn plus
-
C’est sûrement objet qui synchroniser l’uuid de l’owner alors.
Comme tu as le setTamed sur true ça expliquerai pourquoi elle ne spawn pas sans cette fonction.Ton code actuelle ne fonctionne toujours pas ?
-
Et avec la fonction dans la class, il se passe quoi?
-
@‘Superloup10’:
Et avec la fonction dans la class, il se passe quoi?
Pareil spawn pas j’ai essayé les 2
-
C’est bizarre.
-
@‘Superloup10’:
C’est bizarre.
Je comprend rien moi car c’est juste 1 ligne en plus qui fait tous planter
-
Tu peux m’envoyer un zip de ton dossier src ?
-
@‘robin4002’:
Tu peux m’envoyer un zip de ton dossier src ?
-
package fr.darkvince.facrpg; import fr.darkvince.facrpg.monture.EntityDragonDindeSauvage; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class oeufDragonDinde extends Item { public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { if(!world.isRemote) { EntityDragonDindeSauvage entity = new EntityDragonDindeSauvage(world); entity.setTamed(true); entity.setPosition(x, y + 1, z); entity.func_152115_b(player.getUniqueID().toString()); world.spawnEntityInWorld(entity); } return true; } }Avec entity.func_152115_b(player.getUniqueID().toString()); au bon endroit et pas de @SideOnly(Side.CLIENT) au dessus de la fonction ça fonctionne mieux
-
Je vais tester en multi mais je croie que j’avais deja test comme sa sa n’avais pas marcher
-
Chez moi ça fonctionne. Testé sur un serveur local.
-
@‘robin4002’:
Chez moi ça fonctionne. Testé sur un serveur local.
[font=Ubuntu, sans-serifEffectivement sa spawn bien je c’est pas comment j’ai fait pour pas que sa marche moi, parcontre j’ai personne pour test si tous marche bien je mettrai demain si c’est resolu]
[font=Ubuntu, sans-serifps: Robin comme tu a mais src tu peut regarder pourquoi mais commande marche pas coter serveur avec mon gui]
-
Les commandes sont exécutés, le problème c’est qu’elles n’existent pas :
[00:18:58] [Server thread/INFO] [STDOUT]: [fr.darkvince.facrpg.PaquetCommand$Handler:onMessage:44]: manuadd robin4002 Neogicien
[00:18:58] [Server thread/INFO]: Unknown command. Try /help for a list of commands
La commande de tp fonctionne. -
@‘robin4002’:
Les commandes sont exécutés, le problème c’est qu’elles n’existent pas :
[00:18:58] [Server thread/INFO] [STDOUT]: [fr.darkvince.facrpg.PaquetCommand$Handler:onMessage:44]: manuadd robin4002 Neogicien
[00:18:58] [Server thread/INFO]: Unknown command. Try /help for a list of commands
La commande de tp fonctionne.Tu a essayé quelle version car moi sa marche pas en 1.7.2
-
Mon setup est en 1.7.10.
-
@‘robin4002’:
Mon setup est en 1.7.10.
Sa doit venir de la
