1.12.2 texture mob



  • Bonsoir,
    J'ai créer un mob, il est fonctionnel, hors mis la texture qui n'apparais pas.
    screen

    Mes class :

    package net.fightmc.mod.entity;
    
    import net.minecraft.entity.SharedMonsterAttributes;
    import net.minecraft.entity.monster.EntityMob;
    import net.minecraft.world.World;
    
    
    public class EntityNougat extends EntityMob {
     
        public EntityNougat(World world)
        {
            super(world);
        }
        
        protected SoundEvent getHurtSound(DamageSource damageSourceIn)
        {
            return SoundEvents.ENTITY_COW_HURT;
        }
        
        protected SoundEvent getDeathSound()
        {
            return SoundEvents.ENTITY_COW_DEATH;
        }
        public void applyEntityAttributes()
        {
            super.applyEntityAttributes();
     
            this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(10D);
        }
     
     
    }
    
    
    package net.fightmc.mod.entity;
    
    import net.fightmc.mod.References;
    import net.minecraft.client.model.ModelBiped;
    import net.minecraft.client.renderer.entity.RenderBiped;
    import net.minecraft.client.renderer.entity.RenderManager;
    import net.minecraft.entity.EntityLiving;
    import net.minecraft.util.ResourceLocation;
    
    public class RenderPrimitif extends RenderBiped {
    	 
    	public final ResourceLocation texture = new ResourceLocation(References.MODID + ":textures/entity/nougat.png"); 
    	 
    	public RenderPrimitif(RenderManager renderManagerIn) {
    		super(renderManagerIn, new ModelBiped(0.0F, 0.0F, 64, 64), 0.5f);
    	}
    	
    	protected ResourceLocation getEntityTexture(EntityNougat entity)
    	{
    		return texture;
    	}
    }	
    

    class principale :

    package net.fightmc.mod;
    
    import net.fightmc.mod.entity.EntityNougat;
    import net.fightmc.mod.init.BlocksMod;
    import net.fightmc.mod.init.ItemsMod;
    import net.fightmc.mod.proxy.ServerProxy;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.util.ResourceLocation;
    import net.minecraftforge.fml.client.registry.RenderingRegistry;
    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.common.registry.EntityRegistry;
    
    @Mod(modid = References.MODID, name = References.NAME, version = References.VERSION, acceptedMinecraftVersions = References.MINECRAFT_VERSION)
    
    
    public class Fightmc {
    	
    	@Instance(References.MODID)
    	public static Fightmc instance;
    	
    	@SidedProxy(clientSide = References.CLIENT_PROXY, serverSide = References.SERVER_PROXY, modId = References.MODID)
    	public static ServerProxy proxy;
    	
    	public static final CreativeTabs fightmctab = new fightmctab("fightmctab");
    	@EventHandler
    	public void preInit(FMLPreInitializationEvent event)
    	{
    		ItemsMod.init();
    		BlocksMod.init();
    	}
    	
    	@EventHandler
    	public void init(FMLInitializationEvent event)
    	{
    		proxy.register();
    		EntityRegistry.registerModEntity(new ResourceLocation(References.MODID, "entitynougat"), EntityNougat.class, "mobnougat", 420, Fightmc.instance, 40, 2, true);
    
    	}
    	
    	@EventHandler
    	public void postInit(FMLPostInitializationEvent event)
    	{
    		
    	}
    }
    
    

    D'où viens le soucis ? Je n'ai pas trouvé.
    cdlt


Log in to reply