Résolu "Arc" avec effet.
-
Dans ce cas, toute cette partie :
DamageSource damagesource = shootingEntity != null ? (new EntityDamageSourceIndirect("arrow", this, this.shootingEntity)).setProjectile() : (new EntityDamageSourceIndirect("arrow", this, this)).setProjectile(); if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman)) { movingobjectposition.entityHit.setFire(5); } if (movingobjectposition.entityHit.attackEntityFrom(damagesource, (float)k)) { if (movingobjectposition.entityHit instanceof EntityLivingBase) { EntityLivingBase entitylivingbase = (EntityLivingBase)movingobjectposition.entityHit; if (!this.worldObj.isRemote) { entitylivingbase.setArrowCountInEntity(entitylivingbase.getArrowCountInEnti?ty() + 1); } if (this.knockbackStrength > 0) { f4 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); if (f4 > 0.0F) { movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)f4); } } if (this.shootingEntity != null && this.shootingEntity instanceof EntityLivingBase) { EnchantmentHelper.func_151384_a(entitylivingbase, this.shootingEntity); EnchantmentHelper.func_151385_b((EntityLivingBase)this.shootingEntity, entitylivingbase); } if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer && this.shootingEntity instanceof EntityPlayerMP) { ((EntityPlayerMP)this.shootingEntity).playerNetServerHandler.sendPacket(new? S2BPacketChangeGameState(6, 0.0F)); } } this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); if (!(movingobjectposition.entityHit instanceof EntityEnderman)) { this.setDead(); } } else { this.motionX *= -0.10000000149011612D; this.motionY *= -0.10000000149011612D; this.motionZ *= -0.10000000149011612D; this.rotationYaw += 180.0F; this.prevRotationYaw += 180.0F; this.ticksInAir = 0; }
Remplace par :
if(movingobjectposition.entityHit instanceof EntityLivingBase) { ((EntityLivingBase) movingobjectposition.entityHit).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 1200)); }
-
Ca marche pour les deux mais les mobs marchent toujours mais plus lentement y a t il un moyen qu’il ne bouge plus radicalement ?
-
movingobjectposition.entityHit.noClip = true;
Le problème avec ça, c’est qu’il bougera plus définitivement, il faudrait remettre noClip sur false au bon d’un certains temps. -
par exemple le temps normal d’une potion de slowness c’est possible genre 1:07 ? Et ou le rajouter ?
-
Changes la durée et la puissance du PotionEffect
-
(Potion.moveSlowdown.id, 20, 1200)); 20 = en ticks ou en secondes ?
J’ai riens dis
package mod.common; 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; @SideOnly(Side.CLIENT) public class RenderFlechette extends Render { private static final ResourceLocation FlechetteTextures = new ResourceLocation(ModMinecraft.MODID, "textures/entity/itemFlechette.png"); private static final String __OBFID = "CL_00000978"; /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render <t extends="" entity)="" and="" this="" method="" has="" signature="" public="" void="" func_76986_a(t="" entity,="" double="" d,="" d1,<br="">* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityFlechette par1EntityFlechette, double par2, double par4, double par6, float par8, float par9) { this.bindEntityTexture(par1EntityFlechette); GL11.glPushMatrix(); GL11.glTranslatef((float)par2, (float)par4, (float)par6); GL11.glRotatef(par1EntityFlechette.prevRotationYaw + (par1EntityFlechette.rotationYaw - par1EntityFlechette.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(par1EntityFlechette.prevRotationPitch + (par1EntityFlechette.rotationPitch - par1EntityFlechette.prevRotationPitch) * par9, 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)par1EntityFlechette.arrowShake - par9; 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(); } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(EntityFlechette par1EntityFlechette) { return this.getEntityTexture(par1EntityFlechette); } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(Entity par1Entity) { return this.getEntityTexture((EntityFlechette)par1Entity); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render <t extends="" entity)="" and="" this="" method="" has="" signature="" public="" void="" func_76986_a(t="" entity,="" double="" d,="" d1,<br="">* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.doRender((EntityFlechette)par1Entity, par2, par4, par6, par8, par9); } }
Voici mon render , y a des erreurs ? J’ai essayé de faire comme je pensais que sa devait être et sa semble marcher mais au lieu de la flechette c’est un cube blanc qui apparaît ?
Et dans le proxy j’ai plusieurs erreurs que je ne sais pas corriger pouvez vous le faire ? merci
package mod.proxy;
public class ClientProxy extends CommonProxy
{
@Override
public void registerRender()
{
System.out.println(“méthode côté client”);
}
RenderingRegistry.registerEntityRenderingHandler(EntityFlechette.class, new RenderFlechette(new ModelBiped(), 0.5F));
}</t></t> -
Je pense avoir réussi le probleme avec le clientproxy j’ai mis comme cela ```
package mod.proxy;import mod.common.EntityFlechette;
import mod.common.RenderFlechette;
import cpw.mods.fml.client.registry.RenderingRegistry;public class ClientProxy extends CommonProxy
{@Override
public void registerRender()
{
System.out.println(“render”);RenderingRegistry.registerEntityRenderingHandler(EntityFlechette.class, new RenderFlechette());
}}
mais lorsque je tire j'ai un crashreport :( Je suis un peu désespérée je dois vous avouer :/
–-- Minecraft Crash Report ----
// Ouch. That hurtTime: 13/07/14 22:15
Description: Registering texturejava.lang.NullPointerException: Registering texture
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63)
at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35)
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89)
at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45)
at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:62)
at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:57)
at mod.common.RenderFlechette.doRender(RenderFlechette.java:46)
at mod.common.RenderFlechette.doRender(RenderFlechette.java:118)
at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:532)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1298)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1095)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1024)
at net.minecraft.client.Minecraft.run(Minecraft.java:912)
at net.minecraft.client.main.Main.main(Main.java:112)
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:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)A detailed walkthrough of the error, its code path and all known details is as follows:
– Head –
Stacktrace:
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63)
at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35)– Resource location being registered –
Details:
Resource location:NULL
Texture object class: net.minecraft.client.renderer.texture.SimpleTexture
Stacktrace:
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89)
at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45)
at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:62)
at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:57)
at mod.common.RenderFlechette.doRender(RenderFlechette.java:46)
at mod.common.RenderFlechette.doRender(RenderFlechette.java:118)– Entity being rendered –
Details:
Entity Type: RenderFlechetteun (mod.common.EntityFlechette)
Entity ID: 572
Entity Name: entity.RenderFlechetteun.name
Entity’s Exact location: 240,82, 72,59, 102,47
Entity’s Block location: World: (240,72,102), Chunk: (at 0,4,6 in 15,6; contains blocks 240,0,96 to 255,255,111), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Entity’s Momentum: 0,72, -0,95, -1,27– Renderer details –
Details:
Assigned renderer: mod.common.RenderFlechette@2f318251
Location: 0,25,-0,28,-0,18 - World: (0,-1,-1), Chunk: (at 0,-1,15 in 0,-1; contains blocks 0,0,-16 to 15,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Rotation: 150.49066
Delta: 0.18068206
Stacktrace:
at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:532)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1298)– Affected level –
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP[‘Player937’/369, l=‘MpServer’, x=239,98, y=73,62, z=103,70]]
Chunk stats: MultiplayerChunkCache: 210, 210
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (240,64,256), Chunk: (at 0,4,0 in 15,16; contains blocks 240,0,256 to 255,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 4690 game time, 4690 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 105 total; [EntityFlechette[‘entity.RenderFlechetteun.name’/572, l=‘MpServer’, x=240,82, y=72,59, z=102,47], EntityBat[‘Bat’/78, l=‘MpServer’, x=160,37, y=27,09, z=89,10], EntityZombie[‘Zombie’/89, l=‘MpServer’, x=173,50, y=30,00, z=65,69], EntitySkeleton[‘Skeleton’/90, l=‘MpServer’, x=173,50, y=30,00, z=64,78], EntityBat[‘Bat’/91, l=‘MpServer’, x=172,94, y=22,00, z=89,63], EntityPig[‘Pig’/92, l=‘MpServer’, x=169,19, y=71,00, z=88,91], EntityPig[‘Pig’/93, l=‘MpServer’, x=171,50, y=71,00, z=90,31], EntityPig[‘Pig’/94, l=‘MpServer’, x=163,03, y=72,00, z=84,84], EntityPig[‘Pig’/95, l=‘MpServer’, x=161,25, y=70,00, z=80,53], EntitySkeleton[‘Skeleton’/96, l=‘MpServer’, x=165,84, y=56,00, z=169,75], EntityZombie[‘Zombie’/114, l=‘MpServer’, x=192,46, y=29,14, z=74,72], EntityZombie[‘Zombie’/115, l=‘MpServer’, x=189,94, y=30,00, z=71,63], EntityBat[‘Bat’/116, l=‘MpServer’, x=181,50, y=23,10, z=100,22], EntityCreeper[‘Creeper’/135, l=‘MpServer’, x=195,03, y=51,00, z=78,63], EntityZombie[‘Zombie’/136, l=‘MpServer’, x=194,84, y=28,00, z=82,41], EntityZombie[‘Zombie’/137, l=‘MpServer’, x=206,69, y=28,92, z=92,61], EntityBat[‘Bat’/138, l=‘MpServer’, x=195,12, y=28,95, z=108,67], EntitySkeleton[‘Skeleton’/139, l=‘MpServer’, x=199,50, y=13,00, z=162,50], EntityZombie[‘Zombie’/140, l=‘MpServer’, x=201,94, y=13,00, z=161,47], EntityBat[‘Bat’/141, l=‘MpServer’, x=200,59, y=19,10, z=172,52], EntitySkeleton[‘Skeleton’/398, l=‘MpServer’, x=173,28, y=31,00, z=60,06], EntityPig[‘Pig’/399, l=‘MpServer’, x=162,50, y=78,00, z=62,31], EntityBat[‘Bat’/402, l=‘MpServer’, x=199,01, y=20,36, z=45,00], EntitySkeleton[‘Skeleton’/403, l=‘MpServer’, x=220,09, y=12,00, z=49,41], EntityPig[‘Pig’/149, l=‘MpServer’, x=221,69, y=68,00, z=120,69], EntitySkeleton[‘Skeleton’/150, l=‘MpServer’, x=223,50, y=57,00, z=139,09], EntitySkeleton[‘Skeleton’/151, l=‘MpServer’, x=219,91, y=58,00, z=137,50], EntityPig[‘Pig’/152, l=‘MpServer’, x=208,34, y=68,00, z=130,88], EntityPig[‘Pig’/409, l=‘MpServer’, x=249,13, y=66,00, z=25,94], EntityPig[‘Pig’/414, l=‘MpServer’, x=265,50, y=66,00, z=31,38], EntityZombie[‘Zombie’/415, l=‘MpServer’, x=261,97, y=29,00, z=42,59], EntityPig[‘Pig’/160, l=‘MpServer’, x=229,97, y=67,00, z=87,44], EntitySkeleton[‘Skeleton’/416, l=‘MpServer’, x=260,47, y=28,00, z=46,13], EntityPig[‘Pig’/161, l=‘MpServer’, x=238,53, y=68,00, z=80,31], EntityCreeper[‘Creeper’/417, l=‘MpServer’, x=271,50, y=21,00, z=63,94], EntityPig[‘Pig’/162, l=‘MpServer’, x=225,31, y=68,00, z=116,09], EntityBat[‘Bat’/163, l=‘MpServer’, x=237,25, y=20,10, z=135,25], EntityZombie[‘Zombie’/419, l=‘MpServer’, x=285,69, y=46,00, z=43,97], EntityCreeper[‘Creeper’/164, l=‘MpServer’, x=228,41, y=19,00, z=129,97], EntityPig[‘Pig’/420, l=‘MpServer’, x=272,50, y=69,00, z=39,25], EntityPig[‘Pig’/165, l=‘MpServer’, x=226,38, y=68,00, z=128,13], EntityCreeper[‘Creeper’/421, l=‘MpServer’, x=285,16, y=34,00, z=48,30], EntityCreeper[‘Creeper’/422, l=‘MpServer’, x=284,31, y=34,00, z=48,56], EntitySquid[‘Squid’/166, l=‘MpServer’, x=225,50, y=60,38, z=164,50], EntityClientPlayerMP[‘Player937’/369, l=‘MpServer’, x=239,98, y=73,62, z=103,70], EntityZombie[‘Zombie’/424, l=‘MpServer’, x=293,03, y=35,00, z=32,41], EntityFlechette[‘entity.RenderFlechetteun.name’/174, l=‘MpServer’, x=246,50, y=66,00, z=93,25], EntityBat[‘Bat’/175, l=‘MpServer’, x=240,25, y=21,10, z=134,25], EntityCreeper[‘Creeper’/176, l=‘MpServer’, x=249,91, y=30,00, z=129,75], EntityCreeper[‘Creeper’/177, l=‘MpServer’, x=244,00, y=16,00, z=130,41], EntityZombie[‘Zombie’/178, l=‘MpServer’, x=253,25, y=34,00, z=136,13], EntityPig[‘Pig’/183, l=‘MpServer’, x=254,56, y=67,00, z=182,50], EntityCreeper[‘Creeper’/186, l=‘MpServer’, x=258,28, y=41,00, z=105,28], EntityCreeper[‘Creeper’/187, l=‘MpServer’, x=257,31, y=41,00, z=104,31], EntityPig[‘Pig’/188, l=‘MpServer’, x=257,03, y=68,00, z=98,94], EntityPig[‘Pig’/189, l=‘MpServer’, x=264,66, y=67,00, z=137,75], EntityZombie[‘Zombie’/190, l=‘MpServer’, x=271,97, y=17,00, z=183,50], EntitySpider[‘Spider’/193, l=‘MpServer’, x=283,19, y=58,00, z=77,26], EntitySkeleton[‘Skeleton’/194, l=‘MpServer’, x=283,84, y=16,00, z=89,50], EntitySkeleton[‘Skeleton’/195, l=‘MpServer’, x=285,69, y=16,00, z=90,16], EntityCreeper[‘Creeper’/196, l=‘MpServer’, x=281,59, y=41,00, z=110,00], EntityCreeper[‘Creeper’/197, l=‘MpServer’, x=272,38, y=37,00, z=135,78], EntityCreeper[‘Creeper’/198, l=‘MpServer’, x=286,53, y=45,00, z=136,97], EntityPig[‘Pig’/200, l=‘MpServer’, x=278,78, y=64,00, z=144,44], EntitySkeleton[‘Skeleton’/202, l=‘MpServer’, x=293,09, y=17,00, z=89,59], EntityZombie[‘Zombie’/203, l=‘MpServer’, x=297,50, y=57,00, z=86,50], EntityPig[‘Pig’/204, l=‘MpServer’, x=299,47, y=76,00, z=83,66], EntityCreeper[‘Creeper’/205, l=‘MpServer’, x=301,06, y=20,00, z=110,50], EntityZombie[‘Zombie’/206, l=‘MpServer’, x=296,47, y=22,00, z=107,97], EntityCreeper[‘Creeper’/207, l=‘MpServer’, x=295,94, y=34,00, z=110,50], EntityPig[‘Pig’/208, l=‘MpServer’, x=290,13, y=67,00, z=118,59], EntityPig[‘Pig’/209, l=‘MpServer’, x=299,16, y=69,00, z=124,03], EntityBat[‘Bat’/210, l=‘MpServer’, x=301,75, y=17,10, z=157,50], EntityPig[‘Pig’/211, l=‘MpServer’, x=298,53, y=64,00, z=144,31], EntityPig[‘Pig’/212, l=‘MpServer’, x=290,72, y=64,00, z=150,53], EntitySquid[‘Squid’/213, l=‘MpServer’, x=297,14, y=58,42, z=166,77], EntitySquid[‘Squid’/214, l=‘MpServer’, x=292,50, y=58,00, z=164,50], EntitySquid[‘Squid’/217, l=‘MpServer’, x=299,96, y=58,39, z=167,62], EntitySquid[‘Squid’/218, l=‘MpServer’, x=298,13, y=58,00, z=165,47], EntitySquid[‘Squid’/219, l=‘MpServer’, x=292,47, y=58,17, z=166,74], EntityBat[‘Bat’/221, l=‘MpServer’, x=297,75, y=23,10, z=180,06], EntityPig[‘Pig’/223, l=‘MpServer’, x=299,97, y=73,00, z=179,50], EntityPig[‘Pig’/227, l=‘MpServer’, x=317,50, y=83,00, z=79,22], EntityCreeper[‘Creeper’/228, l=‘MpServer’, x=311,13, y=20,00, z=94,75], EntityZombie[‘Zombie’/229, l=‘MpServer’, x=310,41, y=54,00, z=88,34], EntityPig[‘Pig’/230, l=‘MpServer’, x=311,53, y=83,00, z=94,94], EntityCreeper[‘Creeper’/231, l=‘MpServer’, x=306,69, y=20,00, z=97,31], EntitySkeleton[‘Skeleton’/232, l=‘MpServer’, x=314,84, y=22,00, z=112,00], EntityBat[‘Bat’/233, l=‘MpServer’, x=309,74, y=23,20, z=107,23], EntityPig[‘Pig’/234, l=‘MpServer’, x=308,50, y=73,00, z=97,44], EntityPig[‘Pig’/235, l=‘MpServer’, x=313,03, y=75,00, z=98,47], EntityCreeper[‘Creeper’/236, l=‘MpServer’, x=313,16, y=22,00, z=113,69], EntityCreeper[‘Creeper’/237, l=‘MpServer’, x=312,16, y=23,00, z=113,34], EntitySkeleton[‘Skeleton’/238, l=‘MpServer’, x=315,23, y=22,00, z=113,98], EntityCreeper[‘Creeper’/239, l=‘MpServer’, x=317,28, y=22,00, z=114,06], EntitySkeleton[‘Skeleton’/240, l=‘MpServer’, x=304,69, y=32,04, z=112,70], EntityBat[‘Bat’/241, l=‘MpServer’, x=309,84, y=28,10, z=142,00], EntitySkeleton[‘Skeleton’/242, l=‘MpServer’, x=316,38, y=17,00, z=129,34], EntitySkeleton[‘Skeleton’/243, l=‘MpServer’, x=313,75, y=43,00, z=139,69], EntitySkeleton[‘Skeleton’/244, l=‘MpServer’, x=316,94, y=36,00, z=133,50], EntityPig[‘Pig’/245, l=‘MpServer’, x=316,97, y=68,00, z=128,06], EntityBat[‘Bat’/246, l=‘MpServer’, x=309,75, y=29,10, z=157,63], EntitySpider[‘Spider’/247, l=‘MpServer’, x=308,13, y=28,00, z=159,19], EntityBat[‘Bat’/248, l=‘MpServer’, x=312,75, y=17,10, z=159,75], EntitySpider[‘Spider’/249, l=‘MpServer’, x=317,42, y=17,00, z=163,23]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2523)
at net.minecraft.client.Minecraft.run(Minecraft.java:934)
at net.minecraft.client.main.Main.main(Main.java:112)
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:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)– System Details –
Details:
Minecraft Version: 1.7.2
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_05, Oracle Corporation
Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 675961856 bytes (644 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 13011 (728616 bytes; 0 MB) allocated, 1530 (85680 bytes; 0 MB) used
IntCache: cache: 7, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
modminecraft{1.0} [Mod Minecraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 650/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to ‘fml,forge’
Type: Client (map_client.txt)
Resource Packs: []
Current Language:ERRORNullPointerException: null
Profiler Position: N/A (disabled)
Vec3 Pool Size: 5373 (300888 bytes; 0 MB) allocated, 549 (30744 bytes; 0 MB) used
Anisotropic Filtering: Off (1)J'ai aussi quand je change la durée de la potion effect ca ne change rien :/ Et l'orsque on tire avec la Sarbacane dans l'inventaire sa nous met Slowness "0:9" mais l'effet ne s'applique pas a nous je ne sais pas pourquoi le cadre slowness apparait dans l'inventaire..
-
Si tu enlève :
float f11 = (float)par1EntityFlechette.arrowShake - par9;if (f11 > 0.0F)
{
float f12 = -MathHelper.sin(f11 * 3.0F) * f11;
GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F);
}
ça crash toujours ?Aussi, enlève la ligne :
private static final String __OBFID = “CL_00000978”;
Sinon tu vas avoir des problèmes lors de la compilation.Pour les deux autres problèmes, je ne sais pas.
-
Oui ca crash toujours malheureusement
–-- Minecraft Crash Report ---- // Oh - I know what I did wrong! Time: 13/07/14 22:48 Description: Registering texture java.lang.NullPointerException: Registering texture at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63) at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:62) at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:57) at mod.common.RenderFlechette.doRender(RenderFlechette.java:44) at mod.common.RenderFlechette.doRender(RenderFlechette.java:110) at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:532) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1298) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1095) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1024) at net.minecraft.client.Minecraft.run(Minecraft.java:912) at net.minecraft.client.main.Main.main(Main.java:112) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63) at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) -- Resource location being registered -- Details: Resource location: ~~NULL~~ Texture object class: net.minecraft.client.renderer.texture.SimpleTexture Stacktrace: at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:62) at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:57) at mod.common.RenderFlechette.doRender(RenderFlechette.java:44) at mod.common.RenderFlechette.doRender(RenderFlechette.java:110) -- Entity being rendered -- Details: Entity Type: RenderFlechetteun (mod.common.EntityFlechette) Entity ID: 478 Entity Name: entity.RenderFlechetteun.name Entity's Exact location: 414,52, 71,31, -18,14 Entity's Block location: World: (414,71,-19), Chunk: (at 14,4,13 in 25,-2; contains blocks 400,0,-32 to 415,255,-17), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Entity's Momentum: 0,95, -0,23, 1,81 -- Renderer details -- Details: Assigned renderer: mod.common.RenderFlechette@6da5cb1 Location: 0,03,-0,16,0,45 - World: (0,-1,0), Chunk: (at 0,-1,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Rotation: 27.664007 Delta: 0.20647562 Stacktrace: at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:532) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1298) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player140'/362, l='MpServer', x=413,73, y=71,62, z=-20,04]] Chunk stats: MultiplayerChunkCache: 190, 190 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (409,64,-37), Chunk: (at 9,4,11 in 25,-3; contains blocks 400,0,-48 to 415,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 289 game time, 289 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 115 total; [EntityBat['Bat'/256, l='MpServer', x=418,88, y=20,17, z=-24,63], EntityFlechette['entity.RenderFlechetteun.name'/257, l='MpServer', x=419,53, y=71,00, z=-10,81], EntityCreeper['Creeper'/258, l='MpServer', x=417,63, y=20,00, z=27,84], EntityCreeper['Creeper'/259, l='MpServer', x=417,38, y=20,00, z=28,69], EntitySkeleton['Skeleton'/260, l='MpServer', x=420,29, y=21,00, z=24,50], EntityCreeper['Creeper'/261, l='MpServer', x=416,69, y=13,00, z=45,66], EntityHorse['Horse'/269, l='MpServer', x=436,28, y=72,00, z=-55,56], EntityHorse['Horse'/270, l='MpServer', x=438,50, y=71,00, z=-54,25], EntityHorse['Horse'/271, l='MpServer', x=437,81, y=72,00, z=-50,95], EntityHorse['Horse'/272, l='MpServer', x=434,34, y=72,00, z=-53,72], EntityHorse['Horse'/273, l='MpServer', x=436,88, y=72,00, z=-53,34], EntityBat['Bat'/274, l='MpServer', x=435,21, y=28,00, z=-49,25], EntityBat['Bat'/275, l='MpServer', x=437,69, y=26,95, z=-27,34], EntityItem['item.item.seeds'/276, l='MpServer', x=434,09, y=71,13, z=-31,94], EntitySpider['Spider'/277, l='MpServer', x=448,16, y=20,00, z=29,50], EntityZombie['Zombie'/278, l='MpServer', x=445,78, y=21,00, z=32,09], EntityPig['Pig'/281, l='MpServer', x=462,53, y=79,00, z=-95,53], EntityPig['Pig'/282, l='MpServer', x=459,78, y=79,00, z=-92,78], EntityPig['Pig'/283, l='MpServer', x=454,19, y=76,00, z=-93,91], EntityPig['Pig'/284, l='MpServer', x=461,16, y=79,00, z=-94,16], EntityCreeper['Creeper'/289, l='MpServer', x=471,66, y=15,00, z=-5,34], EntityZombie['Zombie'/290, l='MpServer', x=472,59, y=15,00, z=-5,53], EntityCreeper['Creeper'/291, l='MpServer', x=476,50, y=17,00, z=-4,50], EntityCreeper['Creeper'/292, l='MpServer', x=479,50, y=17,00, z=-2,50], EntityCreeper['Creeper'/293, l='MpServer', x=473,50, y=22,00, z=32,50], EntityBat['Bat'/296, l='MpServer', x=483,00, y=43,85, z=-50,14], EntitySquid['Squid'/50, l='MpServer', x=351,58, y=60,42, z=-19,12], EntitySquid['Squid'/85, l='MpServer', x=364,51, y=61,10, z=-53,53], EntitySquid['Squid'/86, l='MpServer', x=366,12, y=58,00, z=-57,74], EntitySquid['Squid'/87, l='MpServer', x=363,23, y=62,34, z=-49,63], EntitySquid['Squid'/88, l='MpServer', x=368,59, y=61,31, z=-39,33], EntitySquid['Squid'/89, l='MpServer', x=368,80, y=58,38, z=-46,48], EntitySquid['Squid'/90, l='MpServer', x=369,02, y=59,99, z=-39,07], EntitySquid['Squid'/91, l='MpServer', x=360,21, y=60,08, z=-31,21], EntitySquid['Squid'/92, l='MpServer', x=363,00, y=61,25, z=-31,86], EntitySquid['Squid'/93, l='MpServer', x=355,49, y=59,99, z=-29,96], EntitySquid['Squid'/94, l='MpServer', x=356,28, y=59,66, z=-21,91], EntitySquid['Squid'/95, l='MpServer', x=364,45, y=61,34, z=-20,00], EntitySquid['Squid'/96, l='MpServer', x=352,38, y=58,37, z=-24,00], EntityClientPlayerMP['Player140'/362, l='MpServer', x=413,73, y=71,62, z=-20,04], EntityZombie['Zombie'/140, l='MpServer', x=375,50, y=33,00, z=-99,50], EntityCreeper['Creeper'/141, l='MpServer', x=375,56, y=33,00, z=-98,00], EntityCreeper['Creeper'/142, l='MpServer', x=378,50, y=33,00, z=-94,50], EntityBat['Bat'/143, l='MpServer', x=381,31, y=12,95, z=-75,31], EntitySquid['Squid'/144, l='MpServer', x=383,85, y=55,00, z=-53,51], EntitySquid['Squid'/145, l='MpServer', x=379,09, y=61,38, z=-54,33], EntitySquid['Squid'/146, l='MpServer', x=379,71, y=55,82, z=-53,76], EntitySquid['Squid'/147, l='MpServer', x=367,48, y=60,29, z=-46,35], EntitySquid['Squid'/148, l='MpServer', x=371,57, y=62,25, z=-47,37], EntitySquid['Squid'/149, l='MpServer', x=365,84, y=59,85, z=-52,47], EntitySquid['Squid'/150, l='MpServer', x=370,00, y=58,94, z=-57,68], EntitySquid['Squid'/151, l='MpServer', x=365,87, y=61,77, z=-54,49], EntitySquid['Squid'/152, l='MpServer', x=370,47, y=61,38, z=-26,01], EntityBat['Bat'/153, l='MpServer', x=380,50, y=22,92, z=13,91], EntityCreeper['Creeper'/154, l='MpServer', x=383,50, y=28,00, z=31,50], EntitySkeleton['Skeleton'/155, l='MpServer', x=382,50, y=25,00, z=17,50], EntityCreeper['Creeper'/156, l='MpServer', x=373,44, y=38,00, z=19,00], EntitySkeleton['Skeleton'/172, l='MpServer', x=395,50, y=29,00, z=-80,50], EntitySpider['Spider'/173, l='MpServer', x=394,91, y=26,00, z=-51,56], EntitySkeleton['Skeleton'/174, l='MpServer', x=397,63, y=18,00, z=-58,09], EntitySquid['Squid'/175, l='MpServer', x=386,19, y=61,26, z=-52,78], EntityZombie['Zombie'/176, l='MpServer', x=386,50, y=14,00, z=-33,50], EntityItem['item.tile.mushroom'/177, l='MpServer', x=389,88, y=16,13, z=-4,88], EntitySkeleton['Skeleton'/178, l='MpServer', x=390,70, y=16,00, z=-2,70], EntityBat['Bat'/179, l='MpServer', x=391,58, y=29,79, z=-10,96], EntityZombie['Zombie'/180, l='MpServer', x=386,50, y=17,00, z=-1,50], EntitySkeleton['Skeleton'/181, l='MpServer', x=395,50, y=41,00, z=-6,50], EntitySkeleton['Skeleton'/182, l='MpServer', x=389,94, y=20,00, z=26,50], EntityEnderman['Enderman'/183, l='MpServer', x=392,06, y=35,00, z=40,44], EntitySkeleton['Skeleton'/184, l='MpServer', x=400,00, y=32,00, z=36,66], EntitySpider['Spider'/185, l='MpServer', x=389,28, y=35,02, z=36,44], EntityCreeper['Creeper'/187, l='MpServer', x=385,41, y=21,00, z=53,09], EntityZombie['Zombie'/189, l='MpServer', x=398,50, y=29,00, z=57,50], EntityBat['Bat'/190, l='MpServer', x=387,50, y=19,10, z=58,59], EntityCreeper['Creeper'/191, l='MpServer', x=388,97, y=36,00, z=49,47], EntitySquid['Squid'/197, l='MpServer', x=403,80, y=46,39, z=-78,03], EntitySquid['Squid'/199, l='MpServer', x=412,03, y=47,39, z=-83,60], EntitySquid['Squid'/201, l='MpServer', x=401,95, y=47,76, z=-84,81], EntitySquid['Squid'/202, l='MpServer', x=411,24, y=45,75, z=-78,32], EntitySquid['Squid'/203, l='MpServer', x=410,35, y=45,93, z=-77,18], EntityCreeper['Creeper'/204, l='MpServer', x=414,50, y=30,00, z=-55,50], EntityZombie['Zombie'/205, l='MpServer', x=403,02, y=14,00, z=-19,11], EntityCreeper['Creeper'/206, l='MpServer', x=411,69, y=15,00, z=-16,31], EntityCreeper['Creeper'/207, l='MpServer', x=413,63, y=28,00, z=-16,25], EntitySkeleton['Skeleton'/208, l='MpServer', x=415,50, y=42,00, z=-16,50], EntityBat['Bat'/209, l='MpServer', x=405,68, y=35,18, z=-20,75], EntitySkeleton['Skeleton'/210, l='MpServer', x=411,50, y=14,00, z=30,50], EntityBat['Bat'/211, l='MpServer', x=415,38, y=14,73, z=22,75], EntityBat['Bat'/212, l='MpServer', x=415,09, y=15,89, z=19,50], EntityCreeper['Creeper'/213, l='MpServer', x=405,50, y=22,00, z=23,50], EntityCreeper['Creeper'/214, l='MpServer', x=408,50, y=22,00, z=26,50], EntitySkeleton['Skeleton'/215, l='MpServer', x=411,11, y=11,00, z=41,58], EntityCreeper['Creeper'/216, l='MpServer', x=414,97, y=14,00, z=46,34], EntityEnderman['Enderman'/217, l='MpServer', x=403,50, y=26,00, z=46,34], EntityEnderman['Enderman'/218, l='MpServer', x=409,56, y=25,00, z=44,34], EntityCreeper['Creeper'/219, l='MpServer', x=404,25, y=28,00, z=35,56], EntityBat['Bat'/220, l='MpServer', x=405,56, y=27,00, z=40,75], EntityBat['Bat'/221, l='MpServer', x=400,31, y=34,26, z=35,66], EntityZombie['Zombie'/222, l='MpServer', x=403,50, y=27,00, z=56,50], EntityFlechette['entity.RenderFlechetteun.name'/478, l='MpServer', x=414,52, y=71,31, z=-18,14], EntityCreeper['Creeper'/223, l='MpServer', x=404,50, y=27,00, z=54,50], EntityCreeper['Creeper'/224, l='MpServer', x=403,97, y=21,00, z=55,53], EntityEnderman['Enderman'/225, l='MpServer', x=412,38, y=25,00, z=48,72], EntityBat['Bat'/226, l='MpServer', x=408,25, y=26,98, z=57,75], EntityHorse['Horse'/245, l='MpServer', x=419,97, y=70,00, z=-67,35], EntityHorse['Horse'/246, l='MpServer', x=426,38, y=71,00, z=-66,00], EntityZombie['Zombie'/247, l='MpServer', x=431,89, y=26,44, z=-50,56], EntityHorse['Horse'/248, l='MpServer', x=424,78, y=71,00, z=-63,22], EntityHorse['Horse'/249, l='MpServer', x=424,78, y=72,00, z=-60,22], EntityHorse['Horse'/250, l='MpServer', x=430,78, y=72,00, z=-49,22], EntityHorse['Horse'/251, l='MpServer', x=423,03, y=71,00, z=-62,75], EntityHorse['Horse'/252, l='MpServer', x=426,28, y=71,00, z=-62,75], EntitySpider['Spider'/253, l='MpServer', x=424,59, y=20,00, z=-34,19], EntitySkeleton['Skeleton'/254, l='MpServer', x=421,88, y=21,00, z=-35,50], EntityEnderman['Enderman'/255, l='MpServer', x=420,50, y=42,00, z=-33,50]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2523) at net.minecraft.client.Minecraft.run(Minecraft.java:934) at net.minecraft.client.main.Main.main(Main.java:112) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) – System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_05, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 772318392 bytes (736 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 17891 (1001896 bytes; 0 MB) allocated, 1483 (83048 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available modminecraft{1.0} [Mod Minecraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce GTX 650/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation 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: 16614 (930384 bytes; 0 MB) allocated, 2746 (153776 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
Bizarre qu’on tombe sur un npe et pas une boucle infini.
Remplace :
protected ResourceLocation getEntityTexture(EntityFlechette par1EntityFlechette)
{
return this.getEntityTexture(par1EntityFlechette);
}
par :
protected ResourceLocation getEntityTexture(EntityFlechette par1EntityFlechette)
{
return this.FlechetteTextures ;
} -
Toujours le même crash je vais te passer tous mes codes je pense que tu pourra t’y retrouver plus facilement et cibler plus facilement également le problème !
Classe principale
package mod.common; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import mod.proxy.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.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "modminecraft", name = "Mod Minecraft", version ="1.0") public class ModMinecraft { public static Item itemFlechette; public static Item itemSarbacane; public static Item itemSeve; public static Item itemSevewithmosquito; @Instance("modminecraft") public static ModMinecraft instance; public static final String MODID = "modminecraft"; @SidedProxy(clientSide = "mod.proxy.ClientProxy", serverSide = "mod.proxy.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { itemFlechette = new DinoItem().setUnlocalizedName("itemFlechette").setCreativeTab(CreativeTabs.tabCombat); itemSarbacane = new SarbacaneItem().setUnlocalizedName("itemSarbacane").setCreativeTab(CreativeTabs.tabCombat); itemSeve = new SeveItem().setUnlocalizedName("itemSeve").setCreativeTab(CreativeTabs.tabMaterials); itemSevewithmosquito = new ItemSevewithmosquito().setUnlocalizedName("itemSevewithmosquito").setCreativeTab(CreativeTabs.tabMaterials); GameRegistry.registerItem(itemFlechette, "item_Flechette"); GameRegistry.registerItem(itemSarbacane, "item_Sarbacane"); GameRegistry.registerItem(itemSeve, "item_Seve"); GameRegistry.registerItem(itemSevewithmosquito, "item_Sevewithmosquito"); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRender(); GameRegistry.addRecipe(new ItemStack(itemFlechette, 4), new Object[]{"ZX ", "XYX", " XE", 'X', Items.stick, 'Y', new ItemStack(Items.potionitem, 1, 16426), 'Z', Items.iron_ingot, 'E', new ItemStack(Blocks.wool, 1, 14)}); GameRegistry.addRecipe(new ItemStack(itemSarbacane), new Object[]{"XZ ", "ZXZ", " ZX", 'X', Items.reeds, 'Z', Items.string}); EntityRegistry.registerGlobalEntityID(EntityFlechette.class, "RenderFlechetteun", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerModEntity(EntityFlechette.class, "RenderFlechetteun", 420, this.instance, 40, 1, true); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
La classe de l"arc" qui est une sarbacane
package mod.common; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Items; import net.minecraft.item.EnumAction; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.ArrowLooseEvent; import net.minecraftforge.event.entity.player.ArrowNockEvent; 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; public class SarbacaneItem extends Item { @SideOnly(Side.CLIENT) private IIcon[] iconArray; private static final String __OBFID = "CL_00001777"; public SarbacaneItem() { this.maxStackSize = 1; this.setMaxDamage(0); this.setCreativeTab(CreativeTabs.tabCombat); } /** * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount */ public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) { int j = this.getMaxItemUseDuration(par1ItemStack) - par4; ArrowLooseEvent event = new ArrowLooseEvent(par3EntityPlayer, par1ItemStack, j); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return; } j = event.charge; boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0; if (flag || par3EntityPlayer.inventory.hasItem(ModMinecraft.itemFlechette)) { float f = (float)j / 20.0F; f = (f * f + f * 2.0F) / 3.0F; if ((double)f < 0.1D) { return; } if (f > 1.0F) { f = 1.0F; } EntityFlechette entityflechette= new EntityFlechette(par2World, par3EntityPlayer, f * 2.0F); if (f == 1.0F) { entityflechette.setIsCritical(true); } par1ItemStack.damageItem(1, par3EntityPlayer); par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F); if (flag) { entityflechette.canBePickedUp = 2; } else { par3EntityPlayer.inventory.consumeInventoryItem(ModMinecraft.itemFlechette); } if (!par2World.isRemote) { par2World.spawnEntityInWorld(entityflechette); } } } public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { return par1ItemStack; } /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 72000; } /** * returns the action that specifies what animation to play when the items is being used */ public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.bow; } /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { ArrowNockEvent event = new ArrowNockEvent(par3EntityPlayer, par1ItemStack); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return event.result; } if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(ModMinecraft.itemFlechette)) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); } return par1ItemStack; } /** * Return the enchantability factor of the item, most of the time is based on material. */ @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconregister) { this.itemIcon = iconregister.registerIcon(ModMinecraft.MODID + ":itemSarbacane"); } /** * used to cycle through icons based on their used duration, i.e. for the bow */ @SideOnly(Side.CLIENT) public IIcon getItemIconForUseDuration(int par1) { return this.iconArray[par1]; } }
La classe de l’entity Flechette
package mod.common; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.IProjectile; import net.minecraft.entity.monster.EntityEnderman; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.play.server.S2BPacketChangeGameState; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.EntityDamageSourceIndirect; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; 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; public class EntityFlechette extends Entity implements IProjectile { private int field_145791_d = -1; private int field_145792_e = -1; private int field_145789_f = -1; private Block field_145790_g; private int inData; private boolean inGround; /** 1 if the player can pick up the arrow */ public int canBePickedUp; /** Seems to be some sort of timer for animating an arrow. */ public int arrowShake; /** The owner of this arrow. */ public Entity shootingEntity; private int ticksInGround; private int ticksInAir; private double damage = 2.0D; /** The amount of knockback an arrow applies when it hits a mob. */ private int knockbackStrength; private static final String __OBFID = "CL_00001715"; public EntityFlechette(World par1World) { super(par1World); this.renderDistanceWeight = 10.0D; this.setSize(0.5F, 0.5F); } public EntityFlechette(World par1World, double par2, double par4, double par6) { super(par1World); this.renderDistanceWeight = 10.0D; this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); this.yOffset = 0.0F; } public EntityFlechette (World par1World, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase, float par4, float par5) { super(par1World); this.renderDistanceWeight = 10.0D; this.shootingEntity = par2EntityLivingBase; if (par2EntityLivingBase instanceof EntityPlayer) { this.canBePickedUp = 1; } this.posY = par2EntityLivingBase.posY + (double)par2EntityLivingBase.getEyeHeight() - 0.10000000149011612D; double d0 = par3EntityLivingBase.posX - par2EntityLivingBase.posX; double d1 = par3EntityLivingBase.boundingBox.minY + (double)(par3EntityLivingBase.height / 3.0F) - this.posY; double d2 = par3EntityLivingBase.posZ - par2EntityLivingBase.posZ; double d3 = (double)MathHelper.sqrt_double(d0 * d0 + d2 * d2); if (d3 >= 1.0E-7D) { float f2 = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; float f3 = (float)(-(Math.atan2(d1, d3) * 180.0D / Math.PI)); double d4 = d0 / d3; double d5 = d2 / d3; this.setLocationAndAngles(par2EntityLivingBase.posX + d4, this.posY, par2EntityLivingBase.posZ + d5, f2, f3); this.yOffset = 0.0F; float f4 = (float)d3 * 0.2F; this.setThrowableHeading(d0, d1 + (double)f4, d2, par4, par5); } } public EntityFlechette(World par1World, EntityLivingBase par2EntityLivingBase, float par3) { super(par1World); this.renderDistanceWeight = 10.0D; this.shootingEntity = par2EntityLivingBase; if (par2EntityLivingBase instanceof EntityPlayer) { this.canBePickedUp = 1; } this.setSize(0.5F, 0.5F); this.setLocationAndAngles(par2EntityLivingBase.posX, par2EntityLivingBase.posY + (double)par2EntityLivingBase.getEyeHeight(), par2EntityLivingBase.posZ, par2EntityLivingBase.rotationYaw, par2EntityLivingBase.rotationPitch); this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.posY -= 0.10000000149011612D; this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F); } protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); } /** * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8) { float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5); par1 /= (double)f2; par3 /= (double)f2; par5 /= (double)f2; par1 += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)par8; par3 += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)par8; par5 += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)par8; par1 *= (double)par7; par3 *= (double)par7; par5 *= (double)par7; this.motionX = par1; this.motionY = par3; this.motionZ = par5; float f3 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)f3) * 180.0D / Math.PI); this.ticksInGround = 0; } /** * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, * posY, posZ, yaw, pitch */ @SideOnly(Side.CLIENT) public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) { this.setPosition(par1, par3, par5); this.setRotation(par7, par8); } /** * Sets the velocity to the args. Args: x, y, z */ @SideOnly(Side.CLIENT) public void setVelocity(double par1, double par3, double par5) { this.motionX = par1; this.motionY = par3; this.motionZ = par5; if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(par1 * par1 + par5 * par5); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)f) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch; this.prevRotationYaw = this.rotationYaw; this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); this.ticksInGround = 0; } } /** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f) * 180.0D / Math.PI); } Block block = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f); if (block.getMaterial() != Material.air) { block.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); AxisAlignedBB axisalignedbb = block.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); if (axisalignedbb != null && axisalignedbb.isVecInside(this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ))) { this.inGround = true; } } if (this.arrowShake > 0) { –this.arrowShake; } if (this.inGround) { int j = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); if (block == this.field_145790_g && j == this.inData) { ++this.ticksInGround; if (this.ticksInGround == 1200) { this.setDead(); } } else { this.inGround = false; this.motionX *= (double)(this.rand.nextFloat() * 0.2F); this.motionY *= (double)(this.rand.nextFloat() * 0.2F); this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); this.ticksInGround = 0; this.ticksInAir = 0; } } else { ++this.ticksInAir; Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec31, vec3, false, true, false); vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); if (movingobjectposition != null) { vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); } Entity entity = null; List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); double d0 = 0.0D; int i; float f1; for (i = 0; i < list.size(); ++i) { Entity entity1 = (Entity)list.get(i); if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) { f1 = 0.3F; AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand((double)f1, (double)f1, (double)f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec31, vec3); if (movingobjectposition1 != null) { double d1 = vec31.distanceTo(movingobjectposition1.hitVec); if (d1 < d0 || d0 == 0.0D) { entity = entity1; d0 = d1; } } } } if (entity != null) { movingobjectposition = new MovingObjectPosition(entity); } if (movingobjectposition != null && movingobjectposition.entityHit != null && movingobjectposition.entityHit instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer)movingobjectposition.entityHit; if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer)) { movingobjectposition = null; } } float f2; float f4; if (movingobjectposition != null) { if (movingobjectposition.entityHit != null) { f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); int k = MathHelper.ceiling_double_int((double)f2 * this.damage); if (this.getIsCritical()) { k += this.rand.nextInt(k / 2 + 2); } if(movingobjectposition.entityHit instanceof EntityLivingBase) { ((EntityLivingBase) movingobjectposition.entityHit).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 99999999)); } } else { this.field_145791_d = movingobjectposition.blockX; this.field_145792_e = movingobjectposition.blockY; this.field_145789_f = movingobjectposition.blockZ; this.field_145790_g = block; this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f); this.motionX = (double)((float)(movingobjectposition.hitVec.xCoord - this.posX)); this.motionY = (double)((float)(movingobjectposition.hitVec.yCoord - this.posY)); this.motionZ = (double)((float)(movingobjectposition.hitVec.zCoord - this.posZ)); f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); this.posX -= this.motionX / (double)f2 * 0.05000000074505806D; this.posY -= this.motionY / (double)f2 * 0.05000000074505806D; this.posZ -= this.motionZ / (double)f2 * 0.05000000074505806D; this.playSound("random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.inGround = true; this.arrowShake = 7; this.setIsCritical(false); if (this.field_145790_g.getMaterial() != Material.air) { this.field_145790_g.onEntityCollidedWithBlock(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f, this); } } } if (this.getIsCritical()) { for (i = 0; i < 4; ++i) { this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)i / 4.0D, this.posY + this.motionY * (double)i / 4.0D, this.posZ + this.motionZ * (double)i / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ); } } this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f2) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { ; } while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { this.prevRotationPitch += 360.0F; } while (this.rotationYaw - this.prevRotationYaw < -180.0F) { this.prevRotationYaw -= 360.0F; } while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { this.prevRotationYaw += 360.0F; } this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; float f3 = 0.99F; f1 = 0.05F; if (this.isInWater()) { for (int l = 0; l < 4; ++l) { f4 = 0.25F; this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ); } f3 = 0.8F; } if (this.isWet()) { this.extinguish(); } this.motionX *= (double)f3; this.motionY *= (double)f3; this.motionZ *= (double)f3; this.motionY -= (double)f1; this.setPosition(this.posX, this.posY, this.posZ); this.func_145775_I(); } } /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { par1NBTTagCompound.setShort("xTile", (short)this.field_145791_d); par1NBTTagCompound.setShort("yTile", (short)this.field_145792_e); par1NBTTagCompound.setShort("zTile", (short)this.field_145789_f); par1NBTTagCompound.setShort("life", (short)this.ticksInGround); par1NBTTagCompound.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145790_g)); par1NBTTagCompound.setByte("inData", (byte)this.inData); par1NBTTagCompound.setByte("shake", (byte)this.arrowShake); par1NBTTagCompound.setByte("inGround", (byte)(this.inGround ? 1 : 0)); par1NBTTagCompound.setByte("pickup", (byte)this.canBePickedUp); par1NBTTagCompound.setDouble("damage", this.damage); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { this.field_145791_d = par1NBTTagCompound.getShort("xTile"); this.field_145792_e = par1NBTTagCompound.getShort("yTile"); this.field_145789_f = par1NBTTagCompound.getShort("zTile"); this.ticksInGround = par1NBTTagCompound.getShort("life"); this.field_145790_g = Block.getBlockById(par1NBTTagCompound.getByte("inTile") & 255); this.inData = par1NBTTagCompound.getByte("inData") & 255; this.arrowShake = par1NBTTagCompound.getByte("shake") & 255; this.inGround = par1NBTTagCompound.getByte("inGround") == 1; if (par1NBTTagCompound.hasKey("damage", 99)) { this.damage = par1NBTTagCompound.getDouble("damage"); } if (par1NBTTagCompound.hasKey("pickup", 99)) { this.canBePickedUp = par1NBTTagCompound.getByte("pickup"); } else if (par1NBTTagCompound.hasKey("player", 99)) { this.canBePickedUp = par1NBTTagCompound.getBoolean("player") ? 1 : 0; } } /** * Called by a player entity when they collide with an entity */ public void onCollideWithPlayer(EntityPlayer par1EntityPlayer) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && par1EntityPlayer.capabilities.isCreativeMode; if (this.canBePickedUp == 1 && !par1EntityPlayer.inventory.addItemStackToInventory(new ItemStack(ModMinecraft.itemFlechette, 1))) { flag = false; } if (flag) { this.playSound("random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); par1EntityPlayer.onItemPickup(this, 1); this.setDead(); } } } /** * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ protected boolean canTriggerWalking() { return false; } @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; } public void setDamage(double par1) { this.damage = par1; } public double getDamage() { return this.damage; } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public void setIsCritical(boolean par1) { byte b0 = this.dataWatcher.getWatchableObjectByte(16); if (par1) { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1))); } else { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2))); } } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public boolean getIsCritical() { byte b0 = this.dataWatcher.getWatchableObjectByte(16); return (b0 & 1) != 0; } public class EntitySlowingArrow extends EntityThrowable { public EntitySlowingArrow(World world) { super(world); } protected void onImpact(MovingObjectPosition mop) { Entity e = mop.entityHit; if (e != null && e instanceof EntityLivingBase) { ((EntityLivingBase) e).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 67, 1200)); } } } }
Le render de la flechette
package mod.common; 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; @SideOnly(Side.CLIENT) public class RenderFlechette extends Render { public final ResourceLocation FlechetteTextures = new ResourceLocation(ModMinecraft.MODID, "textures/entity/itemFlechette.png"); protected ResourceLocation getEntityTexture(EntityFlechette par1EntityFlechette) { return this.FlechetteTextures ; } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ private ResourceLocation getEntityFlechettesTexture(EntityFlechette RenderFlechetteun) { return FlechetteTextures; } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render <t extends="" entity)="" and="" this="" method="" has="" signature="" public="" void="" func_76986_a(t="" entity,="" double="" d,="" d1,<br="">* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityFlechette par1EntityFlechette, double par2, double par4, double par6, float par8, float par9) { this.bindEntityTexture(par1EntityFlechette); GL11.glPushMatrix(); GL11.glTranslatef((float)par2, (float)par4, (float)par6); GL11.glRotatef(par1EntityFlechette.prevRotationYaw + (par1EntityFlechette.rotationYaw - par1EntityFlechette.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(par1EntityFlechette.prevRotationPitch + (par1EntityFlechette.rotationPitch - par1EntityFlechette.prevRotationPitch) * par9, 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); 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(); } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render <t extends="" entity)="" and="" this="" method="" has="" signature="" public="" void="" func_76986_a(t="" entity,="" double="" d,="" d1,<br="">* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.doRender((EntityFlechette)par1Entity, par2, par4, par6, par8, par9); } @Override protected ResourceLocation getEntityTexture(Entity var1) { // TODO Auto-generated method stub return null; } }
Le client proxy ```
package mod.proxy;import mod.common.EntityFlechette;
import mod.common.RenderFlechette;
import cpw.mods.fml.client.registry.RenderingRegistry;public class ClientProxy extends CommonProxy
{@Override
public void registerRender()
{
System.out.println(“render”);RenderingRegistry.registerEntityRenderingHandler(EntityFlechette.class, new RenderFlechette());
}}
-
Renvoie quand même le crash actuelle, car tu as bougé certains trucs dans le code.
-
Le voici le voila
–-- Minecraft Crash Report ---- // Shall we play a game? Time: 13/07/14 23:02 Description: Registering texture java.lang.NullPointerException: Registering texture at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63) at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:62) at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:57) at mod.common.RenderFlechette.doRender(RenderFlechette.java:44) at mod.common.RenderFlechette.doRender(RenderFlechette.java:110) at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:532) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1298) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1095) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1024) at net.minecraft.client.Minecraft.run(Minecraft.java:912) at net.minecraft.client.main.Main.main(Main.java:112) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:63) at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:35) -- Resource location being registered -- Details: Resource location: ~~NULL~~ Texture object class: net.minecraft.client.renderer.texture.SimpleTexture Stacktrace: at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:45) at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:62) at net.minecraft.client.renderer.entity.Render.bindEntityTexture(Render.java:57) at mod.common.RenderFlechette.doRender(RenderFlechette.java:44) at mod.common.RenderFlechette.doRender(RenderFlechette.java:110) -- Entity being rendered -- Details: Entity Type: RenderFlechetteun (mod.common.EntityFlechette) Entity ID: 246 Entity Name: entity.RenderFlechetteun.name Entity's Exact location: 417,98, 70,05, -11,59 Entity's Block location: World: (417,70,-12), Chunk: (at 1,4,4 in 26,-1; contains blocks 416,0,-16 to 431,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Entity's Momentum: 0,00, -0,09, 0,00 -- Renderer details -- Details: Assigned renderer: mod.common.RenderFlechette@27c9500c Location: 4,25,-1,57,8,45 - World: (4,-2,8), Chunk: (at 4,-1,8 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Rotation: 42.006824 Delta: 0.77625656 Stacktrace: at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300) at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:532) at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1298) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player468'/348, l='MpServer', x=413,73, y=71,62, z=-20,04]] Chunk stats: MultiplayerChunkCache: 70, 70 Level seed: 0 Level generator: ID 00 - default, ver 1\. Features enabled: false Level generator options: Level spawn location: World: (409,64,-37), Chunk: (at 9,4,11 in 25,-3; contains blocks 400,0,-48 to 415,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 316 game time, 316 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 94 total; [EntityBat['Bat'/259, l='MpServer', x=433,08, y=27,83, z=-50,02], EntityHorse['Horse'/260, l='MpServer', x=436,28, y=72,00, z=-55,56], EntityHorse['Horse'/261, l='MpServer', x=438,50, y=71,00, z=-54,25], EntityBat['Bat'/133, l='MpServer', x=383,88, y=13,89, z=-73,24], EntitySquid['Squid'/134, l='MpServer', x=383,94, y=55,00, z=-53,56], EntityHorse['Horse'/262, l='MpServer', x=438,00, y=72,00, z=-51,13], EntitySquid['Squid'/135, l='MpServer', x=379,16, y=61,34, z=-54,31], EntityHorse['Horse'/263, l='MpServer', x=434,34, y=72,00, z=-53,72], EntitySquid['Squid'/136, l='MpServer', x=379,66, y=55,84, z=-53,63], EntityHorse['Horse'/264, l='MpServer', x=436,88, y=72,00, z=-53,34], EntityBat['Bat'/265, l='MpServer', x=437,50, y=26,92, z=-29,52], EntitySquid['Squid'/137, l='MpServer', x=369,14, y=58,78, z=-56,90], EntityItem['item.item.seeds'/266, l='MpServer', x=434,09, y=71,13, z=-31,94], EntitySquid['Squid'/138, l='MpServer', x=368,47, y=58,31, z=-46,97], EntitySquid['Squid'/139, l='MpServer', x=369,22, y=59,97, z=-39,19], EntityZombie['Zombie'/267, l='MpServer', x=445,78, y=21,00, z=32,09], EntitySquid['Squid'/140, l='MpServer', x=372,44, y=62,41, z=-46,71], EntitySquid['Squid'/141, l='MpServer', x=368,78, y=61,31, z=-39,31], EntitySquid['Squid'/142, l='MpServer', x=370,81, y=61,38, z=-26,50], EntityBat['Bat'/143, l='MpServer', x=382,00, y=22,00, z=15,75], EntityCreeper['Creeper'/144, l='MpServer', x=383,50, y=28,00, z=31,50], EntitySpider['Spider'/273, l='MpServer', x=448,63, y=20,00, z=29,22], EntitySkeleton['Skeleton'/145, l='MpServer', x=382,50, y=25,00, z=17,50], EntityCreeper['Creeper'/146, l='MpServer', x=373,44, y=38,00, z=19,00], EntityCreeper['Creeper'/278, l='MpServer', x=471,66, y=15,00, z=-5,34], EntityZombie['Zombie'/279, l='MpServer', x=472,59, y=15,00, z=-5,53], EntityCreeper['Creeper'/280, l='MpServer', x=476,50, y=17,00, z=-4,50], EntityCreeper['Creeper'/281, l='MpServer', x=479,53, y=17,00, z=-2,47], EntityCreeper['Creeper'/282, l='MpServer', x=473,50, y=22,00, z=32,50], EntitySpider['Spider'/162, l='MpServer', x=394,91, y=26,00, z=-51,56], EntitySkeleton['Skeleton'/163, l='MpServer', x=397,63, y=18,00, z=-58,09], EntitySquid['Squid'/164, l='MpServer', x=386,38, y=61,19, z=-52,78], EntityZombie['Zombie'/165, l='MpServer', x=386,50, y=14,00, z=-33,50], EntityItem['item.tile.mushroom'/166, l='MpServer', x=389,88, y=16,13, z=-4,88], EntitySkeleton['Skeleton'/167, l='MpServer', x=390,70, y=16,24, z=-2,70], EntityBat['Bat'/168, l='MpServer', x=392,56, y=31,25, z=-13,38], EntityZombie['Zombie'/169, l='MpServer', x=386,50, y=17,00, z=-1,50], EntitySkeleton['Skeleton'/170, l='MpServer', x=395,50, y=41,00, z=-6,50], EntitySkeleton['Skeleton'/171, l='MpServer', x=389,94, y=20,00, z=26,50], EntityEnderman['Enderman'/172, l='MpServer', x=392,06, y=35,00, z=40,44], EntitySkeleton['Skeleton'/173, l='MpServer', x=400,00, y=32,00, z=36,66], EntitySpider['Spider'/174, l='MpServer', x=389,28, y=35,00, z=36,44], EntityBat['Bat'/175, l='MpServer', x=400,05, y=34,58, z=33,62], EntitySquid['Squid'/190, l='MpServer', x=411,34, y=45,81, z=-79,24], EntitySquid['Squid'/191, l='MpServer', x=410,44, y=45,84, z=-77,25], EntitySquid['Squid'/192, l='MpServer', x=404,09, y=46,38, z=-77,91], EntityCreeper['Creeper'/193, l='MpServer', x=414,50, y=30,00, z=-55,50], EntityZombie['Zombie'/194, l='MpServer', x=402,67, y=14,36, z=-18,92], EntityCreeper['Creeper'/195, l='MpServer', x=411,69, y=15,00, z=-16,31], EntityCreeper['Creeper'/196, l='MpServer', x=413,63, y=28,00, z=-16,25], EntitySkeleton['Skeleton'/197, l='MpServer', x=415,50, y=42,00, z=-16,50], EntityBat['Bat'/198, l='MpServer', x=409,49, y=35,89, z=-20,21], EntitySkeleton['Skeleton'/199, l='MpServer', x=411,50, y=14,00, z=30,50], EntityBat['Bat'/200, l='MpServer', x=414,83, y=14,89, z=18,95], EntityCreeper['Creeper'/201, l='MpServer', x=405,50, y=22,00, z=23,50], EntitySquid['Squid'/73, l='MpServer', x=364,19, y=61,00, z=-53,53], EntityCreeper['Creeper'/202, l='MpServer', x=407,13, y=22,00, z=26,44], EntitySquid['Squid'/74, l='MpServer', x=366,61, y=58,04, z=-58,69], EntityBat['Bat'/203, l='MpServer', x=414,46, y=15,60, z=22,70], EntitySquid['Squid'/75, l='MpServer', x=363,38, y=62,34, z=-49,50], EntitySquid['Squid'/76, l='MpServer', x=365,31, y=61,28, z=-54,47], EntitySkeleton['Skeleton'/204, l='MpServer', x=411,50, y=11,55, z=41,31], EntitySquid['Squid'/77, l='MpServer', x=366,41, y=60,02, z=-53,41], EntityCreeper['Creeper'/205, l='MpServer', x=414,97, y=14,00, z=46,34], EntitySquid['Squid'/78, l='MpServer', x=368,46, y=59,82, z=-46,27], EntityEnderman['Enderman'/206, l='MpServer', x=403,50, y=26,00, z=46,34], EntitySquid['Squid'/79, l='MpServer', x=355,00, y=59,95, z=-29,47], EntityEnderman['Enderman'/207, l='MpServer', x=410,11, y=25,00, z=44,76], EntitySquid['Squid'/80, l='MpServer', x=355,62, y=59,74, z=-22,09], EntityCreeper['Creeper'/208, l='MpServer', x=404,38, y=28,00, z=35,00], EntitySquid['Squid'/81, l='MpServer', x=364,98, y=61,24, z=-20,39], EntityBat['Bat'/209, l='MpServer', x=405,06, y=27,14, z=40,44], EntitySquid['Squid'/82, l='MpServer', x=352,25, y=58,38, z=-23,94], EntitySquid['Squid'/83, l='MpServer', x=359,90, y=60,30, z=-30,55], EntitySquid['Squid'/84, l='MpServer', x=362,94, y=61,25, z=-31,72], EntityClientPlayerMP['Player468'/348, l='MpServer', x=413,73, y=71,62, z=-20,04], EntityHorse['Horse'/233, l='MpServer', x=419,97, y=70,00, z=-67,35], EntityHorse['Horse'/234, l='MpServer', x=426,59, y=71,00, z=-65,84], EntityZombie['Zombie'/235, l='MpServer', x=431,56, y=26,00, z=-49,74], EntityHorse['Horse'/236, l='MpServer', x=424,78, y=71,00, z=-63,22], EntityHorse['Horse'/237, l='MpServer', x=424,78, y=72,00, z=-60,22], EntityHorse['Horse'/238, l='MpServer', x=430,78, y=72,00, z=-49,22], EntityHorse['Horse'/239, l='MpServer', x=423,03, y=71,00, z=-62,75], EntityHorse['Horse'/240, l='MpServer', x=426,28, y=71,00, z=-62,75], EntitySpider['Spider'/241, l='MpServer', x=424,59, y=20,00, z=-34,19], EntitySkeleton['Skeleton'/242, l='MpServer', x=421,88, y=21,00, z=-35,50], EntityEnderman['Enderman'/243, l='MpServer', x=420,50, y=42,00, z=-33,50], EntityBat['Bat'/244, l='MpServer', x=415,44, y=17,76, z=-20,88], EntityFlechette['entity.RenderFlechetteun.name'/245, l='MpServer', x=419,53, y=71,00, z=-10,81], EntityFlechette['entity.RenderFlechetteun.name'/246, l='MpServer', x=417,98, y=70,05, z=-11,59], EntityCreeper['Creeper'/247, l='MpServer', x=417,63, y=20,00, z=27,84], EntityCreeper['Creeper'/248, l='MpServer', x=417,38, y=20,00, z=28,69], EntitySkeleton['Skeleton'/249, l='MpServer', x=421,22, y=21,00, z=24,50], EntityCreeper['Creeper'/250, l='MpServer', x=416,69, y=13,00, z=45,66]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2523) at net.minecraft.client.Minecraft.run(Minecraft.java:934) at net.minecraft.client.main.Main.main(Main.java:112) 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:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) – System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_05, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 825580592 bytes (787 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 17891 (1001896 bytes; 0 MB) allocated, 3629 (203224 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.211.1121} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.2.1121} [Minecraft Forge] (forgeSrc-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available modminecraft{1.0} [Mod Minecraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: GeForce GTX 650/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation 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: 22530 (1261680 bytes; 1 MB) allocated, 7629 (427224 bytes; 0 MB) used Anisotropic Filtering: Off (1)
-
at mod.common.RenderFlechette.doRender(RenderFlechette.java:44)
Tu peux envoyer la ligne 44 dans la classe RenderFlechette ? -
this.bindEntityTexture(par1EntityFlechette);
Mais je viens de découvrir quelque chose vois tu ^^ Je viens de créer un nouveau mob avec model etc mais mtn quand je tire avec ma sarbacane c’est mon nouveau mob qui sort Oo Donc est-ce qu’il faut un model pour la flèche ? Aussi ma textures de mon mob que j’ai créer ne se load pas alors que j’ai bien mis sa
@Override
protected ResourceLocation getEntityTexture(Entity var1) {
return new ResourceLocation(ModMinecraft.MODID + “textures/entity/frog.png”);
}je pense que j’ai du oublier quelque chose pour ce qui est de mes flèches
-
Heu tu peux réexpliqué ça car j’ai pas tout suivis x)
Ça ne crash plus maintenant mais il y a le mauvais rendu si c’est j’ai bien compris ? -
Tout à fait donc pendant que tu essayais de régler le soucis moi de mon coter j’ai créer un nouveau mob , je l’ai register dans le proxy et dans ma classe principale et maintenant quand j’utilise ma sarbacane c’est le mob que je viens de créer qui sort alors que dans ma classes entityFlechette il est bien mis d’utiliser itemFlechette dans le dossier entity donc je ne comprend pas x-)
Halalalalalalala j’apporte de bonne nouvelle j’ai changer dans mon RenderFlechette
public class RenderFlechette extends Render { public final ResourceLocation FlechetteTextures = new ResourceLocation(ModMinecraft.MODID, "textures/entity/itemFlechette.png"); protected ResourceLocation getEntityTexture(EntityFlechette par1EntityFlechette) { return this.FlechetteTextures ; } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ private ResourceLocation getEntityFlechettesTexture(EntityFlechette RenderFlechetteun) { return FlechetteTextures; } ``` en ceci
public class RenderFlechette extends RenderLiving
{
public RenderFlechette(ModelBase par1ModelBase, float par2) {
super(par1ModelBase, par2);
}@Override
protected ResourceLocation getEntityTexture(Entity var1) {
return new ResourceLocation(ModMinecraft.MODID, “textures/entity/itemFlechette.png”);
}Et la texture est maintenant loader et la flèche est tirré !! Oh mon dieu , on y est ;) Pour la texture qui ne se loadais pas dans mon RenderFrog j'ai changer en ceci :
public class RenderFrog extends RenderLiving
{
public RenderFrog(ModelBase par1ModelBase, float par2) {
super(par1ModelBase, par2);
}@Override
protected ResourceLocation getEntityTexture(Entity var1) {
return new ResourceLocation(ModMinecraft.MODID, “textures/entity/frog.png”);
}
}Désolé je suis super content et ai je le droit de citer les pseudos "AlphaSwittleTeam" & "robin4002" dans mon mod info ?
-
Si tu veux oui.
Mets aussi la balise résolu ! -
Il me reste quand même le problème du cadre slowness qui apparaît dans l’inventaire alors qu’il ne devrait pas et je n’arrive pas a changer la durée.
-
Étrange pour le temps, normalement la durée est en tick.
Pour le cadre qui apparait dans l’inventaire, remplace
if(movingobjectposition.entityHit instanceof EntityLivingBase)
par :
if(movingobjectposition.entityHit instanceof EntityLivingBase && !this.worldObj.isRemote)Et enlève la fonction :
protected void onImpact(MovingObjectPosition mop) { Entity e = mop.entityHit; if (e != null && e instanceof EntityLivingBase) { ((EntityLivingBase) e).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 67, 1200)); } }