Ejemplo n.º 1
0
 void OnPlayerBigMove_Normal(Player sender, API.Events.MoveEventArgs args) {
     string IsFlying = (string)sender.ExtraData["IsFlying"];
     if (IsFlying != null) {
         Vector3S lastPos = (Vector3S)sender.ExtraData["FlyLastPos"];
         Vector3S belowBlock = sender.belowBlock;
         if (IsFlying == "+" && glassesFlatAndMiddle != null) {
             sender.SendReplaceNecessaryBlocksWhere(glassesFlatAndMiddle, lastPos, belowBlock, 0, 20);
             sender.ExtraData["FlyLastPos"] = belowBlock;
         }
         else if (IsFlying == "water" && fluidCube != null) {
             Vector3S tmp = belowBlock;
             tmp.y++;
             sender.SendReplaceNecessaryBlocksWhere(fluidCube, lastPos, tmp, 0, 9);
             sender.ExtraData["FlyLastPos"] = tmp;
         }
         else {
             sender.SendReplaceNecessaryBlocksWhere(glassesFlat, lastPos, belowBlock, 0, 20);
             sender.ExtraData["FlyLastPos"] = belowBlock;
         }
     }
 }