Examples of EntityPlayerMP


Examples of net.minecraft.entity.player.EntityPlayerMP

    return new Vector3(target.posX, target.posY, target.posZ).subtract(new Vector3(source.posX, source.posY, source.posZ));
  }

  private void moveEntity(Entity entity, Vector3 vec) {
    if (entity instanceof EntityPlayerMP) {
      EntityPlayerMP player = (EntityPlayerMP) entity;
      player.playerNetServerHandler.setPlayerLocation(entity.posX + vec.x, entity.posY + vec.y, entity.posZ + vec.z, player.rotationYaw, player.rotationPitch);
    } else entity.setPosition(entity.posX + vec.x, entity.posY + vec.y, entity.posZ + vec.z);
  }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

            if (FMLCommonHandler.instance().getMinecraftServerInstance() == null) {
                return;
            }
            for (Object object : FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().playerEntityList) {
                if (object != null) {
                    EntityPlayerMP player = (EntityPlayerMP) object;
                    onlineIds.add(player.getUniqueID());
                }
            }

            this.onlineIds = new CopyOnWriteArraySet<UUID>(onlineIds);
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

    @Override
    public Player matchPlayer(Player player) {
        if (player instanceof ForgePlayer) {
            return player;
        } else {
            EntityPlayerMP entity = server.getConfigurationManager().func_152612_a(player.getName());
            return entity != null ? new ForgePlayer(this, entity) : null;
        }
    }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

    @Override
    public Collection<Actor> getConnectedUsers() {
        List<Actor> users = new ArrayList<Actor>();
        ServerConfigurationManager scm = server.getConfigurationManager();
        for (String name : scm.getAllUsernames()) {
            EntityPlayerMP entity = scm.func_152612_a(name);
            if (entity != null) {
                users.add(new ForgePlayer(this, entity));
            }
        }
        return users;
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

    @SubscribeEvent
    public void onPacketData(ServerCustomPacketEvent event) {
        C17PacketCustomPayload rawPacket = (C17PacketCustomPayload) event.packet.toC17Packet();
        if (event.packet.channel().equals(ForgeWorldEdit.CUI_PLUGIN_CHANNEL)) {
            EntityPlayerMP player = getPlayerFromEvent(event);
            LocalSession session = ForgeWorldEdit.inst.getSession((EntityPlayerMP) player);

            if (session.hasCUISupport()) {
                return;
            }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

    z = buffer.readInt();

  }

  public IMessage onMessage(PacketOpenRemoteUi message, MessageContext ctx) {
    EntityPlayerMP player = (EntityPlayerMP) ctx.getServerHandler().playerEntity;
    net.minecraft.inventory.Container c = player.openContainer;
    PlayerProxy pp = new PlayerProxy(player, message.x, message.y, message.z);
    EntityPlayerMP proxy = createPlayerProxy(player, pp);
    proxy.playerNetServerHandler = player.playerNetServerHandler;
    proxy.inventory = player.inventory;
    proxy.currentWindowId = player.currentWindowId;
    proxy.inventoryContainer = player.inventoryContainer;
    proxy.openContainer = player.openContainer;
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

      CartLinkUtil.updateCartLinks(world, cart);
    }

    List<List<Entity>> toTeleport = new ArrayList<List<Entity>>(allCarts.size());
    List<EntityMinecart> toDespawn = new ArrayList<EntityMinecart>(allCarts.size());
    EntityPlayerMP playerToTP = null;
    EntityMinecart playerToMount = null;
    for (EntityMinecart cartInTrain : allCarts) {
      if(cartInTrain != null) {
        List<Entity> entities = TeleportUtil.createEntitiesForReciever(cartInTrain, sender, reciever);
        if(entities != null) {
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

    isActive = buf.readBoolean();   
  }
 
  @Override
  public IMessage onMessage(PacketUpgradeState message, MessageContext ctx) {
    EntityPlayerMP player = ctx.getServerHandler().playerEntity;
    switch(message.type) {
    case GLIDE:
      DarkSteelController.instance.setGlideActive(player, message.isActive);
      break;
    case SPEED:
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

      entity.setFire(50);
    } else if(this == EnderIO.blockRocketFuel && entity instanceof EntityLivingBase) {
      ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 150, 3, true));
    } else if(this == EnderIO.blockNutrientDistillation && entity instanceof EntityPlayerMP) {
      long time = entity.worldObj.getTotalWorldTime();
      EntityPlayerMP player = (EntityPlayerMP) entity;
      if(time % Config.nutrientFoodBoostDelay == 0 && player.getEntityData().getLong("eioLastFoodBoost") != time) {
        player.getFoodStats().addStats(1, 0.1f);
        player.getEntityData().setLong("eioLastFoodBoost", time);
      }
    } else if (this == EnderIO.blockHootch && entity instanceof EntityLivingBase) {
      ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 150, 0, true));
    }
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP

    }
    if(!farm.hasHoe()) {
      farm.setNotification(TileFarmStation.NOTIFICATION_NO_HOE);
      return null;
    }
    EntityPlayerMP player = farm.getFakePlayer();
    World world = farm.getWorldObj();
    player.theItemInWorldManager.activateBlockOrUseItem(player, player.worldObj, null, bc.x, bc.y, bc.z, 0, 0, 0, 0);   
   
    List<EntityItem> drops = new ArrayList<EntityItem>();
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.