MFF

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

    Rendu complexe de bloc via TESR

    Planifier Épinglé Verrouillé Déplacé Les blocs
    1.6.x
    215 Messages 31 Publieurs 75.2k 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.
    • F Hors-ligne
      fireblade51
      dernière édition par

      D’accord je vait esseyer sa merci 🙂

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

        😃 Bah c’est a moi de te remercier si tu reussis a régler mon problème qui date de + de 10 jours ^^___
        Parce que j’ai beau suivre plusieurs tutos, rien ne marche.

        Si quelqu’un pouvait m’envoyer tous ses fichiers .java afin que je les copie et que je remplace juste le model

        1 réponse Dernière réponse Répondre Citer 0
        • kevin_68K Hors-ligne
          kevin_68 Moddeurs confirmés
          dernière édition par

          Je pourrais voir toute la classe? (import aussi)


          Mettez à jours vers la dernière version stable (1.8.9 voir même…

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

            Je te met toute les classes dans 2 min___
            BlockParasol :

            package Assabody.mod;
            
            import net.minecraft.block.BlockContainer;
            import net.minecraft.block.material.Material;
            import net.minecraft.client.renderer.texture.IconRegister;
            import net.minecraft.creativetab.CreativeTabs;
            import net.minecraft.tileentity.TileEntity;
            import net.minecraft.world.World;
            
            public class BlockParasol extends BlockContainer {
            
            //Treat it like a normal block here. The Block Bounds are a good idea - the first three are X Y and Z of the botton-left corner,
            //And the second three are the top-right corner.
            public BlockParasol(int id) {
            super(id, Material.iron);
            this.setCreativeTab(CreativeTabs.tabBlock);
            this.setBlockBounds(0.4F, 0.0F, 0.4F, 0.6F, 3.0F, 0.6F);
            }
            
            //Make sure you set this as your TileEntity class relevant for the block!
            @Override
            
            public TileEntity createNewTileEntity(World world) {
            return new TileEntityParasol();
            }
            @Override
            public TileEntity createTileEntity(World world, int metadata)
            {
            return new TileEntityParasol();
            }
            
            //You don't want the normal render type, or it wont render properly.
            @Override
            public int getRenderType() {
            return -1;
            }
            
            //It's not an opaque cube, so you need this.
            @Override
            public boolean isOpaqueCube() {
            return false;
            }
            
            //It's not a normal block, so you need this too.
            public boolean renderAsNormalBlock() {
            return false;
            }
            
            //This is the icon to use for showing the block in your hand.
            public void registerIcons(IconRegister icon) {
            this.blockIcon = icon.registerIcon("assabody-mod:TrafficLightIcon");
            }
            public boolean hasTileEntity(int metadata)
            {
            return true;
            }
            
            }
            

            TileEntityParasol :

            package Assabody.mod;
            
            import com.jcraft.jogg.Packet;
            
            import net.minecraft.nbt.NBTTagCompound;
            import net.minecraft.network.INetworkManager;
            import net.minecraft.network.packet.Packet132TileEntityData;
            import net.minecraft.tileentity.TileEntity;
            
            public class TileEntityParasol extends TileEntity {
            
            public net.minecraft.network.packet.Packet getDescriptionPacket() {
            NBTTagCompound nbtTag = new NBTTagCompound();
            this.writeToNBT(nbtTag);
            return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag);
            }
            
            public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) {
            readFromNBT(packet.customParam1);
            }
            }
            

            TileEntityParasolRenderer ( avec les deux erreurs ) :

            package Assabody.mod;
            
            import javax.swing.text.html.parser.Entity;
            import Assabody.mod.ModelParasol;
            import org.lwjgl.opengl.GL11;
            
            import cpw.mods.fml.common.Mod.Block;
            
            import net.minecraft.client.renderer.OpenGlHelper;
            import net.minecraft.client.renderer.Tessellator;
            import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
            import net.minecraft.tileentity.TileEntity;
            import net.minecraft.util.ResourceLocation;
            import net.minecraft.world.World;
            import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
            
            public class TileEntityParasolRenderer extends TileEntitySpecialRenderer {
            
            //The model of your block
            
            private void adjustRotatePivotViaMeta(World world, int x, int y, int z) {
            int meta = world.getBlockMetadata(x, y, z);
            GL11.glPushMatrix();
            GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F);
            GL11.glPopMatrix();
            }
            
            @Override
            public void renderTileEntityAt(TileEntity par1TileEntity, double x, double y, double z, float scale) {
            //The PushMatrix tells the renderer to "start" doing something.
            GL11.glPushMatrix();
            //This is setting the initial location.
            GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
            //This is the texture of your block. It's pathed to be the same place as your other blocks here.
            //Outdated bindTextureByName("/mods/roads/textures/blocks/TrafficLightPoleRed.png");
            //Use in 1.6.2 this
            func_110628_a(new ResourceLocation("mods:assabody-mod/textures/blocks/TrafficLightPoleRed.png"));
            //the ':' is very important
            
            //This rotation part is very important! Without it, your model will render upside-down! And for some reason you DO need PushMatrix again!
            GL11.glPushMatrix();
            GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
            //A reference to your Model file. Again, very important.
            this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
            
            //Tell it to stop rendering for both the PushMatrix's
            GL11.glPopMatrix();
            GL11.glPopMatrix();
            }
            
            //Set the lighting stuff, so it changes it's brightness properly.
            private void adjustLightFixture(World world, int i, int j, int k, Block block)
            {
            Tessellator tess = Tessellator.instance;
            float brightness = block.getBlockBrightness(world, i, j, k);
            int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
            int modulousModifier = skyLight % 65536;
            int divModifier = skyLight / 65536;
            tess.setColorOpaque_F(brightness, brightness, brightness);
            OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)modulousModifier, divModifier);
            
            }
            
            public void renderTileEntityAtBlockTutorielTechne(TileEntityParasol tileentity, double x, double y, double z, float scale)
            {
            }
            
            public final ModelParasol model;
            
            public TileEntityParasolRenderer() {
            ModelParasol model = new ModelParasol();
            this.model = new ModelParasol();}
            
            }
            

            ModelParasol :

            package Assabody.mod;
            
            import net.minecraft.client.model.ModelBase;
            import net.minecraft.client.model.ModelRenderer;
            import net.minecraft.entity.Entity;
            
            public class ModelParasol extends ModelBase
            {
            ModelRenderer Shape1;
            ModelRenderer Shape2;
            
            public ModelParasol()
            {
            textureWidth = 128;
            textureHeight = 128;
            
            Shape1 = new ModelRenderer(this, 0, 0);
            Shape1.addBox(0.0F, 0.0F, 0.0F, 1, 28, 1);
            Shape1.setRotationPoint(0.0F, -4.0F, 0.0F);
            Shape1.setTextureSize(128, 128);
            Shape1.mirror = true;
            setRotation(this.Shape1, 0.0F, 0.0F, 0.0F);
            Shape2 = new ModelRenderer(this, 4, 0);
            Shape2.addBox(0.0F, 0.0F, 0.0F, 21, 1, 21);
            Shape2.setRotationPoint(-10.0F, -5.0F, -10.0F);
            Shape2.setTextureSize(128, 128);
            Shape2.mirror = true;
            setRotation(this.Shape2, 0.0F, 0.0F, 0.0F);
            }
            
            public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
            {
            super.render(entity, f, f1, f2, f3, f4, f5);
            setRotationAngles(f, f1, f2, f3, f4, f5, entity);
            Shape1.render(f5);
            Shape2.render(f5);
            }
            
            private void setRotation(ModelRenderer model, float x, float y, float z)
            {
            model.rotateAngleX = x;
            model.rotateAngleY = y;
            model.rotateAngleZ = z;
            }
            
            public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
            {
            super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
            }
            
            public void renderModel(float f)
            {
            }
            
            }
            

            Merci de ton aide___
            Déclaration dans la Classe principale :

            GameRegistry.registerTileEntity(TileEntityParasol.class, "tileEntityParasol");
            

            et dans le proxyClient :

            ClientRegistry.bindTileEntitySpecialRenderer(TileEntityParasol.class, new TileEntityParasolRenderer());
            
            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

              TileEntityParasolRenderer.class :
              import cpw.mods.fml.common.Mod.Block; -> net.minecraft.block.Block

              Pour les items et blocs, importez toujours net.minecraft.item ou block.Item ou Block
              Jamais celui de fml, il est que utilisé pour l’itemtracker de fml, c’est lié au fonctionnement de fml, et rien d’autre. Et encore moins la classe Block ou Item de java. TOUJOURS net.minecraft.block.Block ou net.minecraft.item.Item

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

                Ok merci, je vais tester tt de suite___
                Merci beaucoup, maintenant il marque plus qu’1 erreur, l’erreur .render___
                la version de Minecraft la 1.6.2 et forge est en 9.10.0.804

                1 réponse Dernière réponse Répondre Citer 0
                • kevin_68K Hors-ligne
                  kevin_68 Moddeurs confirmés
                  dernière édition par

                  Robin plus rapide quoi moi ……
                  Sinon essaie un ctrl+shift+o et s’il te propose d’importer Entity, prend bien celui de Minecraft


                  Mettez à jours vers la dernière version stable (1.8.9 voir même…

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

                    Ok merci___
                    Il me marque en bas “0 import added.” Et y a tjr l’erreur___
                    Et quand je reste sur minecraft, quand je pose le bloc, minecraft crash

                    Merci et bonne nuit 😃

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

                      Personne n’a d’idées et/ou peut m’envoyer ses classes ?

                      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

                        TileEntityParasolRenderer :
                        import javax.swing.text.html.parser.Entity; -> import net.minecraft.entity.Entity;

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

                          Bonjour j’ai encore un problème, dans la classe: TileEntityTutorialTechneRender

                          
                          package testmodcode;
                          
                          import org.lwjgl.opengl.GL11;
                          import net.minecraft.block.Block;
                          import net.minecraft.client.renderer.OpenGlHelper;
                          import net.minecraft.client.renderer.Tessellator;
                          import net.minecraft.entity.Entity;
                          import net.minecraft.tileentity.TileEntity;
                          import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
                          import net.minecraft.util.ResourceLocation;
                          import net.minecraft.world.World;
                          
                          public class TileEntityTutorialTechneRender extends TileEntitySpecialRenderer
                          {
                          private final ModelBlockTutorielTechne model;
                          protected static final ResourceLocation texture = new ResourceLocation("rm:textures/blocks/BlockTechne.png");
                          
                          public TileEntityTutorialTechneRender()
                          {
                          this.model = new ModelBlockTutorielTechne();
                          }
                          
                          private void adjustRotatePivotViaMeta(World world, int x, int y, int z)
                          {
                          int meta = world.getBlockMetadata(x, y, z);
                          GL11.glPushMatrix();
                          GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F);
                          GL11.glPopMatrix();
                          
                          }
                          
                          @Override
                          public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float scale)
                          {
                          this.renderTileEntityAtBlockTutorielTechne((TileEntityTutorialTechne)tileentity, x, y, z, scale);
                          }
                          
                          public void renderTileEntityAtBlockTutorielTechne(TileEntityTutorialTechne tileentity, double x, double y, double z, float scale)
                          {
                          
                          GL11.glPushMatrix();
                          GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
                          this.func_110628_a(texture);
                          GL11.glPushMatrix();
                          GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
                          this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
                          GL11.glPopMatrix();
                          GL11.glPopMatrix();
                          
                          }
                          private void adjustLightFixture(World world, int i, int j, int k, Block block)
                          {
                          Tessellator tess = Tessellator.instance;
                          float brightness = block.getBlockBrightness(world, i, j, k);
                          int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
                          int modulousModifier = skyLight % 65536;
                          int divModifier = skyLight / 65536;
                          tess.setColorOpaque_F(brightness, brightness, brightness);
                          OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)modulousModifier, divModifier);
                          
                          }
                          }
                          
                          

                          le problème ces cette ligne: " this.func_110628_a(texture); ".
                          et je ne sais pas comment mettre la texture sur le bloc, j’avait esseyer quelque chose, mais quand je le posai il était transparent. merci de m’aider 🙂

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

                            Merci beacuoup, maintenant, il me marque plus aucune erreur mais il crash quand meme des que je pose le bloc :

                            –-- Minecraft Crash Report ----
                            // I just don't know what went wrong :(
                            
                            Time: 15/09/13 09:03
                            Description: Unexpected error
                            
                            java.lang.NullPointerException
                            at net.minecraft.item.ItemBlock.onItemUse(ItemBlock.java:121)
                            at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:152)
                            at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:401)
                            at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1378)
                            at net.minecraft.client.Minecraft.runTick(Minecraft.java:1854)
                            at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:898)
                            at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
                            at net.minecraft.client.main.Main.main(Main.java:93)
                            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:57)
                            at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
                            
                            A detailed walkthrough of the error, its code path and all known details is as follows:
                            ---------------------------------------------------------------------------------------
                            
                            -- Head --
                            Stacktrace:
                            at net.minecraft.item.ItemBlock.onItemUse(ItemBlock.java:121)
                            at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:152)
                            at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:401)
                            at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1378)
                            
                            -- Affected level --
                            Details:
                            Level name: MpServer
                            All players: 1 total; [EntityClientPlayerMP['Player765'/290, l='MpServer', x=94,19, y=64,62, z=208,39]]
                            Chunk stats: MultiplayerChunkCache: 441
                            Level seed: 0
                            Level generator: ID 00 - default, ver 1\. Features enabled: false
                            Level generator options:
                            Level spawn location: World: (-12,64,256), Chunk: (at 4,4,0 in -1,16; contains blocks -16,0,256 to -1,255,271), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
                            Level time: 606 game time, 606 day time
                            Level dimension: 0
                            Level storage version: 0x00000 - Unknown?
                            Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
                            Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
                            Forced entities: 195 total; [EntityFallingSand['Falling Block'/4403, l='MpServer', x=112,50, y=20,75, z=187,50], EntityFallingSand['Falling Block'/4404, l='MpServer', x=113,50, y=19,75, z=186,50], EntityFallingSand['Falling Block'/4405, l='MpServer', x=113,50, y=19,75, z=187,50], EntityFallingSand['Falling Block'/8724, l='MpServer', x=-1,50, y=25,13, z=190,50], EntityPig['Pig'/133, l='MpServer', x=17,50, y=80,00, z=143,50], EntityPig['Pig'/132, l='MpServer', x=20,50, y=81,00, z=139,50], EntityPig['Pig'/135, l='MpServer', x=16,50, y=81,00, z=143,19], EntityPig['Pig'/134, l='MpServer', x=16,50, y=81,00, z=144,53], EntityPig['Pig'/152, l='MpServer', x=16,79, y=71,00, z=233,60], EntityPig['Pig'/153, l='MpServer', x=28,16, y=63,00, z=233,09], EntityPig['Pig'/154, l='MpServer', x=17,91, y=65,00, z=248,84], EntityMinecartChest['entity.MinecartChest.name'/145, l='MpServer', x=15,50, y=30,50, z=205,50], EntityMinecartChest['entity.MinecartChest.name'/173, l='MpServer', x=25,50, y=20,50, z=286,50], EntityPig['Pig'/186, l='MpServer', x=53,50, y=93,00, z=205,50], EntityPig['Pig'/187, l='MpServer', x=50,50, y=63,00, z=207,53], EntityPig['Pig'/184, l='MpServer', x=43,34, y=74,00, z=208,47], EntityPig['Pig'/185, l='MpServer', x=52,47, y=66,00, z=207,69], EntityMinecartChest['entity.MinecartChest.name'/188, l='MpServer', x=60,50, y=29,50, z=170,50], EntityMinecartChest['entity.MinecartChest.name'/189, l='MpServer', x=67,50, y=34,50, z=192,50], EntityItem['item.tile.rail'/178, l='MpServer', x=46,19, y=34,13, z=173,88], EntityItem['item.tile.rail'/183, l='MpServer', x=52,19, y=34,13, z=172,78], EntityItem['item.tile.rail'/181, l='MpServer', x=51,19, y=34,13, z=171,13], EntityChicken['Chicken'/205, l='MpServer', x=97,50, y=63,00, z=268,50], EntityChicken['Chicken'/204, l='MpServer', x=97,50, y=63,00, z=271,50], EntityChicken['Chicken'/207, l='MpServer', x=99,50, y=63,00, z=271,50], EntityChicken['Chicken'/206, l='MpServer', x=101,50, y=63,00, z=270,50], EntityItem['item.tile.gravel'/4603, l='MpServer', x=105,94, y=30,13, z=207,88], EntityItem['item.tile.torch'/203, l='MpServer', x=95,66, y=19,13, z=186,56], EntityPig['Pig'/197, l='MpServer', x=85,66, y=69,00, z=148,81], EntityPig['Pig'/196, l='MpServer', x=82,50, y=71,00, z=143,50], EntityItem['item.tile.mushroom'/198, l='MpServer', x=74,59, y=15,13, z=179,13], EntityPig['Pig'/195, l='MpServer', x=85,50, y=71,00, z=141,50], EntityPig['Pig'/194, l='MpServer', x=86,50, y=71,00, z=139,50], EntityItem['item.tile.rail'/220, l='MpServer', x=112,69, y=29,13, z=211,13], EntitySheep['Sheep'/221, l='MpServer', x=119,50, y=64,00, z=227,50], EntitySheep['Sheep'/222, l='MpServer', x=117,50, y=64,00, z=229,50], EntitySheep['Sheep'/223, l='MpServer', x=117,50, y=64,00, z=227,50], EntityItem['item.tile.rail'/217, l='MpServer', x=107,75, y=26,13, z=216,19], EntityItem['item.tile.rail'/219, l='MpServer', x=114,19, y=29,13, z=212,28], EntityPig['Pig'/212, l='MpServer', x=111,97, y=63,00, z=157,09], EntityPig['Pig'/213, l='MpServer', x=115,41, y=63,00, z=152,81], EntityItem['item.tile.torch'/214, l='MpServer', x=114,19, y=29,13, z=212,63], EntityItem['item.tile.rail'/215, l='MpServer', x=111,19, y=29,13, z=213,88], EntityChicken['Chicken'/209, l='MpServer', x=92,50, y=64,00, z=286,50], EntityChicken['Chicken'/210, l='MpServer', x=91,50, y=64,00, z=288,50], EntityChicken['Chicken'/211, l='MpServer', x=89,50, y=64,00, z=285,50], EntityChicken['Chicken'/236, l='MpServer', x=131,50, y=64,00, z=271,50], EntityChicken['Chicken'/235, l='MpServer', x=132,44, y=64,00, z=269,34], EntityChicken['Chicken'/234, l='MpServer', x=133,22, y=64,00, z=269,31], EntityChicken['Chicken'/233, l='MpServer', x=134,44, y=64,00, z=270,47], EntityChicken['Chicken'/232, l='MpServer', x=127,50, y=62,00, z=212,50], EntityChicken['Chicken'/231, l='MpServer', x=125,50, y=62,00, z=212,50], EntityChicken['Chicken'/230, l='MpServer', x=129,50, y=65,00, z=213,50], EntityChicken['Chicken'/229, l='MpServer', x=129,50, y=65,00, z=212,50], EntitySheep['Sheep'/224, l='MpServer', x=117,50, y=64,00, z=231,50], EntityCow['Cow'/272, l='MpServer', x=163,47, y=69,00, z=198,47], EntityPig['Pig'/278, l='MpServer', x=174,09, y=64,00, z=206,91], EntityPig['Pig'/266, l='MpServer', x=155,50, y=68,00, z=197,50], EntityPig['Pig'/267, l='MpServer', x=153,50, y=66,00, z=199,50], EntityPig['Pig'/265, l='MpServer', x=158,50, y=71,00, z=193,50], EntityCow['Cow'/270, l='MpServer', x=161,50, y=68,00, z=199,50], EntityCow['Cow'/271, l='MpServer', x=165,50, y=70,00, z=197,50], EntityPig['Pig'/268, l='MpServer', x=153,50, y=66,00, z=199,50], EntityCow['Cow'/269, l='MpServer', x=164,78, y=68,00, z=199,78], EntitySkeleton['Skeleton'/309, l='MpServer', x=22,50, y=23,00, z=190,50], EntityItem['item.tile.gravel'/4109, l='MpServer', x=67,22, y=35,13, z=218,16], EntityBat['Bat'/316, l='MpServer', x=84,94, y=25,23, z=207,56], EntityItem['item.tile.gravel'/4120, l='MpServer', x=61,56, y=34,13, z=253,06], EntityItem['item.tile.gravel'/4121, l='MpServer', x=60,81, y=34,13, z=254,66], EntityItem['item.tile.gravel'/4122, l='MpServer', x=57,88, y=35,13, z=252,59], EntityItem['item.tile.gravel'/4123, l='MpServer', x=57,88, y=34,13, z=254,53], EntityItem['item.tile.gravel'/4124, l='MpServer', x=57,44, y=35,13, z=251,22], EntityClientPlayerMP['Player765'/290, l='MpServer', x=94,19, y=64,62, z=208,39], EntityEnderman['Enderman'/369, l='MpServer', x=30,31, y=31,00, z=255,13], EntityCreeper['Creeper'/368, l='MpServer', x=38,50, y=31,00, z=257,50], EntityBat['Bat'/381, l='MpServer', x=48,93, y=42,00, z=222,80], EntityBat['Bat'/383, l='MpServer', x=48,93, y=42,25, z=226,42], EntityBat['Bat'/357, l='MpServer', x=81,88, y=35,10, z=212,25], EntityBat['Bat'/358, l='MpServer', x=82,25, y=35,30, z=214,75], EntityBat['Bat'/409, l='MpServer', x=84,63, y=25,29, z=246,75], EntityItem['item.tile.gravel'/4270, l='MpServer', x=79,91, y=19,13, z=186,88], EntityItem['item.tile.gravel'/4271, l='MpServer', x=71,81, y=35,13, z=207,59], EntityItem['item.tile.gravel'/4268, l='MpServer', x=80,81, y=19,13, z=186,88], EntityBat['Bat'/384, l='MpServer', x=46,30, y=42,76, z=221,34], EntityZombie['Zombie'/444, l='MpServer', x=75,50, y=35,00, z=225,50], EntityBat['Bat'/475, l='MpServer', x=70,50, y=24,45, z=279,91], EntityFallingSand['Falling Block'/9133, l='MpServer', x=46,50, y=26,63, z=205,50], EntityFallingSand['Falling Block'/9131, l='MpServer', x=46,50, y=26,63, z=204,50], EntityFallingSand['Falling Block'/9130, l='MpServer', x=47,50, y=26,63, z=204,50], EntityBat['Bat'/455, l='MpServer', x=78,25, y=26,97, z=190,42], EntityBat['Bat'/454, l='MpServer', x=75,28, y=22,02, z=181,26], EntityBat['Bat'/453, l='MpServer', x=76,44, y=27,72, z=190,60], EntityCreeper['Creeper'/493, l='MpServer', x=91,50, y=34,00, z=222,50], EntityCreeper['Creeper'/489, l='MpServer', x=88,50, y=34,00, z=222,50], EntityCreeper['Creeper'/488, l='MpServer', x=91,50, y=34,00, z=224,50], EntityCreeper['Creeper'/491, l='MpServer', x=88,41, y=34,00, z=224,00], EntityCreeper['Creeper'/546, l='MpServer', x=56,70, y=40,25, z=223,30], EntitySkeleton['Skeleton'/547, l='MpServer', x=45,50, y=42,00, z=223,13], EntitySkeleton['Skeleton'/544, l='MpServer', x=25,50, y=40,00, z=219,50], EntityZombie['Zombie'/563, l='MpServer', x=38,50, y=31,00, z=245,50], EntitySpider['Spider'/516, l='MpServer', x=84,50, y=25,00, z=200,50], EntityItem['item.tile.gravel'/12629, l='MpServer', x=113,43, y=19,54, z=186,55], EntityItem['item.tile.gravel'/12630, l='MpServer', x=113,45, y=19,54, z=187,58], EntitySkeleton['Skeleton'/583, l='MpServer', x=101,50, y=26,00, z=258,50], EntitySkeleton['Skeleton'/584, l='MpServer', x=102,50, y=26,00, z=254,50], EntityZombie['Zombie'/683, l='MpServer', x=22,50, y=30,00, z=162,50], EntitySkeleton['Skeleton'/681, l='MpServer', x=17,50, y=30,00, z=159,50], EntitySkeleton['Skeleton'/680, l='MpServer', x=20,50, y=30,00, z=160,50], EntitySpider['Spider'/653, l='MpServer', x=67,50, y=35,00, z=221,50], EntitySpider['Spider'/654, l='MpServer', x=70,50, y=35,00, z=215,50], EntityCreeper['Creeper'/656, l='MpServer', x=69,50, y=35,00, z=225,50], EntityItem['item.tile.gravel'/4625, l='MpServer', x=115,31, y=18,13, z=187,09], EntitySkeleton['Skeleton'/808, l='MpServer', x=61,50, y=34,00, z=209,50], EntitySkeleton['Skeleton'/809, l='MpServer', x=60,50, y=34,00, z=208,50], EntitySkeleton['Skeleton'/810, l='MpServer', x=63,16, y=34,00, z=207,31], EntityCreeper['Creeper'/12332, l='MpServer', x=72,50, y=48,00, z=137,50], EntityZombie['Zombie'/851, l='MpServer', x=67,50, y=35,00, z=210,50], EntitySkeleton['Skeleton'/852, l='MpServer', x=72,50, y=35,00, z=214,50], EntityCreeper['Creeper'/924, l='MpServer', x=66,50, y=34,00, z=169,50], EntitySkeleton['Skeleton'/922, l='MpServer', x=64,50, y=34,00, z=172,50], EntitySkeleton['Skeleton'/923, l='MpServer', x=67,50, y=34,00, z=172,50], EntityZombie['Zombie'/12467, l='MpServer', x=118,50, y=23,00, z=191,50], EntityZombie['Zombie'/12466, l='MpServer', x=117,50, y=23,00, z=192,50], EntityItem['item.tile.rose'/1238, l='MpServer', x=39,94, y=63,13, z=229,03], EntityFallingSand['Falling Block'/9885, l='MpServer', x=-1,50, y=25,27, z=190,50], EntityFallingSand['Falling Block'/9273, l='MpServer', x=112,50, y=20,63, z=187,50], EntityFallingSand['Falling Block'/9274, l='MpServer', x=113,50, y=19,54, z=186,50], EntityFallingSand['Falling Block'/9276, l='MpServer', x=113,50, y=19,54, z=187,50], EntityItem['item.tile.rail'/9324, l='MpServer', x=56,50, y=34,13, z=248,91], EntityItem['item.tile.rail'/9322, l='MpServer', x=66,34, y=36,13, z=186,03], EntityItem['item.tile.rail'/9323, l='MpServer', x=64,13, y=32,13, z=186,13], EntityCreeper['Creeper'/10958, l='MpServer', x=123,50, y=31,00, z=202,50], EntityFallingSand['Falling Block'/6641, l='MpServer', x=-1,50, y=25,77, z=190,50], EntityItem['item.tile.gravel'/10477, l='MpServer', x=81,13, y=19,13, z=185,81], EntityItem['item.tile.gravel'/10479, l='MpServer', x=79,13, y=19,13, z=185,78], EntityItem['item.tile.gravel'/10473, l='MpServer', x=60,13, y=34,13, z=252,78], EntityItem['item.tile.gravel'/10475, l='MpServer', x=57,09, y=35,13, z=253,81], EntityItem['item.tile.gravel'/10474, l='MpServer', x=59,38, y=34,13, z=254,19], EntityItem['item.tile.rail'/10319, l='MpServer', x=57,09, y=35,13, z=253,47], EntityFallingSand['Falling Block'/7009, l='MpServer', x=47,50, y=26,90, z=203,50], EntityFallingSand['Falling Block'/7008, l='MpServer', x=46,50, y=26,90, z=203,50], EntityFallingSand['Falling Block'/7011, l='MpServer', x=46,50, y=26,90, z=204,50], EntityFallingSand['Falling Block'/7010, l='MpServer', x=47,50, y=26,90, z=204,50], EntityFallingSand['Falling Block'/7013, l='MpServer', x=46,50, y=26,90, z=205,50], EntityItem['item.tile.gravel'/10697, l='MpServer', x=115,56, y=18,13, z=186,13], EntityFallingSand['Falling Block'/2950, l='MpServer', x=-1,50, y=25,25, z=190,50], EntitySquid['Squid'/6832, l='MpServer', x=65,14, y=59,39, z=215,50], EntitySquid['Squid'/6830, l='MpServer', x=80,31, y=61,31, z=213,34], EntitySquid['Squid'/6831, l='MpServer', x=69,47, y=62,35, z=213,11], EntitySquid['Squid'/6829, l='MpServer', x=75,76, y=60,43, z=204,95], EntityItem['item.tile.gravel'/10670, l='MpServer', x=72,44, y=35,13, z=209,25], EntityItem['item.tile.gravel'/10597, l='MpServer', x=114,28, y=18,13, z=186,88], EntityItem['item.tile.gravel'/10594, l='MpServer', x=57,78, y=35,13, z=254,03], EntityItem['item.tile.gravel'/10592, l='MpServer', x=65,88, y=41,13, z=152,59], EntityItem['item.tile.gravel'/10545, l='MpServer', x=64,88, y=32,13, z=187,88], EntityFallingSand['Falling Block'/7647, l='MpServer', x=113,50, y=19,62, z=187,50], EntityFallingSand['Falling Block'/7645, l='MpServer', x=113,50, y=19,62, z=186,50], EntityFallingSand['Falling Block'/7644, l='MpServer', x=112,50, y=20,90, z=187,50], EntityBat['Bat'/12018, l='MpServer', x=74,02, y=25,00, z=200,05], EntityBat['Bat'/12020, l='MpServer', x=74,00, y=25,88, z=201,26], EntityBat['Bat'/12021, l='MpServer', x=73,53, y=26,55, z=190,16], EntitySkeleton['Skeleton'/11993, l='MpServer', x=70,63, y=19,00, z=180,06], EntityCreeper['Creeper'/11778, l='MpServer', x=75,50, y=47,00, z=223,50], EntityItem['item.tile.rail'/11864, l='MpServer', x=101,97, y=19,13, z=226,19], EntityItem['item.tile.rail'/11863, l='MpServer', x=100,66, y=19,13, z=225,31], EntityFallingSand['Falling Block'/3556, l='MpServer', x=46,50, y=26,65, z=204,50], EntityFallingSand['Falling Block'/3558, l='MpServer', x=46,50, y=26,65, z=205,50], EntityFallingSand['Falling Block'/3553, l='MpServer', x=46,50, y=26,65, z=203,50], EntityFallingSand['Falling Block'/3555, l='MpServer', x=47,50, y=26,65, z=204,50], EntityFallingSand['Falling Block'/3554, l='MpServer', x=47,50, y=26,65, z=203,50], EntitySpider['Spider'/12282, l='MpServer', x=67,50, y=35,00, z=200,37], EntityEnderman['Enderman'/12283, l='MpServer', x=67,10, y=35,00, z=201,56], EntityEnderman['Enderman'/12284, l='MpServer', x=66,50, y=35,00, z=206,50], EntitySkeleton['Skeleton'/12285, l='MpServer', x=64,00, y=34,00, z=207,56], EntityFallingSand['Falling Block'/7219, l='MpServer', x=64,50, y=25,90, z=205,50], EntitySpider['Spider'/12152, l='MpServer', x=123,50, y=24,00, z=257,50], EntityCreeper['Creeper'/12159, l='MpServer', x=48,50, y=30,00, z=168,50], EntityZombie['Zombie'/12156, l='MpServer', x=171,50, y=38,00, z=254,50], EntityZombie['Zombie'/11410, l='MpServer', x=75,50, y=14,00, z=221,50], EntitySkeleton['Skeleton'/11414, l='MpServer', x=66,50, y=14,00, z=222,50], EntityZombie['Zombie'/11412, l='MpServer', x=78,50, y=14,00, z=221,50], EntitySkeleton['Skeleton'/11413, l='MpServer', x=73,50, y=14,00, z=220,50], EntityItem['item.tile.torch'/3772, l='MpServer', x=61,72, y=36,95, z=186,91], EntityFallingSand['Falling Block'/3771, l='MpServer', x=64,50, y=25,67, z=205,50], EntityItem['item.tile.gravel'/3725, l='MpServer', x=49,13, y=29,13, z=171,94], EntityItem['item.tile.gravel'/3724, l='MpServer', x=49,88, y=29,13, z=166,44], EntityItem['item.tile.gravel'/4085, l='MpServer', x=67,28, y=35,13, z=186,13], EntityItem['item.tile.rail'/11675, l='MpServer', x=102,75, y=19,13, z=225,19], EntityItem['item.tile.gravel'/4013, l='MpServer', x=64,78, y=32,13, z=186,13], EntityItem['item.tile.gravel'/4014, l='MpServer', x=61,72, y=35,13, z=187,19], EntityItem['item.tile.gravel'/4026, l='MpServer', x=66,94, y=35,13, z=216,88], EntityCreeper['Creeper'/3919, l='MpServer', x=55,91, y=31,00, z=239,53], EntityZombie['Zombie'/3916, l='MpServer', x=58,50, y=31,00, z=239,50], EntityZombie['Zombie'/3917, l='MpServer', x=62,75, y=31,00, z=238,50], EntityCreeper['Creeper'/3920, l='MpServer', x=62,50, y=31,00, z=244,50]]
                            Retry entities: 0 total; []
                            Server brand: fml,forge
                            Server type: Integrated singleplayer server
                            Stacktrace:
                            at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
                            at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2298)
                            at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:851)
                            at net.minecraft.client.main.Main.main(Main.java:93)
                            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:57)
                            at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
                            
                            – System Details --
                            Details:
                            Minecraft Version: 1.6.2
                            Operating System: Windows 8 (amd64) version 6.2
                            Java Version: 1.7.0_21, Oracle Corporation
                            Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                            Memory: 741251680 bytes (706 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
                            JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
                            AABB Pool Size: 32371 (1812776 bytes; 1 MB) allocated, 4 (224 bytes; 0 MB) used
                            Suspicious classes: FML and Forge are installed
                            IntCache: cache: 2, tcache: 0, allocated: 1, tallocated: 63
                            FML: MCP v8.04 FML v6.2.35.804 Minecraft Forge 9.10.0.804 4 mods loaded, 4 mods active
                            mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                            FML{6.2.35.804} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                            Forge{9.10.0.804} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                            assabody-mod{1.6.2-1} [Mod Assabody] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
                            Launched Version: 1.6
                            LWJGL: 2.9.0
                            OpenGL: Intel(R) HD Graphics 4000 GL version 4.0.0 - Build 9.17.10.2932, Intel
                            Is Modded: Definitely; Client brand changed to 'fml,forge'
                            Type: Client (map_client.txt)
                            Resource Pack: Default
                            Current Language: English (US)
                            Profiler Position: N/A (disabled)
                            Vec3 Pool Size: 6818 (381808 bytes; 0 MB) allocated, 25 (1400 bytes; 0 MB) used
                            ```___
                            Mais quand je revais dans le monde qui avait crashé, je vois le parasol mais sans textures :
                            
                            https://dl.dropboxusercontent.com/u/61838459/modding%20bin/2013-09-15_09.15.53.png
                            
                            

                            func_110628_a(new ResourceLocation(“mods:assabody-mod/textures/blocks/Parasol.png”));

                            
                            et le chemin de mon image : ```
                            mcp\src\minecraft\assets\mod-assabody\textures\blocks\Parasol.png
                            

                            Si quelqu’un peut m’aider pour cette derniere erreur ???

                            Merci

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

                              J’ai enfin reussi a mettre la texture du bloc quand on l’a a la main mais je ne sais pas que chemin faut-il pour mettre la texture du bloc special

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

                                @‘jeje78660’:

                                
                                func_110628_a(new ResourceLocation("mods:assabody-mod/textures/blocks/Parasol.png"));
                                
                                

                                et le chemin de mon image : ```
                                mcp\src\minecraft\assets\mod-assabody\textures\blocks\Parasol.png

                                
                                Si quelqu'un peut m'aider pour cette derniere erreur ???
                                
                                Merci
                                
                                
                                mods:assabody-mod/textures/blocks/Parasol.png
                                
                                

                                … mods n’existe pas, il faut mettre comme ceci :

                                
                                assabody-mod:textures/blocks/Parasol.png
                                
                                

                                Mon site | GitHub

                                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

                                  @fireblade51
                                  Remplace this.func_110628_a(texture); par this.bindTexture(texture);
                                  J’avais oublié de changer le nom des fonctions dans ce tutoriel.

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

                                    Je l’ai fait dans TileEntityParasolRenderer :

                                    this.bindTexture("mod-assabody:Parasol");
                                    
                                    

                                    Mais maintenant, quand je lance Minecraft, le parasol affiche soit le items.png soit le block.png soit encore des textures de block.

                                    Mais je voudrais savoir ou placer la texture de mon parasol dans MCP et aussi ou la déclarer ( dans quelle classe )

                                    Voila voila merci___
                                    Sa a l’air d’être le “this.BindTexture” qui fait ce bugg car avant, avec la “func…”, il ne mettais juste aucune texture.

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

                                      Je ne sais pas pourquoi, mais quand je pose le bloc rendu sous techne, il est transparent.
                                      Je vous donne toute mes class pour que vous regardiez ce qui ne va pas:
                                      BlockTutorial:

                                      
                                      package testmodcode;
                                      
                                      import net.minecraft.block.Block;
                                      import net.minecraft.block.BlockContainer;
                                      import net.minecraft.block.material.Material;
                                      import net.minecraft.creativetab.CreativeTabs;
                                      import net.minecraft.tileentity.TileEntity;
                                      import net.minecraft.world.World;
                                      
                                      public class BlockTutorial extends BlockContainer{
                                      
                                      public BlockTutorial(int id)
                                      {
                                      super(id, Material.rock);
                                      this.setCreativeTab(CreativeTabs.tabBlock);
                                      }
                                      
                                      @Override
                                      public TileEntity createNewTileEntity(World world) {
                                      return new TileEntityTutorial();
                                      }
                                      @Override
                                      public TileEntity createTileEntity(World world, int metadata)
                                      {
                                      return new TileEntityTutorialTechne();
                                      }
                                      public boolean hasTileEntity(int metadata)
                                      {
                                      return true;
                                      }
                                      public boolean isOpaqueCube()
                                      {
                                      return false;
                                      }
                                      
                                      public boolean renderAsNormalBlock()
                                      {
                                      return false;
                                      }
                                      
                                      public int getRenderType()
                                      {
                                      return -1;
                                      }
                                      }
                                      
                                      

                                      TileEntityTutorialTechneRender:

                                      
                                      package testmodcode;
                                      
                                      import net.minecraft.block.Block;
                                      import net.minecraft.client.renderer.OpenGlHelper;
                                      import net.minecraft.client.renderer.Tessellator;
                                      import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
                                      import net.minecraft.entity.Entity;
                                      import net.minecraft.tileentity.TileEntity;
                                      import net.minecraft.util.ResourceLocation;
                                      import net.minecraft.world.World;
                                      import org.lwjgl.opengl.GL11;
                                      
                                      public class TileEntityTutorialTechneRender extends TileEntitySpecialRenderer
                                      {
                                      private final ModelBlockTutorielTechne model;
                                      protected static final ResourceLocation texture = new ResourceLocation("rm:blockrender");
                                      
                                      public TileEntityTutorialTechneRender()
                                      {
                                      this.model = new ModelBlockTutorielTechne();
                                      }
                                      
                                      private void adjustRotatePivotViaMeta(World world, int x, int y, int z)
                                      {
                                      int meta = world.getBlockMetadata(x, y, z);
                                      GL11.glPushMatrix();
                                      GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F);
                                      GL11.glPopMatrix();
                                      
                                      }
                                      
                                      @Override
                                      public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float scale)
                                      {
                                      this.renderTileEntityAtBlockTutorielTechne((TileEntityTutorialTechne)tileentity, x, y, z, scale);
                                      }
                                      
                                      public void renderTileEntityAtBlockTutorielTechne(TileEntityTutorialTechne tileentity, double x, double y, double z, float scale)
                                      {
                                      
                                      GL11.glPushMatrix();
                                      GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
                                      this.bindTexture(new ResourceLocation("rm:blockrender"));
                                      GL11.glPushMatrix();
                                      GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
                                      this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
                                      GL11.glPopMatrix();
                                      GL11.glPopMatrix();
                                      
                                      }
                                      private void adjustLightFixture(World world, int i, int j, int k, Block block)
                                      {
                                      Tessellator tess = Tessellator.instance;
                                      float brightness = block.getBlockBrightness(world, i, j, k);
                                      int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
                                      int modulousModifier = skyLight % 65536;
                                      int divModifier = skyLight / 65536;
                                      tess.setColorOpaque_F(brightness, brightness, brightness);
                                      OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)modulousModifier, divModifier);
                                      
                                      }
                                      }
                                      
                                      

                                      TileEntityTutorialTechne:

                                      
                                      package testmodcode;
                                      
                                      import net.minecraft.tileentity.TileEntity;
                                      
                                      public class TileEntityTutorialTechne extends TileEntity
                                      {
                                      
                                      }
                                      
                                      

                                      TileEntityTutorial:

                                      
                                      package testmodcode;
                                      
                                      import net.minecraft.nbt.NBTTagCompound;
                                      import net.minecraft.tileentity.TileEntity;
                                      
                                      public class TileEntityTutorial extends TileEntity
                                      {
                                      public String visiteur[] = new String[]{"visiteur0", "visiteur1", "visiteur2", "visiteur3", "visiteur4"};
                                      public void readFromNBT(NBTTagCompound nbtTag)
                                      {
                                      super.readFromNBT(nbtTag);
                                      for(int i = 0; i < 5; i++)
                                      {
                                      visiteur* = nbtTag.getString("visiteur" + i);
                                      }
                                      }
                                      
                                      public void writeToNBT(NBTTagCompound nbtTag)
                                      {
                                      super.writeToNBT(nbtTag);
                                      for(int i = 0; i < 5; i++)
                                      {
                                      nbtTag.setString("visiteur" + i, visiteur*);
                                      }
                                      visiteur[0] = nbtTag.getString("visiteur" + 1);
                                      visiteur[1] = nbtTag.getString("visiteur" + 2);
                                      visiteur[2] = nbtTag.getString("visiteur" + 3);
                                      visiteur[3] = nbtTag.getString("visiteur" + 4);
                                      visiteur[4] = nbtTag.getString("visiteur" + 5);
                                      }
                                      public String getPlayerList()
                                      {
                                      return visiteur[0] + ", " + visiteur[1] + ", " + visiteur[2] + ", " + visiteur[3] + ", " + visiteur[4] + ", ";
                                      }
                                      public void addplayertolist(String playerName)
                                      {
                                      if(!visiteur[0].equals(playerName))
                                      {
                                      for(int i = 3; i >= 0; i–)
                                      {
                                      visiteur _= visiteur*;
                                      }
                                      visiteur[0] = playerName;
                                      }
                                      worldObj.notifyBlockChange(xCoord, yCoord, zCoord, 2);
                                      visiteur[4] = visiteur[3];
                                      visiteur[3] = visiteur[2];
                                      visiteur[2] = visiteur[1];
                                      visiteur[1] = visiteur[0];
                                      }
                                      }
                                      
                                      

                                      et juste au cas où, ma classe principale:

                                      
                                      package testmodcode;
                                      
                                      import net.minecraft.block.Block;
                                      import net.minecraft.entity.EnumCreatureType;
                                      import net.minecraft.item.EnumToolMaterial;
                                      import net.minecraft.item.Item;
                                      import net.minecraft.item.ItemFood;
                                      import net.minecraft.item.ItemPickaxe;
                                      import net.minecraft.item.ItemSeedFood;
                                      import net.minecraft.item.ItemStack;
                                      import net.minecraft.potion.Potion;
                                      import net.minecraft.stats.Achievement;
                                      import net.minecraft.stats.AchievementList;
                                      import net.minecraft.world.biome.BiomeGenBase;
                                      import net.minecraftforge.common.EnumHelper;
                                      import cpw.mods.fml.common.Mod;
                                      import cpw.mods.fml.common.Mod.EventHandler;
                                      import cpw.mods.fml.common.Mod.Instance;
                                      import cpw.mods.fml.common.SidedProxy;
                                      import cpw.mods.fml.common.event.FMLInitializationEvent;
                                      import cpw.mods.fml.common.event.FMLPostInitializationEvent;
                                      import cpw.mods.fml.common.event.FMLPreInitializationEvent;
                                      import cpw.mods.fml.common.network.NetworkMod;
                                      import cpw.mods.fml.common.registry.EntityRegistry;
                                      import cpw.mods.fml.common.registry.GameRegistry;
                                      import cpw.mods.fml.common.registry.LanguageRegistry;
                                      
                                      @Mod(modid="BG", name="La Bite A Gab", version="V.1.0.0")
                                      @NetworkMod(clientSideRequired=true, serverSideRequired=false) // NE PAS MODIFIER CETTE LIGNE
                                      
                                      public class testmodcodemain {
                                      
                                      @SidedProxy(clientSide = "testmodcode.ClientProxy", serverSide = "testmodcode.CommonProxy")
                                      public static testmodcode.CommonProxy proxy;
                                      
                                      @Instance("BG")
                                      public static testmodcodemain instance;
                                      
                                      public static Item redstoneWheat;
                                      public static Block redstoneWheatBlock;
                                      public static Item redstoneWheatSeeds;
                                      public static Item breadredstone;
                                      public static Block redstoneHayBlock;
                                      public static Block rotationblock;
                                      public static Block BlockTutorial;
                                      
                                      @EventHandler
                                      public void PreInit(FMLPreInitializationEvent event)
                                      {
                                      //Configuration
                                      
                                      //redstoneblock
                                      redstoneWheatBlock = new BlockRedstoneWheat(1001).setUnlocalizedName("redstoneWheatBlock");
                                      GameRegistry.registerBlock(redstoneWheatBlock, "redstoneWheatBlock");
                                      LanguageRegistry.addName(redstoneWheatBlock, "Redstone Wheat Block");
                                      
                                      //redstonecrops
                                      redstoneWheat = new RedstoneWheat(1002).setUnlocalizedName("Redstone Wheat");
                                      GameRegistry.registerItem(redstoneWheat, "redstoneWheat");
                                      LanguageRegistry.addName(redstoneWheat, "Redstone Wheat");
                                      
                                      //redstoneseed
                                      redstoneWheatSeeds = new ItemredstoneWheatSeeds(1003, redstoneWheatBlock.blockID, Block.tilledField.blockID).setUnlocalizedName("redstone Wheat Seeds");
                                      GameRegistry.registerItem(redstoneWheatSeeds, "redstoneWheatSeeds");
                                      LanguageRegistry.addName(redstoneWheatSeeds, "redstone Wheat Seeds");
                                      
                                      //breadredstone
                                      breadredstone = new FoodBreadRedstone(1004, 5, 0.6F, false).setPotionEffect(Potion.moveSpeed.id, 60, 8, 1.0F).setUnlocalizedName("Bread Redstone");
                                      GameRegistry.registerItem(breadredstone, "breadredstone");
                                      LanguageRegistry.addName(breadredstone, "Bread Redstone");
                                      
                                      //BlockHayWheat
                                      redstoneHayBlock = new redstoneHayBlock(1005).setHardness(0.5F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("BlockTutorial");
                                      GameRegistry.registerBlock(redstoneHayBlock, "redstoneHayBlock");
                                      LanguageRegistry.addName(redstoneHayBlock, "Redstone Hay Block");
                                      
                                      //BlockRenduTechne
                                      BlockTutorial = new BlockTutorial(1006).setHardness(1.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("BlockTutorial");
                                      GameRegistry.registerBlock(BlockTutorial, "BlockTutorial");
                                      LanguageRegistry.addName(BlockTutorial, "BlockTutorial");
                                      
                                      //Items
                                      
                                      //Achievements
                                      }
                                      
                                      @EventHandler
                                      public void Init(FMLInitializationEvent event)
                                      {
                                      //generation
                                      addGeneration();
                                      }
                                      private void addGeneration() {
                                      GameRegistry.registerWorldGenerator(new MyWorldGen());
                                      
                                      //Registry
                                      GameRegistry.registerTileEntity(TileEntityTutorial.class, "TileEntityTutorial");
                                      
                                      //Mobs
                                      
                                      //Render
                                      proxy.registerRenderers();
                                      
                                      //NetWork
                                      
                                      //Recipe
                                      GameRegistry.addRecipe(new ItemStack(breadredstone), new Object[]{"XXX", "YYY", "XXX", 'Y', testmodcodemain.redstoneWheat});
                                      GameRegistry.addRecipe(new ItemStack(redstoneHayBlock), new Object[]{"XXX", "XXX", "XXX", 'X', testmodcodemain.redstoneWheat});
                                      GameRegistry.addShapelessRecipe(new ItemStack(redstoneWheat, 9), new Object[]{ new ItemStack(testmodcodemain.redstoneHayBlock)});
                                      GameRegistry.addShapelessRecipe(new ItemStack(Item.wheat, 9), new Object[]{ new ItemStack(Block.hay)});
                                      }
                                      
                                      @EventHandler
                                      public void PostInit(FMLPostInitializationEvent event)
                                      {
                                      //Integration avec les autres mods
                                      
                                      }
                                      }
                                      
                                      

                                      Merci encore une fois de m’aider :)_

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

                                        Tu n’as pas de Model ?

                                        1 réponse Dernière réponse Répondre Citer 0
                                        • kevin_68K Hors-ligne
                                          kevin_68 Moddeurs confirmés
                                          dernière édition par

                                          Dans ton rendu:

                                          protected static final ResourceLocation texture = new ResourceLocation("rm:blockrender");
                                          

                                          l’argument de ResourceLocation doit être “modid:chemin” et pour ce qui ne l’on pas remarqué dans la classe principale vous déclarez ceci: modid=“BG”


                                          Mettez à jours vers la dernière version stable (1.8.9 voir même…

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

                                            Sa ne marche toujours pas, c’est toujours transparent, et voici ma class du model du bloc:

                                            
                                            package testmodcode;
                                            
                                            import net.minecraft.client.model.ModelBase;
                                            import net.minecraft.client.model.ModelRenderer;
                                            import net.minecraft.entity.Entity;
                                            
                                            public class ModelBlockTutorielTechne extends ModelBase
                                            {
                                            //fields
                                            ModelRenderer Shape1;
                                            
                                            public ModelBlockTutorielTechne()
                                            {
                                            textureWidth = 32;
                                            textureHeight = 32;
                                            
                                            Shape1 = new ModelRenderer(this, 0, 0);
                                            Shape1.addBox(0F, 0F, 0F, 5, 10, 6);
                                            Shape1.setRotationPoint(-3F, 14F, -1F);
                                            Shape1.setTextureSize(32, 32);
                                            Shape1.mirror = true;
                                            setRotation(Shape1, 0F, 0F, 0F);
                                            }
                                            
                                            public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
                                            {
                                            super.render(entity, f, f1, f2, f3, f4, f5);
                                            setRotationAngles(f, f1, f2, f3, f4, f5, entity);
                                            }
                                            
                                            private void setRotation(ModelRenderer model, float x, float y, float z)
                                            {
                                            model.rotateAngleX = x;
                                            model.rotateAngleY = y;
                                            model.rotateAngleZ = z;
                                            }
                                            public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
                                            {
                                            super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
                                            }
                                            
                                            }
                                            
                                            

                                            je croit vraiment que j’ai rater quelque chose dans une des classes.

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB