3 sept. 2017, 14:31

Coucou, c’est encore moi

J’aimerai savoir comment donner a mon Mob des textures aléatoires. Pour avoir plusieurs “types” de mob

package fr.hard.mod.Render;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelZombie;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.layers.LayerHeldItem;
import net.minecraft.entity.Entity;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.Side;

import org.lwjgl.opengl.GL11;

import fr.hard.mod.Entity.EntityAssassin;
import fr.hard.mod.Models.ModelAssassin;
import fr.hard.mod.Models.ModelHerobrine;

@SideOnly(Side.CLIENT)
public class RenderAssassin extends RenderBiped <entityassassin>{
       private static final ResourceLocation ASSASSIN1_TEXTURE = new ResourceLocation("hard", "textures/humans/assassin1.png");
       private static final ResourceLocation ASSASSIN2_TEXTURE = new ResourceLocation("hard", "textures/humans/assassin2.png");
       private static final ResourceLocation ASSASSIN3_TEXTURE = new ResourceLocation("hard", "textures/humans/assassin3.png");
       private static final ResourceLocation ASSASSIN4_TEXTURE = new ResourceLocation("hard", "textures/humans/assassin4.png");
       private static final ResourceLocation ASSASSIN5_TEXTURE = new ResourceLocation("hard", "textures/humans/assassin5.png");

       public RenderAssassin(RenderManager renderManagerIn, ModelAssassin modelAssassin, float f)
       {
           super(renderManagerIn, new ModelBiped(), 0.5F, 1.0F);
           this.addLayer(new LayerHeldItem(this));
       }

       protected ResourceLocation getAssassinTexture(EntityAssassin assassin)
       {
               switch (assassin.   I don't know here)
               {
                   case 0:
                   default:
                       return ASSASSIN1_TEXTURE;
                   case 1:
                       return ASSASSIN2_TEXTURE;
                   case 2:
                       return ASSASSIN3_TEXTURE;
                   case 3:
                       return ASSASSIN4_TEXTURE;
                   case 4:
                       return ASSASSIN5_TEXTURE;
               }
       }
}

Je me suis inspirer de la classe RenderRabbit.

Mon erreur est sur la meme ligne que : switch

A la base c’est : getRabbitType mais cela ne correspond pas a mon Mob.

Merci</entityassassin>