MFF

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

    Créer un mob basique

    Planifier Épinglé Verrouillé Déplacé Les entités
    1.7.x
    187 Messages 47 Publieurs 80.6k Vues 6 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.
    • FolganskyF Hors-ligne
      Folgansky Correcteurs
      dernière édition par

      Avec le setSize tu ne peux pas, c’est forcément un carré autour de lui de la hauteur voulue

      edit: Essaie de voir avec la boundingBox, à demander si ça peut te servir

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

        boundingBox –> What is it ? ^^

        1 réponse Dernière réponse Répondre Citer 0
        • elias54E Hors-ligne
          elias54 Administrateurs
          dernière édition par

          @‘conquerorguepard’:

          boundingBox –> What is it ? ^^

          Boîte de collision….

          Mon site | GitHub

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

            Quelqu’un peut me rappeler la fonction pour agrandir ou diminuer la taille d’un mob svp :)?

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

              Si c’est au niveau rendu c’est GL11.glScalef(x, y, z)

              Site web contenant mes scripts : http://SCAREXgaming.github.io

              Pas de demandes de support par MP ni par skype SVP.
              Je n'accepte sur skype que l…

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

                Merci beaucoup! C’est bon 🙂

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

                  le mob ne spawn pas

                  [07:35:59] [Server thread/INFO]: Yeyvo a rejoint la partie
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.reflect.InvocationTargetException
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Constructor.newInstance(Unknown Source)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.EntityList.createEntityByID(EntityList.java:222)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.item.ItemMonsterPlacer.spawnCreature(ItemMonsterPlacer.java:173)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.item.ItemMonsterPlacer.onItemUse(ItemMonsterPlacer.java:79)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:507)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:142)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:422)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:593)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.NullPointerException
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at ma.Yeyvo.Paladium.common.mobs.Fuzemob.applyEntityAttributes(Fuzemob.java:19)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:156)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.EntityLiving.<init>(EntityLiving.java:78)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.EntityCreature.<init>(EntityCreature.java:36)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.monster.EntityMob.<init>(EntityMob.java:21)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at ma.Yeyvo.Paladium.common.mobs.Fuzemob.<init>(Fuzemob.java:13)
                  [07:36:01] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: … 20 more
                  [07:36:01] [Server thread/WARN]: Skipping Entity with id 3
                  [07:36:03] [Server thread/INFO]: Saving and pausing game…
                  ```</init></init></init></init></init>

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

                    NPE a cette ligne : at ma.Yeyvo.Paladium.common.mobs.Fuzemob.applyEntityAttributes(Fuzemob.java:19)

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

                      je trouve pas le problémme dans le code je trouve qu’il est Ok a moin d’avoir raté une maj

                      import ma.Yeyvo.Paladium.common.ModPaladium;
                      import net.minecraft.entity.SharedMonsterAttributes;
                      import net.minecraft.entity.boss.IBossDisplayData;
                      import net.minecraft.entity.monster.EntityMob;
                      import net.minecraft.item.Item;
                      import net.minecraft.world.World;
                      
                      public class Fuzemob extends EntityMob{
                      
                      public Fuzemob(World world) {
                      super(world);
                      }
                      @Override
                      public void applyEntityAttributes()
                      {
                      
                      this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(20D);
                         this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(999999D);
                         this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(3D);
                      this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(2000D);
                      
                      }
                      public Item getDropItem()
                      {
                      return ModPaladium.casquemobs;
                      }
                      public void dropFewItems(boolean b, int looting)
                         {
                             this.dropItem(ModPaladium.PaladiumOre, 20);
                             this.dropItem(ModPaladium.findium, 5);
                         }
                      }
                      
                      ```___j'ai fix le problémme j'avait oublier 
                      ```java
                      super.applyEntityAttributes();
                      

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

                        J’ai un crash après avoir crée le mob

                        [15:40:39] [main/INFO] [GradleStart]: username: Fraiden
                        [15:40:39] [main/INFO] [GradleStart]: Extra: []
                        [15:40:39] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --username, Fraiden, --accessToken, {REDACTED}, --assetIndex, 1.7.10, --assetsDir, C:/Users/Utilisateur/.gradle/caches/minecraft/assets, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
                        [15:40:39] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                        [15:40:39] [main/INFO] [FML]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading
                        [15:40:39] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_79, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jdk1.7.0_79\jre
                        [15:40:39] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                        [15:40:39] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                        [15:40:39] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
                        [15:40:39] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                        [15:40:39] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                        [15:40:39] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                        [15:40:39] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                        [15:40:41] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                        [15:40:41] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                        [15:40:41] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                        [15:40:42] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                        [15:40:42] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
                        [15:40:42] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
                        [15:40:42] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                        [15:40:43] [main/INFO]: Setting user: Fraiden
                        [15:40:45] [Client thread/INFO]: LWJGL Version: 2.9.1
                        [15:40:45] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----
                        // Why did you do that?
                        
                        Time: 12/06/16 15:40
                        Description: Loading screen debug info
                        
                        This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
                        
                        A detailed walkthrough of the error, its code path and all known details is as follows:
                        ---------------------------------------------------------------------------------------
                        
                        -- System Details --
                        Details:
                        Minecraft Version: 1.7.10
                        Operating System: Windows 8.1 (amd64) version 6.3
                        Java Version: 1.7.0_79, Oracle Corporation
                        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                        Memory: 103790712 bytes (98 MB) / 171966464 bytes (164 MB) up to 1897922560 bytes (1810 MB)
                        JVM Flags: 0 total;
                        AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                        IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                        FML:
                        GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 364.72' Renderer: 'GeForce GTX 970/PCIe/SSE2'
                        [15:40:46] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                        [15:40:46] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1614 Initialized
                        [15:40:46] [Client thread/INFO] [FML]: Replaced 183 ore recipies
                        [15:40:46] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                        [15:40:46] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
                        [15:40:46] [Client thread/INFO] [FML]: Searching C:\Users\Utilisateur\Desktop\Modding\Forge 1.7.10\eclipse\mods for mods
                        [15:40:52] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                        [15:40:52] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, CookieJar] at CLIENT
                        [15:40:52] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, CookieJar] at SERVER
                        [15:40:52] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cookie Jar
                        [15:40:52] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
                        [15:40:52] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
                        [15:40:52] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
                        [15:40:52] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
                        [15:40:52] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
                        [15:40:52] [Client thread/INFO] [FML]: Applying holder lookups
                        [15:40:52] [Client thread/INFO] [FML]: Holder lookups applied
                        [15:40:52] [Client thread/INFO] [FML]: Injecting itemstacks
                        [15:40:52] [Client thread/INFO] [FML]: Itemstack injection complete
                        [15:40:52] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                        [15:40:52] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
                        [15:40:53] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                        [15:40:53] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                        AL lib: (EE) MMDevApiOpenPlayback: Device init failed: 0x80004005
                        [15:40:53] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                        [15:40:53] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                        [15:40:53] [Sound Library Loader/INFO]: Sound engine started
                        [15:40:54] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas
                        [15:40:54] [Client thread/INFO]: Created: 16x16 textures/items-atlas
                        [15:40:54] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue
                        [15:40:54] [Client thread/ERROR] [FML]:
                        States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
                        UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
                        UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
                        UCHI Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
                        UCHE CookieJar{1.0.0} [Cookie Jar] (bin)
                        [15:40:54] [Client thread/ERROR] [FML]: The following problems were captured during this phase
                        [15:40:54] [Client thread/ERROR] [FML]: Caught exception from CookieJar
                        java.lang.NullPointerException
                        at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:171) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                        at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                        at Fraiden.Mod.Cookie_Jar.common.Cookie_Jar.init(Cookie_Jar.java:316) ~[bin/:?]
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79]
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79]
                        at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
                        at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79]
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79]
                        at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
                        at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                        at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79]
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79]
                        at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
                        at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
                        at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
                        at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737) [Loader.class:?]
                        at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) [FMLClientHandler.class:?]
                        at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) [Minecraft.class:?]
                        at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
                        at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79]
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79]
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79]
                        at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79]
                        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
                        at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
                        at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                        at GradleStart.main(Unknown Source) [start/:?]
                        [15:40:54] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
                        // Daisy, daisy...
                        
                        Time: 12/06/16 15:40
                        Description: Initializing game
                        
                        java.lang.NullPointerException: Initializing game
                        at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:171)
                        at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150)
                        at Fraiden.Mod.Cookie_Jar.common.Cookie_Jar.init(Cookie_Jar.java:316)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                        at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                        at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                        at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                        at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
                        at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
                        at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
                        at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                        at net.minecraft.client.main.Main.main(Main.java:164)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                        at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                        at GradleStart.main(Unknown Source)
                        
                        A detailed walkthrough of the error, its code path and all known details is as follows:
                        ---------------------------------------------------------------------------------------
                        
                        -- Head --
                        Stacktrace:
                        at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:171)
                        at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150)
                        at Fraiden.Mod.Cookie_Jar.common.Cookie_Jar.init(Cookie_Jar.java:316)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                        at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                        at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                        at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                        at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
                        at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
                        at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
                        
                        -- Initialization --
                        Details:
                        Stacktrace:
                        at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                        at net.minecraft.client.main.Main.main(Main.java:164)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                        at java.lang.reflect.Method.invoke(Method.java:606)
                        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                        at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                        at GradleStart.main(Unknown Source)
                        
                        -- System Details --
                        Details:
                        Minecraft Version: 1.7.10
                        Operating System: Windows 8.1 (amd64) version 6.3
                        Java Version: 1.7.0_79, Oracle Corporation
                        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                        Memory: 108506488 bytes (103 MB) / 475529216 bytes (453 MB) up to 1897922560 bytes (1810 MB)
                        JVM Flags: 0 total;
                        AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                        IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                        FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
                        States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
                        UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
                        UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
                        UCHI Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
                        UCHE CookieJar{1.0.0} [Cookie Jar] (bin)
                        GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 364.72' Renderer: 'GeForce GTX 970/PCIe/SSE2'
                        Launched Version: 1.7.10
                        LWJGL: 2.9.1
                        OpenGL: GeForce GTX 970/PCIe/SSE2 GL version 4.5.0 NVIDIA 364.72, NVIDIA Corporation
                        GL Caps: Using GL 1.3 multitexturing.
                        Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
                        Anisotropic filtering is supported and maximum anisotropy is 16.
                        Shaders are available because OpenGL 2.1 is supported.
                        
                        Is Modded: Definitely; Client brand changed to 'fml,forge'
                        Type: Client (map_client.txt)
                        Resource Packs: []
                        Current Language: English (UK)
                        Profiler Position: N/A (disabled)
                        Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                        Anisotropic Filtering: Off (1)
                        [15:40:54] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Utilisateur\Desktop\Modding\Forge 1.7.10\eclipse\.\crash-reports\crash-2016-06-12_15.40.54-client.txt
                        AL lib: (EE) alc_cleanup: 1 device not closed
                        
                        
                        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

                          Salut,
                          Ton instance est surement null.

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

                            Bonjour,

                            ce tutoriel a-t-il une chance de fonctionner en 1.11? Difficile de trouver des tutos 1.11 et je débute alors…

                            Merci d’avance

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

                              Etant donné que les entités n’ont pas tellement changé depuis la 1.7.10, oui ça devrait aller, il y aura forcément quelques changements mais globalement ça restera la même chose.

                              Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                              AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                              Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                              Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                                Ok merci, parce que je pense pas m’en sortir sans le support d’un tuto 🙂

                                Je vais essayer!

                                1 réponse Dernière réponse Répondre Citer 0
                                • M Hors-ligne
                                  MissChey
                                  dernière édition par robin4002

                                  Bon, alors, j’ai testé et j’ai plusieurs erreurs. Je préfère vous demander avant de commencer à “bidouiller” pour trouver moi-même, parce que en général, quand je commence à faire ça, je suis bonne pour tout recommencer  :dodgy:

                                  Je suis ici sur un mod test que j’ai créé ce matin après m’être déjà arraché les cheveux là-dessus pendant plusieurs heures hier  :@

                                  Voilà pourquoi, avant de faire quoi que ce soit de plus, je vous montre ce qu’il en est après avoir suivi le tuto pas à pas  🙂

                                  Je suis donc en 1.11.2 (Forge 1.11.2-13.20.0.2260 - mapping snapshot_20170329)

                                  Première erreur dans ma classe Render:

                                  
                                  package fr.misschey.tutorial.common;
                                  
                                  import fr.misschey.tutorial.ModTutorial;
                                  import net.minecraft.client.model.ModelBiped;
                                  import net.minecraft.client.renderer.entity.RenderBiped;
                                  import net.minecraft.entity.EntityLiving;
                                  import net.minecraft.util.ResourceLocation;
                                  
                                  public class RenderMobTutoriel extends RenderBiped
                                  {
                                  public final ResourceLocation texture = new ResourceLocation(ModTutorial.MODID, "textures/entity/mob_tutoriel.png");
                                  
                                  public RenderMobTutoriel(ModelBiped model, float shadow)
                                  {
                                  super(model, shadow);
                                  }
                                  
                                  protected ResourceLocation getEntityTexture(EntityLiving living)
                                  {
                                  return this.getMobTutorielTexture((EntityMobTutoriel)living);
                                  }
                                  
                                  private ResourceLocation getMobTutorielTexture(EntityMobTutoriel mobTutoriel)
                                  {
                                  return texture;
                                  }
                                  }
                                  
                                  

                                  Ici:
                                  0_1535893622105_erreur4.jpg

                                  Ensuite, dans ma classe principale:

                                  package fr.misschey.tutorial;
                                  
                                  import java.awt.Color;
                                  
                                  import org.apache.logging.log4j.Logger;
                                  
                                  import fr.misschey.tutorial.common.EntityMobTutoriel;
                                  import net.minecraftforge.fml.common.Mod;
                                  import net.minecraftforge.fml.common.Mod.EventHandler;
                                  import net.minecraftforge.fml.common.Mod.Instance;
                                  import net.minecraftforge.fml.common.SidedProxy;
                                  import net.minecraftforge.fml.common.event.FMLInitializationEvent;
                                  import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
                                  import net.minecraftforge.fml.common.registry.EntityRegistry;
                                  
                                  @Mod(modid = ModTutorial.MODID, name = "Mod Tutorial", version = "1.0.0", acceptedMinecraftVersions = "[1.11.2]")
                                  
                                  public class ModTutorial {
                                  
                                      public static final String MODID = "tutorial";
                                  
                                      @Instance(ModTutorial.MODID)
                                      public static ModTutorial instance;
                                  
                                      @SidedProxy(clientSide = "fr.misschey.tutorial.TutorialClient", serverSide = "fr.misschey.tutorial.TutorialServer")
                                      public static TutorialCommon proxy;
                                  
                                      public static Logger logger;
                                  
                                      @EventHandler
                                      public void preInit(FMLPreInitializationEvent event)
                                      {
                                          logger = event.getModLog();
                                          proxy.preInit(event.getSuggestedConfigurationFile());
                                      }
                                  
                                      @EventHandler
                                      public void init(FMLInitializationEvent event)
                                      {
                                      proxy.init();
                                      EntityRegistry.registerGlobalEntityID(EntityMobTutoriel.class, "mobTutoriel", EntityRegistry.findGlobalUniqueEntityId(), new Color(0, 255, 0).getRGB(), new Color(255, 0, 0).getRGB());
                                  EntityRegistry.registerModEntity(EntityMobTutoriel.class, "mobTutoriel", 420, this.instance, 40, 1, true);
                                  
                                      }
                                  
                                  }
                                  

                                  J’ai deux erreurs:
                                  0_1535893645349_erreur5.jpg
                                  0_1535893649399_erreur6.jpg

                                  Enfin, dernière chose, dans ma classe client, registerEntityRenderingHandler est barré. Existe-t-il une autre manière plus correcte?

                                  0_1535893597626_erreur7.jpg

                                  package fr.misschey.tutorial;
                                  
                                  import java.io.File;
                                  
                                  import fr.misschey.tutorial.common.EntityMobTutoriel;
                                  import fr.misschey.tutorial.common.RenderMobTutoriel;
                                  import net.minecraft.client.model.ModelBiped;
                                  import net.minecraftforge.fml.client.registry.RenderingRegistry;
                                  
                                  public class TutorialClient extends TutorialCommon {
                                  
                                  @Override
                                  public void preInit(File configFile) {
                                  
                                  super.preInit(configFile);
                                  
                                  }
                                  
                                  @Override
                                  public void init() {
                                  
                                  super.init();
                                  RenderingRegistry.registerEntityRenderingHandler(EntityMobTutoriel.class, new RenderMobTutoriel(new ModelBiped(), 0.5F));
                                  
                                  }
                                  
                                  }
                                  
                                  
                                  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

                                    La méthode registerGlobalEntityID ne doit plus être utilisé en 1.8+.
                                    Tu peux retirer toute la ligne.

                                    Pour registerEntityRenderingHandler la méthode est en effet obsolète, il existe une nouvelle façon de faire avec un IRenderFactory.

                                    Pour registerModEntity, il faut faire comme ça :
                                    EntityRegistry.registerModEntity(new ResourceLocation(ModTutorial.MODID, “mobTutoriel”), EntityMobTutoriel.class, “mobTutoriel”, 420, this.instance, 40, 1, true);

                                    Et pour RenderMobTutoriel, remplaces super(model, shadow); par super(model, new ModelBiped(), shadow);

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

                                      Tout d’abord, merci pour ton aide. Grâce à tes indications et à quelques recherches, j’ai réussi à faire quelque chose qui, a priori, fonctionne, sauf que l’oeuf n’apparaît pas dans l’inventaire créatif, du coup je ne sais pas comment tester mon mob… une idée?

                                      EDIT: c’est bon, j’ai trouvé, pour info j’ai juste fait /summon tutorial.mobtutoriel et tout fonctionne parfaitement bien!

                                      Voilà mon code complet, si ça peut servir à quelqu’un:

                                      LA CLASSE DU MOB:

                                      package fr.misschey.tutorial.common;
                                      
                                      import net.minecraft.entity.SharedMonsterAttributes;
                                      import net.minecraft.entity.monster.EntityMob;
                                      import net.minecraft.world.World;
                                      
                                      public class EntityMobTutoriel extends EntityMob
                                      {
                                      
                                      public EntityMobTutoriel(World world)
                                      {
                                      super(world);
                                      }
                                      
                                      public void applyEntityAttributes()
                                      {
                                      super.applyEntityAttributes();
                                      this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20D);
                                      this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6D);
                                      this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1D);
                                      this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.8D);
                                      
                                      }
                                      }
                                      

                                      LA CLASSE RENDER:

                                      package fr.misschey.tutorial.common;
                                      
                                      import fr.misschey.tutorial.ModTutorial;
                                      import net.minecraft.client.model.ModelBiped;
                                      import net.minecraft.client.renderer.entity.Render;
                                      import net.minecraft.client.renderer.entity.RenderBiped;
                                      import net.minecraft.client.renderer.entity.RenderManager;
                                      import net.minecraft.entity.EntityLiving;
                                      import net.minecraft.util.ResourceLocation;
                                      import net.minecraftforge.fml.client.registry.IRenderFactory;
                                      
                                      public class RenderMobTutoriel extends RenderBiped
                                      {
                                      public final ResourceLocation texture = new ResourceLocation(ModTutorial.MODID, "textures/entity/mob_tutoriel.png");
                                      
                                      public static final Factory FACTORY = new Factory();
                                      
                                      public RenderMobTutoriel(RenderManager rendermanagerIn) {
                                              super(rendermanagerIn, new ModelBiped(), 0.5F);
                                          }
                                      
                                      protected ResourceLocation getEntityTexture(EntityLiving living)
                                      {
                                      return this.getMobTutorielTexture((EntityMobTutoriel)living);
                                      }
                                      
                                      private ResourceLocation getMobTutorielTexture(EntityMobTutoriel mobTutoriel)
                                      {
                                      return texture;
                                      }
                                      
                                      public static class Factory implements IRenderFactory <entitymobtutoriel>{
                                      
                                      @Override
                                              public Render createRenderFor(RenderManager manager) {
                                                  return new RenderMobTutoriel(manager);
                                              }
                                      
                                         }
                                      
                                      }
                                      

                                      LA CLASSE ENTITIES (pour toutes les entités du Mod):

                                      package fr.misschey.tutorial.common;
                                      
                                      import fr.misschey.tutorial.ModTutorial;
                                      import net.minecraft.entity.EnumCreatureType;
                                      import net.minecraft.init.Biomes;
                                      import net.minecraft.util.ResourceLocation;
                                      import net.minecraftforge.fml.client.registry.RenderingRegistry;
                                      import net.minecraftforge.fml.common.registry.EntityRegistry;
                                      import net.minecraftforge.fml.relauncher.Side;
                                      import net.minecraftforge.fml.relauncher.SideOnly;
                                      
                                      public class TutorialEntities {
                                      
                                      public static void init() {
                                              // Id locale pour le mod
                                              int id = 1;
                                              EntityRegistry.registerModEntity(new ResourceLocation(ModTutorial.MODID, "mob_tutoriel"), EntityMobTutoriel.class, "mob_tutoriel", 1, ModTutorial.instance, 40, 1, true);
                                      
                                              // Biome de spawn
                                              EntityRegistry.addSpawn(EntityMobTutoriel.class, 100, 3, 5, EnumCreatureType.MONSTER, Biomes.DESERT, Biomes.MESA);
                                      
                                          }
                                      
                                          @SideOnly(Side.CLIENT)
                                          public static void initModels() {
                                              RenderingRegistry.registerEntityRenderingHandler(EntityMobTutoriel.class, RenderMobTutoriel.FACTORY);
                                          }
                                      
                                      }
                                      

                                      A METTRE DANS LA CLASSE CLIENT (dans preInit):

                                      TutorialEntities.initModels();
                                      

                                      A METTRE DANS LA CLASSE COMMON (dans preInit):

                                      TutorialEntities.init();
                                      ```</entitymobtutoriel>
                                      1 réponse Dernière réponse Répondre Citer 0
                                      • M Hors-ligne
                                        MissChey
                                        dernière édition par

                                        Encore une petite question ^^

                                        La capacité des villageois à récolter les cultures, c’est possible d’ajouter cette caractéristique à un mob?

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

                                          Bon, j’ai plusieurs problèmes…
                                          1- Mon mob ne fait rien, ne se déplace pas et n’attaque pas :dodgy: 
                                          2- Mon mob n’a pas de textures, il en a une bizarre, un carré blanc 😄
                                          3- MON MOB CHEAT !!! il ne prend pas de KB !

                                          Bref vous avez compris… HELP !
                                          voila mes codes (1.9)

                                          Render

                                          package com.tuto.mod.client;
                                          
                                          import com.tuto.mod.References;
                                          import com.tuto.mod.common.MobTuto;
                                          
                                          import net.minecraft.client.model.ModelBiped;
                                          import net.minecraft.client.renderer.entity.RenderBiped;
                                          import net.minecraft.client.renderer.entity.RenderManager;
                                          import net.minecraft.entity.Entity;
                                          import net.minecraft.entity.EntityLiving;
                                          import net.minecraft.util.ResourceLocation;
                                          
                                          public class RenderTuto extends RenderBiped
                                          {
                                          
                                              public final ResourceLocation texture = new ResourceLocation(References.MOD_ID, "textures/entity/mob_tutoriel.png");
                                          
                                              public RenderTuto(RenderManager renderManagerIn, ModelBiped modelBipedIn, float shadowSize)
                                              {
                                                  super(renderManagerIn, modelBipedIn, shadowSize);
                                              }
                                          
                                              protected ResourceLocation getEntityTexture(EntityLiving living)
                                              {
                                                  return this.getMobTutorielTexture((MobTuto)living);
                                              }
                                          
                                              private ResourceLocation getMobTutorielTexture(MobTuto mobTutoriel)
                                              {
                                                  return texture;
                                              }
                                          
                                          }
                                          
                                          

                                          Mob

                                          package com.tuto.mod.common;
                                          
                                          import net.minecraft.entity.SharedMonsterAttributes;
                                          import net.minecraft.entity.monster.EntityMob;
                                          import net.minecraft.world.World;
                                          
                                          public class MobTuto extends EntityMob
                                          {
                                              public MobTuto(World worldIn)
                                              {
                                                  super(worldIn);
                                              }
                                          
                                              public void applyEntityAttributes()
                                              {
                                                  super.applyEntityAttributes();
                                                  this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6D);
                                                  this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(0.3D);
                                                  this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.8D);
                                                  this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20D);
                                              }
                                          
                                          }
                                          
                                          

                                          Ma classe principale

                                          package com.tuto.mod;
                                          
                                          import java.lang.reflect.Proxy;
                                          
                                          import com.tuto.mod.common.MobTuto;
                                          import com.tuto.mod.init.BlocksMod;
                                          import com.tuto.mod.init.CraftsMod;
                                          import com.tuto.mod.init.EventsMod;
                                          import com.tuto.mod.init.ItemsMod;
                                          import com.tuto.mod.proxy.CommonProxy;
                                          import com.tuto.mod.world.WorldRegisterTuto;
                                          
                                          import net.minecraft.creativetab.CreativeTabs;
                                          import net.minecraft.item.Item;
                                          import net.minecraft.util.ResourceLocation;
                                          import net.minecraftforge.common.MinecraftForge;
                                          import net.minecraftforge.event.entity.living.LivingEvent;
                                          import net.minecraftforge.fml.common.Mod;
                                          import net.minecraftforge.fml.common.Mod.EventHandler;
                                          import net.minecraftforge.fml.common.Mod.Instance;
                                          import net.minecraftforge.fml.common.SidedProxy;
                                          import net.minecraftforge.fml.common.event.FMLInitializationEvent;
                                          import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
                                          import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
                                          import net.minecraftforge.fml.common.registry.EntityRegistry;
                                          import net.minecraftforge.fml.common.registry.GameRegistry;
                                          import net.minecraftforge.fml.relauncher.Side;
                                          import net.minecraftforge.fml.relauncher.SideOnly;
                                          
                                          @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION)
                                          
                                          public class ModTuto
                                          {
                                              @SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.COMMON_PROXY)
                                              public static  CommonProxy proxy;
                                          
                                               @Instance(References.MOD_ID)
                                                  public static ModTuto instance;
                                          
                                              public static CreativeTabs tabTuto = new CreativeTabs("tabTuto")
                                              {
                                                  @SideOnly(Side.CLIENT)
                                                  public Item getTabIconItem()
                                                  {
                                                      return ItemsMod.supT;
                                                  }
                                              };
                                          
                                              @EventHandler
                                              public void preInit(FMLPreInitializationEvent event)
                                              {
                                                  BlocksMod.init();
                                                  BlocksMod.register();
                                                  ItemsMod.init();
                                                  ItemsMod.register();
                                                  EventsMod.init();
                                                  CraftsMod.init();
                                                  WorldRegisterTuto.MainRegistry();
                                              }
                                          
                                              @EventHandler
                                              public void init(FMLInitializationEvent event)
                                              {
                                                  proxy.registerRenders();
                                                  MinecraftForge.EVENT_BUS.register(new Drop());
                                                  EntityRegistry.registerModEntity(MobTuto.class, "mobTutoriel", 420, this.instance, 40, 1, true);
                                              }
                                          
                                              @EventHandler
                                              public void postInit(FMLPostInitializationEvent event)
                                              {
                                          
                                              }
                                          }
                                          

                                          Bien sur, vous me connaissez, j’ai vérifié, ma texture est au bon endroit dans mon mod. je pense personnellement un placage mal fait des classes, vu que j’ai du crée deux package. Un client et un common. Ne sachant pas ou les mettres, je les est mis dans mon package générale… :s

                                          Il y a deux choses qui m'énerve dans la vie : les babouches et les personnes jouant en 1.7.10 !

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

                                            Personne pour m’aider ? SVP

                                            Il y a deux choses qui m'énerve dans la vie : les babouches et les personnes jouant en 1.7.10 !

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB