terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
TEFoodPlatter.cs
Go to the documentation of this file.
1using System;
2using System.IO;
7
9{
10 // Token: 0x02000811 RID: 2065
12 {
13 // Token: 0x0600420A RID: 16906 RVA: 0x00249AA0 File Offset: 0x00247CA0
14 public override void RegisterTileEntityID(int assignedID)
15 {
16 }
17
18 // Token: 0x0600420B RID: 16907 RVA: 0x00249AB0 File Offset: 0x00247CB0
19 public override void NetPlaceEntityAttempt(int x, int y)
20 {
22 }
23
24 // Token: 0x0600420C RID: 16908 RVA: 0x00249AC4 File Offset: 0x00247CC4
25 public static void NetPlaceEntity(int x, int y)
26 {
27 int num = TEFoodPlatter.Place(x, y);
28 }
29
30 // Token: 0x0600420D RID: 16909 RVA: 0x000021DB File Offset: 0x000003DB
31 public override TileEntity GenerateInstance()
32 {
33 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
34 }
35
36 // Token: 0x0600420E RID: 16910 RVA: 0x00249ADC File Offset: 0x00247CDC
38 {
39 if (!true)
40 {
41 }
42 base..ctor();
43 }
44
45 // Token: 0x0600420F RID: 16911 RVA: 0x00249AF4 File Offset: 0x00247CF4
46 public static int Place(int x, int y)
47 {
48 if (!true)
49 {
50 }
51 int num = TileEntity.AssignNewID();
52 Monitor.Enter(x, x != 0);
53 long num2 = 0L;
54 Monitor.Exit(x);
55 if (num2 == 0L)
56 {
57 return x;
58 }
59 throw new OutOfMemoryException();
60 }
61
62 // Token: 0x06004210 RID: 16912 RVA: 0x00249B44 File Offset: 0x00247D44
63 public override bool IsTileValidForEntity(int x, int y)
64 {
65 bool flag;
66 return flag;
67 }
68
69 // Token: 0x06004211 RID: 16913 RVA: 0x00249B54 File Offset: 0x00247D54
70 public static int Hook_AfterPlacement(int x, int y, int type = 520, int style = 0, int direction = 1, int alternate = 0)
71 {
72 if (!true)
73 {
74 }
76 if (!true)
77 {
78 }
79 int myPlayer = Main.myPlayer;
80 return 87;
81 }
82
83 // Token: 0x06004212 RID: 16914 RVA: 0x00249B90 File Offset: 0x00247D90
84 public static void Kill(int x, int y)
85 {
86 if (!true)
87 {
88 }
89 int key = TileEntity.GetKey(x, y);
90 int key2 = TileEntity.GetKey(x, y);
91 if (!false)
92 {
93 return;
94 }
95 throw new OutOfMemoryException();
96 }
97
98 // Token: 0x06004213 RID: 16915 RVA: 0x00249BD4 File Offset: 0x00247DD4
99 public static int Find(int x, int y)
100 {
101 if (!true)
102 {
103 }
104 int key = TileEntity.GetKey(int.MinValue, x);
105 return int.MinValue;
106 }
107
108 // Token: 0x06004214 RID: 16916 RVA: 0x00249BFC File Offset: 0x00247DFC
109 public static bool ValidTile(int x, int y)
110 {
111 /*
112An exception occurred when decompiling this method (06004214)
113
114ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Tile_Entities.TEFoodPlatter::ValidTile(System.Int32,System.Int32)
115
116 ---> System.Exception: Basic block has to end with unconditional control flow.
117{
118 IL_001D:
119 stloc:int16(var_7_24, callgetter:int16(Tile::get_frameY, ldloc:Tile[exp:valuetype Terraria.Tile&](var_6)))
120}
121
122 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
123 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
124 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
125 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
126 --- End of inner exception stack trace ---
127 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
128 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
129*/;
130 }
131
132 // Token: 0x06004215 RID: 16917 RVA: 0x00249C34 File Offset: 0x00247E34
133 public override void WriteExtraData(BinaryWriter writer, bool networkSend)
134 {
135 int netID = this.item.netID;
136 byte prefix = this.item.prefix;
137 int stack = this.item.stack;
138 }
139
140 // Token: 0x06004216 RID: 16918 RVA: 0x00249C68 File Offset: 0x00247E68
141 public override void ReadExtraData(BinaryReader reader, bool networkSend)
142 {
143 long num = 0L;
144 bool flag = this.item.Prefix((int)num);
145 Item item = this.item;
146 }
147
148 // Token: 0x06004217 RID: 16919 RVA: 0x00249C8C File Offset: 0x00247E8C
149 public override string ToString()
150 {
151 Point16 position = this.Position;
152 string text;
153 if ((text == null || text != null) && ("x " == null || "x " != null))
154 {
155 short y = this.Position.Y;
156 string text2;
157 if ((text2 == null || text2 != null) && ("y item: " == null || "y item: " != null) && ("y item: " == null || "y item: " == null || "y item: " != null))
158 {
159 string text3;
160 return text3;
161 }
162 }
163 throw new ArrayTypeMismatchException();
164 }
165
166 // Token: 0x06004218 RID: 16920 RVA: 0x00249CF4 File Offset: 0x00247EF4
167 public void DropItem()
168 {
169 if (!true)
170 {
171 }
172 bool logicHost = Main.LogicHost;
173 Item item = this.item;
174 int netID = item.netID;
175 byte prefix = item.prefix;
176 }
177
178 // Token: 0x06004219 RID: 16921 RVA: 0x00249D24 File Offset: 0x00247F24
179 public static void TryPlacing(int x, int y, int netid, int prefix, int stack)
180 {
181 int num = 1;
182 if (num == 0)
183 {
184 }
185 WorldGen.RangeFrame(x, y, netid, prefix);
186 int num2 = TEFoodPlatter.Find(x, y);
187 if (num == 0)
188 {
189 }
190 }
191
192 // Token: 0x0600421A RID: 16922 RVA: 0x00249D58 File Offset: 0x00247F58
193 public static void OnPlayerInteraction(Player player, int clickX, int clickY)
194 {
195 Vector2 position = player.inventory.position;
197 if (position2 != null)
198 {
199 int num = TEFoodPlatter.Find(clickX, clickY);
200 if (position2 == null)
201 {
202 }
204 int num2 = 1;
205 long num3 = 0L;
206 long num4 = 0L;
207 WorldGen.KillTile(clickX, clickY, num2 != 0, num3 != 0L, num4 != 0L);
208 bool netClient = Main.NetClient;
209 return;
210 }
213 Recipe.FindRecipes(false);
214 }
215
216 // Token: 0x0600421B RID: 16923 RVA: 0x00249DD0 File Offset: 0x00247FD0
217 public static bool FitsFoodPlatter(Item i)
218 {
219 if (!true)
220 {
221 return;
222 }
223 }
224
225 // Token: 0x0600421C RID: 16924 RVA: 0x00249DE4 File Offset: 0x00247FE4
226 public static void PlaceItemInFrame(Player player, int x, int y)
227 {
228 int num = 1;
229 bool itemTimeIsZero = player.ItemTimeIsZero;
230 int num2 = TEFoodPlatter.Find(x, y);
231 if (num == 0)
232 {
233 }
234 int num3 = 1;
235 long num4 = 0L;
236 long num5 = 0L;
237 WorldGen.KillTile(x, y, num3 != 0, num4 != 0L, num5 != 0L);
238 bool netClient = Main.NetClient;
239 int tileTargetX = Player.tileTargetX;
241 int selectedItem = player.selectedItem;
242 int whoAmI = player.whoAmI;
243 }
244
245 // Token: 0x0600421D RID: 16925 RVA: 0x00249EEC File Offset: 0x002480EC
246 public void FixLoadedData()
247 {
248 this.item.FixAgainstExploit();
249 }
250
251 // Token: 0x040080C3 RID: 32963
252 private static byte _myEntityID;
253
254 // Token: 0x040080C4 RID: 32964
255 public Item item;
256 }
257}
class f__AnonymousType0<< Count > j__TPar
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11
static int GetKey(int x, int y)
Vector2 position
Definition Entity.cs:460
static void PlaceItemInFrame(Player player, int x, int y)
override void NetPlaceEntityAttempt(int x, int y)
override void RegisterTileEntityID(int assignedID)
static void OnPlayerInteraction(Player player, int clickX, int clickY)
override void ReadExtraData(BinaryReader reader, bool networkSend)
static void TryPlacing(int x, int y, int netid, int prefix, int stack)
static int Hook_AfterPlacement(int x, int y, int type=520, int style=0, int direction=1, int alternate=0)
override void WriteExtraData(BinaryWriter writer, bool networkSend)
override bool IsTileValidForEntity(int x, int y)
bool Prefix(int prefixWeWant)
Definition Item.cs:234
byte prefix
Definition Item.cs:2397
void FixAgainstExploit()
Definition Item.cs:1274
static int myPlayer
Definition Main.cs:2337
static bool NetClient
Definition Main.cs:5438
static bool NetClientOnly
Definition Main.cs:5407
static bool LogicHost
Definition Main.cs:5469
void GamepadEnableGrappleCooldown()
Definition Player.cs:7876
bool ItemTimeIsZero
Definition Player.cs:1651
static int tileTargetX
Definition Player.cs:66
Item[] inventory
Definition Player.cs:21263
static void FindRecipes(bool canDelayCheck=false)
Definition Recipe.cs:204
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)