MFF

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

    Bloc Orientable (TileEntity)

    Planifier Épinglé Verrouillé Déplacé Résolu 1.8.x
    1.8
    71 Messages 6 Publieurs 15.6k 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.
    • EryahE Hors-ligne
      Eryah
      dernière édition par

      Euh… En quoi cela m’aide ? Ça m’apprend juste a faire un Model, mais pas a faire un model ‘rotatif’

      Membre fantôme
      Je développe maintenant un jeu sur UnrealEngine4


      Contact :…

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

        Tu cherches à faire le fichier json non ?

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

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

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

          Oui, mais a faire un sorte qu’il puisse être tourné, qu’il soit orientable, il est déjà fait mon .json

          Membre fantôme
          Je développe maintenant un jeu sur UnrealEngine4


          Contact :…

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

            Apparemment non :

            [09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=east not found
            [09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=south not found
            [09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=north not found
            [09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=west not found
            

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

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

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

              Bah il est fait, mais faut faire en sorte qu’il puisse se tourner, et sa, je ne sais pas comment faire
              Rappel : Ce n’est pas un .json normal

              Membre fantôme
              Je développe maintenant un jeu sur UnrealEngine4


              Contact :…

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

                Pourquoi ne serait-il pas “normal” ?

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

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

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

                  Ce que je veut dire , c’est que ce n’est pas un simple bloc, c’est un model custom

                  Membre fantôme
                  Je développe maintenant un jeu sur UnrealEngine4


                  Contact :…

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

                    Oui, et alors ?

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

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

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

                      Un cube et un model sont tous deux des blocs, ils peuvent donc être tous les deux orientables de la même manière, ça ne diffère pas entre les deux.

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

                        J’ai changé d’avis à propos du bloc. Pour facilité le GUI, j’ai fait un TileEntity

                        Je vais essayer de suivre le tuto de robin, et si ça ne fonctionne pas, je reviendrai ici

                        Membre fantôme
                        Je développe maintenant un jeu sur UnrealEngine4


                        Contact :…

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

                          Comme dit précédament, j’ai crée une TileEntity, et j’ai également prévu de revenir sur ce forum, si un nouveau problème se présentait.
                          Or, un vient de pointer son  nez
                          Classe du bloc

                          package eryah.usefulthings.blocks;
                          
                          import net.minecraft.block.Block;
                          import net.minecraft.block.BlockContainer;
                          import net.minecraft.block.material.Material;
                          import net.minecraft.client.Minecraft;
                          import net.minecraft.client.resources.model.ModelResourceLocation;
                          import net.minecraft.entity.EntityLivingBase;
                          import net.minecraft.item.Item;
                          import net.minecraft.item.ItemStack;
                          import net.minecraft.tileentity.TileEntity;
                          import net.minecraft.util.MathHelper;
                          import net.minecraft.world.World;
                          import net.minecraftforge.fml.common.registry.GameRegistry;
                          import net.minecraftforge.fml.relauncher.Side;
                          import net.minecraftforge.fml.relauncher.SideOnly;
                          import eryah.usefulthings.Reference;
                          import eryah.usefulthings.UsefulthingsMod;
                          import eryah.usefulthings.tileentity.TileEntityPlateCrafter;
                          
                          public class PlateCrafter extends BlockContainer {
                          
                          public static Block platecrafter;    
                          
                            public PlateCrafter(Material material)
                             {
                                  super(material);
                          
                             }
                          
                            @Override
                             public TileEntity createNewTileEntity(World world, int metadata) //Instancie le TileEntity
                             {
                                 return new TileEntityPlateCrafter();
                             }
                          
                             public boolean hasTileEntity(int metadata) //Permet de savoir si le bloc a un TileEntity
                             {
                                 return true;
                             }
                          
                          public static void init()
                          {
                          platecrafter = new PlateCrafter(Material.rock).setUnlocalizedName("platecrafter").setCreativeTab(UsefulthingsMod.UTTab);
                          }
                          
                          public static void register()
                          {
                          GameRegistry.registerBlock(platecrafter, platecrafter.getUnlocalizedName().substring(5));
                          }
                          
                          public static void registerRenders()
                          {
                          registerRender(platecrafter);
                          }
                          
                          public static void registerRender(Block block)
                          {
                          Item item = Item.getItemFromBlock(block);
                          Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
                          }
                          
                          public boolean isOpaqueCube()
                             {
                                 return false;
                             }
                          
                             public boolean renderAsNormalBlock()
                             {
                                 return false;
                             }
                          
                             public int getRenderType()
                             {
                                 return -1;
                             }
                          
                             public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
                             {
                                 int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
                                 world.setBlockMetadataWithNotify(x, y, z, direction, 2);
                             }
                          
                             @SideOnly(Side.CLIENT)
                             public IIcon getIcon(int side, int metadata)
                             {
                                 return side == 3 && metadata == 0 ? this.blockIcon2 : (side == 4 && metadata == 1 ? this.blockIcon2 : (side == 2 && metadata == 2 ? this.blockIcon2 : (side == 5 && metadata == 3 ? this.blockIcon2 : this.blockIcon)));
                             }
                          
                             public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
                             {
                                 if((axis == ForgeDirection.UP || axis == ForgeDirection.DOWN) && !world.isRemote)
                                 {
                                     int direction = world.getBlockMetadata(x, y, z) + 1;
                                     if(direction > 3)
                                     {
                                         direction = 0;
                                     }
                                     world.setBlockMetadataWithNotify(x, y, z, direction, 3);
                                     return true;
                                 }
                                 return false;
                             }
                          
                             public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
                             {
                                 return new ForgeDirection[] {ForgeDirection.UP, ForgeDirection.DOWN};
                             }
                          
                          }
                          
                          

                          Il y des erreurs un peut partout

                          • setBlockMetadataWithNotify - The method setBlockMetadataWithNotify(int, int, int, int, int) is undefined for the type World
                          • IIcon - IIcon cannot be resolved to a type
                          • blockIcon2 - blockIcon2 cannot be resolved or is not a field
                          • blockIcon - blockIcon cannot be resolved or is not a field
                          • ForgeDirection - ForgeDirection cannot be resolved to a variable
                          • getBlockMetadata - The method getBlockMetadata(int, int, int) is undefined for the type World
                          • setBlockMetadataWithNotify - The method setBlockMetadataWithNotify(int, int, int, int, int) is undefined for the type World

                          Membre fantôme
                          Je développe maintenant un jeu sur UnrealEngine4


                          Contact :…

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

                            @‘Eryah’:

                            Comme dit précédament, j’ai crée une TileEntity, et j’ai également prévu de revenir sur ce forum, si un nouveau problème se présentait.
                            Or, un vient de pointer son  nez
                            Classe du bloc

                            package eryah.usefulthings.blocks;
                            
                            import net.minecraft.block.Block;
                            import net.minecraft.block.BlockContainer;
                            import net.minecraft.block.material.Material;
                            import net.minecraft.client.Minecraft;
                            import net.minecraft.client.resources.model.ModelResourceLocation;
                            import net.minecraft.entity.EntityLivingBase;
                            import net.minecraft.item.Item;
                            import net.minecraft.item.ItemStack;
                            import net.minecraft.tileentity.TileEntity;
                            import net.minecraft.util.MathHelper;
                            import net.minecraft.world.World;
                            import net.minecraftforge.fml.common.registry.GameRegistry;
                            import net.minecraftforge.fml.relauncher.Side;
                            import net.minecraftforge.fml.relauncher.SideOnly;
                            import eryah.usefulthings.Reference;
                            import eryah.usefulthings.UsefulthingsMod;
                            import eryah.usefulthings.tileentity.TileEntityPlateCrafter;
                            
                            public class PlateCrafter extends BlockContainer {
                            
                               
                            public static Block platecrafter;    
                            
                              public PlateCrafter(Material material)
                               {
                                    super(material);
                                   
                               }
                             
                              @Override
                               public TileEntity createNewTileEntity(World world, int metadata) //Instancie le TileEntity
                               {
                                   return new TileEntityPlateCrafter();
                               }
                            
                               public boolean hasTileEntity(int metadata) //Permet de savoir si le bloc a un TileEntity
                               {
                                   return true;
                               }
                             
                             
                             
                            public static void init()
                            {
                            platecrafter = new PlateCrafter(Material.rock).setUnlocalizedName("platecrafter").setCreativeTab(UsefulthingsMod.UTTab);
                            }
                            
                            public static void register()
                            {
                            GameRegistry.registerBlock(platecrafter, platecrafter.getUnlocalizedName().substring(5));
                            }
                            
                            public static void registerRenders()
                            {
                            registerRender(platecrafter);
                            }
                            
                            public static void registerRender(Block block)
                            {
                            Item item = Item.getItemFromBlock(block);
                            Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
                            }
                            
                            public boolean isOpaqueCube()
                               {
                                   return false;
                               }
                            
                               public boolean renderAsNormalBlock()
                               {
                                   return false;
                               }
                            
                               public int getRenderType()
                               {
                                   return -1;
                               }
                               
                               public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
                               {
                                   int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
                                   world.setBlockMetadataWithNotify(x, y, z, direction, 2);
                               }
                               
                               @SideOnly(Side.CLIENT)
                               public IIcon getIcon(int side, int metadata)
                               {
                                   return side == 3 && metadata == 0 ? this.blockIcon2 : (side == 4 && metadata == 1 ? this.blockIcon2 : (side == 2 && metadata == 2 ? this.blockIcon2 : (side == 5 && metadata == 3 ? this.blockIcon2 : this.blockIcon)));
                               }
                               
                               public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
                               {
                                   if((axis == ForgeDirection.UP || axis == ForgeDirection.DOWN) && !world.isRemote)
                                   {
                                       int direction = world.getBlockMetadata(x, y, z) + 1;
                                       if(direction > 3)
                                       {
                                           direction = 0;
                                       }
                                       world.setBlockMetadataWithNotify(x, y, z, direction, 3);
                                       return true;
                                   }
                                   return false;
                               }
                               
                               public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
                               {
                                   return new ForgeDirection[] {ForgeDirection.UP, ForgeDirection.DOWN};
                               }
                               
                               
                            
                            }
                            
                            

                            Il y des erreurs un peut partout

                            • setBlockMetadataWithNotify - The method setBlockMetadataWithNotify(int, int, int, int, int) is undefined for the type World
                            • IIcon - IIcon cannot be resolved to a type
                            • blockIcon2 - blockIcon2 cannot be resolved or is not a field
                            • blockIcon - blockIcon cannot be resolved or is not a field
                            • ForgeDirection - ForgeDirection cannot be resolved to a variable
                            • getBlockMetadata - The method getBlockMetadata(int, int, int) is undefined for the type World
                            • setBlockMetadataWithNotify - The method setBlockMetadataWithNotify(int, int, int, int, int) is undefined for the type World

                            Tu peux résoudre toutes ces erreurs grâce à eclipse. IL te propose des solutions, prends-les car si il faut tout te corriger, crois-moi que ça va prendre du temps. La plupart de ces erreurs sont des soucis d’import. Ensuite pour le reste je crois que les méthodes que tu as réécris n’ont pas les bons arguments.

                            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 entre la 1.7 et la 1.8 c’est complètement différent …

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

                                Ah… Serait-il possible d’up le tuto en 1.8 ?
                                (Je sais que tu a tes épreuves du bac, donc je te demande pas MAINTENENT TOUS DE SUITE, mais dès que possible, se serais bien :))

                                Sinon, ce ne sont pas des soici d’import, Eclipse de demande d’ajouter un cast, souvent pour world

                                Membre fantôme
                                Je développe maintenant un jeu sur UnrealEngine4


                                Contact :…

                                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

                                  C’est prévu, dès que je serai en vacance je vais commencer les tutoriels 1.8

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

                                    Serait-il donc possible d’avoir une solution ? 
                                    J’ai essayer d’improviser, de copier a peut-près ce que je pensait etre ce que permtait au coffre de se tourner, mais ça ne marchait pas

                                    Classe du bloc

                                    package eryah.usefulthings.blocks;
                                    
                                    import java.util.Iterator;
                                    
                                    import net.minecraft.block.Block;
                                    import net.minecraft.block.BlockContainer;
                                    import net.minecraft.block.material.Material;
                                    import net.minecraft.block.properties.PropertyDirection;
                                    import net.minecraft.block.state.IBlockState;
                                    import net.minecraft.client.Minecraft;
                                    import net.minecraft.client.resources.model.ModelResourceLocation;
                                    import net.minecraft.entity.EntityLivingBase;
                                    import net.minecraft.item.Item;
                                    import net.minecraft.item.ItemStack;
                                    import net.minecraft.tileentity.TileEntity;
                                    import net.minecraft.tileentity.TileEntityChest;
                                    import net.minecraft.util.BlockPos;
                                    import net.minecraft.util.EnumFacing;
                                    import net.minecraft.util.MathHelper;
                                    import net.minecraft.world.World;
                                    import net.minecraftforge.fml.common.registry.GameRegistry;
                                    import net.minecraftforge.fml.relauncher.Side;
                                    import net.minecraftforge.fml.relauncher.SideOnly;
                                    import eryah.usefulthings.Reference;
                                    import eryah.usefulthings.UsefulthingsMod;
                                    import eryah.usefulthings.tileentity.TileEntityPlateCrafter;
                                    
                                    public class PlateCrafter extends BlockContainer {
                                    
                                    public static Block platecrafter;    
                                    
                                    public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
                                    
                                      public PlateCrafter(Material material)
                                       {
                                            super(material);
                                            this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
                                    
                                       }      
                                    
                                      @Override
                                       public TileEntity createNewTileEntity(World world, int metadata) //Instancie le TileEntity
                                       {
                                           return new TileEntityPlateCrafter();
                                       }
                                    
                                       public boolean hasTileEntity(int metadata) //Permet de savoir si le bloc a un TileEntity
                                       {
                                           return true;
                                       }
                                    
                                    public static void init()
                                    {
                                    platecrafter = new PlateCrafter(Material.rock).setUnlocalizedName("platecrafter").setCreativeTab(UsefulthingsMod.UTTab);
                                    }
                                    
                                    public static void register()
                                    {
                                    GameRegistry.registerBlock(platecrafter, platecrafter.getUnlocalizedName().substring(5));
                                    }
                                    
                                    public static void registerRenders()
                                    {
                                    registerRender(platecrafter);
                                    }
                                    
                                    public static void registerRender(Block block)
                                    {
                                    Item item = Item.getItemFromBlock(block);
                                    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
                                    }
                                    
                                    public boolean isOpaqueCube()
                                       {
                                           return false;
                                       }
                                    
                                       public boolean renderAsNormalBlock()
                                       {
                                           return false;
                                       }
                                    
                                       public int getRenderType()
                                       {
                                           return -1;
                                       }
                                    
                                       public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
                                       {
                                    
                                           Iterator iterator = EnumFacing.Plane.HORIZONTAL.iterator();
                                    
                                           while (iterator.hasNext())
                                           {
                                               EnumFacing enumfacing = (EnumFacing)iterator.next();
                                               BlockPos blockpos1 = pos.offset(enumfacing);
                                               IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);
                                    
                                               if (iblockstate1.getBlock() == this)
                                               {
                                    
                                               }
                                           }
                                       }
                                    
                                       public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
                                       {
                                           return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing());
                                       }
                                    
                                       public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
                                       {
                                           EnumFacing enumfacing = EnumFacing.getHorizontal(MathHelper.floor_double((double)(placer.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3).getOpposite();
                                           state = state.withProperty(FACING, enumfacing);
                                           BlockPos blockpos1 = pos.north();
                                           BlockPos blockpos2 = pos.south();
                                           BlockPos blockpos3 = pos.west();
                                           BlockPos blockpos4 = pos.east();
                                           boolean flag = this == worldIn.getBlockState(blockpos1).getBlock();
                                           boolean flag1 = this == worldIn.getBlockState(blockpos2).getBlock();
                                           boolean flag2 = this == worldIn.getBlockState(blockpos3).getBlock();
                                           boolean flag3 = this == worldIn.getBlockState(blockpos4).getBlock();
                                    
                                           if (!flag && !flag1 && !flag2 && !flag3)
                                           {
                                               worldIn.setBlockState(pos, state, 3);
                                           }
                                           else if (enumfacing.getAxis() == EnumFacing.Axis.X && (flag || flag1))
                                           {
                                               if (flag)
                                               {
                                                   worldIn.setBlockState(blockpos1, state, 3);
                                               }
                                               else
                                               {
                                                   worldIn.setBlockState(blockpos2, state, 3);
                                               }
                                    
                                               worldIn.setBlockState(pos, state, 3);
                                           }
                                           else if (enumfacing.getAxis() == EnumFacing.Axis.Z && (flag2 || flag3))
                                           {
                                               if (flag2)
                                               {
                                                   worldIn.setBlockState(blockpos3, state, 3);
                                               }
                                               else
                                               {
                                                   worldIn.setBlockState(blockpos4, state, 3);
                                               }
                                    
                                               worldIn.setBlockState(pos, state, 3);
                                           }
                                    
                                           if (stack.hasDisplayName())
                                           {
                                               TileEntity tileentity = worldIn.getTileEntity(pos);
                                    
                                               if (tileentity instanceof TileEntityPlateCrafter)
                                               {
                                    
                                               }
                                           }
                                       }
                                    
                                       public IBlockState correctFacing(World worldIn, BlockPos pos, IBlockState state)
                                       {
                                           EnumFacing enumfacing = null;
                                           Iterator iterator = EnumFacing.Plane.HORIZONTAL.iterator();
                                    
                                           while (iterator.hasNext())
                                           {
                                               EnumFacing enumfacing1 = (EnumFacing)iterator.next();
                                               IBlockState iblockstate1 = worldIn.getBlockState(pos.offset(enumfacing1));
                                    
                                               if (iblockstate1.getBlock() == this)
                                               {
                                                   return state;
                                               }
                                    
                                               if (iblockstate1.getBlock().isFullBlock())
                                               {
                                                   if (enumfacing != null)
                                                   {
                                                       enumfacing = null;
                                                       break;
                                                   }
                                    
                                                   enumfacing = enumfacing1;
                                               }
                                           }
                                    
                                           if (enumfacing != null)
                                           {
                                               return state.withProperty(FACING, enumfacing.getOpposite());
                                           }
                                           else
                                           {
                                               EnumFacing enumfacing2 = (EnumFacing)state.getValue(FACING);
                                    
                                               if (worldIn.getBlockState(pos.offset(enumfacing2)).getBlock().isFullBlock())
                                               {
                                                   enumfacing2 = enumfacing2.getOpposite();
                                               }
                                    
                                               if (worldIn.getBlockState(pos.offset(enumfacing2)).getBlock().isFullBlock())
                                               {
                                                   enumfacing2 = enumfacing2.rotateY();
                                               }
                                    
                                               if (worldIn.getBlockState(pos.offset(enumfacing2)).getBlock().isFullBlock())
                                               {
                                                   enumfacing2 = enumfacing2.getOpposite();
                                               }
                                    
                                               return state.withProperty(FACING, enumfacing2);
                                           }
                                       }
                                    
                                    }
                                    
                                    

                                    Quand je lance le jeu, ça crash.
                                    Le log

                                    –-- Minecraft Crash Report ----
                                    // Shall we play a game?
                                    
                                    Time: 12/06/15 16:55
                                    Description: Initializing game
                                    
                                    java.lang.IllegalArgumentException: Cannot set property PropertyDirection{name=facing, clazz=class net.minecraft.util.EnumFacing, values=[north, south, west, east]} as it does not exist in BlockState{block=null, properties=[]}
                                    at net.minecraft.block.state.BlockState$StateImplementation.withProperty(BlockState.java:182)
                                    at eryah.usefulthings.blocks.PlateCrafter.<init>(PlateCrafter.java:43)
                                    at eryah.usefulthings.blocks.PlateCrafter.init(PlateCrafter.java:66)
                                    at eryah.usefulthings.UsefulthingsMod.preInit(UsefulthingsMod.java:89)
                                    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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                    at java.lang.reflect.Method.invoke(Unknown Source)
                                    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                                    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                    at java.lang.reflect.Method.invoke(Unknown Source)
                                    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                                    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:527)
                                    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:246)
                                    at net.minecraft.client.Minecraft.startGame(Minecraft.java:446)
                                    at net.minecraft.client.Minecraft.run(Minecraft.java:356)
                                    at net.minecraft.client.main.Main.main(Main.java:117)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                    at java.lang.reflect.Method.invoke(Unknown Source)
                                    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                                    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                                    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                                    at GradleStart.main(Unknown Source)
                                    
                                    A detailed walkthrough of the error, its code path and all known details is as follows:
                                    –-------------------------------------------------------------------------------------
                                    
                                    -- Head --
                                    Stacktrace:
                                    at net.minecraft.block.state.BlockState$StateImplementation.withProperty(BlockState.java:182)
                                    at eryah.usefulthings.blocks.PlateCrafter.<init>(PlateCrafter.java:43)
                                    at eryah.usefulthings.blocks.PlateCrafter.init(PlateCrafter.java:66)
                                    at eryah.usefulthings.UsefulthingsMod.preInit(UsefulthingsMod.java:89)
                                    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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                    at java.lang.reflect.Method.invoke(Unknown Source)
                                    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                                    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                    at java.lang.reflect.Method.invoke(Unknown Source)
                                    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                                    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:527)
                                    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:246)
                                    at net.minecraft.client.Minecraft.startGame(Minecraft.java:446)
                                    
                                    -- Initialization --
                                    Details:
                                    Stacktrace:
                                    at net.minecraft.client.Minecraft.run(Minecraft.java:356)
                                    at net.minecraft.client.main.Main.main(Main.java:117)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                    at java.lang.reflect.Method.invoke(Unknown Source)
                                    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                                    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                                    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                                    at GradleStart.main(Unknown Source)
                                    
                                    -- System Details --
                                    Details:
                                    Minecraft Version: 1.8
                                    Operating System: Windows 8.1 (amd64) version 6.3
                                    Java Version: 1.8.0_45, Oracle Corporation
                                    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                                    Memory: 855525096 bytes (815 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
                                    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
                                    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                                    FML: MCP v9.10 FML v8.99.8.1412 Minecraft Forge 11.14.1.1412 4 mods loaded, 4 mods active
                                    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
                                    FML{8.99.8.1412} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1412.jar) Unloaded->Constructed->Pre-initialized
                                    Forge{11.14.1.1412} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1412.jar) Unloaded->Constructed->Pre-initialized
                                    ut{Beta 1.0} [Useful Things] (bin) Unloaded->Constructed->Errored
                                    Loaded coremods (and transformers):
                                    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.2.12420 Compatibility Profile Context 13.151.0.0' Renderer: 'AMD Radeon HD 8240'
                                    Launched Version: 1.8
                                    LWJGL: 2.9.1
                                    OpenGL: AMD Radeon HD 8240 GL version 4.2.12420 Compatibility Profile Context 13.151.0.0, ATI Technologies Inc.
                                    GL Caps: Using GL 1.3 multitexturing.
                                    Using GL 1.3 texture combiners.
                                    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
                                    Shaders are available because OpenGL 2.1 is supported.
                                    VBOs are available because OpenGL 1.5 is supported.
                                    
                                    Using VBOs: No
                                    Is Modded: Definitely; Client brand changed to 'fml,forge'
                                    Type: Client (map_client.txt)
                                    Resource Packs: []
                                    Current Language: Français (France)
                                    Profiler Position: N/A (disabled)
                                    ```</init></init>

                                    Membre fantôme
                                    Je développe maintenant un jeu sur UnrealEngine4


                                    Contact :…

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

                                      Il te manque la fonction createBlockState :

                                      @Override
                                      protected BlockState createBlockState() {
                                      return new BlockState(this, new IProperty[] { FACING });
                                      }
                                      

                                      PS : pense à utiliser les balises java pour tes codes.

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

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

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

                                        Ca continue à crasher
                                        Crash Report

                                        –-- Minecraft Crash Report ----
                                        // Why did you do that?
                                        
                                        Time: 12/06/15 18:55
                                        Description: There was a severe problem during mod loading that has caused the game to fail
                                        
                                        net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException: Don't know how to convert ut:platecrafter[facing=north] back into data…
                                        at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:225)
                                        at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:182)
                                        at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:171)
                                        at eryah.usefulthings.blocks.PlateCrafter.register(PlateCrafter.java:68)
                                        at eryah.usefulthings.UsefulthingsMod.preInit(UsefulthingsMod.java:90)
                                        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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                        at java.lang.reflect.Method.invoke(Unknown Source)
                                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                        at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                                        at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                        at java.lang.reflect.Method.invoke(Unknown Source)
                                        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                        at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                                        at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:527)
                                        at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:246)
                                        at net.minecraft.client.Minecraft.startGame(Minecraft.java:446)
                                        at net.minecraft.client.Minecraft.run(Minecraft.java:356)
                                        at net.minecraft.client.main.Main.main(Main.java:117)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                        at java.lang.reflect.Method.invoke(Unknown Source)
                                        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                                        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                                        at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                                        at GradleStart.main(Unknown Source)
                                        Caused by: java.lang.IllegalArgumentException: Don't know how to convert ut:platecrafter[facing=north] back into data…
                                        at net.minecraft.block.Block.getMetaFromState(Block.java:272)
                                        at net.minecraftforge.fml.common.registry.GameData.registerBlock(GameData.java:839)
                                        at net.minecraftforge.fml.common.registry.GameData.registerBlock(GameData.java:801)
                                        at net.minecraftforge.fml.common.registry.GameRegistry.registerBlock(GameRegistry.java:214)
                                        ... 43 more
                                        
                                        A detailed walkthrough of the error, its code path and all known details is as follows:
                                        ---------------------------------------------------------------------------------------
                                        
                                        -- System Details --
                                        Details:
                                        Minecraft Version: 1.8
                                        Operating System: Windows 8.1 (amd64) version 6.3
                                        Java Version: 1.8.0_45, Oracle Corporation
                                        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                                        Memory: 848712600 bytes (809 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
                                        JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
                                        IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                                        FML: MCP v9.10 FML v8.99.8.1412 Minecraft Forge 11.14.1.1412 4 mods loaded, 4 mods active
                                        mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
                                        FML{8.99.8.1412} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1412.jar) Unloaded->Constructed->Pre-initialized
                                        Forge{11.14.1.1412} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1412.jar) Unloaded->Constructed->Pre-initialized
                                        ut{Beta 1.0} [Useful Things] (bin) Unloaded->Constructed->Errored
                                        Loaded coremods (and transformers):
                                        GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.2.12420 Compatibility Profile Context 13.151.0.0' Renderer: 'AMD Radeon HD 8240'
                                        

                                        J’ai pourtant regarder, j’ia bien register le block

                                        Membre fantôme
                                        Je développe maintenant un jeu sur UnrealEngine4


                                        Contact :…

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

                                          Tu as oublié les fonctions getStateFromMeta et getMetaFromState, écoute ce que l’on te dit : http://www.minecraftforgefrance.fr/showthread.php?tid=2176&pid=24810#pid24810

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

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

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

                                            Elle existait déjà dans mon code
                                            Enfin, la méthode était déjà présente quand j’ai copié collé ce que tu m’a donné

                                            Malheureusement, je ne peut pas tester maintenant le code, j’ai un erreur, qui je pense fera crash mon jeu

                                            Membre fantôme
                                            Je développe maintenant un jeu sur UnrealEngine4


                                            Contact :…

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB