本文整理了Java中net.minecraft.entity.Entity.copyLocationAndAnglesFrom()
方法的一些代码示例,展示了Entity.copyLocationAndAnglesFrom()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.copyLocationAndAnglesFrom()
方法的具体详情如下:
包路径:net.minecraft.entity.Entity
类名称:Entity
方法名:copyLocationAndAnglesFrom
暂无
代码示例来源:origin: TeamLapen/Vampirism
@Override
public void teleportMinionsToLord() {
List<T> toTeleportDim = new ArrayList<>();
Entity e1 = lord.getRepresentingEntity();
Iterator<T> it = minions.iterator();
while (it.hasNext()) {
T m = it.next();
Entity e = MinionHelper.entity(m);
if (e1.dimension != e.dimension) {
toTeleportDim.add(m);
it.remove();
}
}
for (IMinion m : minions) {
Entity e = MinionHelper.entity(m);
e.copyLocationAndAnglesFrom(e1);
}
for (IMinion m : toTeleportDim) {
//Logger.d(TAG, "Teleporting minion");
Entity e = MinionHelper.entity(m);
e.changeDimension(e1.dimension);
e.timeUntilPortal = e.getPortalCooldown();
}
}
代码示例来源:origin: Alex-the-666/Ice_and_Fire
@Override
public void updateTask() {
this.myrmex.getNavigator().tryMoveToXYZ(this.nextRoom.getX(), this.nextRoom.getY(), this.nextRoom.getZ(), this.movementSpeed);
if (nextRoom != null && this.myrmex.getDistanceSq(nextRoom) < 4 && this.myrmex.holdingBaby()) {
if(!this.myrmex.getPassengers().isEmpty()){
for(Entity entity : this.myrmex.getPassengers()){
entity.dismountRidingEntity();
resetTask();
entity.copyLocationAndAnglesFrom(this.myrmex);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!