Posted May 9, 20205 yr Hello! I'm actually doing the Harry Potter Spells in Minecraft and I want to reproduce the Four Point Spell. The concept is easy: it points the player to the north. Here is what I tried : @Override public boolean onCast(PlayerEntity playerIn, int playerPower) { playerIn.setLocationAndAngles(playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), 180F, 0); playerIn.setHeadRotation(180F, 0); playerIn.rotationYaw = 180F; playerIn.rotationPitch = 0; return true; } Thank you for your help.
May 9, 20205 yr Author I resolved it like this : @Override public boolean onCast(PlayerEntity playerIn, int playerPower) { playerIn.rotationYaw = 180F; playerIn.rotationPitch = 0; playerIn.setPositionAndUpdate(playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ()); return true; }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.