Java 类net.minecraft.network.play.server.SPacketPlayerPosLook.EnumFlags 实例源码

项目:TaleCraft    文件:TargetedTeleportCommand.java   
public void teleport(Entity entity, Vec3d target) throws CommandException {
    if(entity == null) {
        throw new CommandException("entity must not be NULL!");
    }

    if(target == null) {
        throw new CommandException("target must not be NULL!");
    }

    // XXX DISABLED FUNCTIONALITY: This doesn't work as expected.
    if(Boolean.FALSE.booleanValue() && entity instanceof EntityPlayerMP) {
        // special case code
        EnumSet<EnumFlags> enumset = EnumSet.noneOf(SPacketPlayerPosLook.EnumFlags.class);
        float f = entity.rotationPitch;
        float f1 = entity.rotationYaw;

        entity.startRiding((Entity)null);
        ((EntityPlayerMP)entity).connection.setPlayerLocation(target.xCoord, target.yCoord, target.zCoord, f, f1, enumset);
        entity.velocityChanged = true;
        return;
    }

    entity.setPositionAndUpdate(target.xCoord, target.yCoord, target.zCoord);
    entity.velocityChanged = true;
}
项目:EnderIO    文件:FakeNetHandlerPlayServer.java   
@Override
public void setPlayerLocation(double x, double y, double z, float yaw, float pitch, @Nonnull Set<EnumFlags> relativeSet) {
}
项目:DankNull    文件:NetServerHandlerFake.java   
@Override
public void setPlayerLocation(double x, double y, double z, float yaw, float pitch, Set<EnumFlags> relativeSet) {

}