MFF

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

    Porte

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

      Tien le code en 1.7.10.

      La porte (block):

      ​package fr.porte;
      
      import java.util.Random;
      
      import net.minecraft.block.BlockDoor;
      import net.minecraft.block.material.Material;
      import net.minecraft.entity.player.EntityPlayer;
      import net.minecraft.init.Blocks;
      import net.minecraft.item.Item;
      import net.minecraft.util.AxisAlignedBB;
      import net.minecraft.util.ChunkCoordinates;
      import net.minecraft.world.IBlockAccess;
      import net.minecraft.world.World;
      import cpw.mods.fml.relauncher.Side;
      import cpw.mods.fml.relauncher.SideOnly;
      import fr.diangle.tutoriel.core.Tuto;
      
      public class Porte extends BlockDoor
      {
      
          public Porte()
          {
              super(Material.anvil);
              this.setHardness(3.0F);
              this.setResistance(5.0F);
              this.disableStats();
          }
      
          @Override
          public Item getItemDropped(int par1, Random rand, int par3)
          {
              return Tuto.porteItem;
          }
      
          @Override
          @SideOnly(Side.CLIENT)
          public Item getItem(World world, int x, int y, int z)
          {
              return Tuto.porteItem;
          }
      
          @Override
          public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
          {
              int pX = (int)player.posX;
              int pY = (int)player.posY;
              int pZ = (int)player.posZ;
              player.setPositionAndUpdate(pX + 0.5, pY, pZ + 0.5);
              if(player.capabilities.isFlying)
                  player.capabilities.isFlying = false;
              player.setSpawnChunk(new ChunkCoordinates(pX, -120, pZ), true);
      
              for(int y1 = pY; y1 >= 0; y1–)
                  world.setBlock(pX, y1, pZ, Blocks.air);
      
              return true;
      
          }
      
          @Override
          @SideOnly(Side.CLIENT)
          public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z)
          {
              this.setBlockBoundsBasedOnState(world, x, y, z);
              return super.getSelectedBoundingBoxFromPool(world, x, y, z);
          }
      
          @Override
          public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
          {
              this.setBlockBoundsBasedOnState(world, x, y, z);
              return super.getCollisionBoundingBoxFromPool(world, x, y, z);
          }
      
          @Override
          public void setBlockBoundsBasedOnState(IBlockAccess blockaccess, int x, int y, int z)
          {
              this.func_150011_b(this.func_150012_g(blockaccess, x, y, z));
          }
      
          @Override
          public int func_150013_e(IBlockAccess blockaccess, int x, int y, int z)
          {
              return this.func_150012_g(blockaccess, x, y, z) & 3;
          }
      
          @Override
          public boolean func_150015_f(IBlockAccess blockaccess, int x, int y, int z)
          {
              return (this.func_150012_g(blockaccess, x, y, z) & 4) != 0;
          }
      
          private void func_150011_b(int par1)
          {
              float f = 0.1875F;
              this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F);
              int j = par1 & 3;
              boolean flag = (par1 & 4) != 0;
              boolean flag1 = (par1 & 16) != 0;
      
              if(j == 0)
              {
                  if(flag)
                  {
                      if(!flag1)
                      {
                          this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
                      }
                      else
                      {
                          this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
                      }
                  }
                  else
                  {
                      this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
                  }
              }
              else if(j == 1)
              {
                  if(flag)
                  {
                      if(!flag1)
                      {
                          this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                      }
                      else
                      {
                          this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
                      }
                  }
                  else
                  {
                      this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
                  }
              }
              else if(j == 2)
              {
                  if(flag)
                  {
                      if(!flag1)
                      {
                          this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
                      }
                      else
                      {
                          this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
                      }
                  }
                  else
                  {
                      this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                  }
              }
              else if(j == 3)
              {
                  if(flag)
                  {
                      if(!flag1)
                      {
                          this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
                      }
                      else
                      {
                          this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                      }
                  }
                  else
                  {
                      this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
                  }
              }
          }
      }
      
      

      La porte item :

      ​package fr.porte;
      
      import fr.diangle.tutoriel.core.Tuto;
      import net.minecraft.block.Block;
      import net.minecraft.block.material.Material;
      import net.minecraft.creativetab.CreativeTabs;
      import net.minecraft.entity.player.EntityPlayer;
      import net.minecraft.init.Blocks;
      import net.minecraft.item.Item;
      import net.minecraft.item.ItemStack;
      import net.minecraft.util.MathHelper;
      import net.minecraft.world.World;
      
      public class ItemPorte extends Item
      {
      
          public ItemPorte()
          {
              this.maxStackSize = 1;
              this.setCreativeTab(CreativeTabs.tabBlock);
          }
      
          public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
          {
              if(side != 1)
              {
                  return false;
              }
              else
              {
                  ++y;
                  Block block = Tuto.porte;
      
                  if(player.canPlayerEdit(x, y, z, side, itemStack) && player.canPlayerEdit(x, y + 1, z, side, itemStack))
                  {
                      if(!block.canPlaceBlockAt(world, x, y, z))
                      {
                          return false;
                      }
                      else
                      {
                          int i1 = MathHelper.floor_double((double)((player.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
                          placeDoorBlock(world, x, y, z, i1, block);
                          --itemStack.stackSize;
                          return true;
                      }
                  }
                  else
                  {
                      return false;
                  }
              }
          }
      
          public static void placeDoorBlock(World world, int x, int y, int z, int side, Block block)
          {
              byte b0 = 0;
              byte b1 = 0;
      
              if(side == 0)
              {
                  b1 = 1;
              }
      
              if(side == 1)
              {
                  b0 = -1;
              }
      
              if(side == 2)
              {
                  b1 = -1;
              }
      
              if(side == 3)
              {
                  b0 = 1;
              }
      
              int i1 = (world.getBlock(x - b0, y, z - b1).isNormalCube() ? 1 : 0) + (world.getBlock(x - b0, y + 1, z - b1).isNormalCube() ? 1 : 0);
              int j1 = (world.getBlock(x + b0, y, z + b1).isNormalCube() ? 1 : 0) + (world.getBlock(x + b0, y + 1, z + b1).isNormalCube() ? 1 : 0);
              boolean flag = world.getBlock(x - b0, y, z - b1) == block || world.getBlock(x - b0, y + 1, z - b1) == block;
              boolean flag1 = world.getBlock(x + b0, y, z + b1) == block || world.getBlock(x + b0, y + 1, z + b1) == block;
              boolean flag2 = false;
      
              if(flag && !flag1)
              {
                  flag2 = true;
              }
              else if(j1 > i1)
              {
                  flag2 = true;
              }
      
              world.setBlock(x, y, z, block, side, 2);
              world.setBlock(x, y + 1, z, block, 8 | (flag2 ? 1 : 0), 2);
              world.notifyBlocksOfNeighborChange(x, y, z, block);
              world.notifyBlocksOfNeighborChange(x, y + 1, z, block);
          }
      }
      
      

      La classe principale :

      ​    public static Block porte;
          public static Item porteItem;
      
          @EventHandler
          public void preLoad(FMLPreInitializationEvent event)
          {
      
              porte = new Porte().setBlockName("porte");
              porteItem = new ItemPorte();
      
              GameRegistry.registerBlock(porte, "porte");
              GameRegistry.registerItem(porteItem, "item_porte");
      
          }
      
      1 réponse Dernière réponse Répondre Citer 0
      • TheAzkazeT Hors-ligne
        TheAzkaze
        dernière édition par

        Dans c’est codage je ne vois pas ou est la nouvelle textures de la porte

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

          @‘TheAzkaze’:

          Dans c’est codage je ne vois pas ou est la nouvelle textures de la porte

          Normal la texture se trouve sûrement dans la classe du Render de la porte.

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

            @‘TheAzkaze’:

            Dans c’est codage je ne vois pas ou est la nouvelle textures de la porte

            C’est le principe de l’héritage, le code de la texture est dans la classe mère. Tu as juste à mettre dans initialisation du bloc “setBlockTextureName(“texture”)”, donc la texture devrons avoir pour nom : “texture_lower.png” et “texture_upper.png”. Attention, il faut aussi mettre un texture à l’item.

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

              La le mod que j’ai créer n’est pas compatible avec not enough items normal ??

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

                envoie nous le crash report.

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

                  Donc voici le crash report

                  –-- Minecraft Crash Report ----
                  // I let you down. Sorry :(
                  
                  Time: 14/06/15 18:38
                  Description: Initializing game
                  
                  java.lang.StringIndexOutOfBoundsException: String index out of range: 8
                  at java.lang.String.charAt(Unknown Source)
                  at net.minecraft.item.crafting.CraftingManager.func_92103_a(CraftingManager.java:226)
                  at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)
                  at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)
                  at fr.minecraftforgefrance.novamine.common.ModNovamine.init(ModNovamine.java:242)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                  at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                  at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                  at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                  at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                  at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                  at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                  at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                  at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                  at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                  at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                  at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                  at cpw.mods.fml.common.Loader.initializeMods(Loader.java:713)
                  at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:304)
                  at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:552)
                  at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)
                  at net.minecraft.client.main.Main.main(SourceFile:148)
                  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)
                  
                  A detailed walkthrough of the error, its code path and all known details is as follows:
                  ---------------------------------------------------------------------------------------
                  
                  -- Head --
                  Stacktrace:
                  at java.lang.String.charAt(Unknown Source)
                  at net.minecraft.item.crafting.CraftingManager.func_92103_a(CraftingManager.java:226)
                  at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)
                  at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)
                  at fr.minecraftforgefrance.novamine.common.ModNovamine.init(ModNovamine.java:242)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                  at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                  at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                  at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                  at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                  at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                  at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                  at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                  at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                  at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                  at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                  at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                  at cpw.mods.fml.common.Loader.initializeMods(Loader.java:713)
                  at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:304)
                  at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:552)
                  
                  -- Initialization --
                  Details:
                  Stacktrace:
                  at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)
                  at net.minecraft.client.main.Main.main(SourceFile:148)
                  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)
                  
                  -- System Details --
                  Details:
                  Minecraft Version: 1.7.10
                  Operating System: Windows 8.1 (amd64) version 6.3
                  Java Version: 1.7.0_79, Oracle Corporation
                  Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                  Memory: 380301072 bytes (362 MB) / 642777088 bytes (613 MB) up to 954728448 bytes (910 MB)
                  JVM Flags: 2 total; -Xms512M -Xmx1024M
                  AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                  IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
                  FML: MCP v9.05 FML v7.10.130.1395 Minecraft Forge 10.13.3.1395 9 mods loaded, 9 mods active
                  mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
                  FML{7.10.130.1395} [Forge Mod Loader] (forge-1.7.10-10.13.3.1395-1710ls.jar) Unloaded->Constructed->Pre-initialized->Initialized
                  Forge{10.13.3.1395} [Minecraft Forge] (forge-1.7.10-10.13.3.1395-1710ls.jar) Unloaded->Constructed->Pre-initialized->Initialized
                  CodeChickenCore{1.0.4.29} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
                  NotEnoughItems{1.0.3.74} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.3.74-universal.jar) Unloaded->Constructed->Pre-initialized->Initialized
                  BiblioCraft{1.10.3} [BiblioCraft] (BiblioCraft[v1.10.3][MC1.7.10].jar) Unloaded->Constructed->Pre-initialized->Initialized
                  chisel{1.5.7} [Chisel] (Chisel-1.7.10-1.5.7.jar) Unloaded->Constructed->Pre-initialized->Initialized
                  customnpcs{1.7.10c} [CustomNpcs] (CustomNPCs_1.7.10c.jar) Unloaded->Constructed->Pre-initialized->Initialized
                  modnovamine{1.0.0} [Mod Novamine] (NovaMineMod.jar) Unloaded->Constructed->Pre-initialized->Errored
                  GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.3958' Renderer: 'Intel(R) HD Graphics 4000'
                  Launched Version: 1.7.10
                  LWJGL: 2.9.1
                  OpenGL: Intel(R) HD Graphics 4000 GL version 4.0.0 - Build 10.18.10.3958, Intel
                  GL Caps: Using GL 1.3 multitexturing.
                  Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
                  Anisotropic filtering is supported and maximum anisotropy is 16.
                  Shaders are available because OpenGL 2.1 is supported.
                  
                  Is Modded: Definitely; Client brand changed to 'fml,forge'
                  Type: Client (map_client.txt)
                  Resource Packs: []
                  Current Language: English (US)
                  Profiler Position: N/A (disabled)
                  Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                  Anisotropic Filtering: Off (1)
                  
                  1 réponse Dernière réponse Répondre Citer 0
                  • SCAREXS Hors-ligne
                    SCAREX
                    dernière édition par

                    çà viens de tes crafts, pas du block. Envoi ta classe principale.

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

                      Voici ma class principal

                      package fr.minecraftforgefrance.novamine.common;
                      
                      import net.minecraft.block.Block;
                      import net.minecraft.block.BlockGlowstone;
                      import net.minecraft.block.BlockOre;
                      import net.minecraft.block.material.Material;
                      import net.minecraft.creativetab.CreativeTabs;
                      import net.minecraft.init.Blocks;
                      import net.minecraft.init.Items;
                      import net.minecraft.item.Item;
                      import net.minecraft.item.Item.ToolMaterial;
                      import net.minecraft.item.ItemArmor.ArmorMaterial;
                      import net.minecraft.item.ItemDoor;
                      import net.minecraft.item.ItemStack;
                      import net.minecraftforge.common.util.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.registry.GameRegistry;
                      import fr.minecraftforgefrance.novamine.proxy.CommonProxy;
                      
                      @Mod(modid = "modnovamine", name = "Mod Novamine", version = "1.0.0")
                      
                      public class ModNovamine
                      {
                      public static final String MODID = "modnovamine";
                      public static final String MODNAME = "Mod Novamine";
                      public static final String MODVERSION = "1.0.0";
                      
                      @SidedProxy(clientSide = "fr.minecraftforgefrance.novamine.proxy.ClientProxy", serverSide = "fr.minecraftforgefrance.novamine.proxy.CommonProxy")
                      public static CommonProxy proxy;
                      
                      @Instance("modnovamine")
                      public static ModNovamine instance;
                      
                      public static Block porte;
                         public static Item porteItem;
                      public static Item itemEmerald, helmetEmerald, chestPlateEmerald, leggingsEmerald, bootsEmerald, swordEmerald, pickaxeEmerald, axeEmerald, shovelEmerald, hoeEmerald;
                      public static Item itemNova, helmetNova, chestPlateNova, leggingsNova, bootsNova, swordNova, pickaxeNova, axeNova, shovelNova, hoeNova;
                      public static Item itemSaphir, helmetSaphir, chestPlateSaphir, leggingsSaphir, bootsSaphir, swordSaphir, pickaxeSaphir, axeSaphir, shovelSaphir, hoeSaphir;
                      public static Block invi, invil, Nova, LA, BlockSaphir;
                      public static CreativeTabs Nova1_8 = new Nova1_8("Nova1_8");
                      public static CreativeTabs BlockNovaMine = new Nova1_8("BlockNovaMine");
                      public static CreativeTabs ItemNovaMine = new Nova1_8("ItemNovaMine");
                      public static CreativeTabs ArmurNovaMine = new Nova1_8("ArmurNovaMine");
                      public static ArmorMaterial armorNova = EnumHelper.addArmorMaterial("armorNova", 25, new int[] {4, 6, 5, 4}, 20);
                      public static ArmorMaterial armorEmerald = EnumHelper.addArmorMaterial("armorEmerald", 50, new int[] {4, 9, 7, 4}, 30);
                      public static ArmorMaterial armorSaphir = EnumHelper.addArmorMaterial("armorSaphir", 60, new int[] {5, 10, 8, 5}, 35);
                      public static ToolMaterial toolNova = EnumHelper.addToolMaterial("toolNova", 2, 854, 12.0F, 4.0F, 18);
                      public static ToolMaterial toolEmerald = EnumHelper.addToolMaterial("toolEmerald", 4, 2000, 10.0F, 4.0F, 18);
                      public static ToolMaterial toolSaphir = EnumHelper.addToolMaterial("toolSaphir", 5, 2400, 10.0F, 5.0F, 19);
                      /** Tool                              Armor
                      WOOD(0, 59, 2.0F, 0.0F, 15),          CLOTH(5, new int[]{1, 3, 2, 1}, 15),
                         STONE(1, 131, 4.0F, 1.0F, 5),         CHAIN(15, new int[]{2, 5, 4, 1}, 12),    
                         IRON(2, 250, 6.0F, 2.0F, 14),         IRON(15, new int[]{2, 6, 5, 2}, 9),
                         EMERALD(3, 1561, 8.0F, 3.0F, 10),     GOLD(7, new int[]{2, 5, 3, 1}, 25),
                                                               DIAMOND(33, new int[]{3, 8, 6, 3}, 10);
                         */
                      @EventHandler
                      public void preInit(FMLPreInitializationEvent event)
                      {
                      invi = new BlockInvisible(Material.rock).setBlockName("invi").setBlockTextureName(MODID + ":invi").setCreativeTab(BlockNovaMine);
                      invil = new BlockInvisible(Material.rock).setBlockName("invil").setBlockTextureName(MODID + ":invi").setCreativeTab(BlockNovaMine).setLightLevel(1.0F);
                      Nova = new BlockOre().setHardness(3.0F).setResistance(5.0F).setBlockName("oreIron").setBlockTextureName("iron_ore").setCreativeTab(BlockNovaMine).setStepSound(Block.soundTypeStone);
                      LA = new BlockGlowstone(Material.glass).setHardness(0.3F).setStepSound(Block.soundTypeGlass).setLightLevel(1.0F).setBlockName("LA").setBlockTextureName(MODID + ":la").setCreativeTab(Nova1_8);
                      helmetNova = new ItemNovaArmor(armorNova, 0).setUnlocalizedName("helmetTuto").setTextureName(MODID + ":helmet_tutoriel").setCreativeTab(ArmurNovaMine);
                             chestPlateNova = new ItemNovaArmor(armorNova, 1).setUnlocalizedName("chestPlateTuto").setTextureName(MODID + ":chestplate_tutoriel").setCreativeTab(ArmurNovaMine);
                             leggingsNova = new ItemNovaArmor(armorNova, 2).setUnlocalizedName("leggingsTuto").setTextureName(MODID + ":leggings_tutoriel").setCreativeTab(ArmurNovaMine);
                             bootsNova = new ItemNovaArmor(armorNova, 3).setUnlocalizedName("bootsTuto").setTextureName(MODID + ":boots_tutoriel").setCreativeTab(ArmurNovaMine);
                             itemNova = new ItemNova().setUnlocalizedName("tutoriel").setTextureName(MODID + ":item_tutoriel").setCreativeTab(ItemNovaMine).setCreativeTab(ItemNovaMine);
                             swordNova = new ItemNovaSword(toolNova).setUnlocalizedName("swordTuto").setTextureName(MODID + ":sword_tutoriel").setCreativeTab(ItemNovaMine);
                             pickaxeNova = new ItemNovaPickaxe(toolNova).setUnlocalizedName("pickaxeTuto").setTextureName(MODID + ":pickaxe_tutoriel").setCreativeTab(ItemNovaMine);
                             axeNova = new ItemNovaAxe(toolNova).setUnlocalizedName("axeTuto").setTextureName(MODID + ":novahache").setCreativeTab(ItemNovaMine);
                             shovelNova = new ItemNovaShovel(toolNova).setUnlocalizedName("shovelTuto").setTextureName(MODID + ":shovel_tutoriel").setCreativeTab(ItemNovaMine);
                             hoeNova = new ItemNovaHoe(toolNova).setUnlocalizedName("hoeTuto").setTextureName(MODID + ":hoe_tutoriel").setCreativeTab(ItemNovaMine);
                             itemEmerald = new ItemEmerald().setUnlocalizedName("tutoriel").setTextureName(MODID + ":item_tutoriel").setCreativeTab(ItemNovaMine).setCreativeTab(ItemNovaMine);
                             helmetEmerald = new ItemEmeraldArmor(armorEmerald, 0).setUnlocalizedName("helmetEmerald").setTextureName(MODID + ":Emerald_helmet").setCreativeTab(ArmurNovaMine);
                             chestPlateEmerald = new ItemEmeraldArmor(armorEmerald, 1).setUnlocalizedName("chestPlateEmerald").setTextureName(MODID + ":Emerald_chestplate").setCreativeTab(ArmurNovaMine);
                             leggingsEmerald = new ItemEmeraldArmor(armorEmerald, 2).setUnlocalizedName("leggingsEmerald").setTextureName(MODID + ":Emerald_leggings").setCreativeTab(ArmurNovaMine);
                             bootsEmerald = new ItemEmeraldArmor(armorEmerald, 3).setUnlocalizedName("bootsEmerald").setTextureName(MODID + ":Emerald_boots").setCreativeTab(ArmurNovaMine);
                             swordEmerald = new ItemEmeraldSword(toolEmerald).setUnlocalizedName("swordEmerald").setTextureName(MODID + ":Emerald_sword").setCreativeTab(ItemNovaMine);
                             pickaxeEmerald = new ItemEmeraldPickaxe(toolEmerald).setUnlocalizedName("pickaxeEmerald").setTextureName(MODID + ":Emerald_pickaxe").setCreativeTab(ItemNovaMine);
                             axeEmerald = new ItemEmeraldAxe(toolEmerald).setUnlocalizedName("axeEmerald").setTextureName(MODID + ":Emerald_hatchet").setCreativeTab(ItemNovaMine);
                             shovelEmerald = new ItemEmeraldShovel(toolEmerald).setUnlocalizedName("shovelEmerald").setTextureName(MODID + ":Emerald_shovel").setCreativeTab(ItemNovaMine);
                             hoeEmerald = new ItemEmeraldHoe(toolEmerald).setUnlocalizedName("hoeEmerald").setTextureName(MODID + ":Emerald_hoe").setCreativeTab(ItemNovaMine);
                             itemSaphir = new Item().setUnlocalizedName("Saphir").setCreativeTab(ItemNovaMine).setTextureName(MODID + ":Saphir");
                             helmetSaphir = new ItemSaphirArmor(armorSaphir, 0).setUnlocalizedName("Saphir_helmet").setTextureName(MODID + ":Saphir_helmet").setCreativeTab(ArmurNovaMine);
                             chestPlateSaphir = new ItemSaphirArmor(armorSaphir, 1).setUnlocalizedName("Saphir_chestplate").setTextureName(MODID + ":Saphir_chestplate").setCreativeTab(ArmurNovaMine);
                             leggingsSaphir = new ItemSaphirArmor(armorSaphir, 2).setUnlocalizedName("Saphir_leggings").setTextureName(MODID + ":Saphir_leggings").setCreativeTab(ArmurNovaMine);
                             bootsSaphir = new ItemSaphirArmor(armorSaphir, 3).setUnlocalizedName("Saphir_boots").setTextureName(MODID + ":Saphir_boots").setCreativeTab(ArmurNovaMine);
                             swordSaphir = new ItemSaphirSword(toolSaphir).setUnlocalizedName("Saphir_sword").setTextureName(MODID + ":Saphir_sword").setCreativeTab(ItemNovaMine);
                             pickaxeSaphir = new ItemSaphirPickaxe(toolSaphir).setUnlocalizedName("Saphir_pickaxe").setTextureName(MODID + ":Saphir_pickaxe").setCreativeTab(ItemNovaMine);
                             axeSaphir = new ItemSaphirAxe(toolSaphir).setUnlocalizedName("Saphir_axe").setTextureName(MODID + ":Saphir_axe").setCreativeTab(ItemNovaMine);
                             shovelSaphir = new ItemSaphirShovel(toolSaphir).setUnlocalizedName("Saphir_shovel").setTextureName(MODID + ":Saphir_shovel").setCreativeTab(ItemNovaMine);
                             hoeSaphir = new ItemSaphirHoe(toolSaphir).setUnlocalizedName("Saphir_hoe").setTextureName(MODID + ":Saphir_hoe").setCreativeTab(ItemNovaMine);
                             BlockSaphir = new BlockSaphir (Material.rock).setBlockName("BlockSaphir").setBlockTextureName(MODID + ":Saphir_block").setCreativeTab(BlockNovaMine);
                             porte = new Porte().setBlockName("porte").setBlockTextureName("spruce_upper").setBlockTextureName("spruce_lower");
                             porteItem = new ItemPorte().setUnlocalizedName("PorteS").setTextureName("spruce");
                      }
                      
                      @EventHandler
                      public void init(FMLInitializationEvent event)
                      {
                      GameRegistry.registerBlock(porte, "porte");
                             GameRegistry.registerItem(porteItem, "item_porte");
                      GameRegistry.registerBlock(invi, "invi");
                      GameRegistry.registerBlock(invil, "invil");
                      GameRegistry.registerBlock(Nova, "Nova");
                      GameRegistry.registerBlock(LA, "LA");
                      GameRegistry.registerItem(itemNova, "itemNova");
                      GameRegistry.registerItem(helmetNova, "item_tuto_helmet");
                         GameRegistry.registerItem(chestPlateNova, "item_tuto_chestplate");
                         GameRegistry.registerItem(leggingsNova, "item_tuto_leggings");
                         GameRegistry.registerItem(bootsNova, "item_tuto_boots");
                         GameRegistry.registerItem(swordNova, "item_tuto_sword");
                         GameRegistry.registerItem(pickaxeNova, "item_tuto_pickaxe");
                         GameRegistry.registerItem(axeNova, "item_tuto_axe");
                         GameRegistry.registerItem(shovelNova, "item_tuto_shovel");
                         GameRegistry.registerItem(hoeNova, "item_tuto_hoe");
                         GameRegistry.registerItem(itemEmerald, "itemEmerald");
                      GameRegistry.registerItem(helmetEmerald, "helmetEmerald");
                         GameRegistry.registerItem(chestPlateEmerald, "chestPlateEmerald");
                         GameRegistry.registerItem(leggingsEmerald, "leggingsEmerald");
                         GameRegistry.registerItem(bootsEmerald, "bootsEmerald");
                         GameRegistry.registerItem(swordEmerald, "swordEmerald");
                         GameRegistry.registerItem(pickaxeEmerald, "pickaxeEmerald");
                         GameRegistry.registerItem(axeEmerald, "axeEmerald");
                         GameRegistry.registerItem(shovelEmerald, "shovelEmerald");
                         GameRegistry.registerItem(hoeEmerald, "hoeEmerald");
                         GameRegistry.registerItem(itemSaphir, "itemSaphir");
                         GameRegistry.registerItem(helmetSaphir, "helmetSaphir");
                         GameRegistry.registerItem(chestPlateSaphir, "chestPlateSaphir");
                         GameRegistry.registerItem(leggingsSaphir, "leggingsSaphir");
                         GameRegistry.registerItem(bootsSaphir, "bootsSaphir");
                         GameRegistry.registerItem(swordSaphir, "swordSaphir");
                         GameRegistry.registerItem(pickaxeSaphir, "pickaxeSaphir");
                         GameRegistry.registerItem(axeSaphir, "axeSaphir");
                         GameRegistry.registerItem(shovelSaphir, "shovelSaphir");
                         GameRegistry.registerItem(hoeSaphir, "hoeSaphir");
                         GameRegistry.registerBlock(BlockSaphir, "BlockSaphir");
                      
                         //recette
                         GameRegistry.addRecipe(new ItemStack(swordEmerald, 1), new Object[] {
                      " E ",
                      " E ",
                      " S ", 'S', Items.stick, 'E', Items.emerald
                      });
                         GameRegistry.addRecipe(new ItemStack(swordEmerald, 1), new Object[] {
                          "E  ",
                          "E  ",
                          "S  ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(swordEmerald, 1), new Object[] {
                          "  E",
                          "  E",
                          "  S", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(pickaxeEmerald, 1), new Object[] {
                          "EEE",
                          " S ",
                          " S ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(axeEmerald, 1), new Object[] {
                          " EE",
                          " SE",
                          " S ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(axeEmerald, 1), new Object[] {
                          "EE ",
                          "ES ",
                          " S ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(shovelEmerald, 1), new Object[] {
                          " E ",
                          " S ",
                          " S ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(shovelEmerald, 1), new Object[] {
                          "E  ",
                          "S  ",
                          "S  ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(shovelEmerald, 1), new Object[] {
                          "  E",
                          "  S",
                          "  S", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(hoeEmerald, 1), new Object[] {
                          "EE ",
                          " S ",
                          " S ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(hoeEmerald, 1), new Object[] {
                          " EE",
                          " S ",
                          " S ", 'S', Items.stick, 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(helmetEmerald, 1), new Object[] {
                          "EEE",
                          "E E",
                          "   ", 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(helmetEmerald, 1), new Object[] {
                          "   ",
                          "EEE",
                          "E E", 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(chestPlateEmerald, 1), new Object[] {
                          "E E",
                          "EEE",
                          "EEE", 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(leggingsEmerald, 1), new Object[] {
                          "EEE",
                          "E E",
                          "E E", 'E', Items.emerald
                         });
                         GameRegistry.addRecipe(new ItemStack(bootsEmerald, 1), new Object[] {
                          "   ",
                          "E E",
                          "E E", 'E', Items.emerald
                         });  
                         GameRegistry.addRecipe(new ItemStack(bootsEmerald, 1), new Object[] {
                          "E E",
                          "E E",
                          "   ", 'E', Items.emerald
                         });  
                         GameRegistry.addRecipe(new ItemStack(BlockSaphir, 1), new Object[] {
                          "SSS",
                          "SSS",
                          "SSS", 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                          " S ",
                          " S ",
                          " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                          "S  ",
                          "S ",
                          "0  ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                          "  S",
                          "  S",
                          "  0", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(pickaxeSaphir, 1), new Object[] {
                          "SSS",
                          " 0 ",
                          " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(axeSaphir, 1), new Object[] {
                          " SS",
                          " 0S",
                          " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(axeSaphir, 1), new Object[] {
                          " SS",
                          " 0S",
                          " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(shovelSaphir, 1), new Object[] {
                          " S ",
                          " 0 ",
                          " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(shovelSaphir, 1), new Object[] {
                          "S  ",
                          "0  ",
                          "0  ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(shovelSaphir, 1), new Object[] {
                          "  S",
                          "  0",
                          "  0", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(hoeSaphir, 1), new Object[] {
                          " SS",
                          " 0 ",
                          " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(hoeSaphir, 1), new Object[] {
                          "SS ",
                          " 0 ",
                          " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(helmetSaphir, 1), new Object[] {
                          "SSS",
                          "S S",
                          "   ", 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(helmetSaphir, 1), new Object[] {
                          "   ",
                          "SSS",
                          "S S", 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(chestPlateSaphir, 1), new Object[] {
                          "S S",
                          "SSS",
                          "SSS", 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(leggingsSaphir, 1), new Object[] {
                          "SSS",
                          "S S",
                          "S S", 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(bootsSaphir, 1), new Object[] {
                          "S S",
                          "S S",
                          "   ", 'S', ModNovamine.itemSaphir
                         });
                         GameRegistry.addRecipe(new ItemStack(bootsSaphir, 1), new Object[] {
                          "   ",
                          "S S",
                          "S S", 'S', ModNovamine.itemSaphir
                         });
                      
                      //GameRegistry.addShapelessRecipe(new ItemStack(tutoBlock, 2), Blocks.dirt, Blocks.dirt, tutoItem);
                         }
                      
                      @EventHandler
                      public void postInit(FMLPostInitializationEvent event)
                      {
                      
                      }
                      }
                      
                      1 réponse Dernière réponse Répondre Citer 0
                      • TheAzkazeT Hors-ligne
                        TheAzkaze
                        dernière édition par

                        La porte n’existait pas encore

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

                          Utilise la balise java, sinon on peut pas voir les lignes. Il manque un espace à la ligne 244.

                          PS : tu n’est pas obligé de tout remplir d’espaces, si tu veux faire une épée par exemple, tu peux mettre juste une lettre dans chaque ligne.

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

                            package fr.minecraftforgefrance.novamine.common;
                            
                            import net.minecraft.block.Block;
                            import net.minecraft.block.BlockGlowstone;
                            import net.minecraft.block.BlockOre;
                            import net.minecraft.block.material.Material;
                            import net.minecraft.creativetab.CreativeTabs;
                            import net.minecraft.init.Blocks;
                            import net.minecraft.init.Items;
                            import net.minecraft.item.Item;
                            import net.minecraft.item.Item.ToolMaterial;
                            import net.minecraft.item.ItemArmor.ArmorMaterial;
                            import net.minecraft.item.ItemDoor;
                            import net.minecraft.item.ItemStack;
                            import net.minecraftforge.common.util.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.registry.GameRegistry;
                            import fr.minecraftforgefrance.novamine.proxy.CommonProxy;
                            
                            @Mod(modid = "modnovamine", name = "Mod Novamine", version = "1.0.0")
                            
                            public class ModNovamine
                            {
                            public static final String MODID = "modnovamine";
                            public static final String MODNAME = "Mod Novamine";
                            public static final String MODVERSION = "1.0.0";
                            
                            @SidedProxy(clientSide = "fr.minecraftforgefrance.novamine.proxy.ClientProxy", serverSide = "fr.minecraftforgefrance.novamine.proxy.CommonProxy")
                            public static CommonProxy proxy;
                            
                            @Instance("modnovamine")
                            public static ModNovamine instance;
                            
                            public static Block porte;
                            public static Item porteItem;
                            public static Item itemEmerald, helmetEmerald, chestPlateEmerald, leggingsEmerald, bootsEmerald, swordEmerald, pickaxeEmerald, axeEmerald, shovelEmerald, hoeEmerald;
                            public static Item itemNova, helmetNova, chestPlateNova, leggingsNova, bootsNova, swordNova, pickaxeNova, axeNova, shovelNova, hoeNova;
                            public static Item itemSaphir, helmetSaphir, chestPlateSaphir, leggingsSaphir, bootsSaphir, swordSaphir, pickaxeSaphir, axeSaphir, shovelSaphir, hoeSaphir;
                            public static Block invi, invil, Nova, LA, BlockSaphir;
                            public static CreativeTabs Nova1_8 = new Nova1_8("Nova1_8");
                            public static CreativeTabs BlockNovaMine = new Nova1_8("BlockNovaMine");
                            public static CreativeTabs ItemNovaMine = new Nova1_8("ItemNovaMine");
                            public static CreativeTabs ArmurNovaMine = new Nova1_8("ArmurNovaMine");
                            public static ArmorMaterial armorNova = EnumHelper.addArmorMaterial("armorNova", 25, new int[] {4, 6, 5, 4}, 20);
                            public static ArmorMaterial armorEmerald = EnumHelper.addArmorMaterial("armorEmerald", 50, new int[] {4, 9, 7, 4}, 30);
                            public static ArmorMaterial armorSaphir = EnumHelper.addArmorMaterial("armorSaphir", 60, new int[] {5, 10, 8, 5}, 35);
                            public static ToolMaterial toolNova = EnumHelper.addToolMaterial("toolNova", 2, 854, 12.0F, 4.0F, 18);
                            public static ToolMaterial toolEmerald = EnumHelper.addToolMaterial("toolEmerald", 4, 2000, 10.0F, 4.0F, 18);
                            public static ToolMaterial toolSaphir = EnumHelper.addToolMaterial("toolSaphir", 5, 2400, 10.0F, 5.0F, 19);
                            /** Tool Armor
                            WOOD(0, 59, 2.0F, 0.0F, 15), CLOTH(5, new int[]{1, 3, 2, 1}, 15),
                            STONE(1, 131, 4.0F, 1.0F, 5), CHAIN(15, new int[]{2, 5, 4, 1}, 12),
                            IRON(2, 250, 6.0F, 2.0F, 14), IRON(15, new int[]{2, 6, 5, 2}, 9),
                            EMERALD(3, 1561, 8.0F, 3.0F, 10), GOLD(7, new int[]{2, 5, 3, 1}, 25),
                            DIAMOND(33, new int[]{3, 8, 6, 3}, 10);
                            */
                            @EventHandler
                            public void preInit(FMLPreInitializationEvent event)
                            {
                            invi = new BlockInvisible(Material.rock).setBlockName("invi").setBlockTextureName(MODID + ":invi").setCreativeTab(BlockNovaMine);
                            invil = new BlockInvisible(Material.rock).setBlockName("invil").setBlockTextureName(MODID + ":invi").setCreativeTab(BlockNovaMine).setLightLevel(1.0F);
                            Nova = new BlockOre().setHardness(3.0F).setResistance(5.0F).setBlockName("oreIron").setBlockTextureName("iron_ore").setCreativeTab(BlockNovaMine).setStepSound(Block.soundTypeStone);
                            LA = new BlockGlowstone(Material.glass).setHardness(0.3F).setStepSound(Block.soundTypeGlass).setLightLevel(1.0F).setBlockName("LA").setBlockTextureName(MODID + ":la").setCreativeTab(Nova1_8);
                            helmetNova = new ItemNovaArmor(armorNova, 0).setUnlocalizedName("helmetTuto").setTextureName(MODID + ":helmet_tutoriel").setCreativeTab(ArmurNovaMine);
                            chestPlateNova = new ItemNovaArmor(armorNova, 1).setUnlocalizedName("chestPlateTuto").setTextureName(MODID + ":chestplate_tutoriel").setCreativeTab(ArmurNovaMine);
                            leggingsNova = new ItemNovaArmor(armorNova, 2).setUnlocalizedName("leggingsTuto").setTextureName(MODID + ":leggings_tutoriel").setCreativeTab(ArmurNovaMine);
                            bootsNova = new ItemNovaArmor(armorNova, 3).setUnlocalizedName("bootsTuto").setTextureName(MODID + ":boots_tutoriel").setCreativeTab(ArmurNovaMine);
                            itemNova = new ItemNova().setUnlocalizedName("tutoriel").setTextureName(MODID + ":item_tutoriel").setCreativeTab(ItemNovaMine).setCreativeTab(ItemNovaMine);
                            swordNova = new ItemNovaSword(toolNova).setUnlocalizedName("swordTuto").setTextureName(MODID + ":sword_tutoriel").setCreativeTab(ItemNovaMine);
                            pickaxeNova = new ItemNovaPickaxe(toolNova).setUnlocalizedName("pickaxeTuto").setTextureName(MODID + ":pickaxe_tutoriel").setCreativeTab(ItemNovaMine);
                            axeNova = new ItemNovaAxe(toolNova).setUnlocalizedName("axeTuto").setTextureName(MODID + ":novahache").setCreativeTab(ItemNovaMine);
                            shovelNova = new ItemNovaShovel(toolNova).setUnlocalizedName("shovelTuto").setTextureName(MODID + ":shovel_tutoriel").setCreativeTab(ItemNovaMine);
                            hoeNova = new ItemNovaHoe(toolNova).setUnlocalizedName("hoeTuto").setTextureName(MODID + ":hoe_tutoriel").setCreativeTab(ItemNovaMine);
                            itemEmerald = new ItemEmerald().setUnlocalizedName("tutoriel").setTextureName(MODID + ":item_tutoriel").setCreativeTab(ItemNovaMine).setCreativeTab(ItemNovaMine);
                            helmetEmerald = new ItemEmeraldArmor(armorEmerald, 0).setUnlocalizedName("helmetEmerald").setTextureName(MODID + ":Emerald_helmet").setCreativeTab(ArmurNovaMine);
                            chestPlateEmerald = new ItemEmeraldArmor(armorEmerald, 1).setUnlocalizedName("chestPlateEmerald").setTextureName(MODID + ":Emerald_chestplate").setCreativeTab(ArmurNovaMine);
                            leggingsEmerald = new ItemEmeraldArmor(armorEmerald, 2).setUnlocalizedName("leggingsEmerald").setTextureName(MODID + ":Emerald_leggings").setCreativeTab(ArmurNovaMine);
                            bootsEmerald = new ItemEmeraldArmor(armorEmerald, 3).setUnlocalizedName("bootsEmerald").setTextureName(MODID + ":Emerald_boots").setCreativeTab(ArmurNovaMine);
                            swordEmerald = new ItemEmeraldSword(toolEmerald).setUnlocalizedName("swordEmerald").setTextureName(MODID + ":Emerald_sword").setCreativeTab(ItemNovaMine);
                            pickaxeEmerald = new ItemEmeraldPickaxe(toolEmerald).setUnlocalizedName("pickaxeEmerald").setTextureName(MODID + ":Emerald_pickaxe").setCreativeTab(ItemNovaMine);
                            axeEmerald = new ItemEmeraldAxe(toolEmerald).setUnlocalizedName("axeEmerald").setTextureName(MODID + ":Emerald_hatchet").setCreativeTab(ItemNovaMine);
                            shovelEmerald = new ItemEmeraldShovel(toolEmerald).setUnlocalizedName("shovelEmerald").setTextureName(MODID + ":Emerald_shovel").setCreativeTab(ItemNovaMine);
                            hoeEmerald = new ItemEmeraldHoe(toolEmerald).setUnlocalizedName("hoeEmerald").setTextureName(MODID + ":Emerald_hoe").setCreativeTab(ItemNovaMine);
                            itemSaphir = new Item().setUnlocalizedName("Saphir").setCreativeTab(ItemNovaMine).setTextureName(MODID + ":Saphir");
                            helmetSaphir = new ItemSaphirArmor(armorSaphir, 0).setUnlocalizedName("Saphir_helmet").setTextureName(MODID + ":Saphir_helmet").setCreativeTab(ArmurNovaMine);
                            chestPlateSaphir = new ItemSaphirArmor(armorSaphir, 1).setUnlocalizedName("Saphir_chestplate").setTextureName(MODID + ":Saphir_chestplate").setCreativeTab(ArmurNovaMine);
                            leggingsSaphir = new ItemSaphirArmor(armorSaphir, 2).setUnlocalizedName("Saphir_leggings").setTextureName(MODID + ":Saphir_leggings").setCreativeTab(ArmurNovaMine);
                            bootsSaphir = new ItemSaphirArmor(armorSaphir, 3).setUnlocalizedName("Saphir_boots").setTextureName(MODID + ":Saphir_boots").setCreativeTab(ArmurNovaMine);
                            swordSaphir = new ItemSaphirSword(toolSaphir).setUnlocalizedName("Saphir_sword").setTextureName(MODID + ":Saphir_sword").setCreativeTab(ItemNovaMine);
                            pickaxeSaphir = new ItemSaphirPickaxe(toolSaphir).setUnlocalizedName("Saphir_pickaxe").setTextureName(MODID + ":Saphir_pickaxe").setCreativeTab(ItemNovaMine);
                            axeSaphir = new ItemSaphirAxe(toolSaphir).setUnlocalizedName("Saphir_axe").setTextureName(MODID + ":Saphir_axe").setCreativeTab(ItemNovaMine);
                            shovelSaphir = new ItemSaphirShovel(toolSaphir).setUnlocalizedName("Saphir_shovel").setTextureName(MODID + ":Saphir_shovel").setCreativeTab(ItemNovaMine);
                            hoeSaphir = new ItemSaphirHoe(toolSaphir).setUnlocalizedName("Saphir_hoe").setTextureName(MODID + ":Saphir_hoe").setCreativeTab(ItemNovaMine);
                            BlockSaphir = new BlockSaphir (Material.rock).setBlockName("BlockSaphir").setBlockTextureName(MODID + ":Saphir_block").setCreativeTab(BlockNovaMine);
                            porte = new Porte().setBlockName("porte").setBlockTextureName("spruce_upper").setBlockTextureName("spruce_lower");
                            porteItem = new ItemPorte().setUnlocalizedName("PorteS").setTextureName("spruce");
                            }
                            
                            @EventHandler
                            public void init(FMLInitializationEvent event)
                            {
                            GameRegistry.registerBlock(porte, "porte");
                            GameRegistry.registerItem(porteItem, "item_porte");
                            GameRegistry.registerBlock(invi, "invi");
                            GameRegistry.registerBlock(invil, "invil");
                            GameRegistry.registerBlock(Nova, "Nova");
                            GameRegistry.registerBlock(LA, "LA");
                            GameRegistry.registerItem(itemNova, "itemNova");
                            GameRegistry.registerItem(helmetNova, "item_tuto_helmet");
                            GameRegistry.registerItem(chestPlateNova, "item_tuto_chestplate");
                            GameRegistry.registerItem(leggingsNova, "item_tuto_leggings");
                            GameRegistry.registerItem(bootsNova, "item_tuto_boots");
                            GameRegistry.registerItem(swordNova, "item_tuto_sword");
                            GameRegistry.registerItem(pickaxeNova, "item_tuto_pickaxe");
                            GameRegistry.registerItem(axeNova, "item_tuto_axe");
                            GameRegistry.registerItem(shovelNova, "item_tuto_shovel");
                            GameRegistry.registerItem(hoeNova, "item_tuto_hoe");
                            GameRegistry.registerItem(itemEmerald, "itemEmerald");
                            GameRegistry.registerItem(helmetEmerald, "helmetEmerald");
                            GameRegistry.registerItem(chestPlateEmerald, "chestPlateEmerald");
                            GameRegistry.registerItem(leggingsEmerald, "leggingsEmerald");
                            GameRegistry.registerItem(bootsEmerald, "bootsEmerald");
                            GameRegistry.registerItem(swordEmerald, "swordEmerald");
                            GameRegistry.registerItem(pickaxeEmerald, "pickaxeEmerald");
                            GameRegistry.registerItem(axeEmerald, "axeEmerald");
                            GameRegistry.registerItem(shovelEmerald, "shovelEmerald");
                            GameRegistry.registerItem(hoeEmerald, "hoeEmerald");
                            GameRegistry.registerItem(itemSaphir, "itemSaphir");
                            GameRegistry.registerItem(helmetSaphir, "helmetSaphir");
                            GameRegistry.registerItem(chestPlateSaphir, "chestPlateSaphir");
                            GameRegistry.registerItem(leggingsSaphir, "leggingsSaphir");
                            GameRegistry.registerItem(bootsSaphir, "bootsSaphir");
                            GameRegistry.registerItem(swordSaphir, "swordSaphir");
                            GameRegistry.registerItem(pickaxeSaphir, "pickaxeSaphir");
                            GameRegistry.registerItem(axeSaphir, "axeSaphir");
                            GameRegistry.registerItem(shovelSaphir, "shovelSaphir");
                            GameRegistry.registerItem(hoeSaphir, "hoeSaphir");
                            GameRegistry.registerBlock(BlockSaphir, "BlockSaphir");
                            
                            //recette
                            GameRegistry.addRecipe(new ItemStack(swordEmerald, 1), new Object[] {
                            " E ",
                            " E ",
                            " S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(swordEmerald, 1), new Object[] {
                            "E ",
                            "E ",
                            "S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(swordEmerald, 1), new Object[] {
                            " E",
                            " E",
                            " S", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(pickaxeEmerald, 1), new Object[] {
                            "EEE",
                            " S ",
                            " S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(axeEmerald, 1), new Object[] {
                            " EE",
                            " SE",
                            " S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(axeEmerald, 1), new Object[] {
                            "EE ",
                            "ES ",
                            " S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(shovelEmerald, 1), new Object[] {
                            " E ",
                            " S ",
                            " S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(shovelEmerald, 1), new Object[] {
                            "E ",
                            "S ",
                            "S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(shovelEmerald, 1), new Object[] {
                            " E",
                            " S",
                            " S", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(hoeEmerald, 1), new Object[] {
                            "EE ",
                            " S ",
                            " S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(hoeEmerald, 1), new Object[] {
                            " EE",
                            " S ",
                            " S ", 'S', Items.stick, 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(helmetEmerald, 1), new Object[] {
                            "EEE",
                            "E E",
                            " ", 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(helmetEmerald, 1), new Object[] {
                            " ",
                            "EEE",
                            "E E", 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(chestPlateEmerald, 1), new Object[] {
                            "E E",
                            "EEE",
                            "EEE", 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(leggingsEmerald, 1), new Object[] {
                            "EEE",
                            "E E",
                            "E E", 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(bootsEmerald, 1), new Object[] {
                            " ",
                            "E E",
                            "E E", 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(bootsEmerald, 1), new Object[] {
                            "E E",
                            "E E",
                            " ", 'E', Items.emerald
                            });
                            GameRegistry.addRecipe(new ItemStack(BlockSaphir, 1), new Object[] {
                            "SSS",
                            "SSS",
                            "SSS", 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                            " S ",
                            " S ",
                            " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                            "S ",
                            "S ",
                            "0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                            " S",
                            " S",
                            " 0", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(pickaxeSaphir, 1), new Object[] {
                            "SSS",
                            " 0 ",
                            " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(axeSaphir, 1), new Object[] {
                            " SS",
                            " 0S",
                            " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(axeSaphir, 1), new Object[] {
                            " SS",
                            " 0S",
                            " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(shovelSaphir, 1), new Object[] {
                            " S ",
                            " 0 ",
                            " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(shovelSaphir, 1), new Object[] {
                            "S ",
                            "0 ",
                            "0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(shovelSaphir, 1), new Object[] {
                            " S",
                            " 0",
                            " 0", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(hoeSaphir, 1), new Object[] {
                            " SS",
                            " 0 ",
                            " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(hoeSaphir, 1), new Object[] {
                            "SS ",
                            " 0 ",
                            " 0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(helmetSaphir, 1), new Object[] {
                            "SSS",
                            "S S",
                            " ", 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(helmetSaphir, 1), new Object[] {
                            " ",
                            "SSS",
                            "S S", 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(chestPlateSaphir, 1), new Object[] {
                            "S S",
                            "SSS",
                            "SSS", 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(leggingsSaphir, 1), new Object[] {
                            "SSS",
                            "S S",
                            "S S", 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(bootsSaphir, 1), new Object[] {
                            "S S",
                            "S S",
                            " ", 'S', ModNovamine.itemSaphir
                            });
                            GameRegistry.addRecipe(new ItemStack(bootsSaphir, 1), new Object[] {
                            " ",
                            "S S",
                            "S S", 'S', ModNovamine.itemSaphir
                            });
                            
                            //GameRegistry.addShapelessRecipe(new ItemStack(tutoBlock, 2), Blocks.dirt, Blocks.dirt, tutoItem);
                            }
                            
                            @EventHandler
                            public void postInit(FMLPostInitializationEvent event)
                            {
                            
                            }
                            }
                            
                            1 réponse Dernière réponse Répondre Citer 0
                            • SCAREXS Hors-ligne
                              SCAREX
                              dernière édition par

                              Tu n’as pas suivis ce que j’ai dit : il te manque un espace ligne 244.

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

                                Et pour la porte les texture pour l’items c’est .setUnlocalizedName(“texture”)
                                Mais pour la porte c pas .setBlockTextureName(“texture_upper”, “textures_lower”)

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

                                  Je ne pense pas car c’est un model spécial, regarde dans les classes de minecraft comment c’est fait.

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

                                    @‘Diangle’:

                                    @‘TheAzkaze’:

                                    Dans c’est codage je ne vois pas ou est la nouvelle textures de la porte

                                    C’est le principe de l’héritage, le code de la texture est dans la classe mère. Tu as juste à mettre dans initialisation du bloc “setBlockTextureName(“texture”)”, donc la texture devrons avoir pour nom : “texture_lower.png” et “texture_upper.png”. Attention, il faut aussi mettre un texture à l’item.

                                    Diangle marque sa mais sa ne marche pas

                                    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

                                      porte = new Porte().setBlockName(“porte”).setBlockTextureName(“spruce”);
                                      Juste comme ça. Le code de la porte ajoute déjà le _upper et _lower

                                      Et comme SCAREX l’a dit, ligne 242 - 246 ça devrait être :

                                         GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                                          "S  ",
                                          "S  ",
                                          "0  ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                                         });
                                      

                                      ou :

                                      GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                                      "S",
                                      "S",
                                      "0", '0', Items.stick, 'S', ModNovamine.itemSaphir
                                      });
                                      

                                      Et non :

                                      GameRegistry.addRecipe(new ItemStack(swordSaphir, 1), new Object[] {
                                      "S ",
                                      "S ",
                                      "0 ", '0', Items.stick, 'S', ModNovamine.itemSaphir
                                      });
                                      
                                      1 réponse Dernière réponse Répondre Citer 0
                                      • TheAzkazeT Hors-ligne
                                        TheAzkaze
                                        dernière édition par

                                        Oui mais dans ses code il ne la pas

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

                                          il ne la pas quoi ? le _lower et _upper ? Ils sont dans la classe mère (déjà dit)… Si tu comprends pas ça, apprend un peu le java.

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

                                            Je ne les vois pas

                                            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