45371 {
45372
45373
45374
45375
45379 Tile tile = Main.tile[x, y];
45380 if (!tile.active())
45381 {
45382 return;
45383 }
45384 if ((
sItem.pick > 0 && !Main.tileAxe[tile.type] && !Main.tileHammer[tile.type]) || (
sItem.axe > 0 && Main.tileAxe[tile.type]) || (
sItem.hammer > 0 && Main.tileHammer[tile.type]))
45385 {
45387 }
45389 if (Main.tileNoFail[tile.type])
45390 {
45392 }
45393 if (Main.tileHammer[tile.type])
45394 {
45396 if (
sItem.hammer > 0)
45397 {
45401 {
45403 }
45404 if (tile.type == 26 && (
sItem.hammer < 80 || !Main.hardMode))
45405 {
45408 }
45409 AchievementsHelper.CurrentlyMining = true;
45411 {
45414 if (Main.netMode == 1)
45415 {
45416 NetMessage.SendData(17, -1, -1, null, 0, x, y);
45417 }
45418 }
45419 else
45420 {
45422 if (Main.netMode == 1)
45423 {
45424 NetMessage.SendData(17, -1, -1,
null, 0, x, y, 1
f);
45425 }
45426 }
45428 {
45430 }
45432 AchievementsHelper.CurrentlyMining = false;
45433 }
45434 }
45435 else if (Main.tileAxe[tile.type])
45436 {
45439 {
45440 num2 += (int)((
float)sItem.axe /
modTile2.MineResist);
45441 }
45442 else
45443 {
45444 num2 = ((tile.type != 80) ? (
num2 + (
int)((float)
sItem.axe * 1.2f)) : (
num2 + (int)((float)(
sItem.axe * 3) * 1.2
f)));
45445 if (Main.getGoodWorld)
45446 {
45448 }
45449 }
45451 {
45452 AchievementsHelper.CurrentlyMining = true;
45454 {
45456 }
45457 if (Main.dontStarveWorld && Main.myPlayer ==
whoAmI &&
num2 > 0 && tile.type == 80)
45458 {
45460 }
45462 {
45464 {
45467 {
45469 }
45470 if (tile.type == 80)
45471 {
45474 }
45475 else
45476 {
45478 }
45479 }
45483 if (Main.netMode == 1)
45484 {
45485 NetMessage.SendData(17, -1, -1, null, 0, x, y);
45486 }
45488 {
45490 }
45491 }
45492 else
45493 {
45495 if (Main.netMode == 1)
45496 {
45497 NetMessage.SendData(17, -1, -1,
null, 0, x, y, 1
f);
45498 }
45499 }
45501 {
45503 }
45505 AchievementsHelper.CurrentlyMining = false;
45506 }
45507 }
45508 else if (
sItem.pick > 0)
45509 {
45511 }
45512 if (
sItem.pick > 0)
45513 {
45515 }
45517 }
static PlayerDeathReason ByOther(int type, int playerIndex=-1)
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
static void TryCreatingMessageWithCooldown(MessageSource messageSource, Vector2 position, Vector2 velocity, int cooldownTimeInTicks)
static void Create(MessageSource source, Vector2 position, Vector2 velocity)
int AddDamage(int tileId, int damageAmount, bool updateAmount=true)
int HitObject(int x, int y, int hitType)
static bool[] CountsAsGemTree
If true for a given tile type (P:Terraria.Tile.TileType), then that tile is categorized as a Gem Tree...
static bool[] IsATreeTrunk
If true for a given tile type (P:Terraria.Tile.TileType), then that tile is categorized as a tree tru...
This class represents a type of tile that can be added by a mod. Only one instance of this class will...
static ModTile GetTile(int type)
Gets the ModTile instance with the given type. If no ModTile with the given type exists,...
This serves as the central class from which tile-related functions are supported and carried out.
void TryReplantingTree(int x, int y)
int statLife
The current health of this player. Capped at F:Terraria.Player.statLifeMax2. If you increase this v...
void ClearMiningCacheAt(int x, int y, int hitTileCacheType)
bool IsBottomOfTreeTrunkNoRoots(int x, int y)
double Hurt(PlayerDeathReason damageSource, int Damage, int hitDirection, bool pvp, bool quiet, bool Crit, int cooldownCounter, bool dodgeable=true, float armorPenetration=0f)
void ApplyItemTime(Item sItem, float multiplier=1f, bool? callUseItem=null)
void PickTile(int x, int y, int pickPower)
void ItemCheck_UseMiningTools_TryPoundingTile(Item sItem, int tileHitId, ref bool hitWall, int x, int y)