static bool CursedLand(Client player, PlayerBlockPlacement placement) { SlotItem i = player.Session.ActiveItem; if (i != null && i.ItemID == BlockID.Bucket) { var pps = new PlayerPositionLookClient(); pps.Position = placement.BlockPosition.CloneDouble(); pps.OnGround = false; pps.Position.Y += 1.1; pps.Position.X += 0.5; pps.Position.Z += 0.5; pps.Pitch = Math.PI / 2; pps.Yaw = player.Session.Yaw; player.FromClient(pps); var ppc = new PlayerPositionLookServer(pps.Position); ppc.Pitch = Math.PI / 2; ppc.Yaw = player.Session.Yaw; player.SendToClient(ppc); } BlockChange bc = new BlockChange(placement.BlockPosition.Offset(placement.FaceDirection), BlockID.Air); player.SendToClient(bc); //Block all actions return(true); }
static bool CursedLand(Client player, PlayerBlockPlacement placement) { SlotItem i = player.Session.ActiveItem; if (i != null && i.ItemID == BlockID.Bucket) { var pps = new PlayerPositionLookClient(); pps.Position = placement.BlockPosition.CloneDouble(); pps.OnGround = false; pps.Position.Y += 1.1; pps.Position.X += 0.5; pps.Position.Z += 0.5; pps.Pitch = Math.PI / 2; pps.Yaw = player.Session.Yaw; player.FromClient(pps); var ppc = new PlayerPositionLookServer(pps.Position); ppc.Pitch = Math.PI / 2; ppc.Yaw = player.Session.Yaw; player.SendToClient(ppc); } BlockChange bc = new BlockChange(placement.BlockPosition.Offset(placement.FaceDirection), BlockID.Air); player.SendToClient(bc); //Block all actions return true; }