Package mekanism.common.entity

Examples of mekanism.common.entity.EntityBalloon


      pos.zPos += 0.3;
      pos.xPos -= 0.4;
      pos.rotateYaw(entityplayer.renderYawOffset);
      pos.translate(new Pos3D(entityplayer));

      world.spawnEntityInWorld(new EntityBalloon(world, pos.xPos-0.5, pos.yPos-0.25, pos.zPos-0.5, getColor(itemstack)));
    }

    itemstack.stackSize--;

    return itemstack;
View Full Code Here


        world.setBlockToAir(obj.xCoord, obj.yCoord+1, obj.zCoord);
        world.setBlockToAir(obj.xCoord, obj.yCoord+2, obj.zCoord);

        if(!world.isRemote)
        {
          world.spawnEntityInWorld(new EntityBalloon(world, obj, getColor(stack)));
          stack.stackSize--;
        }
      }

      return true;
View Full Code Here

          {
            return true;
          }
        }

        player.worldObj.spawnEntityInWorld(new EntityBalloon(entity, getColor(stack)));
        stack.stackSize--;
      }

      return true;
    }
View Full Code Here

          }
        }
       
        if(!hasBalloon)
        {
          source.getWorld().spawnEntityInWorld(new EntityBalloon(entity, getColor(stack)));
          latched = true;
        }
      }
     
      if(!latched)
      {
        Pos3D pos = new Pos3D(coord);
       
        switch(side)
        {
          case DOWN:
            pos.translate(0, -2.5, 0);
            break;
          case UP:
            pos.translate(0, 0, 0);
            break;
          case NORTH:
            pos.translate(0, -1, -0.5);
            break;
          case SOUTH:
            pos.translate(0, -1, 0.5);
            break;
          case WEST:
            pos.translate(-0.5, -1, 0);
            break;
          case EAST:
            pos.translate(0.5, -1, 0);
            break;
        }
       
        if(!source.getWorld().isRemote)
        {
          source.getWorld().spawnEntityInWorld(new EntityBalloon(source.getWorld(), pos.xPos, pos.yPos, pos.zPos, getColor(stack)));
        }
      }
     
      stack.stackSize--;
      return stack;
View Full Code Here

  }

  @Override
  public void doRender(Entity entity, double x, double y, double z, float f, float partialTick)
  {
    EntityBalloon balloon = (EntityBalloon)entity;

    if(balloon.isLatchedToEntity())
    {
      x = (balloon.latchedEntity.lastTickPosX + (balloon.latchedEntity.posX - balloon.latchedEntity.lastTickPosX)*partialTick);
      y = (balloon.latchedEntity.lastTickPosY + (balloon.latchedEntity.posY - balloon.latchedEntity.lastTickPosY)*partialTick);
      z = (balloon.latchedEntity.lastTickPosZ + (balloon.latchedEntity.posZ - balloon.latchedEntity.lastTickPosZ)*partialTick);

 
View Full Code Here

TOP

Related Classes of mekanism.common.entity.EntityBalloon

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.