MFF

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

    [ BLOCK RENDER SPECIAL ]

    Planifier Épinglé Verrouillé Déplacé Résolu 1.7.x
    1.7.10
    29 Messages 3 Publieurs 5.9k Vues 1 Watching
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • robin4002R Hors-ligne
      robin4002 Moddeurs confirmés Rédacteurs Administrateurs
      dernière édition par

      Caused by: java.lang.NullPointerException
      at com.google.SpyMan.Mechanicalcraft.common.Lantern.ModelLantern.<init>(ModelLantern.java:32)
      at com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer.<clinit>(TileEntityLanternSpecialRenderer.java:15)
      … 41 more

      Tu as un npe dans ton modèle ligne 32.</clinit></init>

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

        a la ligne 32 c’est

        ​this.base.mirror = true;
        

        je suis sensé supprimer cette ligne ?

        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 utiliser le correcteur de SCAREX pour les modèles : http://www.scarex.fr/model_corrector.php

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

            je lai déjà fait, et même si je suppr la ligne le jeu crash. 😞

            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

              Vérifie que tout les <nom du=“” morceau=“”>.mirror se trouve bien après la ligne <nom du=“” morceau=“”>= new ModelRenderer(this, valeur, valeur);
              D’ailleurs évite aussi les accents dans les noms de ces morceaux.</nom></nom>

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

                je lai fait mais çà ne change rien

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

                  Renvoi code + crash report alors.

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

                    prend le code que j’ai deja mit il na pas changé

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

                      Le NPE était à une ligne que tu as supprimé, donc je ne peux pas deviner ce que tu as mis à la place. Et le crash report ?

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

                        TileEntityRendererSpecial

                        ​package com.google.SpyMan.Mechanicalcraft.common.Lantern;
                        
                        import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
                        import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
                        import net.minecraft.tileentity.TileEntity;
                        import net.minecraft.util.ResourceLocation;
                        
                        import org.lwjgl.opengl.GL11;
                        
                        import cpw.mods.fml.relauncher.Side;
                        import cpw.mods.fml.relauncher.SideOnly;
                        
                        public class TileEntityLanternSpecialRenderer extends TileEntitySpecialRenderer {
                        @SideOnly(Side.CLIENT)
                        public static ModelLantern modelLantern = new ModelLantern();
                        public static ResourceLocation texture = new ResourceLocation(
                        "modmechanicalcraft:textures/models/blocks/Lantern.png");
                        
                        public TileEntityLanternSpecialRenderer() {
                        this.func_147497_a(TileEntityRendererDispatcher.instance);
                        }
                        
                        private void renderTileEntityTileLanternAt(TileLantern tile, double x,
                        double y, double z, float partialRenderTick) {
                        
                        GL11.glPushMatrix();
                        GL11.glTranslated(x, y, z);
                        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
                        modelLantern.renderAll();
                        this.bindTexture(texture);
                        GL11.glPopMatrix();
                        
                        }
                        public void renderTileEntityAt(TileEntity tile, double x, double y,
                        double z, float partialRenderTick) {
                        this.renderTileEntityTileLanternAt((TileLantern) tile, x, y, z,
                        partialRenderTick);
                        
                        }
                        }
                        

                        Block :

                        ​package com.google.SpyMan.Mechanicalcraft.common.Lantern;
                        
                        import net.minecraft.block.Block;
                        import net.minecraft.block.material.Material;
                        import net.minecraft.tileentity.TileEntity;
                        import net.minecraft.world.World;
                        
                        import com.google.SpyMan.Mechanicalcraft.proxy.ClientProxy;
                        import com.google.SpyMan.Mechanicalcraft.common.*;
                        import com.google.SpyMan.Mechanicalcraft.common.Lantern.*;
                        
                        public class Lantern extends Block {
                        
                        public Lantern(Material material) {
                        super(material);
                        setResistance(3.0F);
                        setLightLevel(20.0F);
                        
                        }
                        
                        public boolean isOpaqueCube() {
                        return false;
                        }
                        
                        public boolean renderAsNormalBlock() {
                        return false;
                        }
                        
                        public int getRenderType() {
                        
                        return ClientProxy.tesrRenderId;
                        }
                        
                        public TileEntity createNewTileEntity(World world, int metadata) {
                        return new TileLantern();
                        
                        }
                        
                        public boolean hasTileEntity(int metadata) {
                        return true;
                        }
                        }
                        
                        

                        Model:

                        ​package com.google.SpyMan.Mechanicalcraft.common.Lantern;
                        
                        import net.minecraft.client.model.ModelBase;
                        import net.minecraft.client.model.ModelRenderer;
                        import net.minecraft.entity.Entity;
                        
                        public class ModelLantern extends ModelBase
                        {
                        
                            ModelRenderer compartimentCandel;
                            ModelRenderer Base;
                            ModelRenderer Shape3;
                            ModelRenderer Shape4;
                            ModelRenderer Shape5;
                            ModelRenderer Shape6;
                            ModelRenderer BaseTop;
                            ModelRenderer Candel;
                            ModelRenderer PoignerCoté1;
                            ModelRenderer Shape10;
                            ModelRenderer poignerTop;
                        
                          public ModelLantern()
                          {
                            textureWidth = 64;
                            textureHeight = 32;
                        
                              compartimentCandel = new ModelRenderer(this, 25, 12);
                              compartimentCandel.addBox(0F, 0F, 0F, 6, 8, 6);
                              compartimentCandel.setRotationPoint(-3F, 15F, -3F);
                              compartimentCandel.setTextureSize(64, 32);
                              compartimentCandel.mirror = true;
                              setRotation(compartimentCandel, 0F, 0F, 0F);
                              Base = new ModelRenderer(this, 0, 0);
                              Base.mirror = false;
                              Base.addBox(0F, 0F, 0F, 8, 1, 8);
                              Base.setRotationPoint(-4F, 23F, -4F);
                              Base.setTextureSize(64, 32);
                              setRotation(Base, 0F, 0F, 0F);
                              Shape3 = new ModelRenderer(this, 8, 17);
                              Shape5.mirror = false;
                              Shape3.addBox(0F, 0F, 0F, 1, 8, 1);
                              Shape3.setRotationPoint(-4F, 15F, 3F);
                              Shape3.setTextureSize(64, 32);
                              setRotation(Shape3, 0F, 0F, 0F);
                              Shape4 = new ModelRenderer(this, 8, 17);
                              Shape4.mirror = false;
                              Shape4.addBox(0F, 0F, 0F, 1, 8, 1);
                              Shape4.setRotationPoint(-4F, 15F, -4F);
                              Shape4.setTextureSize(64, 32);
                              setRotation(Shape4, 0F, 0F, 0F);
                              Shape5 = new ModelRenderer(this, 8, 17);
                              Shape5.mirror = false;
                              Shape5.addBox(0F, 0F, 0F, 1, 8, 1);
                              Shape5.setRotationPoint(3F, 15F, -4F);
                              Shape5.setTextureSize(64, 32);
                              setRotation(Shape5, 0F, 0F, 0F);
                              Shape6 = new ModelRenderer(this, 8, 17);
                              Shape6.mirror = false;
                              Shape6.addBox(0F, 0F, 0F, 1, 8, 1);
                              Shape6.setRotationPoint(3F, 15F, 3F);
                              Shape6.setTextureSize(64, 32);
                              setRotation(Shape6, 0F, 0F, 0F);
                              BaseTop = new ModelRenderer(this, 32, 0);
                              BaseTop.mirror = false;
                              BaseTop.addBox(0F, 0F, 0F, 8, 1, 8);
                              BaseTop.setRotationPoint(-4F, 14F, -4F);
                              BaseTop.setTextureSize(64, 32);
                              setRotation(BaseTop, 0F, 0F, 0F);
                              Candel = new ModelRenderer(this, 15, 17);
                              Candel.mirror = false;
                              Candel.addBox(0F, 0F, 0F, 2, 5, 2);
                              Candel.setRotationPoint(-1F, 18F, -1F);
                              Candel.setTextureSize(64, 32);
                              setRotation(Candel, 0F, 0F, 0F);
                              PoignerCoté1 = new ModelRenderer(this, 0, 10);
                              PoignerCoté1.mirror = false;
                              PoignerCoté1.addBox(0F, 0F, 0F, 1, 2, 2);
                              PoignerCoté1.setRotationPoint(-3F, 12F, -1F);
                              PoignerCoté1.setTextureSize(64, 32);
                              setRotation(PoignerCoté1, 0F, 0F, 0F);
                              Shape10 = new ModelRenderer(this, 0, 10);
                              Shape10.mirror = false;
                              Shape10.addBox(0F, 0F, 0F, 1, 2, 2);
                              Shape10.setRotationPoint(2F, 12F, -1F);
                              Shape10.setTextureSize(64, 32);
                              setRotation(Shape10, 0F, 0F, 0F);
                              poignerTop = new ModelRenderer(this, 7, 10);
                              poignerTop.mirror = false;
                              poignerTop.addBox(0F, 0F, 0F, 4, 1, 2);
                              poignerTop.setRotationPoint(-2F, 11F, -1F);
                              poignerTop.setTextureSize(64, 32);
                              setRotation(poignerTop, 0F, 0F, 0F);
                          }
                        
                          public void renderAll()
                          {
                        
                            compartimentCandel.render(0.0625F);
                            Base.render(0.0625F);
                            Shape3.render(0.0625F);
                            Shape4.render(0.0625F);
                            Shape5.render(0.0625F);
                            Shape6.render(0.0625F);
                            BaseTop.render(0.0625F);
                            Candel.render(0.0625F);
                            PoignerCoté1.render(0.0625F);
                            Shape10.render(0.0625F);
                            poignerTop.render(0.0625F);
                          }
                        
                          private void setRotation(ModelRenderer model, float x, float y, float z)
                          {
                            model.rotateAngleX = x;
                            model.rotateAngleY = y;
                            model.rotateAngleZ = z;
                          }
                        
                        }
                        
                        

                        ClientProxy :

                        ​package com.google.SpyMan.Mechanicalcraft.proxy;
                        
                        import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileEntityLanternSpecialRenderer;
                        import com.google.SpyMan.Mechanicalcraft.common.Lantern.TileLantern;
                        
                        import cpw.mods.fml.client.registry.ClientRegistry;
                        import cpw.mods.fml.client.registry.RenderingRegistry;
                        
                        public class ClientProxy extends CommonProxy {
                        public static int tesrRenderId;
                        @Override
                        public void registerRender() {
                        ClientRegistry.bindTileEntitySpecialRenderer(TileLantern.class, new TileEntityLanternSpecialRenderer());
                        tesrRenderId = RenderingRegistry.getNextAvailableRenderId();
                        }
                        
                        }
                        
                        1 réponse Dernière réponse Répondre Citer 0
                        • SpyManS Hors-ligne
                          SpyMan
                          dernière édition par

                          Crash Report :

                          [22:58:37 [main/INFO] [GradleStart]: Extra: []
                          ]
                          [22:58:37 [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Family/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker]
                          [22:58:37 [main/INFO] [FML]: Forge Mod Loader version 7.99.18.1452 for Minecraft 1.7.10 loading]
                          [22:58:37 [main/INFO] [FML]: Java is Java HotSpot™ 64-Bit Server VM, version 1.8.0_45, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_45]
                          [22:58:37 [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker]
                          [22:58:37 [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin]
                          [22:58:37 [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker]
                          [22:58:37 [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper]
                          [22:58:38 [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!]
                          [22:58:44 [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing]
                          [22:58:44 [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper]
                          [22:58:44 [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker]
                          [22:58:46 [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker]
                          [22:58:46 [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker]
                          [22:58:46 [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker]
                          [22:58:46 [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}]
                          [22:58:49 [main/INFO]: Setting user: Player836]
                          [22:58:56 [Client thread/INFO]: LWJGL Version: 2.9.1]
                          [22:59:01 [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: –-- Minecraft Crash Report ----]
                          // I blame Dinnerbone.

                          %(#333333)

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

                            “Shape5” alors que çà devrait être Shape3, vérifie tout ton fichier, il peut y avoir d’autres erreurs comme celle là

                            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
                            • robin4002R Hors-ligne
                              robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                              dernière édition par

                              PoignerCoté1 = new ModelRenderer(this, 0, 10);
                              Tu n’as toujours pas viré les accents.

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

                                J’ai corrigé les erreurs mais j’ai toujours pas de model qui est appliqué a mon block

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

                                  tu as mis le bindTexture après le rendu du model.

                                  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
                                  • robin4002R Hors-ligne
                                    robin4002 Moddeurs confirmés Rédacteurs Administrateurs
                                    dernière édition par

                                    Le tile entity est-il enregistré dans la classe principale ?

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

                                      Oui bien sur.

                                      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

                                        @‘SCAREX’:

                                        tu as mis le bindTexture après le rendu du model.

                                        Tu as vu ce message ?

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

                                          oui oui

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

                                            Que dois-je faire pour résoudre ce problème? :huh: , j’ai refait entièrement mes classe sans résultat.

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB