Salut, je suis en pleine programmation de mon mod et pour uns des bloc l'image est animé. Mais lorsque je lance Minecraft il y a aucune texture! Je remplace l'image du bloc par un autre(une image 16x16 conventionnel) et cela marche. C'est vraiment quand je met mon image 16x80(il y a 5image) que ça bug! Je travaille avec forge et c'est un mod pour la version 1.6.x de Minecraft.
Mon mod
Le fameux bloc
Mon image
Mon mod
Code:
package hs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.DimensionManager;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = Havre.modid, name = "Haven-Craft", version = "1.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Havre
{
public static final String modid = "Oniromancie_Havre-Craft"
public static Block havenout;
EventManager eventmanager = new EventManager();
@EventHandler
public void load(FMLInitializationEvent event)
{
//Blocks
//get outta here
havenout = new HavenOut(502, Material.rock).setUnlocalizedName("havenout");
GameRegistry.registerBlock(havenout, modid + havenout.getUnlocalizedName().substring(5));
LanguageRegistry.addName(new ItemStack(havenout, 1, 0), "WIP" )
}
}
Le fameux bloc
Code:
package hs;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class HavenOut extends Block
{
public HavenOut(int id, Material material)
{
super(id, material);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public int idDropped(int par1, Random par2Random, int par3)
{
return Havre.havenout.blockID;
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister reg){
this.blockIcon = reg.registerIcon(Havre.modid + ":" + this.getUnlocalizedName());
}
}
Mon image