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

      TileEntityChaise.java ?
      TESRInventoryRenderer.java ?
      BlockEterliaChaise ?

      1 réponse Dernière réponse Répondre Citer 0
      • Bot LennonB Hors-ligne
        Bot Lennon
        dernière édition par

        Pardon, je me suis mélangé dans mes codes, j’edit tout de suite

        Edit: Problème du bloc dans l’inventaire réglé, j’ai réaligné les codes et mis les bons aux bons endroits

        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 boucle for dans ta fonction writeToNBT ne sert à rien.
          Et toujours dans ton tile entity, ajoute ces deux fonctions pour la synchronisation :

              public Packet getDescriptionPacket()
          
              {
                  NBTTagCompound nbttagcompound = new NBTTagCompound();
                  this.writeToNBT(nbttagcompound);
                  return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbttagcompound);
              }
          
              public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
              {
                  this.readFromNBT(pkt.func_148857_g());
              }
          
          1 réponse Dernière réponse Répondre Citer 0
          • Bot LennonB Hors-ligne
            Bot Lennon
            dernière édition par

            La position a l’air d’être sauvegardée cependant lorsque je pose une chaise ma fenêtre de jeu se ferme, et si je reviens la chaise est bien à sa place pourtant.

            Voilà mes logs:

            [22:11:06] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-04-07_22.11.06-server.txt
            [22:11:06] [Client thread/INFO] [FML]: Waiting for the server to terminate/save.
            [22:11:06] [Server thread/INFO]: Saving worlds
            [22:11:06] [Server thread/INFO]: Saving chunks for level 'ESSAI DES MODS'/Overworld
            [22:11:06] [Server thread/ERROR] [FML]: A TileEntity type fr.eterlia.mod.common.TileEntityChaise has throw an exception trying to write state. It will not persist. Report this to the mod author
            java.lang.RuntimeException: class fr.eterlia.mod.common.TileEntityChaise 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.MinecraftServer.stopServer(MinecraftServer.java:405) [MinecraftServer.class:?]
            at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:266) [IntegratedServer.class:?]
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:538) [MinecraftServer.class:?]
            at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
            [22:11:06] [Server thread/INFO]: Saving chunks for level 'ESSAI DES MODS'/Nether
            [22:11:06] [Server thread/INFO]: Saving chunks for level 'ESSAI DES MODS'/The End
            [22:11:06] [Server thread/INFO] [FML]: Unloading dimension 0
            [22:11:06] [Server thread/INFO] [FML]: Unloading dimension -1
            [22:11:06] [Server thread/INFO] [FML]: Unloading dimension 1
            [22:11:06] [Server thread/INFO] [FML]: Applying holder lookups
            [22:11:06] [Server thread/INFO] [FML]: Holder lookups applied
            [22:11:06] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
            [22:11:06] [Client thread/INFO] [FML]: Server terminated.
            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

              Ton entité de bloc n’est pas enregistré.

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

                J’ai un problème mineur avec la texture de mon block, dans le log j’ai ceci:

                [11:35:25] [Client thread/ERROR]: Using missing texture, unable to load meubles:textures/blocks/model_block_tutoriel.png
                java.io.FileNotFoundException: meubles:textures/blocks/model_block_tutoriel.png
                at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
                at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?]
                at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
                at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
                at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
                at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
                at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?]
                at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?]
                at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
                at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
                at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
                at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
                at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
                at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
                at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
                at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
                at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                at GradleStart.main(Unknown Source) [start/:?]
                

                En jeu la texture de mon block est bien présente sauf quand je le casse, c’est une animation du block sans texture (texture par défaut), j’ai fait une image pour mieux comprendre, à gauche mon block et sa texture et à droite le block que je détruis.

                J’ai essayé de comprendre pourquoi et je n’ai pas trouvé malheureusement. 😞

                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

                  Car la texture utilisée pour les particules est celle du bloc, pas celle du TESR. Il faut donc ajouter une texture en plus de 16x16 pour les particules.

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

                    Merci de ta réponse, à partir de quelle minute on voit ce passage dans ta vidéo, j’ai compris ce que tu dis mais c’est l’étape de faire le block 16x16 qui m’intéresse de voir, je fais la face avant, un côté ?

                    J’ai fait ce tutoriel très tard donc…

                    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

                      Aucune idée x)
                      Je ne connais pas par cœur tous mes tutoriels. Faire la texture pour les particules c’est exactement la même chose que faire un texture pour un bloc basique.

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

                        Ok ^^, je vais prendre la texture de face de mon block, encore merci.

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

                          salut j’ai un petit probleme : le carré tout moche apparait alors que le return de getRenderType est bien le bon ;

                          la classe du block ```java
                          package com.mathiasetampes.entreprise.common;

                          import com.mathiasetampes.entreprise.proxy.ClientProxy;

                          import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
                          import cpw.mods.fml.relauncher.Side;
                          import cpw.mods.fml.relauncher.SideOnly;
                          import net.minecraft.block.Block;
                          import net.minecraft.block.BlockContainer;
                          import net.minecraft.block.material.Material;
                          import net.minecraft.client.renderer.texture.IIconRegister;
                          import net.minecraft.entity.EntityLivingBase;
                          import net.minecraft.entity.item.EntityItem;
                          import net.minecraft.entity.player.EntityPlayer;
                          import net.minecraft.inventory.IInventory;
                          import net.minecraft.item.ItemStack;
                          import net.minecraft.nbt.NBTTagCompound;
                          import net.minecraft.tileentity.TileEntity;
                          import net.minecraft.util.IIcon;
                          import net.minecraft.util.MathHelper;
                          import net.minecraft.world.World;

                          public class Distributeur extends BlockContainer
                          {

                          private IIcon front;
                          protected Distributeur()
                          {
                          super(Material.rock); //Mettez le material qui convient
                          this.setResistance(8.0F);
                          this.setHarvestLevel(“pickaxe”, 2); //Outil pour casser le bloc, pour le chiffre : 0=bois, 1=pierre, 2=fer, 3=diamant
                          }

                          @Override
                          public TileEntity createNewTileEntity(World world, int metadata) //Instancie le TileEntity
                          {
                          return new TileEntityDistributeur();
                          }

                          @Override
                          public boolean hasTileEntity(int metadata) //Permet de savoir si le bloc a un TileEntity
                          {
                          return true;
                          }
                          public void breakBlock(World world, int x, int y, int z, Block block, int metadata)
                          {
                          TileEntity tileentity = world.getTileEntity(x, y, z);

                          if (tileentity instanceof IInventory)
                          {
                          IInventory inv = (IInventory)tileentity;
                          for (int i1 = 0; i1 < inv.getSizeInventory(); ++i1)
                          {
                          ItemStack itemstack = inv.getStackInSlot(i1);

                          if (itemstack != null)
                          {
                          float f = world.rand.nextFloat() * 0.8F + 0.1F;
                          float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
                          EntityItem entityitem;

                          for (float f2 = world.rand.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem))
                          {
                          int j1 = world.rand.nextInt(21) + 10;

                          if (j1 > itemstack.stackSize)
                          {
                          j1 = itemstack.stackSize;
                          }

                          itemstack.stackSize -= j1;
                          entityitem = new EntityItem(world, (double)((float)x + f), (double)((float)y + f1), (double)((float)z + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
                          float f3 = 0.05F;
                          entityitem.motionX = (double)((float)world.rand.nextGaussian() * f3);
                          entityitem.motionY = (double)((float)world.rand.nextGaussian() * f3 + 0.2F);
                          entityitem.motionZ = (double)((float)world.rand.nextGaussian() * f3);

                          if (itemstack.hasTagCompound())
                          {
                          entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
                          }
                          }
                          }
                          }

                          world.func_147453_f(x, y, z, block);
                          }

                          super.breakBlock(world, x, y, z, block, metadata);
                          }
                          public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitx, float hity, float hitz)
                          {
                          if (world.isRemote)
                          {
                          return true;
                          }
                          else
                          {
                          FMLNetworkHandler.openGui(player, Entreprise.instance, 0, world, x, y, z);
                          return true;
                          }
                          }
                          public void registerBlockIcons(IIconRegister iiconRegister)
                          {
                          this.blockIcon = iiconRegister.registerIcon(“minecraft:stone”);
                          }

                          public boolean isOpaqueCube()
                          {
                          return false;
                          }

                          public boolean renderAsNormalBlock()
                          {
                          return false;
                          }

                          public int getRenderType()
                          {
                          return ClientProxy.tesrRenderId;
                          }
                          }

                          
                          du client proxy
                          ```java
                          package com.mathiasetampes.entreprise.proxy;
                          
                          import com.mathiasetampes.entreprise.client.TileEntityDistributeurSpecialRenderer;
                          import com.mathiasetampes.entreprise.common.TileEntityDistributeur;
                          
                          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(TileEntityDistributeur.class, new TileEntityDistributeurSpecialRenderer());
                          System.out.println("méthode côté client");
                          tesrRenderId = RenderingRegistry.getNextAvailableRenderId();
                          RenderingRegistry.registerBlockHandler(new TESRInventoryRenderer());
                          
                          }
                          }
                          
                          

                          et du TESR

                          package com.mathiasetampes.entreprise.proxy;
                          
                          import org.lwjgl.opengl.GL11;
                          
                          import com.mathiasetampes.entreprise.client.TileEntityDistributeurSpecialRenderer;
                          import com.mathiasetampes.entreprise.common.Entreprise;
                          
                          import net.minecraft.block.Block;
                          import net.minecraft.client.Minecraft;
                          import net.minecraft.client.renderer.RenderBlocks;
                          import net.minecraft.world.IBlockAccess;
                          import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
                          
                          public class TESRInventoryRenderer implements ISimpleBlockRenderingHandler {
                          
                          @Override
                          public void renderInventoryBlock(Block block, int metadata, int modelId,
                          RenderBlocks renderer)
                          {
                          if(block == Entreprise.distributeur)
                          {
                          GL11.glPushMatrix();
                          GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
                          GL11.glTranslatef(0.0F, -1.0F, 0.0F);
                          Minecraft.getMinecraft().getTextureManager().bindTexture(TileEntityDistributeurSpecialRenderer.texture);
                          TileEntityDistributeurSpecialRenderer.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;
                          }
                          
                          }
                          
                          
                          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 carré tout moche ?
                            Le "        System.out.println(“méthode côté client”);" apparaît-il dans les logs ?

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

                              oui , le carré tout moche : c’est a dire qu’au lieux d’avoir un block j’ai un carré de stone (c’est la texture que j’utilise en dessous du model )

                              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 modèle ressemble à quoi ?

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

                                  a un distributeur de billet

                                  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

                                    Envoie le code du modèle, un screen du modèle, et un screen du rendu en jeu.

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

                                      je veut bien mais c’est le rendu dans l’inventaire qui pose problème

                                      modele

                                      package com.mathiasetampes.entreprise.client.model;
                                      
                                      import net.minecraft.client.model.ModelBase;
                                      import net.minecraft.client.model.ModelRenderer;
                                      import net.minecraft.entity.Entity;
                                      
                                      public class ATMModel extends ModelBase
                                      {
                                       //fields
                                         ModelRenderer Base;
                                         ModelRenderer FrameBottom;
                                         ModelRenderer Top;
                                         ModelRenderer Right;
                                         ModelRenderer Left;
                                         ModelRenderer FrameTop;
                                         ModelRenderer FrameLeft;
                                         ModelRenderer FrameRight;
                                         ModelRenderer Keypad;
                                         ModelRenderer Panel;
                                         ModelRenderer Shape6;
                                         ModelRenderer CashBackPanel;
                                         ModelRenderer CashSlot;
                                         ModelRenderer Screen;
                                         ModelRenderer Panel2;
                                         ModelRenderer Panel3;
                                         ModelRenderer Shape1;
                                      
                                       public ATMModel()
                                       {
                                         textureWidth = 128;
                                         textureHeight = 64;
                                      
                                           Base = new ModelRenderer(this, 64, 18);
                                           Base.addBox(0F, 0F, 0F, 16, 2, 16);
                                           Base.setRotationPoint(-8F, 22F, -8F);
                                           Base.setTextureSize(128, 64);
                                           Base.mirror = true;
                                           setRotation(Base, 0F, 0F, 0F);
                                           FrameBottom = new ModelRenderer(this, 0, 61);
                                           FrameBottom.addBox(0F, 0F, 0F, 14, 2, 1);
                                           FrameBottom.setRotationPoint(-7F, 21F, -8.5F);
                                           FrameBottom.setTextureSize(128, 64);
                                           FrameBottom.mirror = true;
                                           setRotation(FrameBottom, 0F, 0F, 0F);
                                           Top = new ModelRenderer(this, 64, 0);
                                           Top.addBox(0F, 0F, 0F, 16, 2, 16);
                                           Top.setRotationPoint(-8F, 8F, -8F);
                                           Top.setTextureSize(128, 64);
                                           Top.mirror = true;
                                           setRotation(Top, 0F, 0F, 0F);
                                           Right = new ModelRenderer(this, 92, 36);
                                           Right.addBox(0F, 0F, 0F, 2, 12, 16);
                                           Right.setRotationPoint(6F, 10F, -8F);
                                           Right.setTextureSize(128, 64);
                                           Right.mirror = true;
                                           setRotation(Right, 0F, 0F, 0F);
                                           Left = new ModelRenderer(this, 56, 36);
                                           Left.addBox(0F, 0F, 0F, 2, 12, 16);
                                           Left.setRotationPoint(-8F, 10F, -8F);
                                           Left.setTextureSize(128, 64);
                                           Left.mirror = true;
                                           setRotation(Left, 0F, 0F, 0F);
                                           FrameTop = new ModelRenderer(this, 0, 58);
                                           FrameTop.addBox(0F, 0F, 0F, 14, 2, 1);
                                           FrameTop.setRotationPoint(-7F, 9F, -8.5F);
                                           FrameTop.setTextureSize(128, 64);
                                           FrameTop.mirror = true;
                                           setRotation(FrameTop, 0F, 0F, 0F);
                                           FrameLeft = new ModelRenderer(this, 0, 40);
                                           FrameLeft.addBox(0F, 0F, 0F, 2, 10, 8);
                                           FrameLeft.setRotationPoint(-7F, 11F, -8.5F);
                                           FrameLeft.setTextureSize(128, 64);
                                           FrameLeft.mirror = true;
                                           setRotation(FrameLeft, 0F, 0F, 0F);
                                           FrameRight = new ModelRenderer(this, 36, 46);
                                           FrameRight.addBox(0F, 0F, 0F, 2, 10, 8);
                                           FrameRight.setRotationPoint(5F, 11F, -8.5F);
                                           FrameRight.setTextureSize(128, 64);
                                           FrameRight.mirror = true;
                                           setRotation(FrameRight, 0F, 0F, 0F);
                                           Keypad = new ModelRenderer(this, 0, 35);
                                           Keypad.addBox(-7F, 0F, 0F, 13, 4, 1);
                                           Keypad.setRotationPoint(0.5F, 20F, -4.5F);
                                           Keypad.setTextureSize(128, 64);
                                           Keypad.mirror = true;
                                           setRotation(Keypad, -1.308997F, 0F, 0F);
                                           Panel = new ModelRenderer(this, 0, 3);
                                           Panel.addBox(0F, 0F, 0F, 6, 10, 1);
                                           Panel.setRotationPoint(0F, 11.5F, -3.2F);
                                           Panel.setTextureSize(128, 64);
                                           Panel.mirror = true;
                                           setRotation(Panel, -0.2617994F, 0F, 0F);
                                           Shape6 = new ModelRenderer(this, 0, 26);
                                           Shape6.addBox(-7F, 0F, 0F, 13, 8, 1);
                                           Shape6.setRotationPoint(0.8F, 11F, -8.4F);
                                           Shape6.setTextureSize(128, 64);
                                           Shape6.mirror = true;
                                           setRotation(Shape6, 1.22173F, 0F, 0F);
                                           CashBackPanel = new ModelRenderer(this, 20, 53);
                                           CashBackPanel.addBox(0F, 0F, 0F, 5, 2, 1);
                                           CashBackPanel.setRotationPoint(-5F, 18F, -4.5F);
                                           CashBackPanel.setTextureSize(128, 64);
                                           CashBackPanel.mirror = true;
                                           setRotation(CashBackPanel, 0F, 0F, 0F);
                                           CashSlot = new ModelRenderer(this, 20, 56);
                                           CashSlot.addBox(0F, 0F, 0F, 4, 1, 1);
                                           CashSlot.setRotationPoint(-4.5F, 18.5F, -4.8F);
                                           CashSlot.setTextureSize(128, 64);
                                           CashSlot.mirror = true;
                                           setRotation(CashSlot, 0F, 0F, 0F);
                                           Screen = new ModelRenderer(this, 0, 19);
                                           Screen.addBox(0F, 0F, 0F, 5, 6, 1);
                                           Screen.setRotationPoint(-5F, 12.3F, -3F);
                                           Screen.setTextureSize(128, 64);
                                           Screen.mirror = true;
                                           setRotation(Screen, -0.2617994F, 0F, 0F);
                                           Panel2 = new ModelRenderer(this, 0, 0);
                                           Panel2.addBox(0F, 0F, 0F, 6, 2, 1);
                                           Panel2.setRotationPoint(-6F, 11.5F, -3.2F);
                                           Panel2.setTextureSize(128, 64);
                                           Panel2.mirror = true;
                                           setRotation(Panel2, -0.2617994F, 0F, 0F);
                                           Panel3 = new ModelRenderer(this, 20, 40);
                                           Panel3.addBox(0F, 0F, 0F, 1, 10, 1);
                                           Panel3.setRotationPoint(-5.7F, 11.5F, -3.2F);
                                           Panel3.setTextureSize(128, 64);
                                           Panel3.mirror = true;
                                           setRotation(Panel3, -0.2617994F, 0F, 0F);
                                           Shape1 = new ModelRenderer(this, 14, 0);
                                           Shape1.addBox(0F, 0F, 0F, 12, 12, 1);
                                           Shape1.setRotationPoint(-6F, 10F, 7F);
                                           Shape1.setTextureSize(128, 64);
                                           Shape1.mirror = true;
                                           setRotation(Shape1, 0F, 0F, 0F);
                                       }
                                      
                                       public void renderAll()
                                       {
                                         Base.render(0.0625F );
                                         FrameBottom.render(0.0625F );
                                         Top.render(0.0625F );
                                         Right.render(0.0625F );
                                         Left.render(0.0625F );
                                         FrameTop.render(0.0625F );
                                         FrameLeft.render(0.0625F );
                                         FrameRight.render(0.0625F );
                                         Keypad.render(0.0625F );
                                         Panel.render(0.0625F );
                                         Shape6.render(0.0625F );
                                         CashBackPanel.render(0.0625F );
                                         CashSlot.render(0.0625F );
                                         Screen.render(0.0625F );
                                         Panel2.render(0.0625F );
                                         Panel3.render(0.0625F );
                                         Shape1.render(0.0625F );
                                       }
                                      
                                       private void setRotation(ModelRenderer model, float x, float y, float z)
                                       {
                                         model.rotateAngleX = x;
                                         model.rotateAngleY = y;
                                         model.rotateAngleZ = z;
                                       }
                                      
                                      }
                                      
                                      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 ! Il fallait le préciser plutôt.
                                        Je viens de voir le problème.
                                            @Override

                                        public int getRenderId()
                                            {
                                                return 0;
                                            }
                                        Devrait être
                                        return ClientProxy.tesrRenderId; (classe TESRInventoryRenderer)

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

                                          encore moi ^^ j’ai fais en sorte de rendre le distributeur orientable mais bizarrement chaque fois que je quitte le jeu il reprend une certaine position pourtant que j’affiche le nbt de direction il a la bonne valeur

                                          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 es sûr qu’il a la bonne valeur côté client ? À mon avis non. Ajoute ça dans l’entité de bloc

                                            ​ public Packet getDescriptionPacket()
                                            {
                                            NBTTagCompound nbttagcompound = new NBTTagCompound();
                                            this.writeToNBT(nbttagcompound);
                                            return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbttagcompound);
                                            }
                                            
                                            public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
                                            {
                                            this.readFromNBT(pkt.func_148857_g());
                                            this.worldObj.markBlockRangeForRenderUpdate(this.xCoord, this.yCoord, this.zCoord, this.xCoord, this.yCoord, this.zCoord);
                                            }
                                            
                                            1 réponse Dernière réponse Répondre Citer 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 4 / 6
                                            • Premier message
                                              Dernier message
                                            Design by Woryk
                                            ContactMentions Légales

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB