mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 20:49:05 +00:00
Why are we using Camera Yaw for Spawning NPCs? Fix Starring at the Ground
This commit is contained in:
1 parent
ed09511952
commit
1f76564b9d
3 files changed
+3
-3
No files matched your search
@@ -142,7 +142,7 @@ public class CmdNpc extends ChMcLogger {
|
||||
EntityCustomNpc npc = new EntityCustomNpc(pw);
|
||||
if (args.length > 0)
|
||||
npc.display.name = args[0];
|
||||
npc.setPositionAndRotation(player.posX, player.posY, player.posZ, player.cameraYaw, player.cameraPitch);
|
||||
npc.setPositionAndRotation(player.posX, player.posY, player.posZ, player.rotationYaw, 0);
|
||||
npc.ais.startPos = new int[]{MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ)};
|
||||
pw.spawnEntityInWorld(npc);
|
||||
npc.setHealth(npc.getMaxHealth());
|
||||
|
||||
@@ -200,7 +200,7 @@ public class NpcCommand extends CommandKamkeelBase {
|
||||
EntityCustomNpc npc = new EntityCustomNpc(pw);
|
||||
if (args.length > 0)
|
||||
npc.display.name = args[0];
|
||||
npc.setPositionAndRotation(player.posX, player.posY, player.posZ, player.cameraYaw, player.cameraPitch);
|
||||
npc.setPositionAndRotation(player.posX, player.posY, player.posZ, player.rotationYaw, 0);
|
||||
npc.ais.startPos = new int[]{MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ)};
|
||||
pw.spawnEntityInWorld(npc);
|
||||
npc.setHealth(npc.getMaxHealth());
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ItemNpcWand extends Item {
|
||||
EntityCustomNpc npc = new EntityCustomNpc(par3World);
|
||||
npc.ais.startPos = new int[]{par4, par5, par6};
|
||||
|
||||
npc.setLocationAndAngles((float) par4 + 0.5F, npc.getStartYPos(), (float) par6 + 0.5F, player.rotationYaw, player.rotationPitch);
|
||||
npc.setLocationAndAngles((float) par4 + 0.5F, npc.getStartYPos(), (float) par6 + 0.5F, player.rotationYaw, 0);
|
||||
|
||||
par3World.spawnEntityInWorld(npc);
|
||||
npc.setHealth(npc.getMaxHealth());
|
||||
|
||||
Reference in new issue
Block a user