MFF

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

    Temps de recharge dans un onRightClickEvent

    Planifier Épinglé Verrouillé Déplacé Résolu 1.9.x et 1.10.x
    1.10.x
    49 Messages 5 Publieurs 6.8k 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.
    • robin4002R Hors-ligne
      robin4002 Moddeurs confirmés Rédacteurs Administrateurs
      dernière édition par

      print la valeur de stack.stackTagCompound.getInteger(“timer”)
      Et actuellement ton tag n’est plus jamais créé s’il n’existe pas.

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

        Non bizarre rien

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

          Ah j’ai pas fait attention mais remplace le 2*20 par le nombre de ticks que tu souhaitais, et normal que tu ne vois pas le feu sur les pigmans, ils sont immunisés –’
          Print (comme l’a si bien dit robin), la valeur timer enregistrée dans les tags

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

            Ah c’est bon!

            Par contre crash !

            
            [18:34:58] [main/INFO] [GradleStart]: username: floriangabet
            [18:34:58] [main/INFO] [GradleStart]: Extra: []
            [18:34:58] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --username, floriangabet, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
            [18:34:58] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
            [18:34:58] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading
            [18:34:58] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_45, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jdk1.8.0_45\jre
            [18:34:58] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
            [18:34:58] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
            [18:34:58] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
            [18:34:58] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
            [18:34:58] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
            [18:34:58] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
            [18:34:58] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
            [18:34:59] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
            [18:34:59] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
            [18:34:59] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
            [18:34:59] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
            [18:34:59] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
            [18:34:59] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
            [18:34:59] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
            [18:34:59] [main/INFO]: Setting user: floriangabet
            [18:35:00] [Client thread/INFO]: LWJGL Version: 2.9.1
            [18:35:00] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
            [18:35:00] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized
            [18:35:00] [Client thread/INFO] [FML]: Replaced 183 ore recipies
            [18:35:00] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
            [18:35:00] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\mods for mods
            [18:35:00] [Client thread/INFO] [lc]: Mod lc is missing the required element 'name'. Substituting lc
            [18:35:02] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
            [18:35:02] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at CLIENT
            [18:35:02] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at SERVER
            [18:35:02] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip
            [18:35:02] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
            [18:35:02] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
            [18:35:02] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
            [18:35:02] [Client thread/INFO] [FML]: Applying holder lookups
            [18:35:02] [Client thread/INFO] [FML]: Holder lookups applied
            [18:35:02] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
            [18:35:02] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
            [18:35:02] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
            [18:35:02] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
            [18:35:02] [Thread-5/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
            [18:35:03] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
            [18:35:03] [Sound Library Loader/INFO]: Sound engine started
            [18:35:05] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas
            [18:35:05] [Client thread/INFO]: Created: 256x256 textures/items-atlas
            [18:35:05] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
            [18:35:05] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip
            [18:35:07] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas
            [18:35:07] [Client thread/INFO]: Created: 256x256 textures/items-atlas
            [18:35:07] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
            [18:35:07] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down…
            [18:35:08] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
            [18:35:08] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
            [18:35:08] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
            [18:35:08] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
            [18:35:08] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
            [18:35:08] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
            [18:35:08] [Thread-7/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
            [18:35:08] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
            [18:35:08] [Sound Library Loader/INFO]: Sound engine started
            [18:35:10] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
            [18:35:10] [Server thread/INFO]: Generating keypair
            [18:35:10] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
            [18:35:10] [Server thread/INFO] [FML]: Injecting new block and item data into this server instance.
            [18:35:10] [Server thread/INFO] [FML]: Injected new block/item lc:test: 4098 (init) -> 4098 (map).
            [18:35:10] [Server thread/INFO] [FML]: Applying holder lookups
            [18:35:10] [Server thread/INFO] [FML]: Holder lookups applied
            [18:35:11] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@115f9ec)
            [18:35:11] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@115f9ec)
            [18:35:11] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@115f9ec)
            [18:35:11] [Server thread/INFO]: Preparing start region for level 0
            [18:35:11] [Server thread/INFO]: Changing view distance to 8, from 10
            [18:35:12] [Netty Client IO #0/INFO] [FML]: Server protocol version 1
            [18:35:12] [Netty IO #1/INFO] [FML]: Client protocol version 1
            [18:35:12] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.85.1291,lc@1.0,Forge@10.13.2.1291,mcp@9.05
            [18:35:12] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT
            [18:35:12] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER
            [18:35:12] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established
            [18:35:12] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
            [18:35:12] [Server thread/INFO]: floriangabet[local:E:cfdfeea9] logged in with entity id 353 at (-136.6903569380041, 76.0, 272.62722809298504)
            [18:35:12] [Server thread/INFO]: floriangabet joined the game
            [18:35:27] [Server thread/ERROR]: Encountered an unexpected exception
            net.minecraft.util.ReportedException: Ticking memory connection
            at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?]
            at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[MinecraftServer.class:?]
            at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?]
            at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[IntegratedServer.class:?]
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
            at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
            Caused by: java.lang.NullPointerException
            at net.legacymod.items.test.hitEntity(test.java:33) ~[test.class:?]
            at net.minecraft.item.ItemStack.hitEntity(ItemStack.java:371) ~[ItemStack.class:?]
            at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1436) ~[EntityPlayer.class:?]
            at net.minecraft.network.NetHandlerPlayServer.processUseEntity(NetHandlerPlayServer.java:881) ~[NetHandlerPlayServer.class:?]
            at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:51) ~[C02PacketUseEntity.class:?]
            at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:69) ~[C02PacketUseEntity.class:?]
            at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?]
            at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?]
            … 5 more
            [18:35:27] [Server thread/ERROR]: This crash report has been saved to: C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\.\crash-reports\crash-2016-07-05_18.35.27-server.txt
            [18:35:27] [Server thread/INFO]: Stopping server
            [18:35:27] [Server thread/INFO]: Saving players
            [18:35:27] [Server thread/INFO]: Saving worlds
            [18:35:27] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
            [18:35:27] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
            // Quite honestly, I wouldn't worry myself about that.
            
            Time: 05/07/16 18:35
            Description: Ticking memory connection
            
            java.lang.NullPointerException: Ticking memory connection
            at net.legacymod.items.test.hitEntity(test.java:33)
            at net.minecraft.item.ItemStack.hitEntity(ItemStack.java:371)
            at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1436)
            at net.minecraft.network.NetHandlerPlayServer.processUseEntity(NetHandlerPlayServer.java:881)
            at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:51)
            at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:69)
            at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
            at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
            at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
            at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
            at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
            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 net.legacymod.items.test.hitEntity(test.java:33)
            at net.minecraft.item.ItemStack.hitEntity(ItemStack.java:371)
            at net.minecraft.entity.player.EntityPlayer.attackTargetEntityWithCurrentItem(EntityPlayer.java:1436)
            at net.minecraft.network.NetHandlerPlayServer.processUseEntity(NetHandlerPlayServer.java:881)
            at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:51)
            at net.minecraft.network.play.client.C02PacketUseEntity.processPacket(C02PacketUseEntity.java:69)
            at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
            
            -- Ticking connection --
            Details:
            Connection: net.minecraft.network.NetworkManager@b84446
            Stacktrace:
            at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
            at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
            at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
            at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
            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 (x86) version 6.1
            Java Version: 1.8.0_45, Oracle Corporation
            Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
            Memory: 812637320 bytes (774 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: 0, tcache: 0, allocated: 13, tallocated: 95
            FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 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
            lc{1.0} [lc] (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: 1 / 8; [EntityPlayerMP['floriangabet'/353, l='New World', x=-128,64, y=76,00, z=268,90]]
            Type: Integrated Server (map_client.txt)
            Is Modded: Definitely; Client brand changed to 'fml,forge'
            [18:35:27] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2016-07-05_18.35.27-server.txt
            [18:35:27] [Client thread/INFO] [FML]: Waiting for the server to terminate/save.
            [18:35:27] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
            [18:35:27] [Server thread/INFO]: Saving chunks for level 'New World'/The End
            [18:35:27] [Server thread/INFO] [FML]: Unloading dimension 0
            [18:35:27] [Server thread/INFO] [FML]: Unloading dimension -1
            [18:35:27] [Server thread/INFO] [FML]: Unloading dimension 1
            [18:35:27] [Server thread/INFO] [FML]: Applying holder lookups
            [18:35:27] [Server thread/INFO] [FML]: Holder lookups applied
            [18:35:27] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
            [18:35:27] [Client thread/INFO] [FML]: Server terminated.
            AL lib: (EE) alc_cleanup: 1 device not closed
            Java HotSpot(TM) Client VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
            
            

            Ligne 33 de test correspond à:

            
            public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
               {
                if(stack.getTagCompound().getInteger("timer2") >= 2 * 20) // ici
                {
                target.setFire(20 * 20);
                target.attackEntityFrom(DamageSource.inFire, 5 * 2);
                stack.getTagCompound().setInteger("timer2", 0);
                }
                   return true;
               }
            
            
            1 réponse Dernière réponse Répondre Citer 0
            • DeletedD Hors-ligne
              Deleted
              dernière édition par

              Pourquoi t’as renommé l’id par timer2 ? T’as sûrement dû laisser timer dans onUpdate()

              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

                getInteger(“valeur inexistante”) renvoie 0 et non null.
                C’est stack.getTagCompound() qui renvoie null.

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

                  Bizarre car si il a repris la méthode onUpdate() que je lui avais proposé, ça ne devrait pas arriver

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

                    Exact ça marche j’ai mal copier coller x)

                    Mais le problème et que sa met en feu le cochon a chaque coup et moi il faudrait que il y est un temps de recharge de par exemple 30s possible ?

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

                      Change le 2 * 20 par 30 * 20

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

                        Ouais nickel! par contre j’ai un problème quand je met mon code dans une autre classe avec un autre timer mon "sors ne se lance jamais.
                        Je pense que je le fait que il y est deux fonction onupdate dans la même classe fait un conflit et mon second timer ne marche pas ( celui avec le hitentity )

                        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

                          Code ?

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

                            Tien:

                            
                            public class epee extends ItemSword {
                            
                            public epee(ToolMaterial p_i45356_1_) {
                            super(p_i45356_1_);
                            }
                            @Override
                            public void onUpdate(ItemStack item, World world, Entity player,
                            int slotIndex, boolean inHand) {
                            if (item.hasTagCompound())
                            {
                            if (item.stackTagCompound.getInteger("timer2") > 0)
                            {
                            item.stackTagCompound.setInteger("timer2",
                            (int) (item.stackTagCompound.getInteger("timer2") + 1));
                            }
                            if (item.stackTagCompound.getInteger("timer2") >= (int) (45 * 20))
                            {
                            item.stackTagCompound.setInteger("timer2", 0);
                            }
                            }
                            super.onUpdate(item, world, player, slotIndex, inHand);
                            }
                            
                            public ItemStack onItemRightClick(ItemStack item, World world,
                            EntityPlayer player) {
                            if (!item.hasTagCompound())
                            {
                            item.setTagCompound(new NBTTagCompound());
                            item.stackTagCompound.setInteger("timer2", 0);
                            }
                            if (item.stackTagCompound.getInteger("timer2") == 0
                            && ServerProxy.RANK.get(player.getUniqueID()) == EnumRank.GUERRIER) {
                            player.addPotionEffect(new PotionEffect(Potion.digSpeed.id,
                            600, 0));
                            item.stackTagCompound.setInteger("timer2", 1);// On le met à 1 pour
                            // pouvoir rentrer
                            // dans la condition
                            // de onUpdate()
                            world.playSoundAtEntity(player, "sounds/fireworks/blast_far1", 1, 1);
                            // world.spawnParticle("smoke", (double)(player.posX),
                            // (double)(player.posY), (double)(player.posZ), 0.0D, 0.0D, 0.0D);
                            } else {
                            if (world.isRemote)
                            player.addChatComponentMessage(new ChatComponentTranslation(
                            "Tu dois attendre que le sort se recharge !"));// On
                            // indique
                            // au
                            // joueur
                            // via
                            // ce
                            // message
                            // si le
                            // timer
                            // n'est
                            // pas
                            // encore
                            // arrivé
                            // à la
                            // limite
                            // souhaitée
                            }
                            return item;
                            }
                            
                            @SideOnly(Side.CLIENT)
                            public boolean hasEffect(ItemStack item)
                            {
                            return item.hasTagCompound() ? (item.stackTagCompound.getInteger("timer2")
                            == 0 ? true : false) : false;//On vérifie déjà si l'ItemStack a set un
                            // NBTTagCompound si oui, on vérifie si Timer en fait partie et si il est
                            //égal à 0, si oui, on return true à la méthode
                            }
                            
                            public void addInformation(ItemStack item, EntityPlayer player, List list,
                            boolean par4) {
                            if(ServerProxy.RANK.get(player.getUniqueID()) == EnumRank.GUERRIER){
                            list.add("§6Epee de guerrier !");
                            list.add("§6Seul les plus puissants,");
                            list.add("§6peuvent porter cette arme !");
                            }else{
                            list.add("§cVous n'êtes pas Guerrier");
                            list.add("§cvous ne devez pas avoir");
                            list.add("§ccette épée sur vous!");
                            }
                            }
                            
                            public void onUpdate2(ItemStack stack, World world, Entity entity, int slotIndex, boolean isInhand)
                            {
                            super.onUpdate(stack, world, entity, slotIndex, isInhand);
                            if(!stack.hasTagCompound())
                            stack.setTagCompound(new NBTTagCompound());
                            
                            int timer = !stack.getTagCompound().hasKey("timer") ? 0 : stack.getTagCompound().getInteger("timer");
                            timer++;
                            stack.getTagCompound().setInteger("timer", timer);
                            
                            System.out.println(stack.stackTagCompound.getInteger("timer"));
                            }
                            
                                public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
                                {
                                if(stack.getTagCompound().getInteger("timer") >= 30 * 20 && ClientProxy.keyBindSortG.isPressed())
                                {
                                target.setFire(20 * 20);
                                target.attackEntityFrom(DamageSource.inFire, 5 * 2);
                                stack.getTagCompound().setInteger("timer", 0);
                                System.out.println("§c[Sort] §8Frappe foudroyante lancée!");
                                EntityPlayer player1 = Minecraft.getMinecraft().thePlayer;
                            ChatComponentText text1 = new ChatComponentText("§c[Sort] §8Frappe foudroyante lancée!");
                            player1.addChatComponentMessage(text1);
                            EntityPlayer player = Minecraft.getMinecraft().thePlayer;
                                    MinecraftServer.getServer().getCommandManager().executeCommand(player, "weather lightning");
                                }else if (stack.getTagCompound().getInteger("timer") != 30 * 20 && ClientProxy.keyBindSortG.isPressed()){
                                System.out.println("§c[Erreur] §7Tu dois attendre que le sors se recharge! ");
                                EntityPlayer player1 = Minecraft.getMinecraft().thePlayer;
                            ChatComponentText text1 = new ChatComponentText("§c[Erreur] §7Tu dois attendre que le sors se recharge! ");
                            player1.addChatComponentMessage(text1);
                                }
                                    return true;
                                }
                            
                            }
                            
                            
                            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

                              Ta fonction onUpdate2 n’est jamais appelé.

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

                                Ah bon?

                                pour quoi alors dans cette classe ça marche ?

                                
                                public class test extends ItemSword{
                                
                                private static Minecraft mc;
                                
                                public test(ToolMaterial p_i45356_1_) {
                                super(p_i45356_1_);
                                // TODO Auto-generated constructor stub
                                }
                                
                                public void onUpdate2(ItemStack stack, World world, Entity entity, int slotIndex, boolean isInhand)
                                {
                                super.onUpdate(stack, world, entity, slotIndex, isInhand);
                                if(!stack.hasTagCompound())
                                stack.setTagCompound(new NBTTagCompound());
                                
                                int timer = !stack.getTagCompound().hasKey("timer") ? 0 : stack.getTagCompound().getInteger("timer");
                                timer++;
                                stack.getTagCompound().setInteger("timer", timer);
                                
                                // System.out.println(stack.stackTagCompound.getInteger("timer"));
                                }
                                
                                   public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
                                   {
                                    if(stack.getTagCompound().getInteger("timer") >= 30 * 20 && ClientProxy.keyBindSortG.isPressed())
                                    {
                                    target.setFire(20 * 20);
                                    target.attackEntityFrom(DamageSource.inFire, 5 * 2);
                                    stack.getTagCompound().setInteger("timer", 0);
                                    System.out.println("§c[Sort] §8Frappe foudroyante lancée!");
                                    EntityPlayer player1 = Minecraft.getMinecraft().thePlayer;
                                ChatComponentText text1 = new ChatComponentText("§c[Sort] §8Frappe foudroyante lancée!");
                                player1.addChatComponentMessage(text1);
                                    }else if (stack.getTagCompound().getInteger("timer") != 30 * 20 && ClientProxy.keyBindSortG.isPressed()){
                                    System.out.println("§c[Erreur] §7Tu dois attendre que le sors se recharge! ");
                                    EntityPlayer player1 = Minecraft.getMinecraft().thePlayer;
                                ChatComponentText text1 = new ChatComponentText("§c[Erreur] §7Tu dois attendre que le sors se recharge! ");
                                player1.addChatComponentMessage(text1);
                                    }
                                       return true;
                                   }
                                
                                }
                                
                                

                                Je n’ai pourtant rien changer

                                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

                                  Ajoute un print dans la fonction onUpdate2, je doute qu’il sera dans la console.

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

                                    [23:16:11] [main/INFO] [GradleStart]: username: floriangabet
                                    [23:16:11] [main/INFO] [GradleStart]: Extra: []
                                    [23:16:11] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --username, floriangabet, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                                    [23:16:11] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading
                                    [23:16:11] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_45, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jdk1.8.0_45\jre
                                    [23:16:11] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                                    [23:16:11] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
                                    [23:16:11] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                    [23:16:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                                    [23:16:11] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                                    [23:16:12] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                                    [23:16:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                                    [23:16:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                                    [23:16:12] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                                    [23:16:12] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
                                    [23:16:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
                                    [23:16:12] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                                    [23:16:12] [main/INFO]: Setting user: floriangabet
                                    [23:16:13] [Client thread/INFO]: LWJGL Version: 2.9.1
                                    [23:16:13] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                                    [23:16:13] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized
                                    [23:16:13] [Client thread/INFO] [FML]: Replaced 183 ore recipies
                                    [23:16:13] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                                    [23:16:13] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Documents\Modding\LegacyMod\eclipse\mods for mods
                                    [23:16:13] [Client thread/INFO] [lc]: Mod lc is missing the required element 'name'. Substituting lc
                                    [23:16:15] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                                    [23:16:15] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at CLIENT
                                    [23:16:15] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, lc] at SERVER
                                    [23:16:15] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip
                                    [23:16:15] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
                                    [23:16:15] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
                                    [23:16:15] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
                                    [23:16:15] [Client thread/INFO] [FML]: Applying holder lookups
                                    [23:16:15] [Client thread/INFO] [FML]: Holder lookups applied
                                    [23:16:15] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                                    [23:16:15] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
                                    [23:16:15] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                                    [23:16:15] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                                    [23:16:15] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                                    [23:16:16] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                                    [23:16:16] [Sound Library Loader/INFO]: Sound engine started
                                    [23:16:18] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas
                                    [23:16:18] [Client thread/INFO]: Created: 256x256 textures/items-atlas
                                    [23:16:18] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
                                    [23:16:18] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:lc, [1.10] Firewolf v1.36.zip
                                    [23:16:20] [Client thread/INFO]: Created: 2048x2048 textures/blocks-atlas
                                    [23:16:20] [Client thread/INFO]: Created: 256x256 textures/items-atlas
                                    [23:16:20] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                                    [23:16:20] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down…
                                    [23:16:21] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
                                    [23:16:21] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                                    [23:16:21] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                                    [23:16:21] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
                                    [23:16:21] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                                    [23:16:21] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                                    [23:16:21] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                                    [23:16:21] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                                    [23:16:21] [Sound Library Loader/INFO]: Sound engine started
                                    [23:16:38] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
                                    [23:16:38] [Server thread/INFO]: Generating keypair
                                    [23:16:38] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
                                    [23:16:38] [Server thread/INFO] [FML]: Applying holder lookups
                                    [23:16:38] [Server thread/INFO] [FML]: Holder lookups applied
                                    [23:16:38] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@143a4d5)
                                    [23:16:38] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@143a4d5)
                                    [23:16:38] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@143a4d5)
                                    [23:16:38] [Server thread/INFO]: Preparing start region for level 0
                                    [23:16:39] [Server thread/INFO]: Changing view distance to 8, from 10
                                    [23:16:39] [Netty Client IO #0/INFO] [FML]: Server protocol version 1
                                    [23:16:39] [Netty IO #1/INFO] [FML]: Client protocol version 1
                                    [23:16:39] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@7.10.85.1291,lc@1.0,Forge@10.13.2.1291,mcp@9.05
                                    [23:16:39] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT
                                    [23:16:39] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER
                                    [23:16:39] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established
                                    [23:16:39] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
                                    [23:16:39] [Server thread/INFO]: floriangabet[local:E:f2873c73] logged in with entity id 351 at (-112.00548187674536, 70.0, 213.7653439587637)
                                    [23:16:39] [Server thread/INFO]: floriangabet joined the game
                                    1411
                                    1412
                                    1413
                                    1414
                                    1412
                                    1413
                                    1414
                                    1415
                                    1415
                                    1415
                                    1416
                                    1416
                                    1417
                                    1418
                                    1418
                                    1419
                                    1419
                                    1419
                                    1420
                                    1420
                                    1421
                                    1421
                                    1422
                                    1423
                                    1424
                                    1423
                                    1424
                                    1425
                                    1425
                                    1425
                                    1426
                                    1426
                                    1427
                                    1427
                                    1428
                                    1428
                                    1429
                                    1429
                                    1430
                                    1430
                                    1431
                                    1432
                                    1432
                                    1433
                                    1434
                                    1433
                                    1434
                                    1435
                                    1435
                                    1436
                                    1436
                                    1436
                                    1437
                                    1437
                                    1438
                                    1438
                                    1439
                                    1439
                                    1440
                                    1440
                                    1441
                                    1442
                                    1443
                                    1442
                                    1443
                                    1444
                                    1444
                                    1445
                                    1445
                                    1446
                                    1446
                                    1446
                                    1447
                                    1447
                                    1448
                                    1448
                                    1449
                                    1449
                                    1450
                                    1450
                                    1451
                                    1451
                                    1452
                                    1452
                                    1453
                                    1453
                                    1454
                                    1455
                                    1456
                                    1455
                                    1456
                                    1457
                                    1457
                                    1458
                                    1458
                                    1458
                                    1459
                                    1459
                                    1460
                                    1460
                                    1461
                                    1461
                                    1462
                                    1462
                                    1463
                                    1463
                                    1464
                                    1464
                                    1465
                                    1465
                                    1466
                                    1466
                                    1467
                                    1467
                                    1468
                                    1468
                                    1469
                                    1470
                                    1470
                                    1471
                                    1471
                                    1471
                                    1472
                                    1472
                                    1473
                                    1473
                                    1474
                                    1474
                                    1475
                                    1475
                                    1476
                                    1476
                                    1477
                                    1477
                                    1478
                                    1478
                                    1479
                                    1479
                                    1480
                                    1480
                                    1481
                                    1481
                                    1482
                                    1482
                                    1483
                                    1483
                                    1484
                                    1485
                                    1486
                                    1485
                                    1486
                                    1487
                                    1487
                                    1488
                                    1488
                                    1488
                                    1489
                                    1489
                                    1490
                                    1490
                                    1491
                                    1491
                                    1492
                                    1492
                                    1493
                                    1493
                                    1494
                                    1494
                                    1495
                                    1495
                                    1496
                                    1496
                                    1497
                                    1497
                                    1498
                                    1498
                                    1499
                                    1499
                                    1500
                                    1500
                                    1501
                                    1501
                                    1502
                                    1502
                                    1503
                                    1503
                                    1504
                                    1504
                                    1505
                                    1505
                                    1506
                                    1506
                                    1507
                                    1507
                                    1508
                                    1508
                                    1509
                                    1509
                                    1510
                                    1510
                                    1511
                                    1511
                                    1512
                                    1512
                                    1513
                                    1513
                                    1514
                                    1514
                                    1515
                                    1515
                                    1516
                                    1516
                                    1517
                                    1517
                                    1518
                                    1518
                                    1519
                                    1519
                                    1520
                                    1520
                                    1521
                                    1521
                                    1522
                                    1522
                                    1523
                                    1524
                                    1525
                                    1524
                                    1525
                                    1526
                                    1526
                                    1526
                                    1527
                                    1527
                                    1528
                                    1528
                                    1529
                                    1529
                                    1530
                                    1530
                                    1531
                                    1532
                                    1532
                                    1533
                                    1533
                                    1533
                                    1534
                                    1534
                                    1535
                                    1535
                                    1536
                                    1536
                                    1537
                                    1537
                                    1538
                                    1538
                                    1539
                                    1539
                                    1540
                                    1540
                                    1541
                                    1541
                                    1542
                                    1542
                                    1543
                                    1543
                                    1544
                                    1544
                                    1545
                                    1545
                                    1546
                                    1546
                                    1547
                                    1547
                                    1548
                                    1548
                                    1549
                                    1549
                                    1550
                                    1550
                                    1551
                                    1551
                                    1552
                                    1552
                                    1553
                                    1553
                                    1554
                                    1554
                                    1555
                                    1555
                                    1556
                                    1556
                                    1557
                                    1557
                                    1558
                                    1559
                                    1560
                                    1559
                                    1560
                                    1561
                                    1561
                                    1562
                                    1562
                                    1563
                                    1563
                                    1563
                                    1564
                                    1564
                                    1564
                                    1565
                                    1566
                                    1565
                                    1567
                                    1568
                                    1568
                                    1569
                                    1569
                                    1569
                                    1570
                                    1570
                                    1571
                                    1571
                                    1572
                                    1572
                                    1573
                                    1573
                                    1574
                                    1574
                                    1575
                                    1575
                                    1576
                                    1576
                                    1577
                                    1577
                                    1578
                                    1578
                                    1579
                                    1579
                                    1580
                                    1580
                                    1581
                                    1581
                                    1582
                                    1582
                                    1583
                                    1583
                                    1584
                                    1584
                                    1585
                                    1585
                                    1586
                                    1586
                                    1587
                                    1587
                                    1588
                                    1588
                                    1589
                                    1589
                                    1590
                                    1590
                                    1591
                                    1591
                                    1592
                                    1592
                                    1593
                                    1593
                                    1594
                                    1594
                                    1595
                                    1595
                                    1596
                                    1596
                                    1597
                                    1597
                                    1598
                                    1598
                                    1599
                                    1599
                                    1600
                                    1600
                                    1601
                                    1601
                                    1602
                                    1602
                                    1603
                                    1603
                                    1604
                                    1604
                                    1605
                                    1605
                                    1606
                                    1606
                                    1607
                                    1608
                                    1608
                                    1609
                                    1609
                                    1609
                                    1610
                                    1610
                                    1611
                                    1611
                                    1612
                                    1612
                                    1613
                                    1614
                                    1614
                                    1615
                                    1615
                                    1615
                                    1616
                                    1616
                                    1617
                                    1617
                                    1618
                                    1618
                                    1619
                                    1619
                                    1620
                                    1620
                                    1621
                                    1621
                                    1622
                                    1622
                                    1623
                                    1623
                                    1624
                                    1624
                                    1625
                                    1625
                                    1626
                                    1626
                                    1627
                                    1627
                                    1628
                                    1628
                                    1629
                                    1629
                                    1630
                                    1630
                                    1631
                                    1631
                                    1632
                                    1632
                                    1633
                                    1633
                                    1634
                                    1634
                                    1635
                                    1635
                                    1636
                                    1636
                                    1637
                                    1637
                                    1638
                                    1638
                                    1639
                                    1639
                                    1640
                                    1640
                                    1641
                                    1641
                                    1642
                                    1642
                                    1643
                                    1643
                                    1644
                                    1644
                                    1645
                                    1645
                                    1646
                                    1646
                                    1647
                                    1647
                                    1648
                                    1648
                                    1649
                                    1649
                                    1650
                                    1650
                                    1651
                                    1651
                                    1652
                                    1652
                                    1653
                                    1653
                                    1654
                                    1654
                                    1655
                                    1655
                                    1656
                                    1656
                                    1657
                                    1657
                                    1658
                                    1658
                                    1659
                                    1659
                                    1660
                                    1660
                                    1661
                                    1661
                                    1662
                                    1662
                                    1663
                                    1663
                                    1664
                                    1664
                                    1665
                                    1665
                                    1666
                                    1666
                                    1667
                                    1667
                                    1668
                                    1668
                                    1669
                                    1669
                                    1670
                                    1670
                                    1671
                                    1671
                                    1672
                                    1672
                                    1673
                                    1673
                                    1674
                                    1674
                                    1675
                                    1675
                                    1676
                                    1676
                                    1677
                                    1677
                                    1678
                                    1678
                                    1679
                                    1679
                                    1680
                                    1680
                                    1681
                                    1681
                                    1682
                                    1682
                                    1683
                                    1683
                                    1684
                                    1684
                                    1685
                                    1685
                                    1686
                                    1686
                                    1687
                                    1687
                                    1688
                                    1688
                                    1689
                                    1689
                                    1690
                                    1690
                                    1691
                                    1691
                                    1692
                                    1692
                                    1693
                                    1693
                                    1694
                                    1694
                                    1695
                                    1695
                                    
                                    

                                    Enfin cela doit être surement un bug… sinon pour l’appeler je procèdes comment ?

                                    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

                                      Tu mets le code qui se trouve dans onUpdate2 dans la fonction onUpdate.

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

                                        Ahhh ok j’ai compris en fait la fonction s’appelle onupdate et si tu la change elle n’est plus reconnu donc elle marche pas ok^^ merci 🙂

                                        edit: Une dernière petit question on je peux avoir la liste des sons de minecraft? merci

                                        world.playSoundAtEntity(player, “sound ???”, 1, 1);

                                        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, dans le fichier sounds.json de minecraft.
                                          Pour le trouver tu vas dans .minecraft/assets/indexes et tu ouvres le fichier 1.7.10.json (comme tu es en 1.7.10).
                                          Dedans cherche sounds.json :

                                          "minecraft/sounds.json": {
                                          "hash": "fce0bb3e14ade7b292a7c1d5fa785533d8106d82",
                                          "size": 34020
                                          },
                                          

                                          son hash est fce0bb3e14ade7b292a7c1d5fa785533d8106d82, donc le fichier se trouve dans le dossier
                                          .minecraft/assets/objects/fc
                                          C’est le fichier fce0bb3e14ade7b292a7c1d5fa785533d8106d82
                                          Il n’a pas d’extension mais tu peux quand même l’ouvre avec un éditeur de texte.
                                          (Linux se base sous le type MIME contrairement à Windows qui se base sur les extensions, donc sous Linux le fichier est même directement reconnu comme fichier texte).

                                          1 réponse Dernière réponse Répondre Citer 1
                                          • GabsG Hors-ligne
                                            Gabs
                                            dernière édition par

                                            D’accord merci :).
                                            Sinon j’ai une question

                                            Si je veux faire que lorsque le joueur tape une entity (hitentity) toute les entity qui se trouve dans un rayon de 3 blocks (de l’entity que je viens de taper) prenne feu comment je peux faire ?

                                            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