Ajout effet potion à l'impact d'une flèche + bug texture
-
Bonjour, je travaille sur une flèche spécial qui donne l’effet ralentissement, je problème c’est que je ne c’est pas comment donner l’effet (la condition) même si je pense que c’est celle si met je ne sais pas ou mettre l’effet
public void onCollideWithPlayer(EntityPlayer p_70100_1_) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && p_70100_1_.capabilities.isCreativeMode; if (this.canBePickedUp == 1 && !p_70100_1_.inventory.addItemStackToInventory(new ItemStack(ItemMod.slowarrow, 1))) { flag = false; } if (flag) { this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); p_70100_1_.onItemPickup(this, 1); this.setDead(); } } }
Et le deuxième point: la texture, j’ai passer 4 heures a rechercher sur internet et a coder mais non, rien.
J’espère que vous pourrer m’aider
-
Salut,
1)https://www.minecraftforgefrance.fr/showthread.php?tid=412
2)Montre ta classe Render et ta texture afin qu’on puisse t’aider.Le titre devrait plutôt ressembler à ceci: “Ajout effet potion à l’impact d’une flèche + bug texture”.
-
package com.mod.Titamod.renders; import com.mod.Titamod.Reference; import com.mod.Titamod.init.EntityMod; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.util.ResourceLocation; public class RenderCaramelBall extends RenderLiving { private ResourceLocation texture = new ResourceLocation(Reference.MOD_ID + ":textures/entity/Texture_1.png"); public RenderCaramelBall(ModelBase p_i1262_1_, float p_i1262_2_) { super(p_i1262_1_, p_i1262_2_); } protected ResourceLocation getEntityTexture(EntityMod living) { return this.getEntityTexture((EntityMod) living); } @Override protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return texture; } }
-
A ma connaissance, les ResourceLocation, d’entity se déclarent toujours comme ça:
new ResourceLocation(MODID, “textures/entity.file.png”);
mais je peux me tromper.Et le rendu d’un projectile doit plutôt extends de Render, car RenderLiving possède des fonctions peu utiles pour un projectile, et puis ce n’est pas “propre” quant au sens attribué à la POO (comme faire hériter un objet Lion de Canidé sous prétexte que lui aussi possède des dents comparable à celle de l’objet Chien).
-
package com.mod.Titamod.renders;
import com.mod.Titamod.Reference;
import com.mod.Titamod.init.EntityMod;import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;public class RenderCaramelBall extends Render
{
private ResourceLocation texture = new ResourceLocation(Reference.MOD_ID + “:textures/entity/Texture_1.png”);public RenderCaramelBall(ModelBase p_i1262_1_, float p_i1262_2_)
{
super();
}protected ResourceLocation getEntityTexture(EntityMod living)
{
return this.getEntityTexture((EntityMod) living);
}protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return texture;
}@Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{}
}Ca marche toujours pas.
-
Salut,
Ta fonction doRender est vide, donc forcement il ne se passe rien.
Regardes le code de rendu de la flèche. (RenderArrow.java) -
J’ai essayé, mais ce qui est bizzare c’est que même en copiant de A à Z le code de la flèche (en effectuant les modifs de nom, cela ne marche toujours pas.
package com.mod.Titamod.renders; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import com.mod.Titamod.entity.EntityCaramelBall; @SideOnly(Side.CLIENT) public class RenderCaramelBall extends Render { private static final ResourceLocation CaramelTextures = new ResourceLocation("textures/entity/Texture_1.png"); private static final String __OBFID = "CL_00000978"; public void doRender(EntityCaramelBallp_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.bindEntityTexture(p_76986_1_); GL11.glPushMatrix(); GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F); Tessellator tessellator = Tessellator.instance; byte b0 = 0; float f2 = 0.0F; float f3 = 0.5F; float f4 = (float)(0 + b0 * 10) / 32.0F; float f5 = (float)(5 + b0 * 10) / 32.0F; float f6 = 0.0F; float f7 = 0.15625F; float f8 = (float)(5 + b0 * 10) / 32.0F; float f9 = (float)(10 + b0 * 10) / 32.0F; float f10 = 0.05625F; GL11.glEnable(GL12.GL_RESCALE_NORMAL); float f11 = (float)p_76986_1_.arrowShake - p_76986_9_; if (f11 > 0.0F) { float f12 = -MathHelper.sin(f11 * 3.0F) * f11; GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F); } GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F); GL11.glScalef(f10, f10, f10); GL11.glTranslatef(-4.0F, 0.0F, 0.0F); GL11.glNormal3f(f10, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)f6, (double)f8); tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)f7, (double)f8); tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)f7, (double)f9); tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)f6, (double)f9); tessellator.draw(); GL11.glNormal3f(-f10, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)f6, (double)f8); tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)f7, (double)f8); tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)f7, (double)f9); tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)f6, (double)f9); tessellator.draw(); for (int i = 0; i < 4; ++i) { GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F); GL11.glNormal3f(0.0F, 0.0F, f10); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double)f2, (double)f4); tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double)f3, (double)f4); tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double)f3, (double)f5); tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double)f2, (double)f5); tessellator.draw(); } GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); } protected ResourceLocation getEntityTexture(EntityCaramelBall p_110775_1_) { return CaramelTextures; } protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return this.getEntityTexture((EntityCaramelBall)p_110775_1_); } public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.doRender((EntityCaramelBall)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } }
-
Ton entité est bien enregistré ?
-
Je c pue très bien comment on fait mais je crois que oui. Mias tu peux me le rappeller Stp
-
EntityRegistry.registerModEntity(Entity.class, …);
-
Je sais que tu vas me prendre pour un kikoo, mais je met ca ou, parce que quand je met ca dans mon EntityMod ca marche pas;
package com.mod.Titamod.init; import com.mod.Titamod.entity.EntityObsidianBoat; import com.mod.Titamod.entity.EntityTitamod2; import com.mod.Titamod.handlers.EntityHandler; import cpw.mods.fml.common.registry.EntityRegistry; public class EntityMod { public static void init() { EntityHandler.registerAmbiants(EntityTitamod2.class, "Lapin"); EntityRegistry.registerModEntity(EntityCaramelBall.class, "Ball"); } }
-
La fonction n’a pas que 2 arguments, eclipse devrait te proposer d’ajouter le reste (je ne les connais pas par cœurs, c’est pour cela que je les ai pas donné).
-
EntityRegistry.registerModEntity(EntityCaramelBall.class, "Ball", 0, null, 0, 0, false);
Oui, ça me les propose mais quand je lance le jeu ça crache.
Et je c’est pas à quoi ça correspond
Le rapport:
–-- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 02/09/17 11:37 Description: Initializing game java.lang.NullPointerException: Initializing game at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:164) at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150) at com.mod.Titamod.init.EntityMod.init(EntityMod.java:16) at com.mod.Titamod.Titamod.init(Titamod.java:60) 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.initializeMods(Loader.java:737) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) 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 cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:164) at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150) at com.mod.Titamod.init.EntityMod.init(EntityMod.java:16) at com.mod.Titamod.Titamod.init(Titamod.java:60) 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.initializeMods(Loader.java:737) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311) at net.minecraft.client.Minecraft.startGame(Minecraft.java:597) -- 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 10 (amd64) version 10.0 Java Version: 1.8.0_144, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 640974584 bytes (611 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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.1558 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHI mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHI FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHI Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) UCHE titamod{1.0.0} [Titanium mod] (bin) GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.05' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce GTX 1060 6GB/PCIe/SSE2 GL version 4.5.0 NVIDIA 382.05, 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: Français (France) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
Le null doit être remplacé par ClassePrincipale.instance.
Le premier 0 c’est l’id, tu peux laisser 0.
Le second 0 c’est le range à laquelle l’entité doit être synchro, 32 ou 64 serait mieux que 0.
Ensuite l’update tick, remplaces par 5.
Et pour finir le false c’est sendVelocityUpdate, à mettre sur true pour avoir la synchro. -
J’ai appliquer ce que tu ma dit, quand je lance le jeu ça ne crache plus mais quand j’essaye du tirer :
A fatal error has occured, this connection is terminated.
EntityRegistry.registerModEntity(EntityCaramelBall.class, “Ball”, 0, Titamod.instance, 64, 5, true);
-
Envoies les logs.
-
Envoies les logs.
-
[12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.Class.getConstructor0(Unknown Source) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.Class.getConstructor(Unknown Source) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.entity.EntityList.createEntityFromNBT(EntityList.java:179) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:494) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:41) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:12) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:344) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:144) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445) [12:05:28] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [12:05:28] [Server thread/WARN]: Skipping Entity with id titamod.Ball [12:05:28] [Server thread/INFO]: Changing view distance to 12, from 10 [12:05:28] [Netty Client IO #0/INFO] [FML]: Server protocol version 2 [12:05:28] [Netty IO #1/INFO] [FML]: Client protocol version 2 [12:05:28] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : titamod@1.0.0,FML@7.10.99.99,Forge@10.13.4.1558,mcp@9.05 [12:05:28] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [12:05:28] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [12:05:28] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [12:05:28] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established [12:05:28] [Server thread/INFO]: Player534[local:E:7193fa56] logged in with entity id 978 at (224.70019713853415, 71.49771478177003, 291.3221894843424) [12:05:28] [Server thread/INFO]: Player534 a rejoint la partie [12:05:32] [Client thread/ERROR] [FML]: A severe problem occurred during the spawning of an entity at ( 225.8125,73.0, 290.65625) java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_144] at java.lang.Class.getConstructor(Unknown Source) ~[?:1.8.0_144] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:77) [EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:34) [EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:28) [EntitySpawnHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) [SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [12:05:32] [Client thread/ERROR] [FML]: EntitySpawnHandler exception java.lang.RuntimeException: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:126) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:34) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:28) ~[EntitySpawnHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_144] at java.lang.Class.getConstructor(Unknown Source) ~[?:1.8.0_144] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:77) ~[EntitySpawnHandler.class:?] … 26 more [12:05:32] [Client thread/ERROR] [FML]: OpenGuiHandler exception java.lang.RuntimeException: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:126) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:34) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:28) ~[EntitySpawnHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_144] at java.lang.Class.getConstructor(Unknown Source) ~[?:1.8.0_144] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:77) ~[EntitySpawnHandler.class:?] … 26 more [12:05:32] [Client thread/ERROR] [FML]: HandshakeCompletionHandler exception java.lang.RuntimeException: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:126) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:34) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:28) ~[EntitySpawnHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_144] at java.lang.Class.getConstructor(Unknown Source) ~[?:1.8.0_144] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:77) ~[EntitySpawnHandler.class:?] … 26 more [12:05:32] [Client thread/ERROR] [FML]: There was a critical exception handling a packet on channel FML java.lang.RuntimeException: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:126) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:34) ~[EntitySpawnHandler.class:?] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.channelRead0(EntitySpawnHandler.java:28) ~[EntitySpawnHandler.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?] at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?] at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) [PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_144] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_144] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.NoSuchMethodException: com.mod.Titamod.entity.EntityCaramelBall.<init>(net.minecraft.world.World) at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_144] at java.lang.Class.getConstructor(Unknown Source) ~[?:1.8.0_144] at cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity(EntitySpawnHandler.java:77) ~[EntitySpawnHandler.class:?] … 26 more ```</init></init></init></init></init></init></init></init></init></init>
-
Dans ta classe EntityCaramelBall il faut que tu ajoutes un constructeur avec juste world en argument :
public EntityCaramelBall(World world) { super(world); }
-
Euh… Maintenant ça crache pue mais mes flèche reste en l’air et elle n’on pas de texture, la forme je sais, c’est parce que j’ai repris le code du model de la flèche mais à par le supprimé je vois pas. Mon but s’étaient de faire un truc rond.
Je pense que c le RenderMod qui pose problème, voilà comment il est enregistrer
RenderingRegistry.registerEntityRenderingHandler(EntityCaramelBall.class, new RenderCaramelBall());
Ce qui est étonnant c que j’ai aussi le problème de texture avec un bateau customs, et quand je fais click droit ça invoque une flèche alors que c’est pas le même code, pas la même texture et pas le même render:
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianBoat.class, new RenderTitamodBoat(new ModelObsidianBoat(), 1));