当前位置: 首页>>代码示例>>Java>>正文


Java EntityPlayer.getGameProfile方法代码示例

本文整理汇总了Java中net.minecraft.entity.player.EntityPlayer.getGameProfile方法的典型用法代码示例。如果您正苦于以下问题:Java EntityPlayer.getGameProfile方法的具体用法?Java EntityPlayer.getGameProfile怎么用?Java EntityPlayer.getGameProfile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.entity.player.EntityPlayer的用法示例。


在下文中一共展示了EntityPlayer.getGameProfile方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ShiftedPlayer

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public ShiftedPlayer(EntityPlayer wrappedPlayer, BlockPos fakePosition) {
	super(wrappedPlayer.getEntityWorld(), wrappedPlayer.getGameProfile());
	this.wrappedPlayer = wrappedPlayer;
	this.posX = fakePosition.getX();
	this.posY = fakePosition.getY();
	this.posZ = fakePosition.getZ();
}
 
开发者ID:astronautlabs,项目名称:rezolve,代码行数:8,代码来源:ShiftedPlayer.java

示例2: EntityPlayerProxy

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public EntityPlayerProxy(EntityPlayer realPlayer, double posX, double posY, double posZ, float pitch, float yaw)
{
	super(realPlayer.world, realPlayer.getGameProfile());

	InjectionHandler.copyAllFieldsFrom(this, realPlayer, EntityPlayer.class);

	this.posX = posX;
	this.posY = posY;
	this.posZ = posZ;
	this.rotationPitch = pitch;
	this.rotationYaw = yaw;

	m_realPlayer = realPlayer;
}
 
开发者ID:orbwoi,项目名称:UniversalRemote,代码行数:15,代码来源:EntityPlayerProxy.java

示例3: getProfile

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public static GameProfile getProfile(EntityPlayer ent) {
    return ent.getGameProfile();
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:4,代码来源:ZWrapper.java

示例4: predictPlayerLocation

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public Vec3 predictPlayerLocation(EntityPlayer player, int ticksIntoFuture) {
    if (playerPositions.containsKey(player)) {
        List<Vec3> pastPositions = playerPositions.get(player);
        if (pastPositions.size() > 1) {
            Vec3 first = pastPositions.get(0);

            List<Vec3> deltas = new LinkedList<>();
            Vec3 previous = first;
            for (Vec3 position : pastPositions) {
                deltas.add(position.subtract(previous));
                previous = position;
            }

            Vec3 mean = Vec3.ORIGIN;
            for (Vec3 delta : deltas)
                mean = mean.add(delta);

            mean = mean.divideElements(deltas.size());

            EntityPlayer simulated = new EntityOtherPlayerMP(mc.theWorld, player.getGameProfile());
            simulated.noClip = false;
            simulated.setPosition(player.posX, player.posY, player.posZ);
            for (int i = 0; i < ticksIntoFuture; i++) {
                double x = mean.x, y = mean.y, z = mean.z;
                simulated.moveEntity(x, y, z);

                if (!player.capabilities.isFlying) {
                    y = y * 0.8 - 0.02;
                }
                if (simulated.onGround && y < 0) {
                    y = 0;
                }

                x *= 0.99;
                z *= 0.99;

                mean = new Vec3(x, y, z);
            }

            return new Vec3(simulated.posX, simulated.posY, simulated.posZ);
        }
    }
    return null;
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:45,代码来源:PredictionEngine.java


注:本文中的net.minecraft.entity.player.EntityPlayer.getGameProfile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。