MFF

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

    Minecraft Frame Undecorated

    Planifier Épinglé Verrouillé Déplacé Résolu 1.7.x
    1.7.10
    60 Messages 6 Publieurs 10.0k 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.
    • P Hors-ligne
      PlagueZ
      dernière édition par

      le null ne fonctionne pas j’ai regarder sur le net je trouve rien 😕 je continue mes recherche

      Edit: Minecraft.getServer(); a la place du null ça fonctionne

      “Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire wo…

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

        Qu est ce qui ne fonctionne pas précisément ?
        J ai oublié de le dire mais essaie de cast le null sa changera peut être quelque chose

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

          le fait d’utilisé un null faisait planter le serveur j’ai remplacer par MinecraftServer.getserver() bon maintenant j’attaque le reste je reviens vers vous si j’ai un probleme 😃

          “Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire wo…

          1 réponse Dernière réponse Répondre Citer 0
          • DiabolicaTrixD Hors-ligne
            DiabolicaTrix Correcteurs Moddeurs confirmés
            dernière édition par

            Tu peux essayer de cast MinecraftServer à null, mais si ça fonctionne c’est parfait.

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

              je rencontre un probleme un peu bizard en rapport je pense avec mon hit handler

              :::

              –-- Minecraft Crash Report ----
              // Who set us up the TNT?

              Time: 22/09/15 09:39
              Description: Ticking entity

              java.lang.ClassCastException: virusz.mob.passive.EntityBoar cannot be cast to net.minecraft.entity.player.EntityPlayer
              at virusz.event.HitHandler.onHit(HitHandler.java:28)
              at cpw.mods.fml.common.eventhandler.ASMEventHandler_35_HitHandler_onHit_LivingHurtEvent.invoke(.dynamic)
              at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
              at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
              at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:300)
              at net.minecraft.entity.EntityLivingBase.damageEntity(EntityLivingBase.java:1261)
              at net.minecraft.entity.EntityLivingBase.attackEntityFrom(EntityLivingBase.java:870)
              at net.minecraft.entity.passive.EntityAnimal.attackEntityFrom(EntityAnimal.java:224)
              at net.minecraft.entity.monster.EntityMob.attackEntityAsMob(EntityMob.java:140)
              at net.minecraft.entity.ai.EntityAIAttackOnCollide.updateTask(EntityAIAttackOnCollide.java:167)
              at net.minecraft.entity.ai.EntityAITasks.onUpdateTasks(EntityAITasks.java:125)
              at net.minecraft.entity.EntityLiving.updateAITasks(EntityLiving.java:613)
              at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:1983)
              at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431)
              at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:39)
              at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816)
              at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250)
              at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47)
              at virusz.mob.zombie.EntityTermite.onUpdate(EntityTermite.java:113)
              at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298)
              at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684)
              at net.minecraft.world.World.updateEntity(World.java:2258)
              at net.minecraft.world.World.updateEntities(World.java:2108)
              at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)
              at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)
              at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:349)
              at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
              at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
              at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

              A detailed walkthrough of the error, its code path and all known details is as follows:

              – Head –
              Stacktrace:
              at virusz.event.HitHandler.onHit(HitHandler.java:28)
              at cpw.mods.fml.common.eventhandler.ASMEventHandler_35_HitHandler_onHit_LivingHurtEvent.invoke(.dynamic)
              at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
              at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
              at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:300)
              at net.minecraft.entity.EntityLivingBase.damageEntity(EntityLivingBase.java:1261)
              at net.minecraft.entity.EntityLivingBase.attackEntityFrom(EntityLivingBase.java:870)
              at net.minecraft.entity.passive.EntityAnimal.attackEntityFrom(EntityAnimal.java:224)
              at net.minecraft.entity.monster.EntityMob.attackEntityAsMob(EntityMob.java:140)
              at net.minecraft.entity.ai.EntityAIAttackOnCollide.updateTask(EntityAIAttackOnCollide.java:167)
              at net.minecraft.entity.ai.EntityAITasks.onUpdateTasks(EntityAITasks.java:125)
              at net.minecraft.entity.EntityLiving.updateAITasks(EntityLiving.java:613)
              at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:1983)
              at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431)
              at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:39)
              at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816)
              at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250)
              at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47)
              at virusz.mob.zombie.EntityTermite.onUpdate(EntityTermite.java:113)
              at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298)
              at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684)
              at net.minecraft.world.World.updateEntity(World.java:2258)

              – Entity being ticked –
              Details:
              Entity Type: EntityTermite (virusz.mob.zombie.EntityTermite)
              Entity ID: 219
              Entity Name: entity.EntityTermite.name
              Entity’s Exact location: -117,29, 66,75, 162,14
              Entity’s Block location: World: (-118,66,162), Chunk: (at 10,4,2 in -8,10; contains blocks -128,0,160 to -113,255,175), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
              Entity’s Momentum: -0,03, 0,25, -0,08
              Stacktrace:
              at net.minecraft.world.World.updateEntities(World.java:2108)
              at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)

              – Affected level –
              Details:
              Level name: world
              All players: 0 total; []
              Chunk stats: ServerChunkCache: 429 Drop: 0
              Level seed: 5605351470870339068
              Level generator: ID 00 - default, ver 1. Features enabled: true
              Level generator options:
              Level spawn location: World: (-28,64,236), Chunk: (at 4,4,12 in -2,14; contains blocks -32,0,224 to -17,255,239), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
              Level time: 25505 game time, 585 day time
              Level dimension: 0
              Level storage version: 0x04ABD - Anvil
              Level weather: Rain time: 48799 (now: false), thunder time: 85593 (now: false)
              Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
              Stacktrace:
              at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)
              at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:349)
              at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
              at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
              at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

              – System Details –
              Details:
              Minecraft Version: 1.7.10
              Operating System: Windows 7 (amd64) version 6.1
              Java Version: 1.8.0_45, Oracle Corporation
              Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
              Memory: 958588896 bytes (914 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
              JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
              AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
              IntCache: cache: 1, tcache: 0, allocated: 13, tallocated: 95
              FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 7 mods loaded, 7 mods active
              mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
              FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
              Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
              flansmod{@VERSION@} [Flan’s Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
              MapWriter{2.1.1} [MapWriter] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
              craftguide{@MOD_VERSION@} [CraftGuide] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
              VirusZ{beta-0.1} [VirusZ] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
              Profiler Position: N/A (disabled)
              Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
              Player Count: 0 / 20; []
              Is Modded: Definitely; Server brand changed to ‘fml,forge’
              Type: Dedicated Server (map_server.txt)

              :::

              :::

              
              package virusz.event;
              import virusz.core.ExtendedPlayer;
              import virusz.core.VirusZCore;
              import net.minecraft.entity.Entity;
              import net.minecraft.entity.EntityLiving;
              import net.minecraft.entity.IProjectile;
              import net.minecraft.entity.boss.EntityDragon;
              import net.minecraft.entity.boss.EntityWither;
              import net.minecraft.entity.monster.EntityMagmaCube;
              import net.minecraft.entity.monster.EntityMob;
              import net.minecraft.entity.monster.EntitySlime;
              import net.minecraft.entity.passive.EntityAnimal;
              import net.minecraft.entity.passive.EntityVillager;
              import net.minecraft.entity.passive.EntityWaterMob;
              import net.minecraft.entity.player.EntityPlayer;
              import net.minecraft.entity.player.EntityPlayerMP;
              import net.minecraftforge.event.entity.living.LivingHurtEvent;
              import cpw.mods.fml.common.eventhandler.SubscribeEvent;
              
              public class HitHandler
              {
              @SubscribeEvent
              public void onHit(LivingHurtEvent e)
              {
              if(e.entity instanceof EntityPlayer || e.source.getEntity() instanceof EntityMob){
              EntityPlayer player =(EntityPlayer)e.entity;
              ExtendedPlayer.get(player).consumeCombat(1);
              System.out.println("hit");
              System.out.println(ExtendedPlayer.get(player).getCurrentCombat());
              }
              if(e.entity instanceof EntityPlayer && e.source.getEntity() instanceof EntityPlayer){
              EntityPlayer player =(EntityPlayer)e.entity;
              ExtendedPlayer.get(player).consumeCombat(1);
              System.out.println("hitplayer");
              System.out.println(ExtendedPlayer.get(player).getCurrentCombat());
              }
              
              if(e.entity instanceof EntityPlayer)return;
              if(e.source.isProjectile())
              {
              Entity en = e.source.getSourceOfDamage();
              if (e.entity instanceof EntityLiving&&en instanceof IProjectile||VirusZCore.EntityBullet.isInstance(en))
              {
              
              if(e.entity.posY+e.entity.getEyeHeight()-0.4F <en.posy &&="" en.posy<e.entity.posy+e.entity.geteyeheight()+0.4f&&!isbadentity(e.entity))<br="">{
              System.out.println("DEBUG "+e.entity.toString());
              e.ammount=e.ammount*10;
              ((EntityLiving) e.entityLiving).setCustomNameTag("HEADSHOT!");
              ((EntityLiving) e.entityLiving).setAlwaysRenderNameTag(true);
              }
              
              }
              }
              }
              
              private boolean isBadEntity(Entity e)
              {
              if(e instanceof EntityVillager)return false;
              if(e instanceof EntityAnimal)return true;
              if(e instanceof EntityWaterMob)return true;
              if(e instanceof EntitySlime || e instanceof EntityMagmaCube)return true;
              if(e instanceof EntityDragon|| e instanceof EntityWither)return true;
              return false;
              }
              
              }
              
              

              :::</en.posy>

              “Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire wo…

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

                e.entity instanceof EntityLivingBase

                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

                  Le || n’est pas bon.

                  1 réponse Dernière réponse Répondre Citer 0
                  • DiabolicaTrixD Hors-ligne
                    DiabolicaTrix Correcteurs Moddeurs confirmés
                    dernière édition par

                    En fait ton if est un peu étrange, tu n’a pas vrai ent besoin de la source pour mettre le joueur en combat. De plus, ton if vérifie si celui qui prend les dommages est d’instance EntityPlayer OU que le source est d’imstance EntityMob. Je me sais pas si c’est ce que tu veux, mais ça me paraît un peu inutile

                    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

                      Oui, normalement il ne devrait pas avoir de ou (ni la condition qu’il y a après).

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

                        Pour ton problème d’Undecorated Frame: (je sais pas si tu as déjà la solution, j’ai lu les 5 pages de message en diagonale)

                        Première solution: dans le launcher (ou dans les variables de lancement)

                        -Dorg.lwjgl.opengl.Window.undecorated=true
                        

                        Seconde solution:
                        Note: J’utilise cette solution en patchant la classe Minecraft, (ça marche aussi en vanilla du coup)
                        Ce qu’il faut mettre dans le constructeur:

                        System.setProperty("org.lwjgl.opengl.Window.undecorated","true");
                        

                        Après libre à toi d’utiliser cette solution voir, de faire un système à la fullscreen on/off dans le menu des options graphiques 😉

                        Si je t'ai filé un coup de main n'oublie pas le + / -
                        Par contre évite les demandes d'aides en MP, tu sera sympa'

                        La JavaDoc c'est comme le PQ, ça sert à ce démerder tous seul. -Victor Hugo- 2017

                        Une superbe API pour animer vos super modèles CraftStudio dans Minecraft !

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

                          pour séparer les 2 type de dégât les dégât fait par un joueur et ceux par un zombie juste pour des raison simple je veut que le mode de combat contre les zombie est un time plus petit que celui du joueur en ayant 3 type de combat d’ou le fait que j’utilise un int et pas un boolean en gros 20=pas en combat 1en combat jcj 2=combat pve la c’était pas encore fait mais je viens de terminer le systeme

                          et je vérifie que l instance est un joueur sinon je me mange des cannot cast exception a l’entité qui attaque le joueur

                          pour le set Undecorated ce n’est plus nécessaire puisque je suis parvenu a détecter les rage quit mais je ban pas j’ai mis un logger comme ça si des joueur viennent se plaindre d’une déconnexion combat un tour dans les logs est je peut vérifier leur dire

                          est pour le || c’était un erreur en fait fallait mettre && voila mon probleme est résolut 😃 le systeme a l’air de plutôt bien fonctionner reste a mes bêta testeur de le mettre a l épreuve

                          Edit:Merci Amateis du tuyau ca va me servir pour un autre projet 😉

                          “Imagination is more important than knowledge. For knowledge is limited to all we now know and understand, while imagination embraces the entire wo…

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

                            Amateis, j en profite si tu t y connais bien en core modding, pourrais tu m expliquer comment ajouter quelque chose dans le constructeur de la classe Minecraft, stp ?

                            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

                              Pas de hors sujet Julot, merci. De plus il ne me semble pas que la classe Minecraft puisse être patché, il me semble qu’elle est initialisé avant les coremods.

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

                                Comment a-t-il fait alors ? o_O
                                Et sinon sa première méthode énoncée marche sous eclipse, ok. Mais en dehors, comment faire ? Si j ajoute cette ligne dans le build.gradle, le gradlew build le prendra en compte ou pas ?

                                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

                                  Oups j’ai rien dit x)
                                  Il faut ajouter la ligne dans les arguments du launcher.

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

                                  MINECRAFT FORGE FRANCE © 2024

                                  Powered by NodeBB