22643 {
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905 using (new Main.CurrentPlayerOverride(this))
22906 {
22907 if (i == Main.myPlayer && Main.netMode != 2)
22908 {
22910 }
22911 if (i == Main.myPlayer && Main.dontStarveWorld)
22912 {
22914 }
22924 {
22926 }
22930 {
22932 }
22934 {
22936 {
22939 }
22940 else
22941 {
22945 }
22946 }
22948 {
22950 {
22953 }
22955 {
22958 }
22960 {
22966 {
22969 }
22970 }
22971 else
22972 {
22977 }
22978 }
22980 {
22982 }
22985 if (Main.myPlayer == i)
22986 {
22987 if (Main.mapFullscreen)
22988 {
22990 }
22992 {
22994 }
22995 TileObject.objectPreview.Reset();
22997 {
22999 }
23001 }
23003 {
23004 NPC.freeCake = false;
23005 if (Main.netMode != 1)
23006 {
23008 }
23009 }
23011 {
23013 }
23015 {
23017 }
23019 {
23021 }
23022 if (Main.expertMode)
23023 {
23025 {
23027 }
23029 {
23031 }
23032 }
23033 else
23034 {
23036 {
23038 }
23040 {
23042 }
23043 }
23046 {
23049 Lighting.AddLight(
num111,
j, 0.5
f, 0.2
f, 0.05
f);
23052 }
23054 if (
whoAmI != Main.myPlayer)
23055 {
23058 if (Main.netMode == 1 && !Main.sectionManager.TilesLoaded(
num27 - 3,
num37 - 3,
num27 + 3,
num37 + 3))
23059 {
23061 }
23063 {
23070 }
23071 }
23073 {
23075 {
23077 }
23078 else
23079 {
23081 }
23082 }
23083 if (i == Main.myPlayer)
23084 {
23086 }
23088 {
23090 }
23092 {
23094 }
23097 {
23098 return;
23099 }
23105 {
23107 }
23110 {
23112 }
23115 {
23117 }
23119 {
23121 }
23123 {
23125 if (Main.rand.Next(5) == 0)
23126 {
23127 for (
int k = 0;
k < 2;
k++)
23128 {
23129 Dust dust = Dust.NewDustDirect(
position,
width,
height, 45, 0
f, 0
f, 255,
default(Color), (
float)Main.rand.Next(20, 26) * 0.1f);
23130 dust.noLight = true;
23131 dust.noGravity = true;
23132 dust.velocity *= 0.5f;
23133 dust.velocity.X = 0
f;
23134 dust.velocity.Y -= 0.5f;
23135 }
23136 }
23138 {
23140 }
23141 }
23144 {
23146 }
23147 float num47 = (float)Main.maxTilesX / 4200
f;
23149 float num58 = (float)((
double)(position.Y / 16
f - (60
f + 10
f *
num47)) / (Main.worldSurface / 6.0));
23150 if (Main.remixWorld)
23151 {
23152 num58 = (float)((
double)(position.Y / 16
f - (60
f + 10
f *
num47)) / (Main.worldSurface / 1.0));
23153 }
23154 if (Main.remixWorld)
23155 {
23156 if ((
double)
num58 < 0.1)
23157 {
23159 }
23160 }
23161 else if ((
double)
num58 < 0.25)
23162 {
23164 }
23166 {
23168 }
23175 if (
whoAmI == Main.myPlayer)
23176 {
23178 {
23180 }
23182 if (
whoAmI == Main.myPlayer)
23183 {
23185 }
23186 }
23188 {
23190 }
23192 {
23194 }
23196 {
23198 }
23200 {
23202 }
23203 if (i == Main.myPlayer)
23204 {
23206 {
23208 }
23210 {
23212 }
23215 }
23217 {
23219 return;
23220 }
23222 {
23226 return;
23227 }
23230 {
23232 }
23234 {
23236 }
23239 {
23241 if (Main.hasFocus)
23242 {
23243 if (!Main.drawingPlayerChat && !Main.editSign && !Main.editChest && !Main.blockInput)
23244 {
23247 if (Main.mapFullscreen)
23248 {
23250 {
23251 Main.mapFullscreenPos.Y -= 1
f * (16
f / Main.mapFullscreenScale);
23252 }
23254 {
23255 Main.mapFullscreenPos.Y += 1
f * (16
f / Main.mapFullscreenScale);
23256 }
23258 {
23259 Main.mapFullscreenPos.X -= 1
f * (16
f / Main.mapFullscreenScale);
23260 }
23262 {
23263 Main.mapFullscreenPos.X += 1
f * (16
f / Main.mapFullscreenScale);
23264 }
23277 }
23279 {
23281 }
23283 {
23285 {
23287 }
23289 }
23290 else
23291 {
23293 }
23295 {
23297 {
23299 }
23301 }
23302 else
23303 {
23305 }
23307 {
23309 {
23311 }
23313 }
23314 else
23315 {
23317 }
23319 {
23322 }
23324 {
23326 {
23328 }
23330 {
23332 }
23333 else
23334 {
23336 }
23337 }
23339 {
23341 }
23342 else
23343 {
23345 }
23347 {
23349 {
23351 }
23353 }
23354 else
23355 {
23357 }
23358 if (Main.mapFullscreen)
23359 {
23361 {
23362 Main.mapFullscreenScale *= 1.05f;
23363 }
23365 {
23366 Main.mapFullscreenScale *= 0.95f;
23367 }
23368 }
23369 else
23370 {
23371 if (Main.mapStyle == 1)
23372 {
23374 {
23375 Main.mapMinimapScale *= 1.025f;
23376 }
23378 {
23379 Main.mapMinimapScale *= 0.975f;
23380 }
23382 {
23383 Main.mapMinimapAlpha += 0.015f;
23384 }
23386 {
23387 Main.mapMinimapAlpha -= 0.015f;
23388 }
23389 }
23390 else if (Main.mapStyle == 2)
23391 {
23393 {
23394 Main.mapOverlayScale *= 1.05f;
23395 }
23397 {
23398 Main.mapOverlayScale *= 0.95f;
23399 }
23401 {
23402 Main.mapOverlayAlpha += 0.015f;
23403 }
23405 {
23406 Main.mapOverlayAlpha -= 0.015f;
23407 }
23408 }
23410 {
23412 {
23414 Main.mapStyle++;
23415 if (Main.mapStyle > 2)
23416 {
23417 Main.mapStyle = 0;
23418 }
23419 }
23421 }
23422 else
23423 {
23425 }
23426 }
23428 {
23430 {
23431 if (Main.mapFullscreen)
23432 {
23434 Main.mapFullscreen = false;
23435 }
23436 else
23437 {
23439 }
23440 }
23442 }
23443 else
23444 {
23446 }
23447 }
23449 {
23451 }
23453 {
23460 }
23462 {
23464 {
23468 }
23469 else
23470 {
23472 }
23473 }
23475 {
23478 {
23480 }
23481 }
23482 for (
int m = 0;
m < 4;
m++)
23483 {
23487 {
23488 case 0:
23491 break;
23492 case 1:
23495 break;
23496 case 2:
23499 break;
23500 case 3:
23503 break;
23504 }
23506 {
23508 {
23510 }
23511 else
23512 {
23514 }
23515 }
23517 {
23520 }
23521 else
23522 {
23524 }
23525 }
23529 {
23531 {
23533 }
23535 }
23536 else
23537 {
23539 }
23541 {
23543 {
23545 }
23547 }
23549 {
23553 if (!Main.drawingPlayerChat &&
selectedItem != 58 && !Main.editSign && !Main.editChest)
23554 {
23556 {
23559 }
23561 {
23564 }
23566 {
23569 }
23571 {
23574 }
23576 {
23579 }
23581 {
23584 }
23586 {
23589 }
23591 {
23594 }
23596 {
23599 }
23601 {
23604 }
23612 {
23614 }
23616 {
23618 }
23620 {
23622 {
23623 case 0:
23625 break;
23626 case 1:
23628 break;
23629 case 2:
23631 break;
23632 case 3:
23634 break;
23635 }
23636 }
23638 {
23641 }
23643 {
23645 {
23647 }
23651 }
23652 }
23653 bool flag29 = Main.hairWindow;
23655 {
23656 int y = Main.screenHeight / 2 + 60;
23658 flag29 = ((Rectangle)(
ref val)).Contains(Main.MouseScreen.ToPoint());
23659 }
23661 {
23662 CaptureManager.Instance.Active = false;
23663 }
23665 {
23667 }
23668 if (Main.mapFullscreen)
23669 {
23670 float num80 = PlayerInput.ScrollWheelDelta / 120;
23672 {
23674 }
23675 Main.mapFullscreenScale *= 1
f +
num80 * 0.3f;
23676 }
23678 {
23680 }
23682 {
23684 {
23685 if (!Main.playerInventory)
23686 {
23688 }
23689 else
23690 {
23693 if (Main.recBigList)
23694 {
23702 if (((Rectangle)(
ref val)).Contains(Main.MouseScreen.ToPoint()))
23703 {
23707 {
23709 {
23710 Main.recStart -=
num20;
23711 if (Main.recStart < 0)
23712 {
23713 Main.recStart = 0;
23714 }
23715 }
23716 else
23717 {
23718 Main.recStart +=
num20;
23719 if (Main.recStart > Main.numAvailableRecipes -
num20)
23720 {
23721 Main.recStart = Main.numAvailableRecipes -
num20;
23722 }
23723 }
23725 }
23726 }
23728 }
23730 {
23731 Main.focusRecipe +=
num90;
23732 if (Main.focusRecipe > Main.numAvailableRecipes - 1)
23733 {
23734 Main.focusRecipe = Main.numAvailableRecipes - 1;
23735 }
23736 if (Main.focusRecipe < 0)
23737 {
23738 Main.focusRecipe = 0;
23739 }
23740 }
23741 }
23742 }
23744 }
23745 }
23746 else
23747 {
23748 bool flag2 =
false;
23749 if (!Main.drawingPlayerChat &&
selectedItem != 58 && !Main.editSign && !Main.editChest)
23750 {
23753 {
23756 }
23758 {
23761 }
23763 {
23766 }
23768 {
23771 }
23773 {
23776 }
23778 {
23781 }
23783 {
23786 }
23788 {
23791 }
23793 {
23796 }
23798 {
23801 }
23803 {
23805 {
23807 }
23810 }
23811 }
23812 }
23813 }
23815 {
23817 {
23818 int damage = (int)(20.0 * (double)Main.GameModeInfo.EnemyDamageMultiplier);
23820 }
23822 for (
int n = 0;
n < 20;
n++)
23823 {
23825 if (Main.rand.Next(2) == 0)
23826 {
23827 Main.dust[
num24].noGravity =
true;
23828 }
23829 }
23830 }
23833 {
23843 }
23845 {
23847 }
23848 else
23849 {
23851 }
23853 {
23855 {
23857 }
23858 else
23859 {
23861 }
23862 }
23864 {
23866 {
23868 }
23869 else
23870 {
23872 }
23873 }
23875 {
23878 }
23879 if (Settings.HoverControl == Settings.HoverControlMode.Hold)
23880 {
23883 }
23885 if (Main.playerInventory)
23886 {
23888 }
23891 }
23892 if (i == Main.myPlayer)
23893 {
23895 {
23897 }
23899 {
23904 {
23906 }
23908 {
23910 }
23912 {
23914 }
23916 {
23921 {
23923 }
23925 {
23927 {
23929 break;
23930 }
23931 }
23932 }
23935 {
23938 {
23941 }
23942 }
23944 {
23948 {
23950 }
23953 {
23955 }
23956 }
23958 }
23960 {
23962 }
23963 }
23964 if (Main.netMode != 1)
23965 {
23967 {
23970 NPC.BigMimicSummonCheck(
x6,
y2,
this);
23971 }
23973 {
23974 int x7 = Main.chest[
chest].x;
23975 int y3 = Main.chest[
chest].y;
23976 Projectile.GasTrapCheck(
x7,
y3,
this);
23977 ItemSlot.forceClearGlowsOnChest = true;
23978 }
23980 }
23982 {
23984 }
23985 tileTargetX = (int)(((
float)Main.mouseX + Main.screenPosition.X) / 16
f);
23986 tileTargetY = (int)(((
float)Main.mouseY + Main.screenPosition.Y) / 16
f);
23988 {
23989 tileTargetY = (int)((Main.screenPosition.Y + (
float)Main.screenHeight - (float)Main.mouseY) / 16
f);
23990 }
23992 {
23994 }
23996 {
23998 }
24000 {
24002 }
24004 {
24006 }
24008 {
24010 }
24012 {
24014 }
24016 {
24018 }
24020 {
24022 {
24024 {
24026 }
24027 }
24029 {
24031 }
24032 }
24033 if (i == Main.myPlayer)
24034 {
24036 }
24037 try
24038 {
24039 if (
whoAmI == Main.myPlayer && ((
Game)Main.instance).IsActive)
24040 {
24043 }
24044 }
24045 catch
24046 {
24047 Main.SmartCursorWanted_GamePad = false;
24048 Main.SmartCursorWanted_Mouse = false;
24049 }
24052 {
24054 }
24056 {
24058 }
24060 {
24062 }
24064 {
24066 }
24068 {
24070 }
24076 {
24080 }
24082 {
24084 }
24088 {
24090 }
24092 {
24094 }
24095 else
24096 {
24098 }
24099 if (
whoAmI == Main.myPlayer)
24100 {
24101 Main.musicBox2 = -1;
24102 if (Main.SceneMetrics.WaterCandleCount > 0)
24103 {
24105 }
24106 if (Main.SceneMetrics.PeaceCandleCount > 0)
24107 {
24109 }
24110 if (Main.SceneMetrics.ShadowCandleCount > 0)
24111 {
24113 }
24114 if (Main.SceneMetrics.HasCampfire)
24115 {
24117 }
24118 if (Main.SceneMetrics.HasCatBast)
24119 {
24121 }
24122 if (Main.SceneMetrics.HasStarInBottle)
24123 {
24125 }
24126 if (Main.SceneMetrics.HasHeartLantern)
24127 {
24129 }
24130 if (Main.SceneMetrics.HasSunflower)
24131 {
24133 }
24134 if (Main.SceneMetrics.hasBanner)
24135 {
24137 }
24139 {
24141 }
24142 }
24145 {
24147 }
24152 {
24154 }
24155 if (
whoAmI == Main.myPlayer)
24156 {
24158 {
24160 }
24164 }
24167 {
24173 }
24174 else
24175 {
24177 }
24179 {
24181 }
24183 {
24185 }
24190 {
24192 }
24196 if (
whoAmI == Main.myPlayer)
24197 {
24199 {
24201 {
24203 }
24204 }
24205 }
24214 {
24216 }
24218 {
24220 }
24222 if (Main.npcShop <= 0)
24223 {
24225 }
24227 {
24229 }
24235 {
24237 }
24239 {
24241 }
24243 {
24245 }
24248 {
24253 {
24255 {
24257 }
24259 {
24262 }
24264 {
24267 }
24268 }
24269 }
24273 {
24275 }
24278 {
24281 }
24283 {
24285 }
24287 {
24289 }
24291 {
24293 {
24295 }
24296 else if (
aggro > -250)
24297 {
24299 }
24300 }
24302 {
24304 {
24307 {
24309 }
24310 }
24312 {
24314 {
24317 {
24319 if (Main.netMode == 1)
24320 {
24321 NetMessage.SendData(84, -1, -1,
null,
whoAmI);
24322 }
24323 }
24324 }
24325 }
24326 else
24327 {
24329 {
24331 }
24333 {
24335 }
24336 }
24338 {
24340 }
24346 {
24348 }
24349 }
24351 {
24353 {
24355 }
24356 if ((
double)velocity.X > -0.1 && (double)
velocity.X < 0.1 && (
double)velocity.Y > -0.1 && (double)
velocity.Y < 0.1 && !
mount.
Active)
24357 {
24359 {
24362 {
24364 if (Main.netMode == 1)
24365 {
24366 NetMessage.SendData(84, -1, -1,
null,
whoAmI);
24367 }
24368 }
24369 }
24370 }
24371 else
24372 {
24376 {
24378 }
24380 {
24382 }
24383 }
24389 {
24391 }
24392 }
24394 {
24395 bool flag6 =
false;
24397 {
24401 {
24403 }
24404 else
24405 {
24407 }
24409 {
24410 NetMessage.SendData(84, -1, -1,
null,
whoAmI);
24411 }
24419 {
24421 }
24422 }
24423 else
24424 {
24428 {
24430 }
24431 else
24432 {
24434 }
24436 {
24437 NetMessage.SendData(84, -1, -1,
null,
whoAmI);
24438 }
24439 }
24441 {
24442 if (Main.rand.Next(2) == 0)
24443 {
24444 Vector2
vector = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
24445 Dust
obj2 = Main.dust[Dust.NewDust(
base.Center -
vector * 30
f, 0, 0, 229)];
24446 obj2.noGravity = true;
24447 obj2.position = base.Center -
vector * (float)Main.rand.Next(5, 11);
24448 obj2.velocity =
vector.RotatedBy(1.5707963705062866) * 4
f;
24449 obj2.scale = 0.5f + Main.rand.NextFloat();
24450 obj2.fadeIn = 0.5f;
24451 }
24452 if (Main.rand.Next(2) == 0)
24453 {
24454 Vector2
vector2 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
24455 Dust
obj3 = Main.dust[Dust.NewDust(
base.Center -
vector2 * 30
f, 0, 0, 240)];
24456 obj3.noGravity = true;
24457 obj3.position = base.Center -
vector2 * 12
f;
24458 obj3.velocity =
vector2.RotatedBy(-1.5707963705062866) * 2
f;
24459 obj3.scale = 0.5f + Main.rand.NextFloat();
24460 obj3.fadeIn = 0.5f;
24461 }
24462 }
24463 }
24464 else
24465 {
24467 }
24469 {
24471 }
24473 {
24475 }
24478 {
24480 }
24483 {
24486 {
24488 }
24489 }
24491 {
24493 }
24495 {
24497 }
24499 {
24501 }
24503 {
24506 {
24508 }
24509 }
24511 {
24514 {
24517 }
24518 }
24520 {
24522 }
24529 {
24531 }
24533 {
24535 }
24540 {
24542 {
24544 }
24545 }
24547 {
24549 }
24551 {
24553 }
24555 {
24557 }
24561 {
24563 }
24564 else
24565 {
24567 }
24569 {
24571 }
24573 {
24575 }
24576 else
24577 {
24579 }
24581 {
24584 }
24586 {
24591 }
24593 {
24595 }
24597 {
24599 }
24601 {
24603 }
24609 {
24611 {
24613 }
24618 bool flag7 =
false;
24620 {
24622 }
24624 {
24626 {
24629 }
24631 {
24634 }
24635 else
24636 {
24638 {
24641 }
24643 {
24646 }
24647 }
24648 }
24650 {
24652 {
24655 {
24659 }
24660 }
24662 {
24665 {
24669 }
24670 }
24671 }
24674 {
24676 }
24679 {
24680 instantMovementAccumulatedThisFrame.X += -1
f;
24681 }
24683 {
24684 instantMovementAccumulatedThisFrame.X += 1
f;
24685 }
24686 bool flag9 =
false;
24688 {
24691 {
24698 {
24700 }
24702 {
24704 }
24706 {
24708 }
24710 {
24714 }
24715 if (i == Main.myPlayer)
24716 {
24717 Main.cameraX = Main.cameraX + position.X - (float)
num45;
24718 }
24719 position.X =
num45;
24723 }
24724 }
24726 {
24729 {
24731 }
24733 {
24735 }
24736 }
24738 {
24740 }
24742 {
24744 }
24746 {
24748 }
24750 {
24752 }
24754 {
24756 }
24758 {
24760 }
24762 {
24766 }
24767 }
24769 {
24771 }
24772 if (
NPC.brainOfGravity >= 0 &&
NPC.brainOfGravity < 200 && Vector2.Distance(
base.Center, Main.npc[
NPC.brainOfGravity].Center) < 4000
f)
24773 {
24775 }
24777 {
24779 }
24781 {
24785 {
24787 }
24794 {
24796 }
24798 {
24800 }
24802 {
24805 {
24807 }
24808 }
24810 {
24812 {
24816 {
24819 {
24820 if (i == Main.myPlayer)
24821 {
24822 Main.cameraX = Main.cameraX + position.X -
x3;
24823 }
24828 }
24829 else
24830 {
24833 {
24834 if (i == Main.myPlayer)
24835 {
24836 Main.cameraX = Main.cameraX + position.X -
x3;
24837 }
24842 }
24843 }
24844 }
24846 {
24847 velocity.Y *= 0.7f;
24848 }
24850 {
24851 velocity.Y -= 0.2f;
24852 }
24853 else
24854 {
24855 velocity.Y -= 0.02f;
24856 }
24858 {
24860 }
24861 }
24863 {
24867 {
24870 {
24871 if (i == Main.myPlayer)
24872 {
24873 Main.cameraX = Main.cameraX + position.X -
x4;
24874 }
24879 }
24880 else
24881 {
24884 {
24885 if (i == Main.myPlayer)
24886 {
24887 Main.cameraX = Main.cameraX + position.X -
x4;
24888 }
24893 }
24894 }
24895 }
24897 {
24898 velocity.Y *= 0.7f;
24899 }
24901 {
24902 velocity.Y += 0.2f;
24903 }
24904 else
24905 {
24906 velocity.Y += 0.1f;
24907 }
24909 {
24911 }
24912 }
24913 else
24914 {
24915 velocity.Y *= 0.7f;
24916 if ((
double)velocity.Y > -0.1 && (double)
velocity.Y < 0.1)
24917 {
24919 }
24920 }
24921 }
24923 {
24927 }
24928 else
24929 {
24931 position.Y =
num48 * 16 + 22;
24932 }
24935 {
24937 }
24939 {
24941 }
24942 if (i == Main.myPlayer)
24943 {
24944 Main.cameraX += position.X -
num50;
24945 Main.cameraX =
MathHelper.Clamp(Main.cameraX, -32
f, 32
f);
24946 }
24947 position.X =
num50;
24950 {
24952 }
24954 {
24957 }
24959 {
24961 }
24972 }
24974 {
24976 {
24978 }
24980 {
24982 }
24984 {
24989 }
24991 {
24996 }
24998 {
25000 }
25002 {
25007 {
25009 }
25011 {
25013 }
25014 }
25016 {
25020 }
25022 {
25023 float num51 = 1.75f;
25028 }
25030 {
25034 {
25037 }
25038 }
25040 {
25043 {
25046 }
25047 else
25048 {
25050 }
25051 }
25054 {
25057 }
25059 {
25063 }
25065 {
25074 {
25077 }
25080 {
25082 {
25087 {
25089 }
25090 }
25091 else
25092 {
25095 }
25096 }
25098 {
25100 }
25101 }
25106 {
25108 }
25110 {
25112 {
25114 {
25119 }
25120 else
25121 {
25126 }
25127 }
25128 }
25130 {
25132 {
25134 {
25139 }
25140 else
25141 {
25146 }
25147 }
25148 }
25149 else
25150 {
25152 }
25154 {
25155 velocity.Y = 0
f - (mount.Acceleration +
gravity + 0.001f);
25156 }
25161 {
25163 }
25165 {
25167 }
25169 {
25171 }
25177 {
25179 }
25181 {
25183 }
25186 {
25189 }
25191 {
25193 }
25195 {
25197 }
25199 {
25201 {
25203 }
25206 {
25208 }
25211 }
25212 else
25213 {
25216 {
25219 }
25222 {
25227 {
25229 }
25231 }
25233 {
25236 {
25238 }
25240 {
25242 {
25244 }
25246 }
25247 else
25248 {
25250 }
25251 }
25253 {
25255 }
25257 {
25259 }
25261 {
25263 {
25267 {
25269 {
25271 }
25273 {
25275 }
25276 }
25278 {
25280 {
25283 }
25285 {
25288 }
25289 }
25290 }
25291 else
25292 {
25294 }
25295 }
25297 {
25299 }
25301 {
25303 }
25305 {
25307 }
25309 {
25313 {
25315 }
25317 velocity.Y -= 0.1f *
gravDir;
25319 {
25321 {
25322 velocity.Y -= 0.5f;
25323 }
25325 {
25326 velocity.Y -= 0.1f;
25327 }
25329 {
25331 }
25332 }
25333 else
25334 {
25336 {
25337 velocity.Y += 0.5f;
25338 }
25339 else if ((
double)velocity.Y < (double)
jumpSpeed * 0.5)
25340 {
25341 velocity.Y += 0.1f;
25342 }
25344 {
25346 }
25347 }
25348 }
25350 {
25352 {
25354 }
25356 {
25358 {
25360 {
25361 velocity.Y *= 0.9f;
25362 if (
velocity.Y > -1
f && (
double)velocity.Y < 0.5)
25363 {
25364 velocity.Y = 1
E-05
f;
25365 }
25366 }
25367 else
25368 {
25371 {
25373 }
25375 {
25376 velocity.Y -= 0.5f;
25377 }
25378 else if ((
double)velocity.Y > (double)(0
f -
num55) * 1.5)
25379 {
25380 velocity.Y -= 0.1f;
25381 }
25383 {
25384 velocity.Y = (0
f -
num55) * 1.5
f;
25385 }
25386 }
25387 }
25388 else
25389 {
25392 {
25394 {
25396 }
25397 }
25399 {
25401 }
25402 }
25403 }
25405 {
25407 {
25409 }
25410 else
25411 {
25413 }
25415 }
25417 {
25421 {
25422 if (
wings == 10 && Main.rand.Next(3) == 0)
25423 {
25426 {
25428 }
25429 int num57 = Dust.NewDust(
new Vector2(
position.X + (
float)(
width / 2) + (
float)
num56, position.Y + (float)(
height / 2) - 15
f), 30, 30, 76, 0
f, 0
f, 50,
default(Color), 0.6f);
25430 Main.dust[
num57].fadeIn = 1.1f;
25431 Main.dust[
num57].noGravity =
true;
25432 Main.dust[
num57].noLight =
true;
25434 obj4.velocity *= 0.3f;
25436 }
25438 {
25441 {
25443 }
25444 int num60 = Dust.NewDust(
new Vector2(
position.X + (
float)(
width / 2) + (
float)
num59, position.Y + (float)(
height / 2) - 15
f), 30, 30, 261, 0
f, 0
f, 50,
default(Color), 0.6f);
25445 Main.dust[
num60].fadeIn = 1.1f;
25446 Main.dust[
num60].noGravity =
true;
25447 Main.dust[
num60].noLight =
true;
25448 Main.dust[
num60].noLightEmittence = noLightEmittence;
25450 obj5.velocity *= 0.3f;
25452 }
25454 {
25456 }
25458 {
25460 }
25461 if (
wings == 9 && Main.rand.Next(3) == 0)
25462 {
25465 {
25467 }
25469 Main.dust[
num62].noGravity =
true;
25471 obj6.velocity *= 0.3f;
25472 Main.dust[
num62].noLightEmittence = noLightEmittence;
25474 }
25475 if (
wings == 29 && Main.rand.Next(3) == 0)
25476 {
25479 {
25481 }
25483 Main.dust[
num64].noGravity =
true;
25485 obj7.velocity *= 0.3f;
25486 Main.dust[
num64].noLightEmittence = noLightEmittence;
25487 if (Main.rand.Next(10) == 0)
25488 {
25489 Main.dust[
num64].fadeIn = 2
f;
25490 }
25492 }
25494 {
25495 if (Main.rand.Next(10) == 0)
25496 {
25499 {
25501 }
25503 Main.dust[
num66].noLightEmittence = noLightEmittence;
25505 obj8.velocity *= 0.3f;
25507 }
25508 }
25509 else if (
wings == 5 && Main.rand.Next(6) == 0)
25510 {
25513 {
25515 }
25518 obj9.velocity *= 0.3f;
25519 Main.dust[
num68].noLightEmittence = noLightEmittence;
25521 }
25523 {
25525 {
25528 {
25531 }
25532 int type = 6;
25533 float scale = 1.5f;
25534 int alpha = 100;
25535 float x5 = position.X + (float)(
width / 2) + 16
f;
25537 {
25538 x5 = position.X + (float)(
width / 2) - 26
f;
25539 }
25541 if (Main.rand.Next(2) == 1)
25542 {
25543 x5 = position.X + (float)(
width / 2) + 8
f;
25545 {
25546 x5 = position.X + (float)(
width / 2) - 20
f;
25547 }
25549 }
25550 int num71 = Dust.NewDust(
new Vector2(
x5,
num70), 8, 8, type, 0
f, 0
f, alpha,
default(Color), scale);
25551 Main.dust[
num71].velocity.X *= 0.3f;
25552 Main.dust[
num71].velocity.Y += 10
f;
25553 Main.dust[
num71].noGravity =
true;
25554 Main.dust[
num71].noLightEmittence = noLightEmittence;
25558 {
25562 {
25564 }
25565 }
25566 }
25568 {
25570 {
25574 {
25576 }
25578 }
25579 else if (
wings == 34)
25580 {
25584 {
25586 }
25588 }
25589 else if (
wings != 45)
25590 {
25592 {
25594 }
25595 else if (
wings == 44)
25596 {
25598 }
25599 else if (
wings == 39)
25600 {
25604 {
25606 }
25608 }
25609 else if (
wings == 26)
25610 {
25613 {
25615 }
25617 Main.dust[
num76].noGravity =
true;
25618 Main.dust[
num76].noLight =
true;
25620 obj10.velocity /= 4
f;
25624 if (Main.rand.Next(2) == 0)
25625 {
25628 {
25630 }
25633 {
25635 }
25637 Main.dust[
num76].noGravity =
true;
25638 Main.dust[
num76].noLight =
true;
25640 obj12.velocity /= 4
f;
25644 }
25646 }
25647 else if (
wings == 37)
25648 {
25649 Color color = Color.Lerp(Color.Black, Color.White, Main.rand.NextFloat());
25652 {
25654 }
25655 int num79 = Dust.NewDust(
new Vector2(
position.X + (
float)(
width / 2) + (
float)
num78,
position.Y), 24,
height, Utils.SelectRandom<
int>(Main.rand, 31, 31, 31), 0
f, 0
f, 100,
default(Color), 0.7f);
25656 Main.dust[
num79].noGravity =
true;
25657 Main.dust[
num79].noLight =
true;
25659 obj14.velocity /= 4
f;
25663 if (Main.dust[
num79].type == 55)
25664 {
25665 Main.dust[
num79].color = color;
25666 }
25667 if (Main.rand.Next(3) == 0)
25668 {
25671 {
25673 }
25676 {
25678 }
25679 num79 = Dust.NewDust(
new Vector2(
position.X + (
float)(
width / 2) + (
float)
num78,
num81), 12,
height / 2, Utils.SelectRandom<
int>(Main.rand, 31, 31, 31), 0
f, 0
f, 140,
default(Color), 0.7f);
25680 Main.dust[
num79].noGravity =
true;
25681 Main.dust[
num79].noLight =
true;
25683 obj16.velocity /= 4
f;
25687 if (Main.dust[
num79].type == 55)
25688 {
25689 Main.dust[
num79].color = color;
25690 }
25691 }
25693 }
25694 else if (
wings != 24)
25695 {
25697 {
25699 }
25700 else if (
wings == 12)
25701 {
25703 }
25704 else
25705 {
25707 }
25708 }
25709 }
25710 }
25711 }
25712 }
25715 {
25717 {
25719 }
25720 }
25722 {
25724 }
25725 }
25727 {
25729 }
25730 else
25731 {
25733 }
25734 }
25736 {
25738 {
25740 {
25742 }
25744 {
25746 }
25748 {
25750 }
25751 }
25752 else
25753 {
25755 {
25757 }
25759 {
25761 }
25763 {
25765 }
25766 }
25767 }
25768 }
25769 }
25770 else
25771 {
25773 }
25775 {
25777 }
25779 {
25780 float num82 = 0.9f;
25782 {
25784 }
25785 velocity.Y *=
num82;
25787 {
25788 velocity.Y = 1
E-05
f;
25789 }
25790 }
25792 {
25793 velocity.Y *= 0.92f;
25795 {
25796 velocity.Y = 1
E-05
f;
25797 }
25798 }
25802 {
25805 if (Main.wofNPCIndex >= 0)
25806 {
25807 NPC nPC = Main.npc[Main.wofNPCIndex];
25808 float num113 = nPC.Center.X + (float)(
nPC.direction * 200);
25809 float y7 =
nPC.Center.Y;
25815 if (Main.expertMode)
25816 {
25818 float amount =
Math.Min(1
f, ((Vector2)(
ref nPC.velocity)).Length() / 5
f);
25820 }
25823 {
25825 }
25826 else
25827 {
25830 }
25833 velocity.X =
num83;
25834 velocity.Y =
num84;
25835 }
25836 else
25837 {
25839 }
25841 {
25843 {
25845 {
25847 }
25848 }
25849 }
25850 }
25851 if (Main.myPlayer ==
whoAmI)
25852 {
25855 {
25857 {
25859 }
25861 }
25862 else
25863 {
25865 }
25867 {
25868 Rectangle
rectangle =
default(Rectangle);
25870 Rectangle
value2 =
default(Rectangle);
25873 {
25875 {
25877 }
25879 Main.npcChatCornerItem = 0;
25880 Main.npcChatText = "";
25881 }
25882 }
25884 {
25885 Rectangle
value3 =
default(Rectangle);
25887 try
25888 {
25890 if (Main.sign[
sign] ==
null)
25891 {
25893 }
25895 {
25896 val =
new Rectangle(Main.sign[
sign].x * 16, Main.sign[
sign].y * 16, 32, 32);
25898 {
25900 }
25901 }
25903 {
25906 Main.editSign = false;
25907 Main.npcChatText = "";
25908 }
25909 }
25910 catch
25911 {
25914 Main.editSign = false;
25915 Main.npcChatText = "";
25916 }
25917 }
25918 if (Main.editSign)
25919 {
25921 {
25922 Main.editSign = false;
25923 }
25924 else
25925 {
25926 Main.InputTextSign();
25927 }
25928 }
25929 else if (Main.editChest)
25930 {
25931 Main.InputTextChest();
25932 if (Main.player[Main.myPlayer].chest == -1)
25933 {
25934 Main.editChest = false;
25935 }
25936 }
25938 {
25942 {
25943 rectangle2.X -= 15;
25944 }
25946 {
25947 rectangle2.Width += 15;
25948 }
25950 {
25951 rectangle2.X -= 10;
25952 }
25954 {
25955 rectangle2.Width += 10;
25956 }
25958 {
25959 rectangle2.Y -= 10;
25960 }
25962 {
25963 rectangle2.Height += 10;
25964 }
25966 {
25968 {
25970 bool crit = false;
25971 if ((
float)Main.rand.Next(1, 101) <=
num91)
25972 {
25973 crit = true;
25974 }
25979 {
25981 }
25982 if (Main.npc[
num89].knockBackResist < 1
f && Main.npc[
num89].knockBackResist > 0
f)
25983 {
25984 knockback /= Main.npc[
num89].knockBackResist;
25985 }
25986 if (
whoAmI == Main.myPlayer)
25987 {
25989 }
25990 Main.npc[
num89].immune[i] = 30;
25991 if (!Main.npc[
num89].active)
25992 {
25994 }
25995 }
25996 }
25997 }
26000 {
26003 {
26005 }
26006 }
26008 }
26010 {
26012 }
26013 else
26014 {
26017 }
26019 {
26021 }
26022 else
26023 {
26026 }
26029 {
26031 }
26033 {
26035 }
26037 {
26039 }
26041 {
26043 }
26048 {
26051 }
26054 {
26056 }
26059 {
26061 }
26063 {
26065 {
26067 {
26069 }
26070 else
26071 {
26074 if (Main.remixWorld)
26075 {
26078 }
26080 {
26082 {
26083 if (Main.remixWorld)
26084 {
26086 }
26089 }
26091 {
26094 }
26096 {
26098 }
26100 {
26102 }
26103 }
26104 }
26105 }
26107 }
26108 else
26109 {
26112 {
26114 }
26115 }
26117 {
26119 }
26121 {
26123 }
26125 bool flag19 = Collision.honey;
26126 bool shimmer = Collision.shimmer;
26127 if (shimmer)
26128 {
26131 {
26134 if (Main.tile[
num96,
num97] !=
null && Main.tile[
num96,
num97].shimmer() && Main.tile[
num96,
num97].liquid >= 0 && position.Y / 16
f < (float)Main.UnderworldLayer)
26135 {
26137 }
26138 }
26139 }
26141 {
26144 }
26146 {
26148 {
26150 {
26153 {
26155 }
26156 }
26157 }
26159 {
26161 {
26164 {
26166 {
26168 {
26170 {
26172 Main.dust[
num102].velocity.Y -= 4
f;
26173 Main.dust[
num102].velocity.X *= 2.5f;
26174 Main.dust[
num102].scale = 0.8f;
26175 Main.dust[
num102].noGravity =
true;
26176 switch (Main.rand.Next(6))
26177 {
26178 case 0:
26179 Main.dust[
num102].color =
new Color(255, 255, 210);
26180 break;
26181 case 1:
26182 Main.dust[
num102].color =
new Color(190, 245, 255);
26183 break;
26184 case 2:
26185 Main.dust[
num102].color =
new Color(255, 150, 255);
26186 break;
26187 default:
26188 Main.dust[
num102].color =
new Color(190, 175, 255);
26189 break;
26190 }
26191 }
26193 }
26195 {
26197 {
26199 Main.dust[
num104].velocity.Y -= 1
f;
26200 Main.dust[
num104].velocity.X *= 2.5f;
26201 Main.dust[
num104].scale = 1.3f;
26202 Main.dust[
num104].alpha = 100;
26203 Main.dust[
num104].noGravity =
true;
26204 }
26206 }
26207 else
26208 {
26210 {
26212 Main.dust[
num106].velocity.Y -= 3
f;
26213 Main.dust[
num106].velocity.X *= 2.5f;
26214 Main.dust[
num106].scale = 0.8f;
26215 Main.dust[
num106].alpha = 100;
26216 Main.dust[
num106].noGravity =
true;
26217 }
26219 }
26220 }
26221 else
26222 {
26224 {
26226 Main.dust[
num108].velocity.Y -= 1.5f;
26227 Main.dust[
num108].velocity.X *= 2.5f;
26228 Main.dust[
num108].scale = 1.3f;
26229 Main.dust[
num108].alpha = 100;
26230 Main.dust[
num108].noGravity =
true;
26231 }
26233 }
26234 }
26235 }
26238 {
26241 {
26243 }
26244 }
26245 }
26246 }
26248 {
26251 {
26253 }
26255 {
26258 {
26260 {
26262 {
26264 {
26266 Main.dust[
num110].velocity.Y -= 4
f;
26267 Main.dust[
num110].velocity.X *= 2.5f;
26268 Main.dust[
num110].scale = 0.75f;
26269 Main.dust[
num110].noGravity =
true;
26270 switch (Main.rand.Next(6))
26271 {
26272 case 0:
26273 Main.dust[
num110].color =
new Color(255, 255, 210);
26274 break;
26275 case 1:
26276 Main.dust[
num110].color =
new Color(190, 245, 255);
26277 break;
26278 case 2:
26279 Main.dust[
num110].color =
new Color(255, 150, 255);
26280 break;
26281 default:
26282 Main.dust[
num110].color =
new Color(190, 175, 255);
26283 break;
26284 }
26285 }
26287 }
26289 {
26291 {
26293 Main.dust[
num12].velocity.Y -= 1
f;
26294 Main.dust[
num12].velocity.X *= 2.5f;
26295 Main.dust[
num12].scale = 1.3f;
26296 Main.dust[
num12].alpha = 100;
26297 Main.dust[
num12].noGravity =
true;
26298 }
26300 }
26301 else
26302 {
26304 {
26306 Main.dust[
num14].velocity.Y -= 4
f;
26307 Main.dust[
num14].velocity.X *= 2.5f;
26308 Main.dust[
num14].scale = 0.8f;
26309 Main.dust[
num14].alpha = 100;
26310 Main.dust[
num14].noGravity =
true;
26311 }
26313 }
26314 }
26315 else
26316 {
26318 {
26320 Main.dust[
num16].velocity.Y -= 1.5f;
26321 Main.dust[
num16].velocity.X *= 2.5f;
26322 Main.dust[
num16].scale = 1.3f;
26323 Main.dust[
num16].alpha = 100;
26324 Main.dust[
num16].noGravity =
true;
26325 }
26327 }
26328 }
26329 }
26330 }
26332 {
26334 }
26335 if (!shimmer)
26336 {
26338 }
26340 {
26344 }
26346 {
26348 }
26350 {
26352 }
26354 {
26356 {
26357 case 5:
26358 case 7:
26359 if (
whoAmI == Main.myPlayer)
26360 {
26362 }
26363 break;
26364 case 3:
26365 case 50:
26368 {
26369 velocity.Y *= 0.9f;
26370 }
26371 velocity.Y -= 0.5f;
26373 {
26375 }
26376 break;
26377 }
26378 }
26380 {
26382 }
26385 {
26388 {
26390 }
26391 }
26393 {
26396 {
26398 }
26399 }
26401 {
26403 }
26405 {
26407 }
26408 if (Main.myPlayer == i)
26409 {
26411 {
26413 }
26415 }
26417 {
26419 bool flag20 = mount.Type == 7 || mount.Type == 8 || mount.Type == 12 || mount.Type == 44 || mount.Type == 49;
26421 {
26423 }
26425 {
26427 {
26429 }
26430 }
26432 {
26434 }
26435 }
26438 bool falling = false;
26440 {
26441 falling = true;
26442 }
26444 {
26445 falling = true;
26446 }
26452 {
26455 }
26460 {
26466 BitsByte
bitsByte = Minecart.TrackCollision(
this,
ref position,
ref velocity,
ref lastBoost,
width,
height,
controlDown,
controlUp,
fallStart2,
trackOnly:
false,
mount.Delegations);
26468 {
26472 }
26474 {
26476 }
26478 {
26480 {
26482 {
26484 }
26485 else
26486 {
26488 }
26489 }
26491 {
26493 }
26495 {
26497 }
26499 }
26502 {
26504 }
26506 {
26508 }
26510 {
26512 }
26514 {
26516 }
26517 }
26521 {
26522 velocity.Y = velocity.Y * 0.8f + (float)
Math.Cos(
base.Center.X % 120
f / 120
f * ((
float)Math.PI * 2
f)) * 5
f * 0.2f;
26523 }
26526 {
26529 }
26531 {
26533 }
26535 {
26537 }
26539 {
26541 }
26542 else
26543 {
26546 {
26551 }
26553 {
26558 }
26559 }
26564 {
26567 {
26568 Collision.StepConveyorBelt(
this,
gravDir);
26569 }
26570 }
26572 {
26574 }
26576 {
26577 NetMessage.SendData(13, -1, -1,
null,
whoAmI);
26579 }
26581 {
26583 {
26585 }
26587 {
26589 }
26590 }
26591 if (
gravDir == 1
f && Collision.up)
26592 {
26593 velocity.Y = 0.01f;
26595 {
26597 }
26598 }
26599 else if (
gravDir == -1
f && Collision.down)
26600 {
26601 velocity.Y = -0.01f;
26603 {
26605 }
26606 }
26608 {
26610 }
26612 {
26614 }
26619 if (Main.netMode != 2 &&
mount.
Type != 8)
26620 {
26622 }
26626 {
26628 }
26630 {
26632 }
26634 {
26636 }
26642 }
26643 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Used when NPCs or pets/minions give gifts or rewards to a player.
static PlayerDeathReason ByOther(int type, int playerIndex=-1)
virtual void OnPlayerUpdate(Player player)
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
int height
The height of this Entity's hitbox, in pixels.
static void HandleSpecialEvent(Player player, int eventID)
static void HandleRunning(float pixelsMoved)
static readonly CreativePowerManager Instance
bool IsEnabledForPlayer(int playerIndex)
static void Update(Player player)
void Update(Player player)
static bool DownedInvasionAnyDifficulty
static bool ShouldBlockBuilding(Vector2 worldPosition)
static void FindArenaHitbox()
static void TryPlayingIdleMessage()
static void UpdatePlayerPosition(Player player)
static void SmartCursorLookup(Player player)
static Asset< Texture2D > HairStyleBack
static CaptureManager Instance
static ArmorShaderDataSet Armor
static readonly SoundStyle Item24
static readonly SoundStyle Item32
static readonly SoundStyle Item8
static readonly SoundStyle Item13
int hammer
The Hammer power of this item. For example, Item.hammer = 70; will appear as 70% Hammer Power in the ...
int createWall
The ID of the wall this item places on use. Either a T:Terraria.ID.WallID entry or M:Terraria....
void TurnToAir(bool fullReset=false)
int axe
The Axe power of this item. The Axe power percentage shown to the user is five times this value,...
void SetDefaults(int Type=0)
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
This serves as the central class from which buff-related functions are supported and carried out.
static readonly List< DamageClass > DamageClasses
static DamageClass Ranged
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...
static bool WingUpdate(Player player, bool inUse)
If wings can be seen on the player, calls the player's wing's equipment texture's WingUpdate and all ...
This serves as the central class from which item-related functions are carried out....
static void PostUpdateBuffs(Player player)
static void PreUpdateMovement(Player player)
static void PostUpdateRunSpeeds(Player player)
static void PreUpdate(Player player)
static void PostUpdate(Player player)
static void PostUpdateEquips(Player player)
static void SetControls(Player player)
static void PreUpdateBuffs(Player player)
static void PostUpdateMiscEffects(Player player)
This is where all ModPlayer hooks are gathered and called.
Action< Player, Vector2, int, int > MinecartJumpingSound
Action< Player, Vector2, int, int > MinecartBumperSound
bool IsConsideredASlimeMount
void Dismount(Player mountedPlayer)
MountDelegatesData Delegations
bool Hover(Player mountedPlayer)
void UpdateEffects(Player mountedPlayer)
void UpdateDrill(Player mountedPlayer, bool controlUp, bool controlDown)
void UseDrill(Player mountedPlayer)
void ResetFlightTime(float xVelocity)
void ChangeSelection(int to)
float moveSpeed
The multiplier on this player's F:Terraria.Player.maxRunSpeed and F:Terraria.Player....
bool[] buffImmune
Indexed by T:Terraria.ID.BuffID. If true for a given T:Terraria.ID.BuffID, then this player cannot be...
DoorOpeningHelper doorHelper
int _quickGrappleCooldown
void SetTalkNPC(int npcIndex, bool fromNet=false)
bool selectItemOnNextUse
Causes M:Terraria.Player.SmartSelectLookup to run the next time an item animation is finished,...
int statLifeMax2
The maximum health this player can have, adjusted by buffs and equipment.
void WingAirLogicTweaks()
bool releaseMapFullscreen
void Update_NPCCollision()
OverheadMessage chatOverhead
int chest
Represents the chest the player currently has open. If -1, the player has no chest open....
SelectionRadial DpadRadial
void UpdateMinionTarget()
bool IsStandingStillForSpecialEffects
void HandleBeingInChestRange()
ref StatModifier meleeDamage
void ToggleCreativeMenu()
PlayerSleepingHelper sleeping
int[] doubleTapCardinalTimer
int _timeSinceLastImmuneGet
int statManaMax2
The maximum mana this player can have, adjusted by buffs and equipment.
bool PortalPhysicsEnabled
void UpdateProjectileCaches(int i)
bool downedDD2EventAnyDifficulty
bool tryKeepingHoveringDown
Collision.HurtTile GetHurtTile()
SelectionRadial QuicksRadial
int _framesLeftEligibleForDeadmansChestDeathAchievement
void GamepadEnableGrappleCooldown()
void GetMinecartDamage(float currentSpeed, out int damage, out float knockback)
PlayerSittingHelper sitting
static float jumpSpeed
The speed, in pixels/tick, that this players jumps at.
bool AnyExtraJumpUsable()
Returns true if any extra jump is P:Terraria.DataStructures.ExtraJumpState.Available and M:Terraria....
void CancelAllJumpVisualEffects()
ref StatModifier GetKnockback(DamageClass damageClass)
Gets the knockback modifier for this damage type on this player. This returns a reference,...
Item[] armor
The player's armor and accessories. Indexes 0-2 hold head, chest, and legs armor while 10-12 hold the...
void KeyHoldDown(int keyDir, int holdTime)
static readonly float PhilosopherStoneDurationMultiplier
int statLife
The current health of this player. Capped at F:Terraria.Player.statLifeMax2. If you increase this v...
static int GetMouseScrollDelta()
void PurgeDD2EnergyCrystals()
void UpdateMaxTurrets()
Kills F:Terraria.Projectile.sentry projectiles exceeding the players current F:Terraria....
ref StatModifier rangedDamage
void SmartInteractLookup()
float runAcceleration
The acceleration, in pixels/ticks^2, that this player experiences while running.
void TryToShimmerUnstuck()
void LookForTileInteractions()
void ApplyTouchDamage(int tileId, int x, int y)
bool CanNPCBeHitByPlayerOrPlayerProjectile(NPC npc, Projectile projectile=null)
void UpdatePettingAnimal()
int environmentBuffImmunityTimer
void ResetVisibleAccessories()
float MountFishronSpecialCounter
void HorizontalMovement()
bool HasItem(int type)
Checks if the player has the specified item in their F:Terraria.Player.inventory. Does not check Vo...
void ItemCheckWrapped(int i)
int snowBallLauncherInteractionCooldown
int extraFall
The number of extra tiles this player can fall before they start taking fall damage.
void UpdatePetLight(int i)
void WingFrame(bool wingFlap, bool isCustomWings=false)
void AdjustRemainingPotionSickness()
void ConsumeAllExtraJumps()
Sets the P:Terraria.DataStructures.ExtraJumpState.Available flag for all extra jumps to false....
ref StatModifier magicDamage
bool noFallDmg
If true, this player will take no fall damage.
bool GoingDownWithGrapple
float slotsMinions
The current total value of minions this player has summoned. Used to limit active minions to F:Terrar...
ShimmerUnstuckHelper shimmerUnstuckHelper
void TrySpawningFaelings()
DefenseStat statDefense
The defense value of this player. The Defense wiki pageteaches how player defense affects incoming d...
bool CanMoveForwardOnRope(int dir, int x, int y)
bool tryKeepingHoveringUp
bool ShouldDrawWingsThatAreAlwaysAnimated()
PlayerMovementAccsCache movementAbilitiesCache
void KeyDoubleTap(int keyDir)
Mount mount
This player's T:Terraria.Mount. Do not overwrite this value. Instead, call M:Terraria....
void UpdateArmorSets(int i)
void TryToToggleSmartCursor(ref bool smartCursorWanted)
int[] buffTime
The remaining durations in ticks of all buffs this player has active. A value of 0 means that buff ...
int titaniumStormCooldown
double Hurt(PlayerDeathReason damageSource, int Damage, int hitDirection, bool pvp, bool quiet, bool Crit, int cooldownCounter, bool dodgeable=true, float armorPenetration=0f)
void SlopingCollision(bool fallThrough, bool ignorePlats)
void WaterCollision(bool fallThrough, bool ignorePlats)
void UpdatePortableStoolUsage()
void HoneyCollision(bool fallThrough, bool ignorePlats)
void ItemCheck_ManageRightClickFeatures()
void UpdateTouchingTiles()
static float defaultGravity
void StopVanityActions(bool multiplayerBroadcast=true)
float gfxOffY
An offset from the actual position of the player that will be added to the draw position....
int[] buffType
The T:Terraria.ID.BuffIDs of all buffs this player has active. A value of 0 means that buff slot is...
void CheckCrackedBrickBreak()
bool isOperatingAnotherEntity
int timeSinceLastDashStarted
The amount of time that has passed, in ticks, since this player last performed a dash.
float maxRunSpeed
The maximum speed, in pixels/tick, that this player can reach by just running.
void UpdatePermanentBoosters()
ref StatModifier allDamage
void UpdateReleaseUseTile()
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Gives the player the provided buff. This accounts for if the player is immune to the buff....
void UpdateControlHolds()
Vector2 instantMovementAccumulatedThisFrame
void ResetProjectileCaches()
PlayerEyeHelper eyeHelper
void TryBouncingBlocks(bool Falling)
void DryCollision(bool fallThrough, bool ignorePlats)
void ApplyDamageToNPC(NPC npc, int damage, float knockback, int direction, bool crit=false, DamageClass? damageType=null, bool damageVariation=false)
Deals damage to an NPC (and syncs the hit in multiplayer). The damage will be affected by modifiers...
void TryOpeningFullscreenMap()
void FloorVisuals(bool Falling)
void UpdateSocialShadow()
SelectionRadial CircularRadial
void TryLandingOnDetonator()
void ShimmerCollision(bool fallThrough, bool ignorePlats, bool noCollision)
DirectionalInputSyncCache LocalInputCache
void UpdateNearbyInteractibleProjectilesList()
int statMana
The current mana of this player. Capped at F:Terraria.Player.statManaMax2. If you increase this val...
void UpdateAdvancedShadows()
void DelBuff(int b)
Removes the buff at the provided index in F:Terraria.Player.buffType and F:Terraria....
int[] ownedProjectileCounts
Provides efficient access to the number of projectiles of the specified type owned by this player cur...
void UpdateTeleportVisuals()
int[] holdDownCardinalTimer
Vector2 fullRotationOrigin
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
void RefreshDoubleJumps()
float GetTotalCritChance(DamageClass damageClass)
int numMinions
The current number of minions this player has summoned. Note that F:Terraria.Player....
PlayerInteractionAnchor tileEntityAnchor
void ClearBuff(int type)
Removes the provided buff type from the player and shuffles the remaining buff indexes down to fill t...
static bool DisableLeftShiftTrashCan
TileEntity GetTileEntity()
void CopyFrom(Player player)
void PasteInto(Player player)
void Update(Player player)
void UpdateSitting(Player player)
void UpdateState(Player player)
void Update(Player player)