@‘robin4002’:
Salut,
Envoie les codes en entité + le rapport de crash.
Voici la class de l’entité :
| |
| package mods.maxiworldcraft.mineKingdomHeartsmod.common; |
| |
| import net.minecraft.entity.Entity; |
| import net.minecraft.entity.SharedMonsterAttributes; |
| import net.minecraft.entity.ai.EntityAIAttackOnCollide; |
| import net.minecraft.entity.ai.EntityAIAvoidEntity; |
| import net.minecraft.entity.ai.EntityAIHurtByTarget; |
| import net.minecraft.entity.ai.EntityAINearestAttackableTarget; |
| import net.minecraft.entity.ai.EntityAISwimming; |
| import net.minecraft.entity.ai.EntityAIWander; |
| import net.minecraft.entity.monster.EntityMob; |
| import net.minecraft.entity.player.EntityPlayer; |
| import net.minecraft.item.Item; |
| import net.minecraft.item.ItemStack; |
| import net.minecraft.util.ChatComponentTranslation; |
| import net.minecraft.util.DamageSource; |
| import net.minecraft.world.EnumDifficulty; |
| import net.minecraft.world.World; |
| |
| public class EntityReflet extends EntityMob |
| { |
| private int stareTimer; |
| private boolean isAggressive; |
| |
| public EntityReflet(World par1World) |
| { |
| super(par1World); |
| |
| this.tasks.addTask(3, new EntityAIAvoidEntity(this, EntityEffrayeur.class, 6.0F, 0.45D, 0.45D)); |
| this.tasks.addTask(5, new EntityAIWander(this, 0.45D)); |
| this.tasks.addTask(1, new EntityAISwimming(this)); |
| this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 0.70D, false)); |
| this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); |
| this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); |
| } |
| |
| |
| |
| public boolean isAIEnabled() |
| { |
| return false; |
| } |
| |
| |
| |
| |
| |
| protected Entity findPlayerToAttack() |
| { |
| |
| if (this.isEntityAlive()) |
| { |
| EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D); |
| |
| |
| |
| |
| entityplayer.addChatComponentMessage(new ChatComponentTranslation("tile.seifer.voleur1", new Object[0])); |
| entityplayer.addChatComponentMessage(new ChatComponentTranslation("tile.reflet.informationVoleur1", new Object[0])); |
| this.playSound("modminekingdomhearts:informationSE", this.getSoundVolume(), this.getSoundPitch()); |
| return entityplayer != null && this.canEntityBeSeen(entityplayer) ? entityplayer : null; |
| |
| } |
| return null; |
| } |
| |
| protected String getLivingSound() |
| { |
| return null; |
| } |
| |
| public void applyEntityAttributes() |
| { |
| super.applyEntityAttributes(); |
| this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(24D); |
| this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(4D); |
| this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.67D); |
| this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(0.5D); |
| |
| } |
| } |
| |
Voici le crash-report :
| |
| –-- Minecraft Crash Report ---- |
| |
| |
| Time: 24/05/14 13:51 |
| Description: Ticking entity |
| |
| java.lang.NullPointerException: Ticking entity |
| at mods.maxiworldcraft.mineKingdomHeartsmod.common.EntityReflet.findPlayerToAttack(EntityReflet.java:58) |
| at net.minecraft.entity.EntityCreature.updateEntityActionState(EntityCreature.java:64) |
| at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:1993) |
| at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431) |
| at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:39) |
| at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1820) |
| at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250) |
| at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47) |
| at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2254) |
| at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:697) |
| at net.minecraft.world.World.updateEntity(World.java:2214) |
| at net.minecraft.world.World.updateEntities(World.java:2064) |
| at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:528) |
| at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:693) |
| at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:604) |
| at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) |
| at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) |
| at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:742) |
| |
| A detailed walkthrough of the error, its code path and all known details is as follows: |
| --------------------------------------------------------------------------------------- |
| |
| -- Head -- |
| Stacktrace: |
| at mods.maxiworldcraft.mineKingdomHeartsmod.common.EntityReflet.findPlayerToAttack(EntityReflet.java:58) |
| at net.minecraft.entity.EntityCreature.updateEntityActionState(EntityCreature.java:64) |
| at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:1993) |
| at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431) |
| at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:39) |
| at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1820) |
| at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250) |
| at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:47) |
| at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2254) |
| at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:697) |
| at net.minecraft.world.World.updateEntity(World.java:2214) |
| |
| -- Entity being ticked -- |
| Details: |
| Entity Type: reflet (mods.maxiworldcraft.mineKingdomHeartsmod.common.EntityReflet) |
| Entity ID: 199776 |
| Entity Name: Reflet |
| Entity's Exact location: -1630,41, 56,00, -1082,71 |
| Entity's Block location: World: (-1631,56,-1083), Chunk: (at 1,3,5 in -102,-68; contains blocks -1632,0,-1088 to -1617,255,-1073), Region: (-4,-3; contains chunks -128,-96 to -97,-65, blocks -2048,0,-1536 to -1537,255,-1025) |
| Entity's Momentum: -0,02, -0,08, 0,06 |
| Stacktrace: |
| at net.minecraft.world.World.updateEntities(World.java:2064) |
| at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:528) |
| |
| -- Affected level -- |
| Details: |
| Level name: New World |
| All players: 1 total; [EntityPlayerMP['Julot10085'/152583, l='New World', x=-1630,16, y=56,00, z=-1083,41]] |
| Chunk stats: ServerChunkCache: 562 Drop: 0 |
| Level seed: 2573386486296553879 |
| Level generator: ID 01 - flat, ver 0\. Features enabled: true |
| Level generator options: 2;7,3x1,52x24;2; |
| Level spawn location: World: (-1641,4,-1050), Chunk: (at 7,0,6 in -103,-66; contains blocks -1648,0,-1056 to -1633,255,-1041), Region: (-4,-3; contains chunks -128,-96 to -97,-65, blocks -2048,0,-1536 to -1537,255,-1025) |
| Level time: 2696 game time, 2696 day time |
| Level dimension: 0 |
| Level storage version: 0x04ABD - Anvil |
| Level weather: Rain time: 113857 (now: false), thunder time: 70816 (now: false) |
| Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: true |
| Stacktrace: |
| at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:693) |
| at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:604) |
| at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) |
| at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) |
| at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:742) |
| |
| – System Details -- |
| Details: |
| Minecraft Version: 1.7.2 |
| Operating System: Windows XP (x86) version 5.1 |
| Java Version: 1.7.0_55, Oracle Corporation |
| Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation |
| Memory: 793934464 bytes (757 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB) |
| JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M |
| AABB Pool Size: 106 (5936 bytes; 0 MB) allocated, 3 (168 bytes; 0 MB) used |
| IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 |
| FML: MCP v9.01-pre FML v7.2.156.1061 Minecraft Forge 10.12.1.1061 4 mods loaded, 4 mods active |
| mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available |
| FML{7.2.156.1061} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.1.1061.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available |
| Forge{10.12.1.1061} [Minecraft Forge] (forgeSrc-1.7.2-10.12.1.1061.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available |
| modminekingdomhearts{1.0} [Mod MineKingdom Hearts] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available->Available |
| Profiler Position: N/A (disabled) |
| Vec3 Pool Size: 28 (1568 bytes; 0 MB) allocated, 1 (56 bytes; 0 MB) used |
| Player Count: 1 / 8; [EntityPlayerMP['Julot10085'/152583, l='New World', x=-1630,16, y=56,00, z=-1083,41]] |
| Type: Integrated Server (map_client.txt) |
| Is Modded: Definitely; Client brand changed to 'fml,forge' |
| |
| |
PS = Après que le jeu ait crashé si je me suis fait tué par mon mob , plus possible de retourner sur la map elle crash directe