Comment créer un modèle avec Techne
-
Je vais voir tout ça en rentrant et ensuite j’aurais donc quelques questions ^^ notamment comment dire que le mobs doit qu’être dans l’eau avec une certaines profondeurs (car un requin dans une cavité ou dans une cascade d’eau d’ une grottes
-
çà c’est géré au niveau de l’entité, regarde comment c’est géré pour le poulpe, il me semble que tu doit préciser que ton mob est un animal marin.
-
j’ai pas compris ton histoire d’exporter les fichiers et tout, en gros j’ai que récupérer le .tcp d’un requin ^^
-
Alors apprend à utiliser techne et ensuite exporte le fichier en java qui se fait à partir de techne.
-
Après avoir ouvert le fichier techne avec Techne, va dans File>Export As…>Java
Sent from my GT-I9000 using Tapatalk 2
-
j’ai réussi a trouver des images, mais le truc c’est que je vois que le contour, il y a rien au centre ….
Je vais les faire moi meme mais bon, Il y a un système de couleur sur techne ?
-
Les couleurs sont générer à partir de la texture en haut a droite de techne , a gauche dans le cadre TEXTURE OFFSET tu peut organiser la texture en haut a droite ensuite va dans File>Export As…>TextureMap ensuite ouvre le dans paint/photofiltre/photoshop(payant) et design le a ta guise
-
je comprend pas, j’ai télécharger un modèle, je change les couleurs et tout, je le remet sur le modèle et ça marche, donc je prend le .png pour le mettre dans le code et la, j’ai juste des morceaux de mobs
-
mettre un .png dans un code ?! C’est pas possible. Exprime mieux ce que tu veux faire et où est le réel problème.
-
il n’y a pas toute la texture du mobs
-
Le problème vient du model ou de la texture. Ou alors tu n’as pas associé la texture au model correctement.
-
le model c’est celui la : http://techne.zeux.me/
ensuite j’ai colorier le truc, je l’ai mit sur le mob (via techne) j’ai vu que ça marchait donc j’ai mit ça dans ma classe :
public class RenderMob extends RenderBiped { public final ResourceLocation texture = new ResourceLocation(ModItems.MODID, "textures/entity/mob_test.png"); public RenderMob(ModelBiped model, float shadow) { super(model, shadow); } protected ResourceLocation getEntityTexture(EntityLiving living) { return this.getMobTutorielTexture((EntityMod)living); } private ResourceLocation getMobTutorielTexture(EntityMod mobTutoriel) { return texture; } }
-
C’est vrai qu’avec le lien du site je risque d’aller loin…
Et le model fournit en paramètre ?
-
bah c’est le model avec le poisson en main ^^
http://techne.zeux.me/1474b77d
comment ça le model en paramètre ? je pensais que la texture suffisait, je dois rajouter quoi du coup ?
-
Jpense que ta pas regardé dans les tutoriels , http://www.minecraftforgefrance.fr/showthread.php?tid=366 , lis tout et jusqu’au bout C’est pour la 1.6.x mais normalement ca fonctionne si jamais je pourrais t’aider.
-
j’ai donc plus d’erreur (dans les class) mais le jeu crash au chargement du mod j’envoie les différentes class
RenderMob :
package fr.craftesys.items.clien; import net.minecraft.client.renderer.entity.RenderBiped; import net.minecraft.client.model.ModelBiped; import fr.craftesys.items.clien.Cute_Ocelot; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; import fr.craftesys.items.common.EntityMod; import fr.craftesys.items.common.ModItems; public class RenderMob extends RenderBiped { public final ResourceLocation texture = new ResourceLocation(ModItems.MODID, "textures/entity/Cute_Ocelot.png"); public RenderMob(Cute_Ocelot cute_Ocelot, float shadow) { super(cute_Ocelot, shadow); } protected ResourceLocation getEntityTexture(EntityLiving living) { return this.getMobTutorielTexture((EntityMod)living); } private ResourceLocation getMobTutorielTexture(EntityMod mobTutoriel) { return texture; } }
clientproxy :
package fr.craftesys.items.proxy; import net.minecraft.client.model.ModelBiped; import cpw.mods.fml.client.registry.RenderingRegistry; import fr.craftesys.items.clien.Cute_Ocelot; import fr.craftesys.items.clien.RenderMob; import fr.craftesys.items.common.EntityMod; public class clientproxy extends commonproxy { @Override public void registerRender() { //registerItemRenderer(AkiItemList.rubisBow, new BowRenderer()); System.out.println("méthode côté client"); RenderingRegistry.registerEntityRenderingHandler(EntityMod.class, new RenderMob(new Cute_Ocelot(), 0.5F)); } }
Cute_ocelot :
package fr.craftesys.items.clien; 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 Cute_Ocelot extends ModelBiped { //fields ModelRenderer body; ModelRenderer head; ModelRenderer nose; ModelRenderer leftear; ModelRenderer rightear; ModelRenderer backfeetleft; ModelRenderer backfeetright; ModelRenderer frontLeftPaw; ModelRenderer frontRightPaw; ModelRenderer tail1; ModelRenderer tail2; ModelRenderer Fish; public Cute_Ocelot() { textureWidth = 128; textureHeight = 64; body = new ModelRenderer(this, 20, 0); body.addBox(-2F, -14F, -3F, 4, 14, 6); body.setRotationPoint(0F, 12F, -2F); body.setTextureSize(128, 64); body.mirror = true; setRotation(body, -0.1047198F, 0F, 0F); head = new ModelRenderer(this, 0, 0); head.addBox(-2.5F, -2F, -2.5F, 5, 4, 5); head.setRotationPoint(0F, -4F, -2F); head.setTextureSize(128, 64); head.mirror = true; setRotation(head, -0.2964248F, 0F, 0F); nose = new ModelRenderer(this, 8, 12); nose.addBox(-1.5F, 0F, -3.5F, 3, 2, 1); nose.setRotationPoint(0F, -4F, -2F); nose.setTextureSize(128, 64); nose.mirror = true; setRotation(nose, -0.2964267F, 0F, 0F); leftear.mirror = true; leftear = new ModelRenderer(this, 8, 9); leftear.addBox(-2F, -3F, 0.5F, 1, 1, 2); leftear.setRotationPoint(0F, -4F, -2F); leftear.setTextureSize(128, 64); leftear.mirror = true; setRotation(leftear, -0.2964267F, 0F, 0F); leftear.mirror = false; rightear = new ModelRenderer(this, 8, 9); rightear.addBox(1F, -3F, 0.5F, 1, 1, 2); rightear.setRotationPoint(0F, -4F, -2F); rightear.setTextureSize(128, 64); rightear.mirror = true; setRotation(rightear, -0.2964267F, 0F, 0F); backfeetleft.mirror = true; backfeetleft = new ModelRenderer(this, 0, 9); backfeetleft.addBox(0F, 0F, -1F, 2, 6, 2); backfeetleft.setRotationPoint(0.2F, 10F, -2F); backfeetleft.setTextureSize(128, 64); backfeetleft.mirror = true; setRotation(backfeetleft, 0F, 0F, -0.074351F); backfeetleft.mirror = false; backfeetright = new ModelRenderer(this, 0, 9); backfeetright.addBox(-2F, 0F, -1F, 2, 6, 2); backfeetright.setRotationPoint(-0.2F, 10F, -2F); backfeetright.setTextureSize(128, 64); backfeetright.mirror = true; setRotation(backfeetright, 0F, 0F, 0.0743572F); frontLeftPaw = new ModelRenderer(this, 0, 16); frontLeftPaw.addBox(0F, -1F, -10F, 2, 2, 10); frontLeftPaw.setRotationPoint(1.1F, 0F, 2.1F); frontLeftPaw.setTextureSize(128, 64); frontLeftPaw.mirror = true; setRotation(frontLeftPaw, -0.1115358F, 0.111544F, 0F); frontRightPaw = new ModelRenderer(this, 0, 16); frontRightPaw.addBox(-2F, -1F, -10F, 2, 2, 10); frontRightPaw.setRotationPoint(-1.1F, 0F, 2.1F); frontRightPaw.setTextureSize(128, 64); frontRightPaw.mirror = true; setRotation(frontRightPaw, -0.1115358F, -0.1115358F, 0F); tail1 = new ModelRenderer(this, 18, 22); tail1.addBox(-0.5F, 0F, 0F, 1, 1, 6); tail1.setRotationPoint(0F, 11F, 0F); tail1.setTextureSize(128, 64); tail1.mirror = true; setRotation(tail1, -0.6253236F, 0.6761344F, 0.1115358F); tail2 = new ModelRenderer(this, 18, 22); tail2.addBox(-0.5F, -0.5F, -1F, 1, 1, 6); tail2.setRotationPoint(2F, 15F, 4F); tail2.setTextureSize(128, 64); tail2.mirror = true; setRotation(tail2, -0.1420016F, -0.8110101F, 0.2230717F); Fish = new ModelRenderer(this, 18, 18); Fish.addBox(0F, -4F, -9F, 0, 14, 14); Fish.setRotationPoint(0F, -1F, -8F); Fish.setTextureSize(128, 64); Fish.mirror = true; setRotation(Fish, -0.5205006F, 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); body.render(f5); head.render(f5); nose.render(f5); leftear.render(f5); rightear.render(f5); backfeetleft.render(f5); backfeetright.render(f5); frontLeftPaw.render(f5); frontRightPaw.render(f5); tail1.render(f5); tail2.render(f5); Fish.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); } }
et EntityMod :
package fr.craftesys.items.common; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.monster.EntityMob; import net.minecraft.world.World; public class EntityMod extends EntityMob { public EntityMod(World world) { super(world); } public void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(6D); this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(1D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D); } }
-
Et le rapport de crash ?
-
–-- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 17/07/15 13:57 Description: Initializing game java.lang.NullPointerException: Initializing game at net.minecraft.block.BlockStairs.<init>(BlockStairs.java:35) at fr.craftesys.items.common.obsistairs.<init>(obsistairs.java:11) at fr.craftesys.items.common.ModItems.preInit(ModItems.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.block.BlockStairs.<init>(BlockStairs.java:35) at fr.craftesys.items.common.obsistairs.<init>(obsistairs.java:11) at fr.craftesys.items.common.ModItems.preInit(ModItems.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:942) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_45, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 766259888 bytes (730 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCH Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCH examplemod{1.0} [examplemod] (bin) UCE moditems{1.7.10} [Mod Items] (bin) GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 347.52' Renderer: 'GeForce GTX 750 Ti/PCIe/SSE2' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce GTX 750 Ti/PCIe/SSE2 GL version 4.5.0 NVIDIA 347.52, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: ~~ERROR~~ NullPointerException: null Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: On (16) ```</init></init></init></init>
-
at fr.craftesys.items.common.obsistairs.<init>(obsistairs.java:11)
Ton problème vient des escaliers, pas de modèle.</init> -
Lien de téléchargement de Techne mort !