Crash



  • Bonjour après un long arrêt je reprends le modding et  bien un crash report me tombe sur la tête le voici:
    http://pastebin.com/jHfU1X3t

    Mes classes:

    -la principale:

    package fr.minefus.modminefus.common;
    
    import fr.minefus.modminefus.blocks.MBlocks;
    import fr.minefus.modminefus.proxy.CommonProxy;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.init.Blocks;
    import net.minecraft.item.Item;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.common.Mod.EventHandler;
    import net.minecraftforge.fml.common.Mod.Instance;
    import net.minecraftforge.fml.common.SidedProxy;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    
    @Mod(modid = "modminefus", name = "Mod Minefus", version = "1.0.0")
    
    public class ModMinefus {
    
    @Instance("modminefus")
    public static ModMinefus instance;
    public static final String MODID = "modminefus";
    
    @SidedProxy(clientSide = "fr.minefus.modminefus.proxy.ClientProxy", serverSide = "fr.minefus.modminefus.common.proxy.CommonProxy")
    public static CommonProxy proxy;
    
       @EventHandler
       public void preInit(FMLPreInitializationEvent event) {
    
        proxy.registerBlocks();
    
       }
    
       @EventHandler
       public void init(FMLInitializationEvent event) {
    
       }
    
       @EventHandler
       public void postInit(FMLPostInitializationEvent event) {
       }
    }
    
    

    -ClientProcy:

    package fr.minefus.modminefus.proxy;
    
    import fr.minefus.modminefus.blocks.MBlocks;
    import fr.minefus.modminefus.common.ModMinefus;
    import net.minecraft.block.Block;
    import net.minecraft.client.resources.model.ModelResourceLocation;
    import net.minecraft.item.Item;
    import net.minecraftforge.client.model.ModelLoader;
    
    public class ClientProxy extends CommonProxy {
    
    public void registerRender()
    {
    registerItemBlockModel(MBlocks.m_grass);
    registerItemBlockModel(MBlocks.m_grass_flower);
    registerItemBlockModel(MBlocks.m_dirt);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner0);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner1);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner2);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner3);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner5);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner6);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner7);
    registerItemBlockModel(MBlocks.m_dirtgrass_corner8);
    registerItemBlockModel(MBlocks.m_dirtgrass_down);
    registerItemBlockModel(MBlocks.m_dirtgrass_up);
    registerItemBlockModel(MBlocks.m_dirtgrass_left);
    registerItemBlockModel(MBlocks.m_dirtgrass_right);
    registerItemBlockModel(MBlocks.m_stone);
    registerItemBlockModel(MBlocks.m_stone2);
    
    }
    
    protected void registerItemBlockModel(final Block block) {
           registerItemBlockModel(Item.getItemFromBlock(block));
       }
    
       protected void registerItemBlockModel(final Block block, final int metadata, final String name) {
           registerItemBlockModel(Item.getItemFromBlock(block), metadata, name);
       }
    
       protected void registerItemBlockModel(final Item itemBlock) {
           registerItemBlockModel(itemBlock, 0, (ModMinefus.MODID + ":block_").concat(itemBlock.getUnlocalizedName().substring(5)));
       }
    
       protected void registerItemBlockModel(final Item itemBlock, final int metadata, final String name) {
           ModelLoader.setCustomModelResourceLocation(itemBlock, metadata, new ModelResourceLocation(name, "inventory"));
       }
    
    }
    
    

    -CommonProxy:

    package fr.minefus.modminefus.proxy;
    
    import fr.minefus.modminefus.blocks.MBlocks;
    import net.minecraft.block.Block;
    
    public class CommonProxy {
    
    public void registerRender()
    {
    
    }
    
    public void registerBlocks() {
           MBlocks.registerBlocks();
       }
    
    }
    
    

    -BlockGeneric:

    package fr.minefus.modminefus.blocks;
    
    import fr.minefus.modminefus.creativestabs.MCreativesTabs;
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    import net.minecraft.creativetab.CreativeTabs;
    
    public class BlockGeneric extends Block {
    
       public BlockGeneric(Material material) {
           super(material);
    
           setBlockUnbreakable();
           setResistance(600000);
           setCreativeTab(MCreativesTabs.tabBlock);
       }
    
    }
    
    

    MBlocks:

    package fr.minefus.modminefus.blocks;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockTallGrass;
    import net.minecraft.block.material.Material;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    
    public class MBlocks {
    
       public static Block
               m_grass,
               m_grass_flower,
               m_dirt,
               m_dirtgrass_corner0,
               m_dirtgrass_corner1,
               m_dirtgrass_corner2,
               m_dirtgrass_corner3,
               m_dirtgrass_corner5,
               m_dirtgrass_corner6,
               m_dirtgrass_corner7,
               m_dirtgrass_corner8,
               m_dirtgrass_down,
               m_dirtgrass_up,
               m_dirtgrass_left,
               m_dirtgrass_right,
               m_stone,
               m_stone2
               ;
    
       public static void registerBlocks() {
    
        //Blocks basic
    
             GameRegistry.registerBlock(m_grass = (new BlockGeneric(Material.grass).setUnlocalizedName("m_grass")), "m_grass");
             GameRegistry.registerBlock(m_grass_flower = (new BlockGeneric(Material.grass).setUnlocalizedName("m_grass_flower")), "m_grass_flower");
             GameRegistry.registerBlock(m_dirt = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirt")), "m_dirt");
             GameRegistry.registerBlock(m_dirtgrass_corner0 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner0")), "m_dirtgrass_corner0");
             GameRegistry.registerBlock(m_dirtgrass_corner1 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner1")), "m_dirtgrass_corner1");
             GameRegistry.registerBlock(m_dirtgrass_corner2 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner2")), "m_dirtgrass_corner2");
             GameRegistry.registerBlock(m_dirtgrass_corner3 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner3")), "m_dirtgrass_corner3");
             GameRegistry.registerBlock(m_dirtgrass_corner5 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner5")), "m_dirtgrass_corner5");
             GameRegistry.registerBlock(m_dirtgrass_corner6 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner6")), "m_dirtgrass_corner6");
             GameRegistry.registerBlock(m_dirtgrass_corner7 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner7")), "m_dirtgrass_corner7");
             GameRegistry.registerBlock(m_dirtgrass_corner8 = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_corner8")), "m_dirtgrass_corner8");
             GameRegistry.registerBlock(m_dirtgrass_down = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_down")), "m_dirtgrass_down");
             GameRegistry.registerBlock(m_dirtgrass_up = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_up")), "m_dirtgrass_up");
             GameRegistry.registerBlock(m_dirtgrass_left = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_left")), "m_dirtgrass_left");
             GameRegistry.registerBlock(m_dirtgrass_right = (new BlockGeneric(Material.grass).setUnlocalizedName("m_dirtgrass_right")), "m_dirtgrass_right");
             GameRegistry.registerBlock(m_stone = (new BlockGeneric(Material.rock).setUnlocalizedName("m_stone")), "m_stone");
             GameRegistry.registerBlock(m_stone2 = (new BlockGeneric(Material.rock).setUnlocalizedName("m_stone2")), "m_stone2");
    
       }
    
    }
    
    

    Voilà tout 🙂


  • Administrateurs

    Salut,
    @SidedProxy(clientSide = "fr.minefus.modminefus.proxy.ClientProxy", serverSide = "fr.minefus.modminefus.common.proxy.CommonProxy")
    devrait être :
    @SidedProxy(clientSide = "fr.minefus.modminefus.proxy.ClientProxy", serverSide = "fr.minefus.modminefus.proxy.CommonProxy")



  • Ah oui effectivement cela fonctionnait jusqu'à ce que j'ajoute un blocs bizarre ^^ mais merci 🙂


  • Administrateurs

    Balise résolue ?