• Bonjour 😛 j’ai codé un requins avec render ect en simple mob il fonctionne correctement mais quand je l’ai passez en entitywatermob

    Ils me font un rapport de log

    
    2014-01-26 20:24:41 [Avertissement] [Minecraft-Server] Skipping Entity with id 3
    2014-01-26 20:24:41 [Infos] [STDERR] java.lang.reflect.InvocationTargetException
    2014-01-26 20:24:41 [Infos] [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2014-01-26 20:24:41 [Infos] [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2014-01-26 20:24:41 [Infos] [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2014-01-26 20:24:41 [Infos] [STDERR] at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.entity.EntityList.createEntityByID(EntityList.java:205)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.item.ItemMonsterPlacer.spawnCreature(ItemMonsterPlacer.java:175)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.item.ItemMonsterPlacer.onItemUse(ItemMonsterPlacer.java:81)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:153)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.item.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:434)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.network.NetServerHandler.handlePlace(NetServerHandler.java:556)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.network.packet.Packet15Place.processPacket(Packet15Place.java:79)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:691)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:587)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
    2014-01-26 20:24:41 [Infos] [STDERR] Caused by: java.lang.NullPointerException
    2014-01-26 20:24:41 [Infos] [STDERR] at opu.common.EntityAniZob.applyEntityAttributes(EntityAniZob.java:34)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:193)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.entity.EntityLiving.<init>(EntityLiving.java:85)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.entity.EntityCreature.<init>(EntityCreature.java:40)
    2014-01-26 20:24:41 [Infos] [STDERR] at net.minecraft.entity.passive.EntityWaterMob.<init>(EntityWaterMob.java:12)
    2014-01-26 20:24:41 [Infos] [STDERR] at opu.common.EntityAniZob.<init>(EntityAniZob.java:17)
    2014-01-26 20:24:41 [Infos] [STDERR] … 20 more
    2014-01-26 20:24:41 [Avertissement] [Minecraft-Server] Skipping Entity with id 3
    2014-01-26 20:24:42 [Infos] [Minecraft-Server] Saving and pausing game…
    2014-01-26 20:24:42 [Infos] [Minecraft-Server] Saving chunks for level 'New Worldg'/Overworld
    2014-01-26 20:24:42 [Infos] [Minecraft-Server] Saving chunks for level 'New Worldg'/Nether
    2014-01-26 20:24:42 [Infos] [Minecraft-Server] Saving chunks for level 'New Worldg'/The End
    2014-01-26 20:24:57 [Infos] [STDERR] java.lang.reflect.InvocationTargetException
    2014-01-26 20:24:57 [Infos] [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2014-01-26 20:24:57 [Infos] [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2014-01-26 20:24:57 [Infos] [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2014-01-26 20:24:57 [Infos] [STDERR] at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.entity.EntityList.createEntityByID(EntityList.java:205)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.item.ItemMonsterPlacer.spawnCreature(ItemMonsterPlacer.java:175)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.item.ItemMonsterPlacer.onItemUse(ItemMonsterPlacer.java:81)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:153)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.item.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:434)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.network.NetServerHandler.handlePlace(NetServerHandler.java:556)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.network.packet.Packet15Place.processPacket(Packet15Place.java:79)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:691)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:587)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
    2014-01-26 20:24:57 [Infos] [STDERR] Caused by: java.lang.NullPointerException
    2014-01-26 20:24:57 [Infos] [STDERR] at opu.common.EntityAniZob.applyEntityAttributes(EntityAniZob.java:34)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:193)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.entity.EntityLiving.<init>(EntityLiving.java:85)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.entity.EntityCreature.<init>(EntityCreature.java:40)
    2014-01-26 20:24:57 [Infos] [STDERR] at net.minecraft.entity.passive.EntityWaterMob.<init>(EntityWaterMob.java:12)
    2014-01-26 20:24:57 [Infos] [STDERR] at opu.common.EntityAniZob.<init>(EntityAniZob.java:17)
    2014-01-26 20:24:57 [Infos] [STDERR] … 20 more
    2014-01-26 20:24:57 [Avertissement] [Minecraft-Server] Skipping Entity with id 3
    
    

    Classe java du mob

    
    package opu.common;
    
    import net.minecraft.entity.EntityCreature;
    import net.minecraft.entity.SharedMonsterAttributes;
    import net.minecraft.entity.monster.EntityMob;
    import net.minecraft.entity.passive.EntityWaterMob;
    import net.minecraft.world.World;
    
    public class EntityAniZob extends EntityWaterMob
    
    {
    
    public EntityAniZob(World world)
    
    {
    
    super(world);
    
    }
    
    protected void applyEntityAttributes()
    
    {
    
    super.applyEntityAttributes();
    
    this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(40D);
    this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute (40.0D);
    this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.69);
    this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(8.0D);
    
    }
    }
    
    ```</init></init></init></init></init></init></init></init></init></init>
  • Administrateurs Rédacteurs Moddeurs confirmés

    this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(8.0D)?;
    Supprime cette ligne, les mobs marins ne peuvent pas avoir cette attribue.


  • Arf on peux donc pas faire un requin qui attaque :?

  • Modérateurs

    Tu peux à condition de faire tes propres IA.