443 {
444 Main.tileSolid[379] = true;
445 Tile tile = Main.tile[
x - 1,
y];
450 if (
tile5.nactive() && Main.tileSolid[
tile5.type] && !Main.tileSolidTop[
tile5.type])
451 {
455 return;
456 }
457 byte liquid =
tile5.liquid;
458 float num = 0f;
459 if (
y > Main.UnderworldLayer &&
tile5.liquidType() == 0 &&
tile5.liquid > 0)
460 {
463 {
465 }
467 }
468 if (
tile5.liquid == 0)
469 {
471 return;
472 }
474 {
477 {
479 {
481 return;
482 }
484 }
485 }
486 else
487 {
488 if (tile.lava())
489 {
491 }
493 {
495 }
497 {
499 }
501 {
503 }
505 {
508 {
510 {
512 return;
513 }
515 }
516 }
517 else
518 {
519 if (tile.honey())
520 {
522 }
524 {
526 }
528 {
530 }
532 {
534 }
536 {
538 }
539 else
540 {
541 if (tile.shimmer())
542 {
544 }
546 {
548 }
550 {
552 }
554 {
556 }
557 }
558 }
559 }
560 if ((!
tile4.nactive() || !Main.tileSolid[
tile4.type] || Main.tileSolidTop[
tile4.type]) && (
tile4.liquid <= 0 ||
tile4.liquidType() ==
tile5.liquidType()) &&
tile4.liquid <
byte.MaxValue)
561 {
562 bool flag = false;
563 num = 255 -
tile4.liquid;
564 if (num > (
float)(
int)
tile5.liquid)
565 {
566 num = (int)
tile5.liquid;
567 }
568 if (num == 1f &&
tile5.liquid ==
byte.MaxValue)
569 {
570 flag = true;
571 }
572 if (!flag)
573 {
574 tile5.liquid -= (byte)num;
575 }
576 tile4.liquid += (byte)num;
582 {
583 tile5.liquid = byte.MaxValue;
584 }
585 else if (!flag)
586 {
589 }
590 }
591 if (
tile5.liquid > 0)
592 {
597 if (tile.nactive() && Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type])
598 {
600 }
601 else if (tile.liquid > 0 && tile.liquidType() !=
tile5.liquidType())
602 {
604 }
605 else if (Main.tile[
x - 2,
y].nactive() && Main.tileSolid[Main.tile[
x - 2,
y].type] && !Main.tileSolidTop[Main.tile[
x - 2,
y].type])
606 {
608 }
609 else if (Main.tile[
x - 2,
y].liquid == 0)
610 {
612 }
613 else if (Main.tile[
x - 2,
y].liquid > 0 && Main.tile[
x - 2,
y].liquidType() !=
tile5.liquidType())
614 {
616 }
617 if (
tile2.nactive() && Main.tileSolid[
tile2.type] && !Main.tileSolidTop[
tile2.type])
618 {
620 }
622 {
624 }
625 else if (Main.tile[
x + 2,
y].nactive() && Main.tileSolid[Main.tile[
x + 2,
y].type] && !Main.tileSolidTop[Main.tile[
x + 2,
y].type])
626 {
628 }
629 else if (Main.tile[
x + 2,
y].liquid == 0)
630 {
632 }
633 else if (Main.tile[
x + 2,
y].liquid > 0 && Main.tile[
x + 2,
y].liquidType() !=
tile5.liquidType())
634 {
636 }
638 if (
tile5.liquid < 3)
639 {
641 }
642 if (
tile5.liquid > 250)
643 {
646 }
648 {
650 {
653 if (Main.tile[
x - 3,
y].nactive() && Main.tileSolid[Main.tile[
x - 3,
y].type] && !Main.tileSolidTop[Main.tile[
x - 3,
y].type])
654 {
656 }
657 else if (Main.tile[
x - 3,
y].liquid == 0)
658 {
660 }
661 else if (Main.tile[
x - 3,
y].liquidType() !=
tile5.liquidType())
662 {
664 }
665 if (Main.tile[
x + 3,
y].nactive() && Main.tileSolid[Main.tile[
x + 3,
y].type] && !Main.tileSolidTop[Main.tile[
x + 3,
y].type])
666 {
668 }
669 else if (Main.tile[
x + 3,
y].liquid == 0)
670 {
672 }
673 else if (Main.tile[
x + 3,
y].liquidType() !=
tile5.liquidType())
674 {
676 }
678 {
679 num = tile.liquid + tile2.liquid + Main.tile[
x - 2,
y].liquid + Main.tile[
x + 2,
y].liquid + Main.tile[
x - 3,
y].liquid + Main.tile[
x + 3,
y].liquid + tile5.liquid +
num2;
682 tile.liquidType(
tile5.liquidType());
683 if (tile.liquid != (byte)num)
684 {
685 tile.liquid = (byte)num;
687 }
688 else
689 {
691 }
693 if (
tile2.liquid != (
byte)num)
694 {
695 tile2.liquid = (byte)num;
697 }
698 else
699 {
701 }
702 Main.tile[
x - 2,
y].liquidType(
tile5.liquidType());
703 if (Main.tile[
x - 2,
y].liquid != (
byte)num)
704 {
705 Main.tile[
x - 2,
y].liquid = (byte)num;
707 }
708 else
709 {
711 }
712 Main.tile[
x + 2,
y].liquidType(
tile5.liquidType());
713 if (Main.tile[
x + 2,
y].liquid != (
byte)num)
714 {
715 Main.tile[
x + 2,
y].liquid = (byte)num;
717 }
718 else
719 {
721 }
722 Main.tile[
x - 3,
y].liquidType(
tile5.liquidType());
723 if (Main.tile[
x - 3,
y].liquid != (
byte)num)
724 {
725 Main.tile[
x - 3,
y].liquid = (byte)num;
727 }
728 else
729 {
731 }
732 Main.tile[
x + 3,
y].liquidType(
tile5.liquidType());
733 if (Main.tile[
x + 3,
y].liquid != (
byte)num)
734 {
735 Main.tile[
x + 3,
y].liquid = (byte)num;
737 }
738 else
739 {
741 }
742 if (tile.liquid != (
byte)num ||
tile5.liquid != (
byte)num)
743 {
745 }
746 if (
tile2.liquid != (
byte)num ||
tile5.liquid != (
byte)num)
747 {
749 }
750 if (Main.tile[
x - 2,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
751 {
753 }
754 if (Main.tile[
x + 2,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
755 {
757 }
758 if (Main.tile[
x - 3,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
759 {
761 }
762 if (Main.tile[
x + 3,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
763 {
765 }
767 {
768 tile5.liquid = (byte)num;
769 }
770 }
771 else
772 {
774 num = tile.liquid + tile2.liquid + Main.tile[
x - 2,
y].liquid + Main.tile[
x + 2,
y].liquid + tile5.liquid +
num2;
776 tile.liquidType(
tile5.liquidType());
777 if (tile.liquid != (byte)num)
778 {
779 tile.liquid = (byte)num;
781 }
782 else
783 {
785 }
787 if (
tile2.liquid != (
byte)num)
788 {
789 tile2.liquid = (byte)num;
791 }
792 else
793 {
795 }
796 Main.tile[
x - 2,
y].liquidType(
tile5.liquidType());
797 if (Main.tile[
x - 2,
y].liquid != (
byte)num)
798 {
799 Main.tile[
x - 2,
y].liquid = (byte)num;
801 }
802 else
803 {
805 }
806 Main.tile[
x + 2,
y].liquidType(
tile5.liquidType());
807 if (Main.tile[
x + 2,
y].liquid != (
byte)num)
808 {
809 Main.tile[
x + 2,
y].liquid = (byte)num;
811 }
812 else
813 {
815 }
816 if (tile.liquid != (
byte)num ||
tile5.liquid != (
byte)num)
817 {
819 }
820 if (
tile2.liquid != (
byte)num ||
tile5.liquid != (
byte)num)
821 {
823 }
824 if (Main.tile[
x - 2,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
825 {
827 }
828 if (Main.tile[
x + 2,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
829 {
831 }
833 {
834 tile5.liquid = (byte)num;
835 }
836 }
837 }
839 {
840 num = tile.liquid + tile2.liquid + Main.tile[
x - 2,
y].liquid + tile5.liquid +
num2;
842 tile.liquidType(
tile5.liquidType());
843 if (tile.liquid != (byte)num || tile5.liquid != (byte)num)
844 {
845 tile.liquid = (byte)num;
847 }
849 if (
tile2.liquid != (
byte)num ||
tile5.liquid != (
byte)num)
850 {
851 tile2.liquid = (byte)num;
853 }
854 Main.tile[
x - 2,
y].liquidType(
tile5.liquidType());
855 if (Main.tile[
x - 2,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
856 {
857 Main.tile[
x - 2,
y].liquid = (byte)num;
859 }
860 tile5.liquid = (byte)num;
861 }
863 {
864 num = tile.liquid + tile2.liquid + Main.tile[
x + 2,
y].liquid + tile5.liquid +
num2;
866 tile.liquidType(
tile5.liquidType());
867 if (tile.liquid != (byte)num || tile5.liquid != (byte)num)
868 {
869 tile.liquid = (byte)num;
871 }
873 if (
tile2.liquid != (
byte)num ||
tile5.liquid != (
byte)num)
874 {
875 tile2.liquid = (byte)num;
877 }
878 Main.tile[
x + 2,
y].liquidType(
tile5.liquidType());
879 if (Main.tile[
x + 2,
y].liquid != (
byte)num ||
tile5.liquid != (
byte)num)
880 {
881 Main.tile[
x + 2,
y].liquid = (byte)num;
883 }
884 tile5.liquid = (byte)num;
885 }
886 else
887 {
888 num = tile.liquid + tile2.liquid + tile5.liquid +
num2;
890 if (num == 254f &&
WorldGen.genRand.Next(30) == 0)
891 {
892 num = 255f;
893 }
894 tile.liquidType(
tile5.liquidType());
895 if (tile.liquid != (byte)num)
896 {
897 tile.liquid = (byte)num;
899 }
901 if (
tile2.liquid != (
byte)num)
902 {
903 tile2.liquid = (byte)num;
905 }
906 tile5.liquid = (byte)num;
907 }
908 }
910 {
911 num = tile.liquid + tile5.liquid +
num2;
913 if (tile.liquid != (byte)num)
914 {
915 tile.liquid = (byte)num;
916 }
917 tile.liquidType(
tile5.liquidType());
918 if (
tile5.liquid != (
byte)num || tile.liquid != (byte)num)
919 {
921 }
922 tile5.liquid = (byte)num;
923 }
925 {
926 num = tile2.liquid + tile5.liquid +
num2;
928 if (
tile2.liquid != (
byte)num)
929 {
930 tile2.liquid = (byte)num;
931 }
933 if (
tile5.liquid != (
byte)num || tile2.liquid != (byte)num)
934 {
936 }
937 tile5.liquid = (byte)num;
938 }
939 }
940 if (
tile5.liquid != liquid)
941 {
942 if (
tile5.liquid == 254 && liquid ==
byte.MaxValue)
943 {
945 {
946 tile5.liquid = byte.MaxValue;
948 }
949 else
950 {
952 }
953 }
954 else
955 {
958 }
959 }
960 else
961 {
963 }
964 }
static decimal Round(decimal d)
static void ShimmerCheck(int x, int y)
static void HoneyCheck(int x, int y)
static void AddWater(int x, int y)
static void LavaCheck(int x, int y)