Пример #1
0
 public virtual ArrowEntity SpawnArrow(PlayerEntity player, ItemStack item, double timeStretched)
 {
     ArrowEntity ae = new ArrowEntity(player.TheRegion);
     ae.SetPosition(player.GetEyePosition());
     ae.NoCollide.Add(player.EID);
     Location forward = player.ForwardVector();
     ae.SetVelocity(forward * timeStretched * 20 * FireStrength);
     Matrix lookatlh = Utilities.LookAtLH(Location.Zero, forward, Location.UnitZ);
     lookatlh.Transpose();
     ae.Angles = Quaternion.CreateFromRotationMatrix(lookatlh);
     ae.Angles *= Quaternion.CreateFromAxisAngle(Vector3.UnitX, 90f * (double)Utilities.PI180);
     player.TheRegion.SpawnEntity(ae);
     return ae;
 }
Пример #2
0
 public ArrowEntityTag(ArrowEntity ent)
 {
     Internal = ent;
 }