не спавнится существо

Версия Minecraft
1.6.4

jopi

Попрошайка
1,421
30
260
Может я вообще тупой, почему он не спавнится ВООБЩЕ?

Java:
package by.fxg.realisto.client.modules.paw.entity;

import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;

public class EntityRock extends Entity {
    public float hoverStart;
    public int lifespan = 6000;
    
    public EntityRock(World par1World) {
        super(par1World);
        this.lifespan = 6000;
        this.hoverStart = (float) (Math.random() * Math.PI * 2.0D);
    }
    
    @Override
    public void onUpdate() {
//        this.lifespan--;
//        if (this.lifespan <= 0) {
//            this.setDead();
//            return;
//        }
        this.prevPosX = this.posX;
        this.prevPosY = this.posY;
        this.prevPosZ = this.posZ;
        this.motionY -= 0.03999999910593033D;
        this.noClip = this.pushOutOfBlocks(this.posX, (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D, this.posZ);
    }

    public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
        par1NBTTagCompound.setInteger("Lifespan", lifespan);
    }

    public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
        if (par1NBTTagCompound.hasKey("Lifespan")) {
            lifespan = par1NBTTagCompound.getInteger("Lifespan");
        }
    }
    
    protected boolean canTriggerWalking() {return false;}
    public boolean handleWaterMovement() {return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);}
    protected void dealFireDamage(int par1) {}
    public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) {return false;}
    public void onCollideWithPlayer(EntityPlayer par1EntityPlayer) {}
    public String getEntityName() {return "Камень";}
    public boolean canAttackWithItem() {return false;}
    protected void entityInit() {}
}
Существо зарегал, яйцо есть.+
Рендер сделал RenderArrow
 

jopi

Попрошайка
1,421
30
260
@Agravaine :j

Java:
2020-01-03 19:52:01 [INFO] [STDERR] java.lang.reflect.InvocationTargetException
2020-01-03 19:52:01 [INFO] [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2020-01-03 19:52:01 [INFO] [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
2020-01-03 19:52:01 [INFO] [STDERR]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
2020-01-03 19:52:01 [INFO] [STDERR]     at java.lang.reflect.Constructor.newInstance(Unknown Source)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.entity.EntityList.createEntityByID(EntityList.java:205)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.item.ItemMonsterPlacer.spawnCreature(ItemMonsterPlacer.java:175)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.item.ItemMonsterPlacer.onItemUse(ItemMonsterPlacer.java:81)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:153)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.item.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:434)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.network.NetServerHandler.handlePlace(NetServerHandler.java:556)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.network.packet.Packet15Place.processPacket(Packet15Place.java:79)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:141)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:54)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:691)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:587)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2020-01-03 19:52:01 [INFO] [STDERR] Caused by: java.lang.NullPointerException
2020-01-03 19:52:01 [INFO] [STDERR]     at by.fxg.realisto.client.modules.paw.entity.EntityRock.applyEntityAttributes(EntityRock.java:35)
2020-01-03 19:52:01 [INFO] [STDERR]     at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:193)
2020-01-03 19:52:01 [INFO] [STDERR]     at by.fxg.realisto.client.modules.paw.entity.EntityRock.<init>(EntityRock.java:26)
2020-01-03 19:52:01 [INFO] [STDERR]     ... 20 more
2020-01-03 19:52:01 [WARNING] [Minecraft-Server] Skipping Entity with id 1
 

jopi

Попрошайка
1,421
30
260
@Agravaine :j короче починил костылями

Java:
package by.fxg.realisto.client.modules.paw.entity;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.item.ItemExpireEvent;

public class EntityRock extends EntityCreature {
    public EntityRock(World par1World) {
        super(par1World);
        this.setSize(0.25F, 0.25F);
        this.motionX = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D));
        this.motionY = 0.20000000298023224D;
        this.motionZ = (double)((float)(Math.random() * 0.20000000298023224D - 0.10000000149011612D));
    }

    protected void applyEntityAttributes() {
        super.applyEntityAttributes();
        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(10.0D);
        this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.001D);
    }
    
    @Override
    public void onUpdate() {
        super.onUpdate();
        this.prevPosX = this.posX;
        this.prevPosY = this.posY;
        this.prevPosZ = this.posZ;
        this.motionY -= 0.03999999910593033D;
        this.noClip = this.pushOutOfBlocks(this.posX, (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D, this.posZ);
        this.moveEntity(this.motionX, this.motionY, this.motionZ);
        
        float f = 0.98F;
        if (this.onGround) {
            f = 0.58800006F;
            int i = this.worldObj.getBlockId(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ));
            if (i > 0) {
                f = Block.blocksList[i].slipperiness * 0.98F;
            }
        }

        this.motionX *= (double)f;
        this.motionY *= 0.9800000190734863D;
        this.motionZ *= (double)f;
        if (this.onGround) {
            this.motionY *= -0.5D;
        }
    }
}

EntityRegistry.registerModEntity(EntityRock.class, "EntityRock", this.nextMobID("EntityRock"), RealistoBase.instance, 20, 80, true);
 
Сверху