16 juil. 2020, 12:25

Bonjour, j’ai créé une entité (que la base) : une fusée et une dimension.
Je voudrais que la fusée emporte le joueur jusqu’à la couche 256 puis se téléporte sur ma dimension.

Class de ma fusée :

public class EntityFuse extends Entity
{

    public EntityFuse(World worldIn, double posX, double posY, double posZ)
    {
        super(worldIn);
        this.setPosition(posX, posY, posZ);
        this.prevPosX = posX;
        this.prevPosY = posY;
        this.prevPosZ = posZ;
        this.motionY = -0.20000000298023224D;
    }

    public EntityFuse(World worldIn)
    {
        super(worldIn);
    }
    
    @Override
    protected void entityInit()
    {

    }

    @Override
    protected void readEntityFromNBT(NBTTagCompound compound)
    {
        // TODO Auto-generated method stub

    }

    @Override
    protected void writeEntityToNBT(NBTTagCompound compound)
    {
        // TODO Auto-generated method stub

    }

    @Override
    public void onEntityUpdate()
    {
        this.posY++;
    }

    @Override
    public boolean canBeAttackedWithItem()
    {
        return false;
    }

}