本文整理汇总了Java中net.minecraft.client.entity.EntityOtherPlayerMP.copyLocationAndAnglesFrom方法的典型用法代码示例。如果您正苦于以下问题:Java EntityOtherPlayerMP.copyLocationAndAnglesFrom方法的具体用法?Java EntityOtherPlayerMP.copyLocationAndAnglesFrom怎么用?Java EntityOtherPlayerMP.copyLocationAndAnglesFrom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.entity.EntityOtherPlayerMP
的用法示例。
在下文中一共展示了EntityOtherPlayerMP.copyLocationAndAnglesFrom方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onEnable
import net.minecraft.client.entity.EntityOtherPlayerMP; //导入方法依赖的package包/类
@Override
public void onEnable() {
if (EntityUtils.getClosestEntityRaw(false) == null) {
WurstClient.INSTANCE.chat.message("There is no nearby entity.");
setEnabled(false);
return;
}
oldX = Minecraft.getMinecraft().thePlayer.posX;
oldY = Minecraft.getMinecraft().thePlayer.posY;
oldZ = Minecraft.getMinecraft().thePlayer.posZ;
oldYaw = Minecraft.getMinecraft().thePlayer.rotationYaw;
oldPitch = Minecraft.getMinecraft().thePlayer.rotationPitch;
Minecraft.getMinecraft().thePlayer.noClip = true;
if (otherID == null) otherID = EntityUtils.getClosestEntityRaw(false).getUniqueID();
otherView = EntityUtils.searchEntityByIdRaw(otherID);
wasInvisible = otherView.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer);
EntityOtherPlayerMP fakePlayer = new EntityOtherPlayerMP(Minecraft.getMinecraft().theWorld,
Minecraft.getMinecraft().thePlayer.getGameProfile());
fakePlayer.clonePlayer(Minecraft.getMinecraft().thePlayer, true);
fakePlayer.copyLocationAndAnglesFrom(Minecraft.getMinecraft().thePlayer);
fakePlayer.rotationYawHead = Minecraft.getMinecraft().thePlayer.rotationYawHead;
Minecraft.getMinecraft().theWorld.addEntityToWorld(-69, fakePlayer);
WurstClient.INSTANCE.chat.message("Now viewing " + otherView.getName() + ".");
WurstClient.INSTANCE.events.add(UpdateListener.class, this);
}
示例2: onEnabled
import net.minecraft.client.entity.EntityOtherPlayerMP; //导入方法依赖的package包/类
@Override
public void onEnabled() {
if(MC.player != null) {
isRidingEntity = MC.player.getRidingEntity() != null;
if (MC.player.getRidingEntity() == null) {
posX = MC.player.posX;
posY = MC.player.posY;
posZ = MC.player.posZ;
}
else {
ridingEntity = MC.player.getRidingEntity();
MC.player.dismountRidingEntity();
}
pitch = MC.player.rotationPitch;
yaw = MC.player.rotationYaw;
clonedPlayer = new EntityOtherPlayerMP(MC.world, MC.getSession().getProfile());
clonedPlayer.copyLocationAndAnglesFrom(MC.player);
clonedPlayer.rotationYawHead = MC.player.rotationYawHead;
MC.world.addEntityToWorld(-100, clonedPlayer);
MC.player.capabilities.isFlying = true;
MC.player.capabilities.setFlySpeed(speed.getAsFloat());
MC.player.noClip = true;
}
}
示例3: onEnable
import net.minecraft.client.entity.EntityOtherPlayerMP; //导入方法依赖的package包/类
@Override
public void onEnable() {
fakePlayer = new EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.getGameProfile());
if(mc.inGameHasFocus){
oldX = mc.thePlayer.posX;
oldY = mc.thePlayer.posY;
oldZ = mc.thePlayer.posZ;
fakePlayer.setEntityId(-1881);
fakePlayer.clonePlayer(mc.thePlayer, true);
fakePlayer.copyLocationAndAnglesFrom(mc.thePlayer);
fakePlayer.rotationYawHead = mc.thePlayer.rotationYawHead;
mc.theWorld.addEntityToWorld(fakePlayer.getEntityId(), fakePlayer);
}
}
示例4: onEnable
import net.minecraft.client.entity.EntityOtherPlayerMP; //导入方法依赖的package包/类
@Override
public void onEnable() {
oldX = Minecraft.getMinecraft().thePlayer.posX;
oldY = Minecraft.getMinecraft().thePlayer.posY;
oldZ = Minecraft.getMinecraft().thePlayer.posZ;
fakePlayer = new EntityOtherPlayerMP(Minecraft.getMinecraft().theWorld,
Minecraft.getMinecraft().thePlayer.getGameProfile());
fakePlayer.clonePlayer(Minecraft.getMinecraft().thePlayer, true);
fakePlayer.copyLocationAndAnglesFrom(Minecraft.getMinecraft().thePlayer);
fakePlayer.rotationYawHead = Minecraft.getMinecraft().thePlayer.rotationYawHead;
Minecraft.getMinecraft().theWorld.addEntityToWorld(-69, fakePlayer);
WurstClient.INSTANCE.events.add(UpdateListener.class, this);
}
示例5: onEnable
import net.minecraft.client.entity.EntityOtherPlayerMP; //导入方法依赖的package包/类
@Override
public void onEnable() {
lastTime = System.currentTimeMillis();
oldX = Minecraft.getMinecraft().thePlayer.posX;
oldY = Minecraft.getMinecraft().thePlayer.posY;
oldZ = Minecraft.getMinecraft().thePlayer.posZ;
fakePlayer = new EntityOtherPlayerMP(Minecraft.getMinecraft().theWorld,
Minecraft.getMinecraft().thePlayer.getGameProfile());
fakePlayer.clonePlayer(Minecraft.getMinecraft().thePlayer, true);
fakePlayer.copyLocationAndAnglesFrom(Minecraft.getMinecraft().thePlayer);
fakePlayer.rotationYawHead = Minecraft.getMinecraft().thePlayer.rotationYawHead;
Minecraft.getMinecraft().theWorld.addEntityToWorld(-69, fakePlayer);
}