2using Microsoft.Xna.Framework;
42 public static int Place(
int x,
int y)
45 tEFoodPlatter.Position =
new Point16(x, y);
72 public static void Kill(
int x,
int y)
84 public static int Find(
int x,
int y)
114 item.stack = reader.ReadInt16();
119 return Position.X +
"x " + Position.Y +
"y item: " +
item;
212 player.releaseUseItem =
false;
213 player.mouseInterface =
true;
232 public override void NetSend(BinaryWriter writer)
Used when a tile or wall is broken.
static Dictionary< int, TileEntity > ByID
static Dictionary< Point16, TileEntity > ByPosition
static object EntityCreationLock
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
static void NetPlaceEntity(int x, int y)
static void PlaceItemInFrame(Player player, int x, int y)
override void NetPlaceEntityAttempt(int x, int y)
static bool FitsFoodPlatter(Item i)
static int Place(int x, int y)
override void LoadData(TagCompound tag)
Allows you to load custom data that you have saved for this tile entity. Try to write defensive load...
static void TryPlacing(int x, int y, Item item, int stack)
override void RegisterTileEntityID(int assignedID)
override void NetSend(BinaryWriter writer)
Allows you to send custom data for this tile entity between client and server, which will be handled ...
override TileEntity GenerateInstance()
static void OnPlayerInteraction(Player player, int clickX, int clickY)
override void ReadExtraData(BinaryReader reader, bool networkSend)
override string ToString()
override void SaveData(TagCompound tag)
Allows you to save custom data for this tile entity. NOTE: The provided tag is always empty by def...
static bool ValidTile(int x, int y)
static int Hook_AfterPlacement(int x, int y, int type=520, int style=0, int direction=1, int alternate=0)
static void Kill(int x, int y)
static int Find(int x, int y)
override void NetReceive(BinaryReader reader)
Receives custom data sent in the M:Terraria.DataStructures.TileEntity.NetSend(System....
override void WriteExtraData(BinaryWriter writer, bool networkSend)
override bool IsTileValidForEntity(int x, int y)
static bool[] IsFood
If true for a given item type (F:Terraria.Item.type), then that item is food. Food items can be pla...
void netDefaults(int type)
int stack
The current stack of the item. F:Terraria.Item.maxStack indicates the max possible stack.
bool Prefix(int prefixWeWant)
Attempts to apply a prefix to this T:Terraria.Item.
bool favorited
If true, then the given item is favorited. Favorited items cannot be dropped, automatically moved in...
static int NewItem(IEntitySource source, Vector2 pos, Vector2 randomBox, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
This particular overload uses two Vector2 to determine the actual spawn position.
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
static int netMode
Denotes the current network mode: 0 for single player client, 1 for multiplayer client,...
static void WriteByteVanillaPrefix(Item item, BinaryWriter writer)
static TagCompound Save(Item item)
static void Receive(Item item, BinaryReader reader, bool readStack=false, bool readFavorite=false)
static void Load(Item item, TagCompound tag)
static void WriteShortVanillaID(Item item, BinaryWriter writer)
static void Send(Item item, BinaryWriter writer, bool writeStack=false, bool writeFavorite=false)
Tag compounds contained named values, serialisable as per the NBT spec: NBT spec wiki page All primi...
static Item TransferWithLimit(Item source, int limit)
Extract up to limit items from source . If some items remain, M:Terraria.ModLoader....
This serves as the central class from which item-related functions are carried out....
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
static void SendTileSquare(int whoAmi, int tileX, int tileY, int xSize, int ySize, TileChangeType changeType=TileChangeType.None)
void GamepadEnableGrappleCooldown()
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
static void FindRecipes(bool canDelayCheck=false)
A Recipe is a collection of ingredients, tiles, and a resulting Item. This is how players can craft i...
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static void RangeFrame(int startX, int startY, int endX, int endY)
This object encapsulates context information about the source of a particular spawning event of an It...