MFF

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

    Ajouter un rendu avancé à votre bloc via TESR

    Planifier Épinglé Verrouillé Déplacé Les blocs
    1.7.x
    109 Messages 23 Publieurs 38.6k Vues 3 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.
    • SCAREXS Hors-ligne
      SCAREX
      dernière édition par

      Voici un exemple possible :

      public class BlockShower extends Block
      {
      protected BlockShower() {
      super(Material.glass);
      this.setHardness(0.5F);
      this.setResistance(2.0F);
      
      this.register();
      }
      
      @Override
      public boolean canPlaceBlockAt(World world, int x, int y, int z) {
      return super.canPlaceBlockAt(world, x, y, z) && world.isAirBlock(x, y + 1, z); // On verifie que le block du dessus est libre pour placer notre deuxième block
      }
      
      @Override
      public TileEntity createTileEntity(World world, int metadata) {
      return taTilEntity; // pour le rendu
      }
      
      @Override
      public int getRenderType() {
      return ClientProxy.RENDER_ID; // Pour le rendu
      }
      
      @Override
      public boolean hasTileEntity(int metadata) {
      return true; // Pour le rendu
      }
      
      @Override
      public boolean isOpaqueCube() {
      return false; // Pour le rendu
      }
      
      @Override
      public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
      if (meta != 4) { // Si c'est le block du dessous
      if (world.getBlock(x, y + 1, z) == this) world.setBlockToAir(x, y + 1, z); // On casse le block du dessus
      } else {
      if (world.getBlock(x, y - 1, z) == this) world.setBlockToAir(x, y - 1, z); // Sinon on casse celui du dessous
      }
      }
      
      @Override
      public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
      int direction = MathHelper.floor_double(entity.rotationYaw * 4.0F / 360.0F + 2.5D) & 3;
      world.setBlockMetadataWithNotify(x, y, z, direction, 2); // (Mon block avait une direction)
      world.setBlock(x, y + 1, z, tonBlock, 4, 2); // On place le deuxième block
      }
      
      @Override
      public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
      int meta = world.getBlockMetadata(x, y, z);
      if (world.getBlock(x, y + (meta == 4 ? -1 : 1), z) != this) this.onBlockHarvested(world, x, y, z, meta, null); // Lors de la mise à jour, si le block du dessus ou du dessous n'est pas le notre, on casse le block
      }
      
      @Override
      public boolean renderAsNormalBlock() {
      return false; // Pour le rendu
      }
      }
      

      Si tu veux créer un cadre noir (les traits noirs autour du block que l’on pointe et non la hitbox) de plus d’un block, tu peux utiliser la méthode getSelectedBoundingBoxFromPool ou setBlockBoundsBasedOnState

      Pour la hitbox, il faut utiliser addCollisionBoxesToList ou setBlockBoundsBasedOnState

      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
      • MrCupCakeMonsterM Hors-ligne
        MrCupCakeMonster
        dernière édition par

        Merci de vos réponses Robin et Scarex, malheureusement ce soir les études sont passés devant, j’essayerai demain 😉

        Envoyé de mon SM-G900F en utilisant Tapatalk

        Mes tutos :

        >! Un item mangeable
        [url=http://www.minecraftforgefranc…

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

          J’aime la méthode de Scarex ^^ Je l’ai utilisé pour faire un block qui génère un arbre 😉

          Pour le specialRender, lors de l’attribution de la texture pour le model, y’a moyen de choper le metadata du bloc pour la texture où dois-je la sauvegarder et passer par le tileEntity ?

          >! Bonjour/Bonsoir,
          >! Vous désirez un Modèle ou une Texture pour votre Mod ? Vous pouvez faire un…

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

            Je ne sais pas si quelqu’un lira ceci et pourra m’aider, mais j’ai un problème avec l’affichage de mon bloc TESR. Il disparaît dans les coins de l’écran ou dans le côté d’une certaine direction.

            Explication en image:
            -Sans le bug
            http://s18.postimg.org/6iywc3ubt/bug1.png

            -Avec le bug
            http://s29.postimg.org/gypdki8fb/bug2.png

            Le bloc TESR:
            http://s17.postimg.org/3oojbpaqn/bug3.png

            –—

            Voila, si une personne est capable de m’aider à régler ce problème, je lui en serai extrêmement reconnaissant, merci d’avance.

            Bravo pour ce tuto extrêmement bien fait. 🙂

            1 réponse Dernière réponse Répondre Citer 0
            • FolganskyF Hors-ligne
              Folgansky Correcteurs
              dernière édition par

              C’est lié à la hitbox du bloc. Si la hitbox n’apparait pas à l’écran du joueur, son rendu n’est pas fait (aussi large soit-il).

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

                @‘Toutoune1008’:

                C’est lié à la hitbox du bloc. Si la hitbox n’apparait pas à l’écran du joueur, son rendu n’est pas fait (aussi large soit-il).

                Ah d’accord c’est bon a savoir merci 🙂

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

                  Quand je veut lance mon jeu il crash 😕 Je suis à ce moment là

                  GL11.glPushMatrix(); // ouvre une matrix
                         GL11.glTranslated(x + 0.5D, y + 1.5D, z + 0.5D); // déplace le bloc sur les coordonnés et le centre
                         GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); // met droit le bloc (par défaut il est à l'envers)
                         this.bindTexture(texture); // affiche la texture
                         model.renderAll(); // rend le modèle
                         GL11.glPopMatrix(); // ferme la matrix
                  

                  Voilà le crash report

                  [15:48:16] [main/INFO] [GradleStart]: username: Fraiden
                  [15:48:16] [main/INFO] [GradleStart]: Extra: []
                  [15:48:16] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Utilisateur/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --username, Fraiden, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
                  [15:48:16] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                  [15:48:16] [main/INFO] [FML]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading
                  [15:48:16] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_91, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_91
                  [15:48:16] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                  [15:48:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                  [15:48:16] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
                  [15:48:16] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                  [15:48:16] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                  [15:48:16] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                  [15:48:16] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                  [15:48:17] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                  [15:48:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                  [15:48:17] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                  [15:48:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                  [15:48:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
                  [15:48:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
                  [15:48:18] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                  [15:48:18] [main/INFO]: Setting user: Fraiden
                  [15:48:19] [Client thread/INFO]: LWJGL Version: 2.9.1
                  [15:48:20] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----
                  // Uh... Did I do that?
                  
                  Time: 05/08/16 15:48
                  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 10 (amd64) version 10.0
                  Java Version: 1.8.0_91, Oracle Corporation
                  Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                  Memory: 788248312 bytes (751 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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: 0, tallocated: 0
                  FML:
                  GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 368.81' Renderer: 'GeForce GTX 970/PCIe/SSE2'
                  [15:48:20] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                  [15:48:20] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1614 Initialized
                  [15:48:20] [Client thread/INFO] [FML]: Replaced 183 ore recipies
                  [15:48:20] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                  [15:48:20] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
                  [15:48:20] [Client thread/INFO] [FML]: Searching C:\Users\Utilisateur\Desktop\Mod\eclipse\mods for mods
                  [15:48:26] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                  [15:48:26] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, radioactivity] at CLIENT
                  [15:48:26] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, radioactivity] at SERVER
                  [15:48:27] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:RadioActivity
                  [15:48:27] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
                  [15:48:27] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
                  [15:48:27] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
                  [15:48:27] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
                  [15:48:27] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
                  [15:48:27] [Client thread/INFO] [FML]: Applying holder lookups
                  [15:48:27] [Client thread/INFO] [FML]: Holder lookups applied
                  [15:48:27] [Client thread/INFO] [FML]: Injecting itemstacks
                  [15:48:27] [Client thread/INFO] [FML]: Itemstack injection complete
                  [15:48:27] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                  [15:48:27] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
                  [15:48:27] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                  [15:48:27] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                  [15:48:27] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                  [15:48:27] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:
                  [15:48:27] [Sound Library Loader/INFO]: Sound engine started
                  [15:48:28] [Client thread/INFO]: Created: 16x16 textures/blocks-atlas
                  [15:48:28] [Client thread/INFO]: Created: 16x16 textures/items-atlas
                  [15:48:28] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue
                  [15:48:28] [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 radioactivity{1.0.0} [RadioActivity] (bin)
                  [15:48:28] [Client thread/ERROR] [FML]: The following problems were captured during this phase
                  [15:48:28] [Client thread/ERROR] [FML]: Caught exception from radioactivity
                  java.lang.ExceptionInInitializerError
                  at fraiden.minecraftmod.radioactivity.proxy.ClientProxy.registerRender(ClientProxy.java:12) ~[bin/:?]
                  at fraiden.minecraftmod.radioactivity.common.RadioActivity.init(RadioActivity.java:62) ~[bin/:?]
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
                  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.8.0_91]
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
                  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.8.0_91]
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
                  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.8.0_91]
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_91]
                  at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_91]
                  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/:?]
                  Caused by: java.lang.NullPointerException
                  at fraiden.minecraftmod.radioactivity.client.ModelCrusher.<init>(ModelCrusher.java:223) ~[ModelCrusher.class:?]
                  at fraiden.minecraftmod.radioactivity.client.TileEntityCrusherSpecialRenderer.<clinit>(TileEntityCrusherSpecialRenderer.java:13) ~[TileEntityCrusherSpecialRenderer.class:?]
                  … 41 more
                  [15:48:28] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
                  // Shall we play a game?
                  
                  Time: 05/08/16 15:48
                  Description: There was a severe problem during mod loading that has caused the game to fail
                  
                  cpw.mods.fml.common.LoaderException: java.lang.ExceptionInInitializerError
                  at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
                  at cpw.mods.fml.common.Loader.initializeMods(Loader.java:739)
                  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(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                  at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                  at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                  at GradleStart.main(Unknown Source)
                  Caused by: java.lang.ExceptionInInitializerError
                  at fraiden.minecraftmod.radioactivity.proxy.ClientProxy.registerRender(ClientProxy.java:12)
                  at fraiden.minecraftmod.radioactivity.common.RadioActivity.init(RadioActivity.java:62)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at 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(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  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)
                  ... 12 more
                  Caused by: java.lang.NullPointerException
                  at fraiden.minecraftmod.radioactivity.client.ModelCrusher.<init>(ModelCrusher.java:223)
                  at fraiden.minecraftmod.radioactivity.client.TileEntityCrusherSpecialRenderer.<clinit>(TileEntityCrusherSpecialRenderer.java:13)
                  ... 41 more
                  
                  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 10 (amd64) version 10.0
                  Java Version: 1.8.0_91, Oracle Corporation
                  Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                  Memory: 680527976 bytes (649 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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: 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 radioactivity{1.0.0} [RadioActivity] (bin)
                  GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 368.81' Renderer: 'GeForce GTX 970/PCIe/SSE2'
                  [15:48:28] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Utilisateur\Desktop\Mod\eclipse\.\crash-reports\crash-2016-08-05_15.48.28-client.txt
                  AL lib: (EE) alc_cleanup: 1 device not closed
                  Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
                  
                  ```</clinit></init></clinit></init>
                  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

                    at fraiden.minecraftmod.radioactivity.client.ModelCrusher.<init>(ModelCrusher.java:223)
                    Tu peux envoyer la classe de ton modèle ?</init>

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

                      @‘robin4002’:

                      at fraiden.minecraftmod.radioactivity.client.ModelCrusher.<init>(ModelCrusher.java:223)
                      Tu peux envoyer la classe de ton modèle ?</init>

                      le code ?

                      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.

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

                          @‘robin4002’:

                          oui.

                          Problème résolu, c’était à cause des mirrors.

                          1 réponse Dernière réponse Répondre Citer 0
                          • ? This user is from outside of this forum
                            Invité
                            dernière édition par

                            ===ERREUR===

                            Salut,

                            Après une journée de travail intensif pour essayer de régler ce problème, rien ne fait… j’en suis toujours au même point.
                            Je me permet donc de vous demander de l’aide.
                            ===MON PROBLÈME===

                            Le bloc en jeux s’affiche comme un bloc sans texture de base

                            ===MON CODE===

                            class du bloc :

                            package fr.baptiste.notifia.Blocks;
                            
                            import java.util.List;
                            
                            import fr.baptiste.notifia.TileEntity.TileEntityCone;
                            import fr.baptiste.notifia.proxy.ClientProxy;
                            import net.minecraft.block.Block;
                            import net.minecraft.block.material.Material;
                            import net.minecraft.entity.Entity;
                            import net.minecraft.entity.EntityLivingBase;
                            import net.minecraft.item.ItemStack;
                            import net.minecraft.tileentity.TileEntity;
                            import net.minecraft.util.AxisAlignedBB;
                            import net.minecraft.util.MathHelper;
                            import net.minecraft.world.IBlockAccess;
                            import net.minecraft.world.World;
                            
                            public class cone extends Block
                            {    
                            
                               public cone(Material material)
                               {
                                   super(material);
                               }
                            
                               @Override
                               public TileEntity createTileEntity(World world, int metadata)
                               {
                                   return new TileEntityCone();
                               }
                            
                               @Override
                               public boolean hasTileEntity(int metadata)
                               {
                                   return true;
                               }
                               public boolean isOpaqueCube()
                               {
                                   return false;
                               }
                            
                               public boolean renderAsNormalBlock()
                               {
                                   return false;
                               }
                            
                               public int getRenderType()
                               {
                                   return ClientProxy.tesrRenderId;
                               }
                               public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
                               {
                                   this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                               }
                            
                            }
                            

                            Class TileEntity du bloc:

                            package fr.baptiste.notifia.TileEntity;
                            
                            import net.minecraft.tileentity.TileEntity;
                            
                            public class TileEntityCone extends TileEntity
                            {
                            
                            }
                            

                            ClientProxy:

                            package fr.baptiste.notifia.proxy;
                            
                            import cpw.mods.fml.client.registry.ClientRegistry;
                            import cpw.mods.fml.client.registry.RenderingRegistry;
                            import fr.baptiste.notifia.TileEntity.TileEntityCone;
                            import fr.baptiste.notifia.TileEntity.TileEntityConeSpecialRenderer;
                            import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
                            
                            public class ClientProxy extends CommonProxy
                            {
                            public static int tesrRenderId;
                            
                            @Override
                            public void registerRenders()
                            {
                            ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCone.class, new TileEntityConeSpecialRenderer());
                                   tesrRenderId = RenderingRegistry.getNextAvailableRenderId();
                                   RenderingRegistry.registerBlockHandler(new TESRInventoryRenderer());
                            }
                            }
                            
                            

                            Le specialRenderer :

                            package fr.baptiste.notifia.TileEntity;
                            
                            import org.lwjgl.opengl.GL11;
                            
                            import fr.baptiste.notifia.Reference;
                            import fr.baptiste.notifia.models.ModelConeTesr;
                            import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
                            import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
                            import net.minecraft.tileentity.TileEntity;
                            import net.minecraft.util.ResourceLocation;
                            
                            public class TileEntityConeSpecialRenderer extends TileEntitySpecialRenderer {
                            
                               public static ModelConeTesr model = new ModelConeTesr();
                               public static ResourceLocation texture = new ResourceLocation(Reference.MOD_ID, "textures/models/blocks/cone.png");
                            
                               public TileEntityConeSpecialRenderer()
                               {
                                   this.func_147497_a(TileEntityRendererDispatcher.instance);
                               }
                            
                               @Override
                               public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialRenderTick) // la fonction qui était la de base
                               {
                                   this.renderTileEntityConeAt((TileEntityCone)tile, x, y, z, partialRenderTick); // j'appelle ma fonction renderTileEntityTutorielAt en castant TileEntityTutoriel à l'argument tile
                               }
                            
                               private void renderTileEntityConeAt(TileEntityCone tile, double x, double y, double z, float partialRenderTick) // ma propre fonction
                               {
                                   GL11.glPushMatrix(); // ouvre une matrix
                                   GL11.glTranslated(x + 0.5D, y + 1.5D, z + 0.5D); // déplace le bloc sur les coordonnés et le centre
                                   GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); // met droit le bloc (par défaut il est à l'envers)
                                   this.bindTexture(texture); // affiche la texture
                                   model.renderAll(); // rend le modèle
                                   GL11.glPopMatrix(); // ferme la matrix
                               }
                            
                            }
                            

                            Le inventoryrenderer :

                            package fr.baptiste.notifia.proxy;
                            
                            import org.lwjgl.opengl.GL11;
                            
                            import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
                            import fr.baptiste.notifia.TileEntity.TileEntityConeSpecialRenderer;
                            import fr.baptiste.notifia.init.BlockMod;
                            import net.minecraft.block.Block;
                            import net.minecraft.client.Minecraft;
                            import net.minecraft.client.renderer.RenderBlocks;
                            import net.minecraft.world.IBlockAccess;
                            
                            public class TESRInventoryRenderer implements ISimpleBlockRenderingHandler {
                            
                            @Override
                            public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer)
                            {
                                   if(block == BlockMod.cone && metadata == 0)
                                   {
                                       GL11.glPushMatrix();
                                       GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
                                       GL11.glTranslatef(0.0F, -1.0F, 0.0F);
                                       Minecraft.getMinecraft().getTextureManager().bindTexture(TileEntityConeSpecialRenderer.texture);
                                       TileEntityConeSpecialRenderer.model.renderAll();
                                       GL11.glPopMatrix();
                                   }
                            }
                            
                            @Override
                            public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
                            RenderBlocks renderer)
                            {
                            return false;
                            }
                            
                            @Override
                            public boolean shouldRender3DInInventory(int modelId)
                            {
                            return true;
                            }
                            
                            @Override
                            public int getRenderId()
                            {
                            return 0;
                            }
                            
                            }
                            
                            

                            Class racine (une partie) :

                            public void Init(FMLInitializationEvent event)
                            {
                            proxy.registerRenders();
                            GameRegistry.registerTileEntity(TileEntityCone.class, null);
                            }
                            

                            J’espère que tout sera vous serez utile pour régler ce problème. Merci beaucoup et bonne soirée;

                            Amicalement, Baptiste. G

                            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,
                              GameRegistry.registerTileEntity(TileEntityCone.class, null);
                              devrait être :
                              GameRegistry.registerTileEntity(TileEntityCone.class, Reference.MOD_ID + “:cone”);

                              1 réponse Dernière réponse Répondre Citer 0
                              • ? This user is from outside of this forum
                                Invité
                                dernière édition par

                                @‘robin4002’:

                                Salut,
                                GameRegistry.registerTileEntity(TileEntityCone.class, null);
                                devrait être :
                                GameRegistry.registerTileEntity(TileEntityCone.class, Reference.MOD_ID + “:cone”);

                                Aucun changement.

                                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 peux envoyer ta classe client proxy ?

                                  1 réponse Dernière réponse Répondre Citer 0
                                  • ? This user is from outside of this forum
                                    Invité
                                    dernière édition par

                                    @‘robin4002’:

                                    Tu peux envoyer ta classe client proxy ?

                                    Elle y est

                                    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

                                      Ah oui en effet, j’avais pourtant vérifié deux fois x)

                                      Tu as essayé de replacé les blocs après avoir corrigé l’enregistrement du tile entity ?
                                      Car je ne vois pas d’autres problèmes dans ton code.

                                      1 réponse Dernière réponse Répondre Citer 0
                                      • ? This user is from outside of this forum
                                        Invité
                                        dernière édition par

                                        @‘robin4002’:

                                        Ah oui en effet, j’avais pourtant vérifié deux fois x)

                                        Tu as essayé de replacé les blocs après avoir corrigé l’enregistrement du tile entity ?
                                        Car je ne vois pas d’autres problèmes dans ton code.

                                        Je test et je te tient au courant?

                                        1 réponse Dernière réponse Répondre Citer 0
                                        • ? This user is from outside of this forum
                                          Invité
                                          dernière édition par

                                          J’ai cette erreur dans la console :

                                          [17:36:26] [Server thread/ERROR] [FML]: A TileEntity type fr.baptiste.notifia.TileEntity.TileEntityCone has throw an exception trying to write state. It will not persist. Report this to the mod author
                                          java.lang.RuntimeException: class fr.baptiste.notifia.TileEntity.TileEntityCone is missing a mapping! This is a bug!
                                          at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96) ~[TileEntity.class:?]
                                          at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:395) [AnvilChunkLoader.class:?]
                                          at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:204) [AnvilChunkLoader.class:?]
                                          at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:287) [ChunkProviderServer.class:?]
                                          at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:340) [ChunkProviderServer.class:?]
                                          at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:863) [WorldServer.class:?]
                                          at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) [MinecraftServer.class:?]
                                          at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:113) [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:?]
                                          
                                          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

                                            Ton tile entity n’est toujours pas enregistré correctement.

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB