6723 {
6725 {
6729 ushort
type = tile.type;
6730 short frameX = tile.frameX;
6731 short frameY = tile.frameY;
6733 {
6734 Main.spriteBatch.Draw(TextureAssets.SunOrb.Value,
new Vector2((
float)(num * 16 - (
int)screenPosition.
X) + 8f,
num2 * 16 - (
int)screenPosition.
Y - 36) +
offSet,
new Rectangle(0, 0, TextureAssets.SunOrb.Width(), TextureAssets.SunOrb.Height()),
new Color(Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor, 0), Main.sunCircle,
new Vector2(TextureAssets.SunOrb.Width() / 2, TextureAssets.SunOrb.Height() / 2), 1f,
SpriteEffects.None, 0f);
6735 }
6736 if (
type == 334 && frameX >= 5000)
6737 {
6743 while (
num3 >= 5000)
6744 {
6747 }
6753 Main.instance.LoadItem(
item.type);
6756 int width =
value2.Width;
6757 int height =
value2.Height;
6759 if (width > 40 || height > 40)
6760 {
6761 num6 = ((width <= height) ? (40f / (
float)height) : (40f / (float)width));
6762 }
6766 {
6768 }
6769 Color color = Lighting.GetColor(num,
num2);
6770 Main.spriteBatch.Draw(
value,
new Vector2(num * 16 - (
int)screenPosition.
X + 24,
num2 * 16 - (
int)screenPosition.
Y + 8) +
offSet,
value2, Lighting.GetColor(num,
num2), 0f,
new Vector2(width / 2, height / 2),
num6, effects, 0f);
6772 {
6773 Main.spriteBatch.Draw(
value,
new Vector2(num * 16 - (
int)screenPosition.
X + 24,
num2 * 16 - (
int)screenPosition.
Y + 8) +
offSet,
value2,
item.GetColor(color), 0f,
new Vector2(width / 2, height / 2),
num6, effects, 0f);
6774 }
6775 }
6777 {
6782 }
6784 {
6787 {
6788 Main.instance.LoadItem(
item3.type);
6797 float scale = 1f;
6801 position.Y += 2f;
6805 {
6807 }
6808 }
6809 }
6811 {
6814 int width3 = itemFrame.Width;
6815 int height3 = itemFrame.Height;
6819 {
6821 }
6824 if (tile.frameX < 54)
6825 {
6827 }
6833 Main.spriteBatch.Draw(
itemTexture,
new Vector2(num * 16 - (
int)screenPosition.
X + 24,
num2 * 16 - (
int)screenPosition.
Y + 24) +
offSet, itemFrame,
currentColor2, 0f,
new Vector2(
width3 / 2,
height3 / 2),
num8,
effects3, 0f);
6835 {
6836 Main.spriteBatch.Draw(
itemTexture,
new Vector2(num * 16 - (
int)screenPosition.
X + 24,
num2 * 16 - (
int)screenPosition.
Y + 24) +
offSet, itemFrame,
item4.GetColor(
color4), 0f,
new Vector2(
width3 / 2,
height3 / 2),
num8,
effects3, 0f);
6837 }
6838 }
6840 {
6844 float num11 = (float)(Main.tileFrame[
type] % 60) / 60f;
6846 Main.spriteBatch.Draw(
value5,
new Vector2(num * 16 - (
int)screenPosition.
X,
num2 * 16 - (
int)screenPosition.
Y + 10) +
offSet,
value5.Frame(1, 4, 0,
num10),
color5 * (1f -
num11), 0f,
Vector2.
Zero, 1f,
SpriteEffects.None, 0f);
6847 Main.spriteBatch.Draw(
value5,
new Vector2(num * 16 - (
int)screenPosition.
X,
num2 * 16 - (
int)screenPosition.
Y + 10) +
offSet,
value5.Frame(1, 4, 0,
frameY2),
color5 *
num11, 0f,
Vector2.
Zero, 1f,
SpriteEffects.None, 0f);
6848 }
6850 {
6852 _ = (float)(Main.tileFrame[
type] % 60) / 60f;
6854 Main.critterCage = true;
6862 Main.spriteBatch.Draw(
value6,
vector,
value7,
new Color(255, 255, 255, 255), 0f,
Vector2.
Zero, 1f,
SpriteEffects.None, 0f);
6864 {
6865 Color color6 =
new Color(127, 127, 127, 0).MultiplyRGBA(Main.hslToRgb((Main.GlobalTimeWrappedHourly + (
float)
j / (
float)
num15) % 1f, 1f, 0.5f));
6867 color6.A = 0;
6871 }
6872 Main.spriteBatch.Draw(
value6,
vector,
value7,
new Color(255, 255, 255, 0) * 0.1f, 0f,
Vector2.
Zero, 1f,
SpriteEffects.None, 0f);
6873 }
6874 }
6875 }
static Dictionary< Point16, TileEntity > ByPosition
int GetWaterAnimalCageFrame(int x, int y, int tileFrameX, int tileFrameY)
static float DrawItemIcon(Item item, int context, SpriteBatch spriteBatch, Vector2 screenPositionForItemCenter, float scale, float sizeLimit, Color environmentColor)
static void GetItemLight(ref Color currentColor, Item item, bool outInTheWorld=false)