Package net.minecraft.entity

Examples of net.minecraft.entity.Entity


                vec31 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
            }

            this.rotationPitch += 1F;

            Entity entity = null;
            List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
            double d0 = 0.0D;
            int l;
            float f1;

            for (l = 0; l < list.size(); ++l)
            {
                Entity entity1 = list.get(l);

                if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5))
                {
                    f1 = 0.3F;
                    AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f1, f1, f1);
                    MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3, vec31);
View Full Code Here


      requirements.add(s);
    }
  }

  public void writeToWorld(IBuilderContext context) {
    Entity e = EntityList.createEntityFromNBT(entityNBT, context.world());
    context.world().spawnEntityInWorld(e);
  }
View Full Code Here

    NBTTagList nbttaglist = entityNBT.getTagList("Pos", 6);
    Position newPosition = new Position(nbttaglist.func_150309_d(0),
        nbttaglist.func_150309_d(1), nbttaglist.func_150309_d(2));

    for (Object o : context.world().loadedEntityList) {
      Entity e = (Entity) o;

      Position existingPositon = new Position(e.posX, e.posY, e.posZ);

      if (existingPositon.isClose(newPosition, 0.1F)) {
        return true;
View Full Code Here

            if (var4 != null)
            {
                var3 = Vec3.createVectorHelper(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
            }

            Entity var5 = null;
            final List<?> var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
            double var7 = 0.0D;
            final Iterator<?> var9 = var6.iterator();
            float var11;

            while (var9.hasNext())
            {
                final Entity var10 = (Entity) var9.next();

                if (var10.canBeCollidedWith() && (var10 != this.shootingEntity || this.ticksInAir >= 5))
                {
                    var11 = 0.3F;
                    final AxisAlignedBB var12 = var10.boundingBox.expand(var11, var11, var11);
                    final MovingObjectPosition var13 = var12.calculateIntercept(var17, var3);
View Full Code Here

                int shouldBeMountedId = buffer.readInt();
                if (this.riddenByEntity == null)
                {
                   if (shouldBeMountedId > -1)
                   {
                     Entity e = FMLClientHandler.instance().getWorldClient().getEntityByID(shouldBeMountedId);
                     if (e != null)
                     {
                       if (e.dimension != this.dimension)
                       {
                       if (e instanceof EntityPlayer)
                       {
                         e = WorldUtil.forceRespawnClient(this.dimension, e.worldObj.difficultySetting.getDifficultyId(), e.worldObj.getWorldInfo().getTerrainType().getWorldTypeName(), ((EntityPlayerMP)e).theItemInWorldManager.getGameType().getID());
                           e.mountEntity(this);
                         }
                       }
                       else
                         e.mountEntity(this);
                     }
                   }
                }
                else if (this.riddenByEntity.getEntityId() != shouldBeMountedId)
                {
                  if (shouldBeMountedId == -1)
                  {
                    this.riddenByEntity.mountEntity(null);
                  }
                  else
                  {
                    Entity e = FMLClientHandler.instance().getWorldClient().getEntityByID(shouldBeMountedId);
                      if (e != null)
                      {
                      if (e.dimension != this.dimension)
                      {
                   if (e instanceof EntityPlayer)
                   {
                     e = WorldUtil.forceRespawnClient(this.dimension, e.worldObj.difficultySetting.getDifficultyId(), e.worldObj.getWorldInfo().getTerrainType().getWorldTypeName(), ((EntityPlayerMP)e).theItemInWorldManager.getGameType().getID());
                          e.mountEntity(this);
                        }
                      }
                      else
                        e.mountEntity(this);
                      }
                  }
                }
            }
            else
            {
                this.shouldMoveClient = buffer.readBoolean();
            }
        }
        catch (final Exception e)
        {
            e.printStackTrace();
        }
    }
View Full Code Here

                int shouldBeMountedId = buffer.readInt();
                if (this.riddenByEntity == null)
                {
                   if (shouldBeMountedId > -1)
                   {
                     Entity e = FMLClientHandler.instance().getWorldClient().getEntityByID(shouldBeMountedId);
                     if (e != null) e.mountEntity(this);
                   }
                }
                else if (this.riddenByEntity.getEntityId() != shouldBeMountedId)
                {
                  if (shouldBeMountedId == -1)
                  {
                    this.riddenByEntity.mountEntity(null);
                  }
                  else
                  {
                    Entity e = FMLClientHandler.instance().getWorldClient().getEntityByID(shouldBeMountedId);
                      if (e != null) e.mountEntity(this);
                  }
                }
            }
            else
            {
                this.shouldMoveClient = buffer.readBoolean();
            }
        }
        catch (final Exception e)
        {
            e.printStackTrace();
        }
    }
View Full Code Here

    @SubscribeEvent
    public void onLivingAttacked(LivingAttackEvent event)
    {
        if (!event.entity.isEntityInvulnerable() && !event.entity.worldObj.isRemote && event.entityLiving.getHealth() <= 0.0F && !(event.source.isFireDamage() && event.entityLiving.isPotionActive(Potion.fireResistance)))
        {
            Entity entity = event.source.getEntity();

            if (entity instanceof EntitySlimeling)
            {
                EntitySlimeling entitywolf = (EntitySlimeling) entity;
View Full Code Here

        if (var3 != null)
        {
            var2 = Vec3.createVectorHelper(var3.hitVec.xCoord, var3.hitVec.yCoord, var3.hitVec.zCoord);
        }

        Entity var4 = null;
        final List<?> var5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(2.0D, 2.0D, 2.0D));
        double var6 = 0.0D;
        final Iterator<?> var8 = var5.iterator();

        while (var8.hasNext())
        {
            final Entity var9 = (Entity) var8.next();

            if (var9.canBeCollidedWith() && !var9.isEntityEqual(this.shootingEntity))
            {
                final float var10 = 0.01F;
                final AxisAlignedBB var11 = var9.boundingBox.expand(var10, var10, var10);
                final MovingObjectPosition var12 = var11.calculateIntercept(var15, var2);
View Full Code Here

                for (final Object o : entityList)
                {
                    if (o instanceof Entity)
                    {
                        final Entity e = (Entity) o;

                        if (e.worldObj.provider instanceof IOrbitDimension)
                        {
                            final IOrbitDimension dimension = (IOrbitDimension) e.worldObj.provider;
View Full Code Here

            else if (kb == KeyHandlerClient.leftShiftKey)
            {
                keyNum = 5;
            }

            Entity entityTest = KeyHandlerClient.mc.thePlayer.ridingEntity;
            if (entityTest != null && entityTest instanceof IControllableEntity && keyNum != -1)
            {
                IControllableEntity entity = (IControllableEntity) entityTest;

                if (kb.getKeyCode() == KeyHandlerClient.mc.gameSettings.keyBindInventory.getKeyCode())
View Full Code Here

TOP

Related Classes of net.minecraft.entity.Entity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.