Résolu Crash entity particules
-
Récemment j’ai du créer un fumigène, sauf que je voulais que le fumigène soit tout le temps visible même en enlevant les particules. Je pense que çà en est la cause même si je n’arrive pas à comprendre pourquoi :
Le code où les particules sont appelées :
public void performAction(MovingObjectPosition mop) { switch (this.metadata) { case 1: if (this.fuse > 0) { for (int i = 0; i < 4; i++) { Minecraft mc = Minecraft.getMinecraft(); if (mc.renderViewEntity != null && mc.effectRenderer != null) { float multi = 1.6F; double x = this.posX + this.rand.nextGaussian() * multi; double y = this.posY + ((this.rand.nextDouble() - 0.2D) * 3) * multi; double z = this.posZ + this.rand.nextGaussian() * multi; double d = mc.renderViewEntity.posX - x; double d1 = mc.renderViewEntity.posY - y; double d2 = mc.renderViewEntity.posZ - z; if (d * d + d1 * d1 + d2 * d2 <= 4096.0D) mc.effectRenderer.addEffect(new EntitySmokeFX(this.worldObj, x, y, z, 0.0D, 0.0D, 0.0D, 5.0F)); // On vérifie que le joueur est à moins de 64 blocks de distance et on crée la particule } } if (this.fuse >= 200) this.setDead(); } break; default: if (!this.worldObj.isRemote && this.fuse >= 40 || (mop != null && mop.entityHit != null)) { this.setDead(); this.worldObj.createExplosion(this, this.posX, this.posY + 1.0D, this.posZ, 3.4F, this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing")); } break; } }
[18:22:55] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Ticking entity at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:709) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?] Caused by: java.lang.NullPointerException at net.minecraft.entity.Entity.moveEntity(Entity.java:709) ~[Entity.class:?] at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1680) ~[EntityLivingBase.class:?] at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2023) ~[EntityLivingBase.class:?] at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431) ~[EntityLiving.class:?] at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:39) ~[EntityMob.class:?] at net.minecraft.entity.monster.EntityZombie.onLivingUpdate(EntityZombie.java:243) ~[EntityZombie.class:?] at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816) ~[EntityLivingBase.class:?] at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250) ~[EntityLiving.class:?] at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47) ~[EntityMob.class:?] at net.minecraft.entity.monster.EntityZombie.onUpdate(EntityZombie.java:335) ~[EntityZombie.class:?] at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684) ~[WorldServer.class:?] at net.minecraft.world.World.updateEntity(World.java:2258) ~[World.class:?] at net.minecraft.world.World.updateEntities(World.java:2108) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) ~[MinecraftServer.class:?] … 4 more [18:22:55] [Server thread/ERROR]: This crash report has been saved to: D:\minecraft\modding forge\Hilium\eclipse\.\crash-reports\crash-2015-07-01_18.22.55-server.txt [18:22:55] [Server thread/INFO]: Stopping server [18:22:55] [Server thread/INFO]: Saving players [18:22:55] [Server thread/INFO]: Saving worlds [18:22:55] [Server thread/INFO]: Saving chunks for level 'faty world'/Overworld [18:22:55] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ---- // Who set us up the TNT? Time: 01/07/15 18:22 Description: Ticking entity java.lang.NullPointerException: Ticking entity at net.minecraft.entity.Entity.moveEntity(Entity.java:709) at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1680) at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2023) at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431) at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:39) at net.minecraft.entity.monster.EntityZombie.onLivingUpdate(EntityZombie.java:243) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816) at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250) at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47) at net.minecraft.entity.monster.EntityZombie.onUpdate(EntityZombie.java:335) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684) at net.minecraft.world.World.updateEntity(World.java:2258) at net.minecraft.world.World.updateEntities(World.java:2108) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.entity.Entity.moveEntity(Entity.java:709) at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1680) at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2023) at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431) at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:39) at net.minecraft.entity.monster.EntityZombie.onLivingUpdate(EntityZombie.java:243) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1816) at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250) at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47) at net.minecraft.entity.monster.EntityZombie.onUpdate(EntityZombie.java:335) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684) at net.minecraft.world.World.updateEntity(World.java:2258) -- Entity being ticked -- Details: Entity Type: Zombie (net.minecraft.entity.monster.EntityZombie) Entity ID: 67608 Entity Name: Zombie Entity's Exact location: -184,50, 16,00, -123,50 Entity's Block location: World: (-185,16,-124), Chunk: (at 7,1,4 in -12,-8; contains blocks -192,0,-128 to -177,255,-113), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1) Entity's Momentum: 0,00, -0,08, 0,00 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:2108) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) -- Affected level -- Details: Level name: faty world All players: 1 total; [EntityPlayerMP['SCAREXgaming'/19, l='faty world', x=-212,15, y=59,61, z=-107,30]] Chunk stats: ServerChunkCache: 457 Drop: 0 Level seed: -5653420333754846043 Level generator: ID 01 - flat, ver 0\. Features enabled: false Level generator options: 2;7,3x1,52x24;2; Level spawn location: World: (-173,4,-160), Chunk: (at 3,0,0 in -11,-10; contains blocks -176,0,-160 to -161,255,-145), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1) Level time: 48175 game time, 1000 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 21251 (now: false), thunder time: 114019 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_71, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 2167294096 bytes (2066 MB) / 2353528832 bytes (2244 MB) up to 4772069376 bytes (4551 MB) JVM Flags: 2 total; -Xmx5G -Xms2G AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 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 UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCHIJAAAA hilium{1.0.0} [Hilium Mod] (bin) GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['SCAREXgaming'/19, l='faty world', x=-212,15, y=59,61, z=-107,30]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [18:22:55] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-07-01_18.22.55-server.txt [18:22:55] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [18:22:55] [Server thread/INFO]: Saving chunks for level 'faty world'/Nether [18:22:55] [Server thread/INFO]: Saving chunks for level 'faty world'/The End [18:22:55] [Server thread/INFO] [FML]: Unloading dimension 0 [18:22:55] [Server thread/INFO] [FML]: Unloading dimension -1 [18:22:55] [Server thread/INFO] [FML]: Unloading dimension 1 [18:22:55] [Server thread/INFO] [FML]: Applying holder lookups [18:22:55] [Server thread/INFO] [FML]: Holder lookups applied [18:22:55] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [18:22:55] [Client thread/INFO] [FML]: Server terminated. AL lib: (EE) alc_cleanup: 1 device not closed
à chaque fois l’entité change, une fois j’ai une poule, une autre fois un item sur le sol. Je pensais avoir corriger le bug en ajoutant le fait que si le joueur est trop loin, les particules ne sont plus rendus mais çà ne l’a corrigé que pendant un moment. Le crash ne se produit que lorsque je lance le fumigène ou quand je me reconnecte sur le monde.
-
at net.minecraft.entity.Entity.moveEntity(Entity.java:709) ~[Entity.class:?]
Il y a quoi ici ? -
C’est l’entité de base, voilà :
List list = this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox.addCoord(p_70091_1_, p_70091_3_, p_70091_5_)); for (int i = 0; i < list.size(); ++i) { p_70091_3_ = ((AxisAlignedBB)list.get(i)).calculateYOffset(this.boundingBox, p_70091_3_); } this.boundingBox.offset(0.0D, p_70091_3_, 0.0D); if (!this.field_70135_K && d7 != p_70091_3_) { p_70091_5_ = 0.0D; p_70091_3_ = 0.0D; p_70091_1_ = 0.0D; } boolean flag1 = this.onGround || d7 != p_70091_3_ && d7 < 0.0D; int j; for (j = 0; j < list.size(); ++j) { p_70091_1_ = ((AxisAlignedBB)list.get(j)).calculateXOffset(this.boundingBox, p_70091_1_); // 709 }
Le seul NPE que je vois ici c’est la méthode calculateXOffset qui peut être appliquée à un élément null, mais si cet élément est null, pourquoi il n’y a pas de NPE dans la première boucle ?
-
La ligne 709 c’est laquelle exactement ?
-
“p_70091_1_ = ((AxisAlignedBB)list.get(j)).calculateXOffset(this.boundingBox, p_70091_1_); // 709”
-
Ah, cette fois ci c’est même plus un mob, c’est une particule !
[18:43:47] [Client thread/FATAL]: Reported exception thrown! net.minecraft.util.ReportedException: Ticking Particle at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:102) ~[EffectRenderer.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:2147) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1040) ~[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.7.0_71] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.entity.Entity.moveEntity(Entity.java:692) ~[Entity.class:?] at net.minecraft.client.particle.EntitySmokeFX.onUpdate(EntitySmokeFX.java:71) ~[EntitySmokeFX.class:?] at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:79) ~[EffectRenderer.class:?] … 12 more [18:43:47] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ---- // This doesn't make any sense! Time: 01/07/15 18:43 Description: Ticking Particle java.lang.NullPointerException: Ticking Particle at net.minecraft.entity.Entity.moveEntity(Entity.java:692) at net.minecraft.client.particle.EntitySmokeFX.onUpdate(EntitySmokeFX.java:71) at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:79) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2147) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1040) at net.minecraft.client.Minecraft.run(Minecraft.java:962) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.entity.Entity.moveEntity(Entity.java:692) at net.minecraft.client.particle.EntitySmokeFX.onUpdate(EntitySmokeFX.java:71) -- Particle being ticked -- Details: Particle: EntitySmokeFX, Pos (-193.49542296364143,54.899999998509884,-123.5257028668937), RGBA (0.09722708,0.09722708,0.09722708,1.0), Age 6 Particle Type: MISC_TEXTURE Stacktrace: at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:79) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['SCAREXgaming'/108, l='MpServer', x=-210,60, y=61,98, z=-104,42]] Chunk stats: MultiplayerChunkCache: 125, 125 Level seed: 0 Level generator: ID 01 - flat, ver 0\. Features enabled: false Level generator options: Level spawn location: World: (-173,4,-160), Chunk: (at 3,0,0 in -11,-10; contains blocks -176,0,-160 to -161,255,-145), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1) Level time: 48445 game time, 1000 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: 76 total; [EntityZombie['Zombie'/11, l='MpServer', x=-283,50, y=31,00, z=-120,50], EntityBat['Bat'/12, l='MpServer', x=-282,05, y=22,00, z=-96,29], EntityZombie['Zombie'/13, l='MpServer', x=-279,06, y=1,00, z=-90,50], EntityZombie['Zombie'/14, l='MpServer', x=-278,13, y=2,00, z=-90,47], EntityZombie['Zombie'/15, l='MpServer', x=-272,50, y=1,00, z=-89,50], EntitySkeleton['Skeleton'/17, l='MpServer', x=-276,50, y=24,00, z=-88,50], EntitySkeleton['Skeleton'/16, l='MpServer', x=-279,50, y=18,00, z=-87,50], EntityBat['Bat'/19, l='MpServer', x=-263,02, y=7,49, z=-120,31], EntitySkeleton['Skeleton'/18, l='MpServer', x=-278,50, y=24,00, z=-90,50], EntityBat['Bat'/21, l='MpServer', x=-265,00, y=5,10, z=-82,59], EntitySkeleton['Skeleton'/20, l='MpServer', x=-264,50, y=30,00, z=-107,50], EntityBat['Bat'/23, l='MpServer', x=-258,43, y=4,65, z=-79,25], EntityZombie['Zombie'/22, l='MpServer', x=-271,50, y=2,00, z=-88,50], EntitySkeleton['Skeleton'/25, l='MpServer', x=-257,50, y=16,00, z=-82,50], EntityZombie['Zombie'/24, l='MpServer', x=-262,50, y=23,00, z=-85,50], EntitySpider['Spider'/27, l='MpServer', x=-243,22, y=29,00, z=-113,34], EntityZombie['Zombie'/29, l='MpServer', x=-240,50, y=29,00, z=-105,50], EntitySkeleton['Skeleton'/28, l='MpServer', x=-243,50, y=30,00, z=-111,50], EntityBat['Bat'/31, l='MpServer', x=-253,31, y=3,00, z=-83,42], EntitySkeleton['Skeleton'/30, l='MpServer', x=-251,63, y=9,00, z=-80,90], EntityZombie['Zombie'/32, l='MpServer', x=-250,00, y=8,00, z=-77,56], EntitySkeleton['Skeleton'/33, l='MpServer', x=-250,50, y=21,00, z=-79,50], EntityCreeper['Creeper'/38, l='MpServer', x=-233,50, y=31,00, z=-111,50], EntityZombie['Zombie'/39, l='MpServer', x=-233,50, y=29,00, z=-105,50], EntitySkeleton['Skeleton'/36, l='MpServer', x=-226,66, y=1,00, z=-102,22], EntityItem['item.item.rottenFlesh'/37, l='MpServer', x=-229,47, y=1,13, z=-102,91], EntityItem['item.item.sulphur'/42, l='MpServer', x=-231,88, y=4,13, z=-82,44], EntityBat['Bat'/43, l='MpServer', x=-224,30, y=6,77, z=-89,53], EntityZombie['Zombie'/40, l='MpServer', x=-227,50, y=7,00, z=-84,50], EntityCreeper['Creeper'/41, l='MpServer', x=-240,59, y=4,28, z=-80,53], EntityCreeper['Creeper'/44, l='MpServer', x=-234,50, y=29,00, z=-95,50], EntityBat['Bat'/55, l='MpServer', x=-209,30, y=11,08, z=-113,89], EntityZombie['Zombie'/59, l='MpServer', x=-212,50, y=4,00, z=-97,50], EntityCreeper['Creeper'/58, l='MpServer', x=-218,31, y=47,00, z=-127,50], EntityZombie['Zombie'/57, l='MpServer', x=-210,66, y=31,00, z=-116,66], EntityBat['Bat'/56, l='MpServer', x=-211,44, y=30,10, z=-121,78], EntitySpider['Spider'/63, l='MpServer', x=-214,53, y=5,00, z=-88,72], EntityCreeper['Creeper'/62, l='MpServer', x=-216,97, y=4,00, z=-93,41], EntitySkeleton['Skeleton'/61, l='MpServer', x=-221,50, y=27,00, z=-97,50], EntitySkeleton['Skeleton'/60, l='MpServer', x=-221,50, y=30,00, z=-100,50], EntityCreeper['Creeper'/68, l='MpServer', x=-216,50, y=18,00, z=-92,50], EntityBat['Bat'/64, l='MpServer', x=-221,25, y=11,10, z=-81,75], EntityZombie['Zombie'/65, l='MpServer', x=-222,50, y=11,00, z=-82,50], EntityCreeper['Creeper'/66, l='MpServer', x=-213,50, y=10,00, z=-87,50], EntityCreeper['Creeper'/67, l='MpServer', x=-215,50, y=10,00, z=-86,50], EntitySkeleton['Skeleton'/76, l='MpServer', x=-207,50, y=39,00, z=-178,50], EntityBat['Bat'/77, l='MpServer', x=-200,75, y=32,10, z=-183,50], EntityZombie['Zombie'/78, l='MpServer', x=-197,50, y=34,00, z=-179,50], EntitySpider['Spider'/79, l='MpServer', x=-196,50, y=29,00, z=-159,50], EntityCreeper['Creeper'/74, l='MpServer', x=-200,50, y=29,00, z=-184,50], EntityBat['Bat'/85, l='MpServer', x=-201,50, y=29,10, z=-135,75], EntityZombie['Zombie'/84, l='MpServer', x=-197,50, y=31,00, z=-143,50], EntityZombie['Zombie'/87, l='MpServer', x=-204,31, y=31,00, z=-140,50], EntityCreeper['Creeper'/86, l='MpServer', x=-197,50, y=21,00, z=-130,50], EntityZombie['Zombie'/81, l='MpServer', x=-196,50, y=29,00, z=-151,50], EntityZombie['Zombie'/80, l='MpServer', x=-195,50, y=26,00, z=-148,50], EntityCreeper['Creeper'/83, l='MpServer', x=-205,50, y=28,00, z=-136,50], EntitySkeleton['Skeleton'/93, l='MpServer', x=-203,50, y=16,00, z=-105,50], EntityCreeper['Creeper'/92, l='MpServer', x=-196,50, y=8,00, z=-102,50], EntityBat['Bat'/95, l='MpServer', x=-196,53, y=17,10, z=-105,28], EntitySkeleton['Skeleton'/94, l='MpServer', x=-205,50, y=16,00, z=-107,50], EntityZombie['Zombie'/89, l='MpServer', x=-202,72, y=1,00, z=-112,46], EntityCreeper['Creeper'/88, l='MpServer', x=-203,41, y=32,00, z=-137,38], EntityGrenade['entity.hilium.grenade.name'/91, l='MpServer', x=-194,69, y=54,86, z=-122,19], EntitySkeleton['Skeleton'/90, l='MpServer', x=-201,38, y=26,00, z=-125,91], EntityCreeper['Creeper'/102, l='MpServer', x=-182,50, y=11,00, z=-130,50], EntityCreeper['Creeper'/103, l='MpServer', x=-187,50, y=18,00, z=-140,50], EntityCreeper['Creeper'/100, l='MpServer', x=-181,50, y=4,00, z=-132,50], EntityCreeper['Creeper'/101, l='MpServer', x=-184,50, y=4,00, z=-132,50], EntityZombie['Zombie'/96, l='MpServer', x=-200,94, y=19,00, z=-108,59], EntityZombie['Zombie'/97, l='MpServer', x=-206,97, y=4,00, z=-93,47], EntityClientPlayerMP['SCAREXgaming'/108, l='MpServer', x=-210,60, y=61,98, z=-104,42], EntityZombie['Zombie'/106, l='MpServer', x=-184,50, y=16,00, z=-123,50], EntityWitch['Witch'/107, l='MpServer', x=-188,50, y=20,00, z=-123,50], EntityBat['Bat'/104, l='MpServer', x=-183,50, y=6,10, z=-121,94], EntityBat['Bat'/105, l='MpServer', x=-183,63, y=6,10, z=-124,25]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2567) at net.minecraft.client.Minecraft.run(Minecraft.java:983) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) – System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_71, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 1588896504 bytes (1515 MB) / 2058878976 bytes (1963 MB) up to 4772069376 bytes (4551 MB) JVM Flags: 2 total; -Xmx5G -Xms2G AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 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 UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCHIJAAAA hilium{1.0.0} [Hilium Mod] (bin) GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 347.09' Renderer: 'GeForce GTX 660/PCIe/SSE2' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.5.0 NVIDIA 347.09, 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: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: On (16) [18:43:47] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# D:\minecraft\modding forge\Hilium\eclipse\.\crash-reports\crash-2015-07-01_18.43.47-client.txt AL lib: (EE) alc_cleanup: 1 device not closed
-
Ah j’avais pas vu le commentaire x)
Franchement c’est étrange, je ne vois pas d’où ça vient -
Moi non plus, apparemment c’est une histoire de hitbox, sauf que les EntityItem et les particules n’en ont pas.
-
@‘SCAREX’:
Moi non plus, apparemment c’est une histoire de hitbox, sauf que les EntityItem et les particules n’en ont pas.
Bah si F3 + b en jeu et tu peux voir la hitbox des EntityItem
-
Bah si F3 + b en jeu et tu peux voir la hitbox des EntityItem, par-contre les particules non
-
Je parle de “hit” box donc boit de “collision” les EntityItem n’ont pas de boite de collision
-
Scarex, ils en ont une mais elle a difficile à voir, les EntityItem ne pourrait pas gérer la physique sinon…
Sent from my GT-I9000 using Tapatalk 2
-
Enfin bref, là n’est pas le problème : j’ai toujours un crash, j’essaie quelque chose avec les worldAcces du monde en utilisant l’ObfuscationHelper.
-
çà ne peux pas venir de là car la taille de la liste de WorldAccess est de 1. Toujours personne ?
J’ai regardé un peu le code et c’est clairement IMPOSSIBLE d’avoir un NPE à cet endroit, j’explique :
Le code est provoqué dans l’une de ces 2 boucles :for (int i = 0; i < list.size(); ++i) { p_70091_3_ = ((AxisAlignedBB)list.get(i)).calculateYOffset(this.boundingBox, p_70091_3_); } // 2 ème boucle for (j = 0; j < list.size(); ++j) { p_70091_1_ = ((AxisAlignedBB)list.get(j)).calculateXOffset(this.boundingBox, p_70091_1_); }
Le seul NPE possible est lors de l’appel de calculateYOffset ou calculateYOffset. Sauf que cette liste provient de la classe World :
public List getCollidingBoundingBoxes(Entity p_72945_1_, AxisAlignedBB p_72945_2_) { this.collidingBoundingBoxes.clear(); int i = MathHelper.floor_double(p_72945_2_.minX); int j = MathHelper.floor_double(p_72945_2_.maxX + 1.0D); int k = MathHelper.floor_double(p_72945_2_.minY); int l = MathHelper.floor_double(p_72945_2_.maxY + 1.0D); int i1 = MathHelper.floor_double(p_72945_2_.minZ); int j1 = MathHelper.floor_double(p_72945_2_.maxZ + 1.0D); for (int k1 = i; k1 < j; ++k1) { for (int l1 = i1; l1 < j1; ++l1) { if (this.blockExists(k1, 64, l1)) { for (int i2 = k - 1; i2 < l; ++i2) { Block block; if (k1 >= -30000000 && k1 < 30000000 && l1 >= -30000000 && l1 < 30000000) { block = this.getBlock(k1, i2, l1); } else { block = Blocks.stone; } block.addCollisionBoxesToList(this, k1, i2, l1, p_72945_2_, this.collidingBoundingBoxes, p_72945_1_); } } } } double d0 = 0.25D; List list = this.getEntitiesWithinAABBExcludingEntity(p_72945_1_, p_72945_2_.expand(d0, d0, d0)); for (int j2 = 0; j2 < list.size(); ++j2) // On parcours la liste des entités { AxisAlignedBB axisalignedbb1 = ((Entity)list.get(j2)).getBoundingBox(); // On récupère leur hitbox if (axisalignedbb1 != null && axisalignedbb1.intersectsWith(p_72945_2_)) // NullPointer check avec "axisalignedbb1 != null" { this.collidingBoundingBoxes.add(axisalignedbb1); } axisalignedbb1 = p_72945_1_.getCollisionBox((Entity)list.get(j2)); // même chose ici if (axisalignedbb1 != null && axisalignedbb1.intersectsWith(p_72945_2_)) { this.collidingBoundingBoxes.add(axisalignedbb1); // Donc ici on ne peut ajouter à la liste que des objets non null } } return this.collidingBoundingBoxes; // la liste retournée }
Et cette méthode n’est jamais ré-écrite. Pour moi c’est impossible. J’ai essayé de lancer en mode “run” au lieu de “debug” mais c’est toujours le même crash report : je vais reporter ce bug à MinecraftForge même si je ne comprends toujours pas comment c’est possible.
Lignes concernées :
Entity.class -> 688 à 724
World.class -> 1590 à 1646 -
Problème résolu : il fallait juste exécuter le code côter client. J’avais écarté cette thèse car la méthode world.spawnParticle doit être appelée côté serveur.