12239 {
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12267 {
12268 return;
12269 }
12271 {
12273 }
12275 {
12278 }
12280 {
12281 case 4056:
12283 break;
12284 case 3990:
12289 break;
12290 case 3991:
12294 break;
12295 case 3992:
12301 break;
12302 case 3993:
12305 break;
12306 case 4055:
12309 break;
12310 case 3994:
12315 break;
12316 case 3995:
12322 break;
12323 case 3996:
12328 break;
12329 case 3998:
12331 break;
12332 case 4038:
12334 break;
12335 case 4003:
12338 break;
12339 case 4000:
12343 break;
12344 case 4001:
12349 break;
12350 case 4002:
12354 break;
12355 case 4004:
12358 break;
12359 case 3999:
12361 break;
12362 case 4005:
12366 break;
12367 case 4006:
12371 break;
12372 case 4007:
12375 break;
12376 case 4341:
12377 case 5126:
12379 break;
12380 case 4409:
12382 break;
12383 case 5010:
12385 break;
12386 case 3245:
12388 break;
12389 case 5107:
12392 DelegateMethods.v3_1 =
new Vector3(0.9
f, 0.8
f, 0.5
f);
12393 Utils.PlotTileLine(
base.Center,
base.Center +
velocity * 6
f, 20
f, DelegateMethods.CastLightOpen);
12394 Utils.PlotTileLine(
base.Left,
base.Right, 20
f, DelegateMethods.CastLightOpen);
12395 break;
12396 }
12398 {
12402 }
12404 {
12406 }
12408 {
12410 }
12412 {
12414 }
12416 {
12418 }
12420 {
12422 }
12424 {
12426 }
12428 {
12432 }
12434 {
12439 }
12441 {
12465 }
12467 {
12469 }
12471 {
12475 }
12477 {
12479 }
12481 {
12483 }
12485 {
12487 }
12489 {
12492 }
12494 {
12497 }
12499 {
12502 }
12504 {
12505 case 3538:
12507 break;
12508 case 3537:
12510 break;
12511 case 3536:
12513 break;
12514 case 3539:
12516 break;
12517 case 4318:
12519 break;
12520 case 4054:
12522 break;
12523 case 5345:
12525 break;
12526 case 5347:
12528 break;
12529 }
12531 {
12533 }
12535 {
12539 }
12541 {
12543 }
12545 {
12548 }
12550 {
12552 }
12554 {
12557 }
12559 {
12561 }
12563 {
12566 }
12568 {
12573 }
12575 {
12582 }
12584 {
12589 }
12591 {
12596 }
12598 {
12603 }
12605 {
12610 }
12612 {
12617 }
12619 {
12624 }
12626 {
12629 }
12631 {
12634 }
12636 {
12638 }
12640 {
12642 }
12644 {
12646 }
12648 {
12651 }
12653 {
12656 }
12658 {
12660 }
12662 {
12666 }
12668 {
12671 }
12673 {
12675 }
12677 {
12680 }
12682 {
12686 }
12688 {
12691 }
12693 {
12697 }
12699 {
12701 }
12703 {
12705 }
12707 {
12710 }
12712 {
12714 }
12716 {
12720 }
12722 {
12727 }
12729 {
12731 }
12733 {
12735 }
12737 {
12739 }
12741 {
12743 }
12745 {
12747 }
12749 {
12751 }
12753 {
12755 }
12757 {
12759 }
12761 {
12764 }
12766 {
12768 }
12770 {
12772 }
12774 {
12776 }
12778 {
12780 }
12782 {
12784 }
12786 {
12788 }
12790 {
12792 }
12794 {
12798 }
12800 {
12802 }
12804 {
12806 }
12808 {
12811 }
12813 {
12815 }
12817 {
12819 }
12821 {
12823 }
12825 {
12827 }
12829 {
12831 }
12833 {
12835 }
12837 {
12840 }
12842 {
12844 }
12846 {
12848 }
12850 {
12852 }
12854 {
12856 }
12858 {
12860 }
12862 {
12864 }
12866 {
12870 {
12873 }
12874 }
12876 {
12880 }
12882 {
12884 }
12886 {
12888 }
12890 {
12893 }
12895 {
12897 }
12899 {
12904 }
12906 {
12908 }
12910 {
12912 }
12914 {
12917 {
12919 }
12920 }
12922 {
12924 }
12926 {
12928 }
12930 {
12933 }
12935 {
12939 }
12941 {
12944 }
12946 {
12949 }
12951 {
12954 }
12956 {
12958 {
12959 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.225f, 0.05f, 0.15f);
12960 }
12962 {
12963 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 1.8f, 0.4f, 1.2f);
12964 }
12965 }
12967 {
12971 {
12972 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.225f, 0.05f, 0.15f);
12973 }
12975 {
12976 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 1.8f, 0.4f, 1.2f);
12977 }
12978 }
12980 {
12986 {
12987 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.05f, 0.15f, 0.225f);
12988 }
12990 {
12991 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.4f, 1.2f, 1.8f);
12992 }
12993 }
12995 {
12997 }
12999 {
13001 }
13003 {
13005 }
13007 {
13009 }
13011 {
13016 }
13018 {
13025 }
13027 {
13029 }
13031 {
13036 }
13038 {
13045 }
13047 {
13050 }
13052 {
13056 }
13058 {
13061 }
13063 {
13066 }
13068 {
13070 }
13072 {
13074 }
13076 {
13078 }
13080 {
13083 {
13086 {
13087 int myPlayer = Main.myPlayer;
13088 if (Main.player[myPlayer].team ==
team &&
team != 0)
13089 {
13090 float num4 = position.X - Main.player[myPlayer].position.X;
13091 float num2 = position.Y - Main.player[myPlayer].position.Y;
13093 {
13094 Main.player[myPlayer].AddBuff(43, 20);
13095 }
13096 }
13097 }
13098 }
13099 }
13101 {
13107 }
13109 {
13113 }
13115 {
13120 }
13122 {
13127 }
13129 {
13132 }
13134 {
13138 {
13141 }
13142 }
13144 {
13146 }
13148 {
13150 }
13151 if (
currentItem.type == 900 && (!Main.dayTime || Main.eclipse))
13152 {
13154 }
13156 {
13158 }
13160 {
13162 }
13164 {
13166 }
13168 {
13170 }
13172 {
13174 }
13176 {
13178 }
13180 {
13182 }
13184 {
13186 }
13188 {
13190 }
13192 {
13194 }
13196 {
13198 }
13200 {
13202 }
13204 {
13206 }
13208 {
13210 }
13212 {
13214 }
13216 {
13218 }
13220 {
13222 }
13224 {
13226 }
13228 {
13230 }
13232 {
13235 }
13237 {
13240 }
13242 {
13245 }
13247 {
13250 }
13252 {
13255 }
13257 {
13259 }
13261 {
13264 }
13266 {
13277 }
13279 {
13293 }
13295 {
13298 {
13300 }
13301 }
13303 {
13305 }
13307 {
13310 }
13312 {
13314 }
13316 {
13318 }
13320 {
13323 }
13325 {
13327 {
13329 }
13332 }
13334 if (Main.myPlayer !=
whoAmI)
13335 {
13336 return;
13337 }
13339 {
13341 }
13342 else if (
currentItem.type == 576 && Main.rand.Next(540) == 0 && Main.curMusic > 0)
13343 {
13346 if (Main.curMusic == 1)
13347 {
13349 }
13350 if (Main.curMusic == 2)
13351 {
13353 }
13354 if (Main.curMusic == 3)
13355 {
13357 }
13358 if (Main.curMusic == 4)
13359 {
13361 }
13362 if (Main.curMusic == 5)
13363 {
13365 }
13366 if (Main.curMusic == 6)
13367 {
13369 }
13370 if (Main.curMusic == 7)
13371 {
13373 }
13374 if (Main.curMusic == 8)
13375 {
13377 }
13378 if (Main.curMusic == 9)
13379 {
13381 }
13382 if (Main.curMusic == 10)
13383 {
13385 }
13386 if (Main.curMusic == 11)
13387 {
13389 }
13390 if (Main.curMusic == 12)
13391 {
13393 }
13394 if (Main.curMusic == 13)
13395 {
13397 }
13399 if (Main.curMusic == 28)
13400 {
13402 }
13403 else if (Main.curMusic == 29)
13404 {
13406 }
13407 else if (Main.curMusic == 30)
13408 {
13410 }
13411 else if (Main.curMusic == 31)
13412 {
13414 }
13415 else if (Main.curMusic == 32)
13416 {
13418 }
13419 else if (Main.curMusic == 33)
13420 {
13422 }
13423 else if (Main.curMusic == 34)
13424 {
13426 }
13427 else if (Main.curMusic == 35)
13428 {
13430 }
13431 else if (Main.curMusic == 36)
13432 {
13434 }
13435 else if (Main.curMusic == 37)
13436 {
13438 }
13439 else if (Main.curMusic == 38)
13440 {
13442 }
13443 else if (Main.curMusic == 39)
13444 {
13446 }
13447 else if (Main.curMusic == 40)
13448 {
13450 }
13451 else if (Main.curMusic == 41)
13452 {
13454 }
13455 else if (Main.curMusic == 42)
13456 {
13458 }
13459 else if (Main.curMusic == 43)
13460 {
13462 }
13463 else if (Main.curMusic == 44)
13464 {
13466 }
13467 else if (Main.curMusic == 46)
13468 {
13470 }
13471 else if (Main.curMusic == 47)
13472 {
13474 }
13475 else if (Main.curMusic == 48)
13476 {
13478 }
13479 else if (Main.curMusic == 49)
13480 {
13482 }
13483 else if (Main.curMusic == 51)
13484 {
13486 }
13487 else if (Main.curMusic == 52)
13488 {
13490 }
13491 else if (Main.curMusic == 53)
13492 {
13494 }
13495 else if (Main.curMusic == 54)
13496 {
13498 }
13499 else if (Main.curMusic == 55)
13500 {
13502 }
13503 else if (Main.curMusic == 56)
13504 {
13506 }
13507 else if (Main.curMusic == 57)
13508 {
13510 }
13511 else if (Main.curMusic == 58)
13512 {
13514 }
13515 else if (Main.curMusic == 59)
13516 {
13518 }
13519 else if (Main.curMusic == 60)
13520 {
13522 }
13523 else if (Main.curMusic == 61)
13524 {
13526 }
13527 else if (Main.curMusic == 62)
13528 {
13530 }
13531 else if (Main.curMusic == 63)
13532 {
13534 }
13535 else if (Main.curMusic == 64)
13536 {
13538 }
13539 else if (Main.curMusic == 65)
13540 {
13542 }
13543 else if (Main.curMusic == 66)
13544 {
13546 }
13547 else if (Main.curMusic == 67)
13548 {
13550 }
13551 else if (Main.curMusic == 68)
13552 {
13554 }
13555 else if (Main.curMusic == 69)
13556 {
13558 }
13559 else if (Main.curMusic == 70)
13560 {
13562 }
13563 else if (Main.curMusic == 71)
13564 {
13566 }
13567 else if (Main.curMusic == 72)
13568 {
13570 }
13571 else if (Main.curMusic == 73)
13572 {
13574 }
13575 else if (Main.curMusic == 74)
13576 {
13578 }
13579 else if (Main.curMusic == 75)
13580 {
13582 }
13583 else if (Main.curMusic == 76)
13584 {
13586 }
13587 else if (Main.curMusic == 77)
13588 {
13590 }
13591 else if (Main.curMusic == 78)
13592 {
13594 }
13595 else if (Main.curMusic == 79)
13596 {
13598 }
13599 else if (Main.curMusic == 80)
13600 {
13602 }
13603 else if (Main.curMusic == 81)
13604 {
13606 }
13607 else if (Main.curMusic == 82)
13608 {
13610 }
13611 else if (Main.curMusic == 83)
13612 {
13614 }
13615 else if (Main.curMusic == 84)
13616 {
13618 }
13619 else if (Main.curMusic == 85)
13620 {
13622 }
13623 else if (Main.curMusic == 86)
13624 {
13626 }
13627 else if (Main.curMusic == 87)
13628 {
13630 }
13631 else if (Main.curMusic == 88)
13632 {
13634 }
13635 else if (Main.curMusic == 89)
13636 {
13638 }
13639 else if (Main.curMusic == 90)
13640 {
13642 }
13643 else if (Main.curMusic == 91)
13644 {
13646 }
13647 else if (Main.curMusic > 13 && Main.curMusic < Main.maxMusic)
13648 {
13649 currentItem.SetDefaults(1596 + Main.curMusic - 14);
13650 }
13651 else if (
num3 != -1 && Main.curMusic < Main.maxMusic)
13652 {
13654 }
13656 {
13658 }
13659 }
13661 }
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 ...
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.
AmmoID entries represent ammo types. Ammo items that share the same AmmoID value assigned to F:Terrar...
static readonly SoundStyle Item166
int useAmmo
The Ammo ID this weapon will consume. Ammo items with F:Terraria.Item.ammo set to this same AmmoID wi...
static void UpdateAccessory(Item item, Player player, bool hideVisual)
Hook at the end of Player.ApplyEquipFunctional can be called to apply additional code related to acce...
This serves as the central class from which item-related functions are carried out....
static readonly Dictionary< int, int > musicToItem
Unloaded server side.
float moveSpeed
The multiplier on this player's F:Terraria.Player.maxRunSpeed and F:Terraria.Player....
bool equippedAnyWallSpeedAcc
bool[] buffImmune
Indexed by T:Terraria.ID.BuffID. If true for a given T:Terraria.ID.BuffID, then this player cannot be...
int statLifeMax2
The maximum health this player can have, adjusted by buffs and equipment.
bool hasLuck_LuckyHorseshoe
int dashType
The current vanilla dash that the player is using. The following values correspond to vanilla dashes...
bool hasJumpOption_Sandstorm
ref StatModifier meleeDamage
bool bloodMoonMonolithShader
bool remoteVisionForDrone
int statManaMax2
The maximum mana this player can have, adjusted by buffs and equipment.
bool strongBees
If true, then the bees created by F:Terraria.Player.honeyCombItem have a chance to be stronger.
Item brainOfConfusionItem
int statLife
The current health of this player. Capped at F:Terraria.Player.statLifeMax2. If you increase this v...
bool vortexMonolithShader
ref StatModifier rangedDamage
void UpdateBootVisualEffects(Item item)
bool stardustMonolithShader
bool nebulaMonolithShader
Vector2 MountedCenter
Returns the player's center adjusted for mount and step stool usage. Typically used in conjunction wi...
int extraFall
The number of extra tiles this player can fall before they start taking fall damage.
ref float armorPenetration
Item starCloakItem_beeCloakOverrideItem
ref StatModifier magicDamage
bool noFallDmg
If true, this player will take no fall damage.
void UpdateFishingBobber(Item item)
int spikedBoots
Used by the Shoe Spikes and Climbing Claws to allow for holding onto walls (of tiles,...
bool moonLordMonolithShader
int maxMinions
The maximum value of minions this player can have summoned at once. A minion's value is stored as F...
Mount mount
This player's T:Terraria.Mount. Do not overwrite this value. Instead, call M:Terraria....
Item honeyCombItem
If not null, this player will create damaging bee projectiles when taking damage.
PortableStoolUsage portableStoolInfo
bool[] hideVisibleAccessory
void ApplyWilsonBeard(Item currentItem)
bool equippedAnyTileSpeedAcc
void ApplyMusicBox(Item currentItem)
float jumpSpeedBoost
How much to directly increase F:Terraria.Player.jumpSpeed, in pixels/tick.
float manaRegenDelayBonus
ref StatModifier minionDamage
bool CanSeeInvisibleBlocks
WingStats GetWingStats(int wingID)
ref StatModifier allDamage
void SporeSac(Item sourceItem)
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....
float endurance
The percent of damage this player should resist. Has a soft cap of 1f. Cannot reduce taken damage b...
void DoBootsEffect(Utils.TileActionAttempt theEffectMethod)
bool hasCreditsSceneMusicBox
bool accFishingLine
If true, this player's fishing line will never break.
float manaCost
The percent of mana actually used when mana is consumed. Cannot reduce an item's mana cost below 0.
bool hasJumpOption_Blizzard
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
void VolatileGelatin(Item sourceItem)
bool equippedAnyTileRangeAcc
bool DoBootsEffect_PlaceFlamesOnTile(int X, int Y)
ref StatModifier arrowDamageAdditiveStack
bool shimmerMonolithShader
Item starCloakItem_manaCloakOverrideItem
Item starCloakItem_starVeilOverrideItem
int FlyTime
The time in ticks that a player can fly for.