MFF

    Minecraft Forge France
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes
    • Forge Events
      • Automatique
      • Foncé
      • Clair
    • S'inscrire
    • Se connecter

    Savoir quelle entity regarde le joueur

    Planifier Épinglé Verrouillé Déplacé Sans suite
    28 Messages 4 Publieurs 6.5k Vues 1 Watching
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • ÜberfapÜ Hors-ligne
      Überfap
      dernière édition par

      Je fais la setup de Forge et je te dis 😄

      Si je t'ai aidé, n'hésites pas à mettre un point de réputation positif !
      Si tu m'as aidé, je n'hésiterais pas à t'en donner à mon tour !

      1 réponse Dernière réponse Répondre Citer 0
      • isadorI Hors-ligne
        isador Moddeurs confirmés Modérateurs
        dernière édition par

        merci 🙂

        1 réponse Dernière réponse Répondre Citer 0
        • ÜberfapÜ Hors-ligne
          Überfap
          dernière édition par

          Je n’ai vraiment pas le temps en ce moment, je finirais ça demain mais j’ai des pistes à te donner:

          • Le Vec3 du player
          • Le world.getEntitiesWithinBoundingBox()

          Essaie de trouver quelque chose avec ça et bonne nuit 🙂

          Si je t'ai aidé, n'hésites pas à mettre un point de réputation positif !
          Si tu m'as aidé, je n'hésiterais pas à t'en donner à mon tour !

          1 réponse Dernière réponse Répondre Citer 0
          • isadorI Hors-ligne
            isador Moddeurs confirmés Modérateurs
            dernière édition par

            merci je vais chercher

            1 réponse Dernière réponse Répondre Citer 0
            • ÜberfapÜ Hors-ligne
              Überfap
              dernière édition par

              Alors t’as trouvé ?

              Si je t'ai aidé, n'hésites pas à mettre un point de réputation positif !
              Si tu m'as aidé, je n'hésiterais pas à t'en donner à mon tour !

              1 réponse Dernière réponse Répondre Citer 0
              • isadorI Hors-ligne
                isador Moddeurs confirmés Modérateurs
                dernière édition par

                non car je vient de me reveiller et je me suis coucher après toi ^^

                1 réponse Dernière réponse Répondre Citer 0
                • GuguG Hors-ligne
                  Gugu
                  dernière édition par

                  https://github.com/Gugu42/RatchetAndClankMod/blob/master/java/com/gugu42/rcmod/items/ItemDevastator.java

                  Dans le onUpdate, y’a une fonction qui fait exactement ça;

                  "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                  ― Jordan B. Peterson

                  1 réponse Dernière réponse Répondre Citer 0
                  • isadorI Hors-ligne
                    isador Moddeurs confirmés Modérateurs
                    dernière édition par

                    merci je regarde ca
                    si je copie colle ca code:

                    
                    if (par5 && par3Entity instanceof EntityPlayer && !par2World.isRemote) {
                    if (par3Entity.getEntityData().getBoolean("devastatorFired")) {
                    EntityPlayer player = (EntityPlayer) par3Entity;
                    Entity target = null;
                    List entityTagetList = par2World.getEntitiesWithinAABB(
                    Entity.class,
                    player.boundingBox.expand(32.0D, 32.0D, 32.0D));
                    for (int i = 0; i < entityTagetList.size(); i++) {
                    Entity entityTarget = (Entity) entityTagetList.get(i);
                    if (entityTarget != player
                    && entityTarget instanceof EntityLivingBase) {
                    EntityLivingBase entityLivingTarget = (EntityLivingBase) entityTarget;
                    Vec3 vec3 = player.getLook(1.0F).normalize();
                    Vec3 vec31 = entityLivingTarget.worldObj
                    .getWorldVec3Pool()
                    .getVecFromPool(
                    entityLivingTarget.posX - player.posX,
                    entityLivingTarget.boundingBox.minY
                    + (double) (entityLivingTarget.height / 2.0F)
                    - (player.posY + (double) player
                    .getEyeHeight()),
                    entityLivingTarget.posZ - player.posZ);
                    double d0 = vec31.lengthVector();
                    vec31 = vec31.normalize();
                    double d1 = vec3.dotProduct(vec31);
                    if (d1 > 1.0D - 0.025D / d0
                    && player.canEntityBeSeen(entityLivingTarget)) {
                    target = entityLivingTarget;
                    } else {
                    target = null;
                    }
                    
                    }
                    }
                    
                    

                    je peut faire après un

                    
                    if(target == entityTarget)
                    {
                    //mon code
                    }
                    
                    

                    ?

                    1 réponse Dernière réponse Répondre Citer 0
                    • GuguG Hors-ligne
                      Gugu
                      dernière édition par

                      Bah, target = l’entité visée.
                      Après, tu en fais ce que tu veux.

                      "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                      ― Jordan B. Peterson

                      1 réponse Dernière réponse Répondre Citer 0
                      • isadorI Hors-ligne
                        isador Moddeurs confirmés Modérateurs
                        dernière édition par

                        dans tout les cas target sera egal a entityLivingTarget non?

                        1 réponse Dernière réponse Répondre Citer 0
                        • GuguG Hors-ligne
                          Gugu
                          dernière édition par

                          Oui

                          "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                          ― Jordan B. Peterson

                          1 réponse Dernière réponse Répondre Citer 0
                          • robin4002R Hors-ligne
                            robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                            dernière édition par

                            J’aime bien ton message + ta signature.
                            ça fait
                            Oui ! Non !
                            On peut limite compléter avec : en fait je ne sais pas. xD

                            (Ceci était un message inutile de robin4002)

                            1 réponse Dernière réponse Répondre Citer 0
                            • isadorI Hors-ligne
                              isador Moddeurs confirmés Modérateurs
                              dernière édition par

                              merci de ta participation robin

                              du coup gugu avec ton code on peut récup l’entité visé?

                              1 réponse Dernière réponse Répondre Citer 0
                              • isadorI Hors-ligne
                                isador Moddeurs confirmés Modérateurs
                                dernière édition par

                                Petit up car je comprend pas trop le code de gugu

                                1 réponse Dernière réponse Répondre Citer 0
                                • GuguG Hors-ligne
                                  Gugu
                                  dernière édition par

                                  Oui, l’entité Target est la cible.

                                  "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                                  ― Jordan B. Peterson

                                  1 réponse Dernière réponse Répondre Citer 0
                                  • isadorI Hors-ligne
                                    isador Moddeurs confirmés Modérateurs
                                    dernière édition par

                                    Donc en fait si je veux écrire un nbt dans l’entity visé faudrat utiliser la variable Target ?

                                    EDIT:
                                    problème: target renvoi toujours null

                                    
                                    if(kb.keyCode == questKey.keyCode && mc.currentScreen == null && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == CoeQuestMain.quest)// ADMIN
                                    {
                                    FMLNetworkHandler.openGui(player, CoeQuestMain.instance, 2, player.worldObj, (int)Math.floor(player.posX), (int)Math.floor(player.posY), (int)Math.floor(player.posZ));
                                    if(par5 && par3Entity instanceof EntityPlayer && !par2World.isRemote)
                                    {
                                    player = (EntityPlayer)par3Entity;
                                    Entity target = null;
                                    List entityTagetList = par2World.getEntitiesWithinAABB(Entity.class, player.boundingBox.expand(32.0D, 32.0D, 32.0D));
                                    for(int i = 0; i < entityTagetList.size(); i++)
                                    {
                                    Entity entityTarget = (Entity)entityTagetList.get(i);
                                    if(entityTarget != player && entityTarget instanceof EntityLivingBase)
                                    {
                                    EntityLivingBase entityLivingTarget = (EntityLivingBase)entityTarget;
                                    Vec3 vec3 = player.getLook(1.0F).normalize();
                                    Vec3 vec31 = entityLivingTarget.worldObj.getWorldVec3Pool().getVecFromPool(entityLivingTarget.posX - player.posX, entityLivingTarget.boundingBox.minY + (double)(entityLivingTarget.height / 2.0F) - (player.posY + (double)player.getEyeHeight()), entityLivingTarget.posZ - player.posZ);
                                    double d0 = vec31.lengthVector();
                                    vec31 = vec31.normalize();
                                    double d1 = vec3.dotProduct(vec31);
                                    if(d1 > 1.0D - 0.025D / d0 && player.canEntityBeSeen(entityLivingTarget))
                                    {
                                    target = entityLivingTarget;
                                    }
                                    else
                                    {
                                    target = null;
                                    }
                                    
                                    }
                                    }
                                    }
                                    }
                                    
                                    else if(kb.keyCode == questKey.keyCode && mc.currentScreen == null)
                                    {
                                    FMLNetworkHandler.openGui(player, CoeQuestMain.instance, 1, player.worldObj, (int)Math.floor(player.posX), (int)Math.floor(player.posY), (int)Math.floor(player.posZ));
                                    }
                                    System.out.println("target: " + entityTarget);
                                    System.out.println(mouseOver);
                                    }
                                    
                                    
                                    1 réponse Dernière réponse Répondre Citer 0
                                    • isadorI Hors-ligne
                                      isador Moddeurs confirmés Modérateurs
                                      dernière édition par

                                      bon pour le problème de null c’était moi, tromper de condition
                                      maintenant ca crash au niveau du .getEntitiesWithinAABB de

                                      
                                      List entityTagetList = par2World.getEntitiesWithinAABB(CoeMob.Mob.MobtestEntity.class, player.boundingBox.expand(32.0D, 32.0D, 32.0D));
                                      
                                      

                                      le crash report:
                                      :::

                                      
                                      –-- Minecraft Crash Report ----
                                      // Why is it breaking :(
                                      
                                      Time: 30/06/14 13:15
                                      Description: Unexpected error
                                      
                                      java.lang.NullPointerException
                                      at CoeQuest.KeyBindQuest.keyUp(KeyBindQuest.java:84)
                                      at cpw.mods.fml.client.registry.KeyBindingRegistry$KeyHandler.keyTick(KeyBindingRegistry.java:129)
                                      at cpw.mods.fml.client.registry.KeyBindingRegistry$KeyHandler.tickStart(KeyBindingRegistry.java:102)
                                      at cpw.mods.fml.common.SingleIntervalHandler.tickStart(SingleIntervalHandler.java:28)
                                      at cpw.mods.fml.common.FMLCommonHandler.tickStart(FMLCommonHandler.java:122)
                                      at cpw.mods.fml.common.FMLCommonHandler.onRenderTickStart(FMLCommonHandler.java:372)
                                      at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:944)
                                      at net.minecraft.client.Minecraft.run(Minecraft.java:838)
                                      at net.minecraft.client.main.Main.main(Main.java:93)
                                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                      at java.lang.reflect.Method.invoke(Unknown Source)
                                      at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
                                      at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
                                      
                                      A detailed walkthrough of the error, its code path and all known details is as follows:
                                      ---------------------------------------------------------------------------------------
                                      
                                      -- Head --
                                      Stacktrace:
                                      at CoeQuest.KeyBindQuest.keyUp(KeyBindQuest.java:84)
                                      at cpw.mods.fml.client.registry.KeyBindingRegistry$KeyHandler.keyTick(KeyBindingRegistry.java:129)
                                      at cpw.mods.fml.client.registry.KeyBindingRegistry$KeyHandler.tickStart(KeyBindingRegistry.java:102)
                                      at cpw.mods.fml.common.SingleIntervalHandler.tickStart(SingleIntervalHandler.java:28)
                                      at cpw.mods.fml.common.FMLCommonHandler.tickStart(FMLCommonHandler.java:122)
                                      
                                      -- Affected level --
                                      Details:
                                      Level name: MpServer
                                      All players: 1 total; [EntityClientPlayerMP['isador34'/4, l='MpServer', x=1143,30, y=5,62, z=223,68]]
                                      Chunk stats: MultiplayerChunkCache: 275
                                      Level seed: 0
                                      Level generator: ID 01 - flat, ver 0\. Features enabled: false
                                      Level generator options:
                                      Level spawn location: World: (1121,4,239), Chunk: (at 1,0,15 in 70,14; contains blocks 1120,0,224 to 1135,255,239), Region: (2,0; contains chunks 64,0 to 95,31, blocks 1024,0,0 to 1535,255,511)
                                      Level time: 375011 game time, 107102 day time
                                      Level dimension: 0
                                      Level storage version: 0x00000 - Unknown?
                                      Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
                                      Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
                                      Forced entities: 5 total; [MobtestEntity['entity.Testmob.name'/0, l='MpServer', x=1141,31, y=4,00, z=223,69], EntityClientPlayerMP['isador34'/4, l='MpServer', x=1143,30, y=5,62, z=223,68], MobtestEntity['entity.Testmob.name'/1, l='MpServer', x=1151,31, y=4,00, z=226,69], MobtestEntity['entity.Testmob.name'/2, l='MpServer', x=1151,69, y=4,00, z=226,69], MobtestEntity['entity.Testmob.name'/3, l='MpServer', x=1151,69, y=4,00, z=226,69]]
                                      Retry entities: 0 total; []
                                      Server brand: fml,forge
                                      Server type: Integrated singleplayer server
                                      Stacktrace:
                                      at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
                                      at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2312)
                                      at net.minecraft.client.Minecraft.run(Minecraft.java:863)
                                      at net.minecraft.client.main.Main.main(Main.java:93)
                                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                      at java.lang.reflect.Method.invoke(Unknown Source)
                                      at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
                                      at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
                                      
                                      – System Details --
                                      Details:
                                      Minecraft Version: 1.6.4
                                      Operating System: Windows 8 (amd64) version 6.2
                                      Java Version: 1.7.0_45, Oracle Corporation
                                      Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                                      Memory: 661595768 bytes (630 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
                                      JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
                                      AABB Pool Size: 19636 (1099616 bytes; 1 MB) allocated, 1 (56 bytes; 0 MB) used
                                      Suspicious classes: FML and Forge are installed
                                      IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                                      FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 15 mods loaded, 15 mods active
                                      mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coebiome{1.0.0} [CoeBiome] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coeblock{1.0.0} [Coe Block] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coebordure{1.0.0} [Coe Bordure] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coecore{1.0.0} [CoeCore] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coelevel{1.0.0} [CoeLevel] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coemob{1.0.0} [Coemob] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coequest{1.0.0} [CoeQuest] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coespell{1.0.0} [CoeSpell] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      coeweapon{1.0.0} [CoeWeapon] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      crusadegui{2.0.0} [COE gui] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      mineralherb{1.0.1} [Mineralherb] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      PM{V.1.0.0} [Portal WoW] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                                      Launched Version: 1.6
                                      LWJGL: 2.9.0
                                      OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
                                      Is Modded: Definitely; Client brand changed to 'fml,forge'
                                      Type: Client (map_client.txt)
                                      Resource Pack: Default
                                      Current Language: English (US)
                                      Profiler Position: N/A (disabled)
                                      Vec3 Pool Size: 292 (16352 bytes; 0 MB) allocated, 14 (784 bytes; 0 MB) used
                                      
                                      

                                      :::
                                      le code:

                                      
                                      package CoeQuest;
                                      
                                      import java.util.EnumSet;
                                      import java.util.List;
                                      
                                      import net.minecraft.client.Minecraft;
                                      import net.minecraft.client.settings.KeyBinding;
                                      import net.minecraft.entity.Entity;
                                      import net.minecraft.entity.EntityLivingBase;
                                      import net.minecraft.entity.player.EntityPlayer;
                                      import net.minecraft.util.MovingObjectPosition;
                                      import net.minecraft.util.Vec3;
                                      import net.minecraft.world.World;
                                      
                                      import org.lwjgl.input.Keyboard;
                                      
                                      import cpw.mods.fml.client.FMLClientHandler;
                                      import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
                                      import cpw.mods.fml.common.TickType;
                                      import cpw.mods.fml.common.network.FMLNetworkHandler;
                                      
                                      public class KeyBindQuest extends KeyHandler
                                      {
                                      public static KeyBinding questKey = new KeyBinding("key.button.interactKey", Keyboard.KEY_I);
                                      private EntityLivingBase entityTarget;
                                      private World par2World;
                                      private String team;
                                      
                                      private String Newligne=System.getProperty("line.separator");
                                      
                                      public KeyBindQuest()
                                      {
                                      
                                      super(new KeyBinding[] {questKey}, new boolean[] {false});
                                      }
                                      
                                      @Override
                                      public String getLabel()
                                      {
                                      return "Intéragir";
                                      }
                                      
                                      @Override
                                      public void keyDown(EnumSet <ticktype>types, KeyBinding kb, boolean tickEnd, boolean isRepeat)
                                      {}
                                      
                                      @Override
                                      public void keyUp(EnumSet <ticktype>types, KeyBinding kb, boolean tickEnd)
                                      {
                                      
                                      EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
                                      Minecraft mc = Minecraft.getMinecraft();
                                      
                                      MovingObjectPosition mouseOver = player.rayTrace(100D, 1F);
                                      /*
                                      * if(mouseOver != null && mouseOver.typeOfHit ==
                                      * EnumMovingObjectType.ENTITY) { if(mouseOver.entityHit instanceof
                                      * MobtestEntity) { System.out.println(mouseOver.typeOfHit.name());
                                      * if(kb.keyCode == questKey.keyCode && mc.currentScreen == null &&
                                      * player.getCurrentEquippedItem() != null &&
                                      * player.getCurrentEquippedItem().getItem() == CoeQuestMain.quest)//
                                      * ADMIN { FMLNetworkHandler.openGui(player, CoeQuestMain.instance, 2,
                                      * player.worldObj, (int)Math.floor(player.posX),
                                      * (int)Math.floor(player.posY), (int)Math.floor(player.posZ)); }
                                      *
                                      * else if(kb.keyCode == questKey.keyCode && mc.currentScreen == null) {
                                      * FMLNetworkHandler.openGui(player, CoeQuestMain.instance, 1,
                                      * player.worldObj, (int)Math.floor(player.posX),
                                      * (int)Math.floor(player.posY), (int)Math.floor(player.posZ)); } } }
                                      */
                                      if(kb.keyCode == questKey.keyCode && mc.currentScreen == null )
                                      //&& player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == CoeQuestMain.quest)//ADMIN
                                      System.out.println("test 0");
                                      {
                                      FMLNetworkHandler.openGui(player, CoeQuestMain.instance, 2, player.worldObj, (int)Math.floor(player.posX), (int)Math.floor(player.posY), (int)Math.floor(player.posZ));
                                      if(player instanceof EntityPlayer)
                                      {
                                      System.out.println("test 1");
                                      player = (EntityPlayer)player;
                                      Entity target = null;
                                      List entityTagetList =
                                      par2World
                                      .getEntitiesWithinAABB
                                      (CoeMob.Mob.MobtestEntity.class
                                      , player.boundingBox.expand(32.0D, 32.0D, 32.0D));
                                      for(int i = 0; i < entityTagetList.size(); i++)
                                      {
                                      System.out.println("test 2");
                                      Entity entityTarget = (Entity)entityTagetList.get(i);
                                      if(entityTarget != player && entityTarget instanceof EntityLivingBase)
                                      {
                                      EntityLivingBase entityLivingTarget = (EntityLivingBase)entityTarget;
                                      Vec3 vec3 = player.getLook(1.0F).normalize();
                                      Vec3 vec31 = entityLivingTarget.worldObj.getWorldVec3Pool().getVecFromPool(entityLivingTarget.posX - player.posX, entityLivingTarget.boundingBox.minY + (double)(entityLivingTarget.height / 2.0F) - (player.posY + (double)player.getEyeHeight()), entityLivingTarget.posZ - player.posZ);
                                      double d0 = vec31.lengthVector();
                                      vec31 = vec31.normalize();
                                      double d1 = vec3.dotProduct(vec31);
                                      if(d1 > 1.0D - 0.025D / d0 && player.canEntityBeSeen(entityLivingTarget))
                                      {
                                      System.out.println("test 3");
                                      target = entityLivingTarget;
                                      }
                                      else
                                      {
                                      System.out.println("test 4");
                                      target = null;
                                      }
                                      
                                      }
                                      }
                                      }
                                      }
                                      
                                      /*else if(kb.keyCode == questKey.keyCode && mc.currentScreen == null)
                                      {
                                      FMLNetworkHandler.openGui(player, CoeQuestMain.instance, 1, player.worldObj, (int)Math.floor(player.posX), (int)Math.floor(player.posY), (int)Math.floor(player.posZ));
                                      }*/
                                      team = Minecraft.getMinecraft().thePlayer.getTeam().toString();
                                      System.out.println("team: "+team+Newligne);
                                      System.out.println("target: " + entityTarget+Newligne);
                                      System.out.println("MouseOver"+mouseOver);
                                      }
                                      
                                      @Override
                                      public EnumSet <ticktype>ticks()
                                      {
                                      return EnumSet.allOf(TickType.class);
                                      }
                                      }
                                      
                                      ```</ticktype></ticktype></ticktype>
                                      1 réponse Dernière réponse Répondre Citer 0
                                      • GuguG Hors-ligne
                                        Gugu
                                        dernière édition par

                                        Fais un check que la méthode ne return pas null

                                        "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                                        ― Jordan B. Peterson

                                        1 réponse Dernière réponse Répondre Citer 0
                                        • isadorI Hors-ligne
                                          isador Moddeurs confirmés Modérateurs
                                          dernière édition par

                                          comment ca?

                                          1 réponse Dernière réponse Répondre Citer 0
                                          • GuguG Hors-ligne
                                            Gugu
                                            dernière édition par

                                            if(par2World.getEntitiesWithinAABB(CoeMob.Mob.MobtestEntity.class, player.boundingBox.expand(32.0D, 32.0D, 32.0D)) != null)

                                            "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                                            ― Jordan B. Peterson

                                            1 réponse Dernière réponse Répondre Citer 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • Premier message
                                              Dernier message
                                            Design by Woryk
                                            ContactMentions Légales

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB