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


Java EntityOtherPlayerMP.copyLocationAndAnglesFrom方法代码示例

本文整理汇总了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);
}
 
开发者ID:null-dev,项目名称:EvenWurse,代码行数:26,代码来源:RemoteViewMod.java

示例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;
    }
}
 
开发者ID:fr1kin,项目名称:ForgeHax,代码行数:29,代码来源:FreecamMod.java

示例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);
	}
}
 
开发者ID:CheataClient,项目名称:CheataClientSrc,代码行数:15,代码来源:FreeCam.java

示例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);
}
 
开发者ID:null-dev,项目名称:EvenWurse,代码行数:14,代码来源:FreecamMod.java

示例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);
}
 
开发者ID:null-dev,项目名称:EvenWurse,代码行数:15,代码来源:BlinkMod.java


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