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.