Résolu Problème texture techne casque
-
Salut !
J’ai un petit soucis que je n’arrive pas a résoudre car aucune idée du pourquoi ça fait ça… J’ai crée un model techne pour le mettre en casque, ça j’ai réussit, sauf que le soucis c’est que la texture… bah, le casque est texturer, mais ça texture aussi des partie du corps ! oO
Pourtant, j’ai bien fait en sorte de laisser un grand espace sur le dessus du layer qui est la place réserver pour la texture du steve.
|||||||||||
||||||||||||Mon Model a les bonne coordonné pour chercher la texture
// Date: 14/01/2015 21:51:57 // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX package com.google.dofusstuffs.client; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelCoiffeBouftou extends ModelBiped { //fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape6; ModelRenderer Shape7; ModelRenderer Shape8; ModelRenderer Shape9; ModelRenderer Shape10; ModelRenderer Shape11; ModelRenderer Shape12; ModelRenderer Shape13; ModelRenderer Shape14; ModelRenderer Shape15; ModelRenderer Shape16; ModelRenderer Shape17; public ModelCoiffeBouftou() { textureWidth = 64; textureHeight = 96; Shape1 = new ModelRenderer(this, 34, 32+32); Shape1.addBox(-4.5F, -8F, -4.5F, 9, 3, 1); Shape1.setRotationPoint(0F, 0F, 0F); Shape1.setTextureSize(64, 96); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 14, 47+32); Shape2.addBox(-4F, -9F, -4F, 8, 1, 8); Shape2.setRotationPoint(0F, 0F, 0F); Shape2.setTextureSize(64, 96); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 46, 43+32); Shape3.addBox(-5F, -8F, -4F, 1, 5, 8); Shape3.setRotationPoint(0F, 0F, 0F); Shape3.setTextureSize(64, 96); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 43, 43+32); Shape4.addBox(-5F, -3F, -2.5F, 1, 2, 4); Shape4.setRotationPoint(0F, 0F, 0F); Shape4.setTextureSize(64, 96); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 0, 37+32); Shape5.addBox(-4F, -8F, 4F, 8, 5, 1); Shape5.setRotationPoint(0F, 0F, 0F); Shape5.setTextureSize(64, 96); Shape5.mirror = true; setRotation(Shape5, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 46, 43+32); Shape6.addBox(4F, -8F, -4F, 1, 5, 8); Shape6.setRotationPoint(0F, 0F, 0F); Shape6.setTextureSize(64, 96); Shape6.mirror = true; setRotation(Shape6, 0F, 0F, 0F); Shape7 = new ModelRenderer(this, 43, 43+32); Shape7.addBox(4F, -3F, -2.5F, 1, 2, 4); Shape7.setRotationPoint(0F, 0F, 0F); Shape7.setTextureSize(64, 96); Shape7.mirror = true; setRotation(Shape7, 0F, 0F, 0F); Shape8 = new ModelRenderer(this, 21, 40+32); Shape8.addBox(-3F, -9.5F, -3F, 6, 1, 6); Shape8.setRotationPoint(0F, 0F, 0F); Shape8.setTextureSize(64, 96); Shape8.mirror = true; setRotation(Shape8, 0F, 0F, 0F); Shape9 = new ModelRenderer(this, 36, 36+32); Shape9.addBox(-4F, -7.5F, -5F, 8, 2, 1); Shape9.setRotationPoint(0F, 0F, 0F); Shape9.setTextureSize(64, 96); Shape9.mirror = true; setRotation(Shape9, 0F, 0F, 0F); Shape10 = new ModelRenderer(this, 0, 32+32); Shape10.addBox(-3F, -7.5F, 4.5F, 6, 3, 1); Shape10.setRotationPoint(0F, 0F, 0F); Shape10.setTextureSize(64, 96); Shape10.mirror = true; setRotation(Shape10, 0F, 0F, 0F); Shape11 = new ModelRenderer(this, 48, 32+32); Shape11.addBox(-5.5F, -7.5F, -3.5F, 1, 4, 7); Shape11.setRotationPoint(0F, 0F, 0F); Shape11.setTextureSize(64, 96); Shape11.mirror = true; setRotation(Shape11, 0F, 0F, 0F); Shape12 = new ModelRenderer(this, 48, 32+32); Shape12.addBox(4.5F, -7.5F, -3.5F, 1, 4, 7); Shape12.setRotationPoint(0F, 0F, 0F); Shape12.setTextureSize(64, 96); Shape12.mirror = true; setRotation(Shape12, 0F, 0F, 0F); Shape13 = new ModelRenderer(this, 58, 32+32); Shape13.addBox(-1F, -5.5F, -4.7F, 2, 2, 1); Shape13.setRotationPoint(0F, 0F, 0F); Shape13.setTextureSize(64, 96); Shape13.mirror = true; setRotation(Shape13, 0F, 0F, 0F); Shape14 = new ModelRenderer(this, 9, 49+32); Shape14.addBox(-8F, -8.5F, -0.5F, 4, 2, 2); Shape14.setRotationPoint(0F, 0F, 0F); Shape14.setTextureSize(64, 96); Shape14.mirror = true; setRotation(Shape14, 0F, 0F, 0F); Shape15 = new ModelRenderer(this, 29, 32+32); Shape15.addBox(-8.5F, -9.3F, 0F, 1, 2, 1); Shape15.setRotationPoint(0F, 0F, 0F); Shape15.setTextureSize(64, 96); Shape15.mirror = true; setRotation(Shape15, 0F, 0F, 0F); Shape16 = new ModelRenderer(this, 9, 44+32); Shape16.addBox(4F, -8.5F, -0.5F, 4, 2, 2); Shape16.setRotationPoint(0F, 0F, 0F); Shape16.setTextureSize(64, 96); Shape16.mirror = true; setRotation(Shape16, 0F, 0F, 0F); Shape17 = new ModelRenderer(this, 24, 32+32); Shape17.addBox(7.5F, -9.3F, 0F, 1, 2, 1); Shape17.setRotationPoint(0F, 0F, 0F); Shape17.setTextureSize(64, 96); Shape17.mirror = true; setRotation(Shape17, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5,entity); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); Shape5.render(f5); Shape6.render(f5); Shape7.render(f5); Shape8.render(f5); Shape9.render(f5); Shape10.render(f5); Shape11.render(f5); Shape12.render(f5); Shape13.render(f5); Shape14.render(f5); Shape15.render(f5); Shape16.render(f5); Shape17.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.Shape1.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape1.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape2.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape2.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape3.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape3.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape4.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape4.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape5.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape5.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape6.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape6.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape7.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape7.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape8.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape8.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape9.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape9.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape10.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape10.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape11.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape11.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape12.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape12.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape13.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape13.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape14.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape14.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape15.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape15.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape16.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape16.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape17.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape17.rotateAngleX = f4 / (180F / (float)Math.PI); } }
Mon render
package com.google.dofusstuffs.client; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; public class RenderCoiffeBouftou implements IItemRenderer { protected ModelCoiffeBouftou model; protected static final ResourceLocation texture = new ResourceLocation("moddofusstuffs:textures/items/stuff_coiffe_bouftou.png"); public RenderCoiffeBouftou () { model = new ModelCoiffeBouftou(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch(type) { case EQUIPPED: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { // TODO Auto-generated method stub return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch(type) { case EQUIPPED: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; } default: break; } } }
Même si j’ai pas trop compris la ligne :
model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
0.0F, 0.0F, 0.0F, 0.0F, 0.0F, etc ?
Et enfin le casque :
package com.google.dofusstuffs.common; import com.google.dofusstuffs.client.ModelCoiffeBouftou; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class StuffCoiffeBouftou extends ItemArmor { public StuffCoiffeBouftou(ArmorMaterial material, int renderIndex, int armorType) { super(material, renderIndex, armorType); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { return "moddofusstuffs:textures/armor/stuff_coiffe_bouftou.png"; } @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityliving, ItemStack stack, int armor) { return new ModelCoiffeBouftou(); } }
J’en suis sur que c’est un truc tout bete en plus -_-
Merci.
-
Tu as d’autres morceaux d’armure sur toi ?
-
Non, aucun… J’ai remarquer que j’avais deux chemins de textures différent, l’un de “items” et l’autre de “armor”, j’ai mit le bon chemin ducoup, mais toujours rien…
-
Je ne vois pas par quoi cela peut être causé dans ce cas désolé
-
Arf, en plus, c’est le même problème qu’ici : http://www.minecraftforgefrance.fr/showthread.php?tid=1178&highlight=armure et sans réponse ^^’
EDIT : J’ai continué de faire des tests, toujours le même soucis…
Ma classe principale :
package com.google.dofusstuffs.common; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraftforge.common.util.EnumHelper; import com.google.dofusstuffs.client.CommonProxy; 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; @Mod(modid = "moddofusstuffs", name = "Mod Dofus's Stuffs", version = "Indev") public class ModDofusStuffs { @Instance("moddofusstuff") public static ModDofusStuffs instance; @SidedProxy(clientSide = "com.google.dofusstuffs.client.ClientProxy", serverSide = "com.google.dofusstuffs.client.CommonProxy") public static CommonProxy proxy; public static Item StuffCoiffeBouftou, StuffCapeBouftou, StuffMarteauBouftou; public static ArmorMaterial StuffBouftou = EnumHelper.addArmorMaterial("PanoplieBouftou", 25, new int[] {4, 6, 5, 4}, 20); public static ToolMaterial MarteauDofus = EnumHelper.addToolMaterial("MarteauDofus", 1, 9999, 5.0F, 6.0F, 18); @EventHandler public void preInit(FMLPreInitializationEvent event) { StuffCoiffeBouftou = new StuffCoiffeBouftou(StuffBouftou, 1,0).setUnlocalizedName("Coiffe Bouftou");//.setTextureName(MODID + ":helmet_tutoriel"); GameRegistry.registerItem(StuffCoiffeBouftou, "Coiffe Bouftou"); StuffCapeBouftou = new StuffCapeBouftou(StuffBouftou, 1, 1).setUnlocalizedName("Cape Bouftou");//.setTextureName(MODID + ":helmet_tutoriel"); GameRegistry.registerItem(StuffCapeBouftou, "Cape Bouftou"); StuffMarteauBouftou = new StuffMarteauBouftou(MarteauDofus).setUnlocalizedName("Marteau Bouftou"); GameRegistry.registerItem(StuffMarteauBouftou, "Marteau Bouftou"); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRender(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
Proxy :
package com.google.dofusstuffs.client; import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.MinecraftForgeClient; import com.google.dofusstuffs.common.ModDofusStuffs; public class ClientProxy extends CommonProxy { @Override public void registerRender() { System.out.println("méthode côté serveur/client"); MinecraftForgeClient.registerItemRenderer(ModDofusStuffs.StuffCoiffeBouftou, new RenderCoiffeBouftou()); MinecraftForgeClient.registerItemRenderer(ModDofusStuffs.StuffMarteauBouftou, (IItemRenderer)new RenderMarteauBouftou()); MinecraftForgeClient.registerItemRenderer(ModDofusStuffs.StuffCapeBouftou, new RenderCapeBouftou()); } }
Mon Rendu :
package com.google.dofusstuffs.client; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.IItemRenderer; import org.lwjgl.opengl.GL11; public class RenderCoiffeBouftou implements IItemRenderer { protected ModelCoiffeBouftou model; protected static final ResourceLocation texture = new ResourceLocation("moddofusstuffs:textures/armor/stuff_coiffe_bouftou.png"); public RenderCoiffeBouftou () { model = new ModelCoiffeBouftou(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch(type) { case EQUIPPED: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { // TODO Auto-generated method stub return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch(type) { case EQUIPPED: GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(texture); model.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); break; default: break; } } }
L’item :
package com.google.dofusstuffs.common; import com.google.dofusstuffs.client.ModelCoiffeBouftou; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class StuffCoiffeBouftou extends ItemArmor { public StuffCoiffeBouftou(ArmorMaterial material, int renderIndex, int armorType) { super(material, renderIndex, armorType); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(stack.getItem() == ModDofusStuffs.StuffCoiffeBouftou) { return "moddofusstuffs:textures/armor/stuff_coiffe_bouftou.png"; } return "moddofusstuffs:textures/armor/stuff_empty.png"; } @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityliving, ItemStack stack, int armor) { return new ModelCoiffeBouftou(); } }
Et enfin le Model
// Date: 14/01/2015 21:51:57 // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX package com.google.dofusstuffs.client; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelCoiffeBouftou extends ModelBiped { //fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape6; ModelRenderer Shape7; ModelRenderer Shape8; ModelRenderer Shape9; ModelRenderer Shape10; ModelRenderer Shape11; ModelRenderer Shape12; ModelRenderer Shape13; ModelRenderer Shape14; ModelRenderer Shape15; ModelRenderer Shape16; ModelRenderer Shape17; public ModelCoiffeBouftou() { textureWidth = 64; textureHeight = 96; Shape1 = new ModelRenderer(this, 34, 32+32); Shape1.addBox(-4.5F, -8F, -4.5F, 9, 3, 1); Shape1.setRotationPoint(0F, 0F, 0F); Shape1.setTextureSize(64, 96); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 14, 47+32); Shape2.addBox(-4F, -9F, -4F, 8, 1, 8); Shape2.setRotationPoint(0F, 0F, 0F); Shape2.setTextureSize(64, 96); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 46, 43+32); Shape3.addBox(-5F, -8F, -4F, 1, 5, 8); Shape3.setRotationPoint(0F, 0F, 0F); Shape3.setTextureSize(64, 96); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 43, 43+32); Shape4.addBox(-5F, -3F, -2.5F, 1, 2, 4); Shape4.setRotationPoint(0F, 0F, 0F); Shape4.setTextureSize(64, 96); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 0, 37+32); Shape5.addBox(-4F, -8F, 4F, 8, 5, 1); Shape5.setRotationPoint(0F, 0F, 0F); Shape5.setTextureSize(64, 96); Shape5.mirror = true; setRotation(Shape5, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 46, 43+32); Shape6.addBox(4F, -8F, -4F, 1, 5, 8); Shape6.setRotationPoint(0F, 0F, 0F); Shape6.setTextureSize(64, 96); Shape6.mirror = true; setRotation(Shape6, 0F, 0F, 0F); Shape7 = new ModelRenderer(this, 43, 43+32); Shape7.addBox(4F, -3F, -2.5F, 1, 2, 4); Shape7.setRotationPoint(0F, 0F, 0F); Shape7.setTextureSize(64, 96); Shape7.mirror = true; setRotation(Shape7, 0F, 0F, 0F); Shape8 = new ModelRenderer(this, 21, 40+32); Shape8.addBox(-3F, -9.5F, -3F, 6, 1, 6); Shape8.setRotationPoint(0F, 0F, 0F); Shape8.setTextureSize(64, 96); Shape8.mirror = true; setRotation(Shape8, 0F, 0F, 0F); Shape9 = new ModelRenderer(this, 36, 36+32); Shape9.addBox(-4F, -7.5F, -5F, 8, 2, 1); Shape9.setRotationPoint(0F, 0F, 0F); Shape9.setTextureSize(64, 96); Shape9.mirror = true; setRotation(Shape9, 0F, 0F, 0F); Shape10 = new ModelRenderer(this, 0, 32+32); Shape10.addBox(-3F, -7.5F, 4.5F, 6, 3, 1); Shape10.setRotationPoint(0F, 0F, 0F); Shape10.setTextureSize(64, 96); Shape10.mirror = true; setRotation(Shape10, 0F, 0F, 0F); Shape11 = new ModelRenderer(this, 48, 32+32); Shape11.addBox(-5.5F, -7.5F, -3.5F, 1, 4, 7); Shape11.setRotationPoint(0F, 0F, 0F); Shape11.setTextureSize(64, 96); Shape11.mirror = true; setRotation(Shape11, 0F, 0F, 0F); Shape12 = new ModelRenderer(this, 48, 32+32); Shape12.addBox(4.5F, -7.5F, -3.5F, 1, 4, 7); Shape12.setRotationPoint(0F, 0F, 0F); Shape12.setTextureSize(64, 96); Shape12.mirror = true; setRotation(Shape12, 0F, 0F, 0F); Shape13 = new ModelRenderer(this, 58, 32+32); Shape13.addBox(-1F, -5.5F, -4.7F, 2, 2, 1); Shape13.setRotationPoint(0F, 0F, 0F); Shape13.setTextureSize(64, 96); Shape13.mirror = true; setRotation(Shape13, 0F, 0F, 0F); Shape14 = new ModelRenderer(this, 9, 49+32); Shape14.addBox(-8F, -8.5F, -0.5F, 4, 2, 2); Shape14.setRotationPoint(0F, 0F, 0F); Shape14.setTextureSize(64, 96); Shape14.mirror = true; setRotation(Shape14, 0F, 0F, 0F); Shape15 = new ModelRenderer(this, 29, 32+32); Shape15.addBox(-8.5F, -9.3F, 0F, 1, 2, 1); Shape15.setRotationPoint(0F, 0F, 0F); Shape15.setTextureSize(64, 96); Shape15.mirror = true; setRotation(Shape15, 0F, 0F, 0F); Shape16 = new ModelRenderer(this, 9, 44+32); Shape16.addBox(4F, -8.5F, -0.5F, 4, 2, 2); Shape16.setRotationPoint(0F, 0F, 0F); Shape16.setTextureSize(64, 96); Shape16.mirror = true; setRotation(Shape16, 0F, 0F, 0F); Shape17 = new ModelRenderer(this, 24, 32+32); Shape17.addBox(7.5F, -9.3F, 0F, 1, 2, 1); Shape17.setRotationPoint(0F, 0F, 0F); Shape17.setTextureSize(64, 96); Shape17.mirror = true; setRotation(Shape17, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5,entity); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); Shape5.render(f5); Shape6.render(f5); Shape7.render(f5); Shape8.render(f5); Shape9.render(f5); Shape10.render(f5); Shape11.render(f5); Shape12.render(f5); Shape13.render(f5); Shape14.render(f5); Shape15.render(f5); Shape16.render(f5); Shape17.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); this.Shape1.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape1.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape2.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape2.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape3.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape3.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape4.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape4.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape5.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape5.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape6.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape6.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape7.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape7.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape8.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape8.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape9.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape9.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape10.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape10.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape11.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape11.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape12.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape12.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape13.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape13.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape14.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape14.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape15.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape15.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape16.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape16.rotateAngleX = f4 / (180F / (float)Math.PI); this.Shape17.rotateAngleY = f3 / (180F / (float)Math.PI); this.Shape17.rotateAngleX = f4 / (180F / (float)Math.PI); } }
-
Salut ! Je crois que j’ai trouvé la solution, je fais des tests et je te dis (j’ai le même problème ) !
-
Ah, excuse-moi, mais je m’étais trompé ^^’
-
Salut, je ne sais pas si ça a à voir, mais peut être que ce problème est causé par la fonction " mirror " buggée sur Techne. Essaye de mettre ton " mirror " sous le " ModelRenderer " dans chacun de tes morceaux, comme ceci :
Shape1 = new ModelRenderer(this, 34, 32+32); Shape1.mirror = true; Shape1.addBox(-4.5F, -8F, -4.5F, 9, 3, 1); Shape1.setRotationPoint(0F, 0F, 0F); Shape1.setTextureSize(64, 96);
Je doute que ça marche mais essaye tout de même.
-
Non, ça rend juste la texture à l’envers.
-
Essaye de mettre dans ton fichier texture l’image a l’envers ^^