Créer un mob basique
-
Lances un
gradlew cleanCacheet essais à nouveau. -
@robin4002 ok je vais essayer, je ten donnera des nouvelles.
-
@robin4002 a dit dans Créer un mob basique :
gradlew cleanCache
deso, j’ai pas pu me co avant, mais me revoila avec la reponse:
C:\Users*personelle*\Desktop\Devlopement\Eclipse\Mods\Minecraft\Dimancium-1.7.2>gradlew cleanCache
FAILURE: Build failed with an exception.
-
Where:
Build file ‘C:\Users*personelle*\Desktop\Devlopement\Eclipse\Mods\Minecraft\Dimancium-1.7.2\build.gradle’ line: 18 -
What went wrong:
A problem occurred evaluating root project ‘Dimancium-1.7.2’.
java.io.EOFException: End of input at line 6600 column 10
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4 mins 29.931 secs
C:\Users*personelle*\Desktop\Devlopement\Eclipse\Mods\Minecraft\Dimancium-1.7.2>gradlew build
FAILURE: Build failed with an exception.
-
Where:
Build file ‘C:\Users*personelle*\Desktop\Devlopement\Eclipse\Mods\Minecraft\Dimancium-1.7.2\build.gradle’ line: 18 -
What went wrong:
A problem occurred evaluating root project ‘Dimancium-1.7.2’.
java.io.EOFException: End of input at line 6600 column 10
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 13.411 secs
C:\Users*personelle*\Desktop\Devlopement\Eclipse\Mods\Minecraft\Dimancium-1.7.2>
-
-
Envoies ton build.gradle complet, il y a clairement un problème avec ce dernier.
-
@robin4002 deso, c pas tout le temp que je peux me co mais me voila
mon build.gradlew:
buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "0.5" group= "mod.dimancium" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "dimancium" minecraft { version = "1.7.10-10.13.4.1558-1.7.10" runDir = "eclipse" } dependencies { // you may put jars on which you depend on in ./libs // or you may define them like so.. //compile "some.group:artifact:version:classifier" //compile "some.group:artifact:version" // real examples //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // for more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } -
Bon même pas, je ne vois rien de spécial …
Vu que la ligne indiqué est la 18 ce qui correspond à l’application du plugin forgegradle, c’est lui qui doit avoir un soucis, donc je n’ai pas de solution à te proposer …
-
Est-il possible d’enlever l’animation des bras en l’aire des zombie comme si ct un joueur ( car je voulais mettre un ModelPlayer mais ça ne fonction pas) et la collision lié a la 1.9 a un mob ?
-
Je n’ai pas de texture!!!
voici le code du render du mobpackage com.google.daichi93100.daichmod.client; import com.google.daichi93100.daichmod.common.EntityMobTutoriel; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.renderer.entity.RenderBiped; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderMobTutoriel extends RenderBiped { public final ResourceLocation texture = new ResourceLocation("modaichmod:textures/models/entity/mob_blue.png"); public RenderMobTutoriel(ModelBiped model, float shadow) { super(model, shadow); } protected ResourceLocation getEntityTexture(EntityLiving living) { return this.getMobTutorielTexture((EntityMobTutoriel)living); } private ResourceLocation getMobTutorielTexture(EntityMobTutoriel mobTutoriel) { return texture; } }la classe du client proxy
package com.google.daichi93100.daichmod.proxy; import org.lwjgl.input.Keyboard; import com.google.daichi93100.daichmod.client.RenderMobTutoriel; import com.google.daichi93100.daichmod.common.EntityMobTutoriel; import com.google.daichi93100.daichmod.common.ModDaichmod; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.settings.KeyBinding; import net.minecraft.util.ChatComponentText; public class ClientProxy extends CommonProxy { @Override public void registerRender() { RenderingRegistry.registerEntityRenderingHandler(EntityMobTutoriel.class, new RenderMobTutoriel(new ModelBiped(), 0.5F)); System.out.println("méthode côté client"); } }la texture

-
"
modaichmod:textures/models/entity/mob_blue.png"
Et verifie que ton chemin est le bon -
@robin4002 mon mob ne spawn pas et je n’ai pas d’oeuf
-
Tu as probablement loupé l’étape d’enregistrement de l’entité.
-
@robin4002 J’ai beau regarder tout, le mob peut-etre summon en jeu mais lors de l’éxecution, il ne le trouve pas
-
Fais voir ton code lié à l’enregistrement du mob.
-
@robin4002 Tiens
@Mod.EventHandler public void init(FMLInitializationEvent event){ proxy.registerRender(); EntityRegistry.registerGlobalEntityID(EntityCrystalEnderman.class, "crystal_enderman", EntityRegistry.findGlobalUniqueEntityId(), new Color(100, 172, 247).getRGB(), new Color(66, 95, 247).getRGB()); EntityRegistry.registerModEntity(EntityCrystalEnderman.class, "crystal_enderman", 420, instance, 40, 1, true); } -
Et ta variable
instanceest bien déclaré comme il faut ? (avec le @Mod.Instance au dessus et le bon modid dedans) -
@robin4002 oui
@Mod.Instance(References.MODID) public static Main instance; -
Tout semble bon pourtant, je ne comprends pourquoi ton mob n’apparait pas

Même si c’était un soucis de rendu, il devrait au moins avoir l’œuf avec ton code. -
@robin4002 Tu sais cmt je pourrais me give l’oeuf pour voir d’où vient le problème
-
Dans le tuto, il y a marqué
EntityRegistry.registerModEntity(EntityMobTutoriel.class, "mobTutoriel", 420, this.instance, 40, 1, true);Où 420 est l’id de l’entité, mais il faudrait pas plutôt mettre l’id obtenu dans findGlobalUniqueEntityId ?
-
@AstFaster a dit dans Créer un mob basique :
@robin4002 Tu sais cmt je pourrais me give l’oeuf pour voir d’où vient le problème
Si l’œuf n’apparait pas, il n’existe pas et donc l’entité n’est pas correctement enregistré.
@LeBossMax2 a dit dans Créer un mob basique :
Dans le tuto, il y a marqué
EntityRegistry.registerModEntity(EntityMobTutoriel.class, "mobTutoriel", 420, this.instance, 40, 1, true);Où 420 est l’id de l’entité, mais il faudrait pas plutôt mettre l’id obtenu dans findGlobalUniqueEntityId ?
Il ne me semble pas, le registre d’entité global et le registre d’entité de fml sont différents.
Après ce truc était assez mal foutu en 1.7.10 …