Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Horrible code from a Minecraft mod

By: a guest on Oct 27th, 2012  |  syntax: Java  |  size: 30.48 KB  |  hits: 2,437  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package net.minecraft.src;
  2. // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
  3. // Jad home page: http://www.kpdus.com/jad.html
  4. // Decompiler options: packimports(3) braces deadcode 
  5. import java.util.Random;
  6. public class BlockInstantTent extends BlockContainer
  7. {
  8. public BlockInstantTent(int i, int j, Material material)
  9. {
  10. super(i, j, material);
  11. }
  12. protected TileEntity getBlockEntity()
  13. {
  14. return new TileEntityTent();
  15. }
  16. public int tickRate()
  17. {
  18. return 4;
  19. }
  20. public static TentData getTentData(short word0, World world, boolean createNew) {
  21. String s = prefix_ + word0;
  22. TentData mapdata = (TentData)world.loadItemData(TentData303.class, s);
  23. if(mapdata == null && createNew) {
  24. int i = world.getUniqueDataId(prefix);
  25. String s1 = prefix_ + i;
  26. mapdata = new HookData303(s1);
  27. world.setItemData(s1, mapdata);
  28. }
  29. return mapdata;
  30. }
  31. public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
  32. {
  33. int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
  34. if(l == 0)
  35. {
  36. rotation = 0;
  37. }
  38. if(l == 1)
  39. {
  40. rotation = 1;
  41. }
  42. if(l == 2)
  43. {
  44. rotation = 2;
  45. }
  46. if(l == 3)
  47. {
  48. rotation = 3;
  49. }
  50. }
  51. protected int damageDropped(int i)
  52. {
  53. return i;
  54. }
  55. public static int func_21034_c(int i)
  56. {
  57. return ~i & 0xf;
  58. }
  59. public static int func_21035_d(int i)
  60. {
  61. return ~i & 0xf;
  62. }
  63. public int getBlockTextureFromSideAndMetadata(int i, int j)
  64. {
  65. if(i == 1)
  66. {
  67. return mod_instantTent.instantTentTop;
  68. }
  69. if(j == 0)
  70. {
  71. return mod_instantTent.instantTent13;
  72. }
  73. if(j == 1)
  74. {
  75. return mod_instantTent.instantTent1;
  76. }
  77. if(j == 2)
  78. {
  79. return mod_instantTent.instantTent2;
  80. }
  81. if(j == 3)
  82. {
  83. return mod_instantTent.instantTent3;
  84. }
  85. if(j == 4)
  86. {
  87. return mod_instantTent.instantTent4;
  88. }
  89. if(j == 5)
  90. {
  91. return mod_instantTent.instantTent5;
  92. }
  93. if(j == 6)
  94. {
  95. return mod_instantTent.instantTent6;
  96. }
  97. if(j == 7)
  98. {
  99. return mod_instantTent.instantTent7;
  100. }
  101. if(j == 8)
  102. {
  103. return mod_instantTent.instantTent8;
  104. }
  105. if(j == 9)
  106. {
  107. return mod_instantTent.instantTent9;
  108. }
  109. if(j == 10)
  110. {
  111. return mod_instantTent.instantTent10;
  112. }
  113. if(j == 11)
  114. {
  115. return mod_instantTent.instantTent11;
  116. }
  117. if(j == 12)
  118. {
  119. return mod_instantTent.instantTent12;
  120. }
  121. if(j == 13)
  122. {
  123. return mod_instantTent.instantTent0;
  124. }
  125. if(j == 14)
  126. {
  127. return mod_instantTent.instantTent14;
  128. }
  129. if(j == 15)
  130. {
  131. return mod_instantTent.instantTent15;
  132. }
  133. else
  134. {
  135. return blockIndexInTexture;
  136. }
  137. }
  138. public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int l)
  139. {
  140. ModLoader.getMinecraftInstance().thePlayer.triggerAchievement(mod_instantTent.packItUp);
  141. TileEntityTent tent = (TileEntityTent)world.getBlockTileEntity(i, j, k);
  142. for(int l = 0; l < 5 l++)
  143. {
  144. ItemStack itemstack = tent.getStackInSlot(l);
  145. if(itemstack == null)
  146. {
  147. continue;
  148. }
  149. float f = random.nextFloat() * 0.8F + 0.1F;
  150. float f1 = random.nextFloat() * 0.8F + 0.1F;
  151. float f2 = random.nextFloat() * 0.8F + 0.1F;
  152. do
  153. {
  154. if(itemstack.stackSize <= 0)
  155. {
  156. continue label0;
  157. }
  158. int i1 = random.nextInt(21) + 10;
  159. if(i1 > itemstack.stackSize)
  160. {
  161. i1 = itemstack.stackSize;
  162. }
  163. itemstack.stackSize -= i1;
  164. EntityItem entityitem = new EntityItem(world, (float)i + f, (float)j + f1, (float)k + f2, new ItemStack(itemstack.itemID, i1, itemstack.getItemDamage()));
  165. float f3 = 0.05F;
  166. entityitem.motionX = (float)random.nextGaussian() * f3;
  167. entityitem.motionY = (float)random.nextGaussian() * f3 + 0.2F;
  168. entityitem.motionZ = (float)random.nextGaussian() * f3;
  169. world.entityJoinedWorld(entityitem);
  170. } while(true);
  171. }
  172. double d = (float)i + 0.5F;
  173. double d1 = (float)j + 0.7F;
  174. double d2 = (float)k + 0.5F;
  175. double d3 = 0.2199999988079071D;
  176. double d4 = 0.27000001072883606D;
  177. world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 0.0D);
  178. world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 1.0D);
  179. world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, 1.0D);
  180. world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 0.0D, 0.0D);
  181. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 0.0D);
  182. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 1.0D);
  183. world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, -1.0D);
  184. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, 0.0D);
  185. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, -1.0D);
  186. if(rotation == 0)
  187. {
  188. world.setBlockWithNotify(i,j+1,k-1,0);
  189. world.setBlockWithNotify(i,j+2,k-1,0);
  190. world.setBlockWithNotify(i+1,j,k,0);
  191. world.setBlockWithNotify(i+2,j,k,0);
  192. world.setBlockWithNotify(i-1,j,k,0);
  193. world.setBlockWithNotify(i-2,j,k,0);
  194. world.setBlockWithNotify(i,j,k+1,0);
  195. world.setBlockWithNotify(i+1,j,k+1,0);
  196. world.setBlockWithNotify(i+2,j,k+1,0);
  197. world.setBlockWithNotify(i-1,j,k+1,0);
  198. world.setBlockWithNotify(i-2,j,k+1,0);
  199. world.setBlockWithNotify(i,j,k+2,0);
  200. world.setBlockWithNotify(i+1,j,k+2,0);
  201. world.setBlockWithNotify(i+2,j,k+2,0);
  202. world.setBlockWithNotify(i-1,j,k+2,0);
  203. world.setBlockWithNotify(i-2,j,k+2,0);
  204. world.setBlockWithNotify(i,j,k-1,0);
  205. world.setBlockWithNotify(i+1,j,k-1,0);
  206. world.setBlockWithNotify(i+2,j,k-1,0);
  207. world.setBlockWithNotify(i-1,j,k-1,0);
  208. world.setBlockWithNotify(i-2,j,k-1,0);
  209. world.setBlockWithNotify(i,j+1,k,0);
  210. world.setBlockWithNotify(i+1,j+1,k,0);
  211. world.setBlockWithNotify(i+2,j+1,k,0);
  212. world.setBlockWithNotify(i-1,j+1,k,0);
  213. world.setBlockWithNotify(i-2,j+1,k,0);
  214. world.setBlockWithNotify(i+1,j+1,k+1,0);
  215. world.setBlockWithNotify(i+2,j+1,k+1,0);
  216. world.setBlockWithNotify(i-1,j+1,k+1,0);
  217. world.setBlockWithNotify(i-2,j+1,k+1,0);
  218. world.setBlockWithNotify(i,j+1,k+1,0);
  219. world.setBlockWithNotify(i+1,j+1,k+2,0);
  220. world.setBlockWithNotify(i+2,j+1,k+2,0);
  221. world.setBlockWithNotify(i-1,j+1,k+2,0);
  222. world.setBlockWithNotify(i-2,j+1,k+2,0);
  223. world.setBlockWithNotify(i,j+1,k+2,0);
  224. world.setBlockWithNotify(i+1,j+1,k-1,0);
  225. world.setBlockWithNotify(i+2,j+1,k-1,0);
  226. world.setBlockWithNotify(i-1,j+1,k-1,0);
  227. world.setBlockWithNotify(i-2,j+1,k-1,0);
  228. world.setBlockWithNotify(i,j+1,k-1,0);
  229. world.setBlockWithNotify(i,j+2,k,0);
  230. world.setBlockWithNotify(i+1,j+2,k,0);
  231. world.setBlockWithNotify(i+2,j+2,k,0);
  232. world.setBlockWithNotify(i-1,j+2,k,0);
  233. world.setBlockWithNotify(i-2,j+2,k,0);
  234. world.setBlockWithNotify(i,j+2,k+1,0);
  235. world.setBlockWithNotify(i+1,j+2,k+1,0);
  236. world.setBlockWithNotify(i+2,j+2,k+1,0);
  237. world.setBlockWithNotify(i-1,j+2,k+1,0);
  238. world.setBlockWithNotify(i-2,j+2,k+1,0);
  239. world.setBlockWithNotify(i,j+2,k+2,0);
  240. world.setBlockWithNotify(i+1,j+2,k+2,0);
  241. world.setBlockWithNotify(i+2,j+2,k+2,0);
  242. world.setBlockWithNotify(i-1,j+2,k+2,0);
  243. world.setBlockWithNotify(i-2,j+2,k+2,0);
  244. world.setBlockWithNotify(i,j+2,k-1,0);
  245. world.setBlockWithNotify(i+1,j+2,k-1,0);
  246. world.setBlockWithNotify(i+2,j+2,k-1,0);
  247. world.setBlockWithNotify(i-1,j+2,k-1,0);
  248. world.setBlockWithNotify(i-2,j+2,k-1,0);
  249. world.setBlockWithNotify(i,j+3,k,0);
  250. world.setBlockWithNotify(i+1,j+3,k,0);
  251. world.setBlockWithNotify(i+2,j+3,k,0);
  252. world.setBlockWithNotify(i-1,j+3,k,0);
  253. world.setBlockWithNotify(i-2,j+3,k,0);
  254. world.setBlockWithNotify(i,j+3,k+1,0);
  255. world.setBlockWithNotify(i+1,j+3,k+1,0);
  256. world.setBlockWithNotify(i+2,j+3,k+1,0);
  257. world.setBlockWithNotify(i-1,j+3,k+1,0);
  258. world.setBlockWithNotify(i-2,j+3,k+1,0);
  259. world.setBlockWithNotify(i,j+3,k+2,0);
  260. world.setBlockWithNotify(i+1,j+3,k+2,0);
  261. world.setBlockWithNotify(i+2,j+3,k+2,0);
  262. world.setBlockWithNotify(i-1,j+3,k+2,0);
  263. world.setBlockWithNotify(i-2,j+3,k+2,0);
  264. world.setBlockWithNotify(i,j+3,k-1,0);
  265. world.setBlockWithNotify(i+1,j+3,k-1,0);
  266. world.setBlockWithNotify(i+2,j+3,k-1,0);
  267. world.setBlockWithNotify(i-1,j+3,k-1,0);
  268. world.setBlockWithNotify(i-2,j+3,k-1,0);
  269. }
  270. if(rotation == 1)
  271. {
  272. int metadata = world.getBlockMetadata(i, j, k);
  273. world.setBlockAndMetadataWithNotify(i+1,j+1,k,0, 2);
  274. world.setBlockAndMetadataWithNotify(i+1,j+2,k,0, 10);
  275. world.setBlockAndMetadataWithNotify(i,j+1,k-1,0, 1);
  276. world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 9);
  277. for (int i1 = 0; i1 < 5; i1++)
  278. {
  279. for (int j1 = 0; j1 < 4; j1++)
  280. {
  281. world.setBlockAndMetadataWithNotify(i+1,j+j1,(k-i1)+2,0,metadata);
  282. world.setBlockAndMetadataWithNotify(i-2,j+j1,(k-i1)+2,0,metadata);
  283. world.setBlockAndMetadataWithNotify((i-j1)+1,j,(k-i1)+2,0,metadata);
  284. }
  285. }
  286. world.setBlockWithNotify(i+1,j+3,k+2,0);
  287. world.setBlockWithNotify(i,j+3,k+2,0);
  288. world.setBlockWithNotify(i-1,j+3,k+2,0);
  289. world.setBlockWithNotify(i-2,j+3,k+2,0);
  290. world.setBlockWithNotify(i+1,j+3,k-2,0);
  291. world.setBlockWithNotify(i,j+3,k-2,0);
  292. world.setBlockWithNotify(i-1,j+3,k-2,0);
  293. world.setBlockWithNotify(i-2,j+3,k-2,0);
  294. world.setBlockAndMetadataWithNotify(i+1,j+3,k,0,metadata);
  295. world.setBlockAndMetadataWithNotify(i,j+3,k,0,metadata);
  296. world.setBlockAndMetadataWithNotify(i-1,j+3,k,0,metadata);
  297. world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,0,metadata);
  298. world.setBlockAndMetadataWithNotify(i,j+3,k-1,0,metadata);
  299. world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,0,metadata);
  300. world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,0,metadata);
  301. world.setBlockAndMetadataWithNotify(i,j+3,k+1,0,metadata);
  302. world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,0,metadata);
  303. world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,0,metadata);
  304. world.setBlockAndMetadataWithNotify(i,j+1,k+2,0,metadata);
  305. world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,0,metadata);
  306. world.setBlockAndMetadataWithNotify(i-2,j+1,k+2,0,metadata);
  307. world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,0,metadata);
  308. world.setBlockAndMetadataWithNotify(i,j+2,k+2,0,metadata);
  309. world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,0,metadata);
  310. world.setBlockAndMetadataWithNotify(i-2,j+2,k+2,0,metadata);
  311. world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,0,metadata);
  312. world.setBlockAndMetadataWithNotify(i,j+1,k-2,0,metadata);
  313. world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,0,metadata);
  314. world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,0,metadata);
  315. world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,0,metadata);
  316. world.setBlockAndMetadataWithNotify(i,j+2,k-2,0,metadata);
  317. world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,0,metadata);
  318. world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,0,metadata);
  319. world.setBlockWithNotify(i+1,j+2,k,0);
  320. world.setBlockWithNotify(i+1,j+1,k,0);
  321. world.setBlockAndMetadataWithNotify(i+1,j+1,k,0, 2);
  322. world.setBlockAndMetadataWithNotify(i+1,j+2,k,0, 10);
  323. world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 9);
  324. world.setBlockAndMetadataWithNotify(i,j+1,k-1,0, 1);
  325. world.setBlockWithNotify(i+1,j+2,k-1,0);
  326. world.setBlockWithNotify(i+1,j+2,k+1,0);
  327. world.setBlockWithNotify(i-1,j+1,k+1,0);
  328. world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 3);
  329. world.setBlockWithNotify(i,j+2,k+1,0) ;
  330. world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3);
  331. world.setBlockAndMetadataWithNotify(i,j,k,0,metadata);
  332. }
  333. if(rotation == 2)
  334. {
  335. int metadata = world.getBlockMetadata(i, j, k);
  336. world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3);
  337. world.setBlockAndMetadataWithNotify(i,j+2,k+1,0, 11);
  338. world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 2);
  339. world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 10);
  340. for (int i1 = 0; i1 < 5; i1++)
  341. {
  342. for (int j1 = 0; j1 < 4; j1++)
  343. {
  344. world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,k+1,0,metadata);
  345. world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,(k-4)+2,0,metadata);
  346. world.setBlockAndMetadataWithNotify((i-i1)+2,j,(k-j1)+1,0,metadata);
  347. }
  348. }
  349. world.setBlockWithNotify(i+2,j+3,k+1,0);
  350. world.setBlockWithNotify(i+2,j+3,k,0);
  351. world.setBlockWithNotify(i+2,j+3,k+1,0);
  352. world.setBlockWithNotify(i+2,j+3,k-2,0);
  353. world.setBlockWithNotify(i-2,j+3,k+1,0);
  354. world.setBlockWithNotify(i-2,j+3,k,0);
  355. world.setBlockWithNotify(i-2,j+3,k-1,0);
  356. world.setBlockWithNotify(i-2,j+3,k-2,0);
  357. world.setBlockAndMetadataWithNotify(i,j+3,k+1,0,metadata);
  358. world.setBlockAndMetadataWithNotify(i,j+3,k,0,metadata);
  359. world.setBlockAndMetadataWithNotify(i,j+3,k-1,0,metadata);
  360. world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,0,metadata);
  361. world.setBlockAndMetadataWithNotify(i-1,j+3,k,0,metadata);
  362. world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,0,metadata);
  363. world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,0,metadata);
  364. world.setBlockAndMetadataWithNotify(i+1,j+3,k,0,metadata);
  365. world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,0,metadata);
  366. world.setBlockAndMetadataWithNotify(i+2,j+1,k+1,0,metadata);
  367. world.setBlockAndMetadataWithNotify(i+2,j+1,k,0,metadata);
  368. world.setBlockAndMetadataWithNotify(i+2,j+1,k-1,0,metadata);
  369. world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,0,metadata);
  370. world.setBlockAndMetadataWithNotify(i+2,j+2,k+1,0,metadata);
  371. world.setBlockAndMetadataWithNotify(i+2,j+2,k,0,metadata);
  372. world.setBlockAndMetadataWithNotify(i+2,j+2,k-1,0,metadata);
  373. world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,0,metadata);
  374. world.setBlockAndMetadataWithNotify(i-2,j+1,k+1,0,metadata);
  375. world.setBlockAndMetadataWithNotify(i-2,j+1,k,0,metadata);
  376. world.setBlockAndMetadataWithNotify(i-2,j+1,k-1,0,metadata);
  377. world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,0,metadata);
  378. world.setBlockAndMetadataWithNotify(i-2,j+2,k+1,0,metadata);
  379. world.setBlockAndMetadataWithNotify(i-2,j+2,k,0,metadata);
  380. world.setBlockAndMetadataWithNotify(i-2,j+2,k-1,0,metadata);
  381. world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,0,metadata);
  382. world.setBlockWithNotify((i-1)+1,j+2,k+1,0);
  383. world.setBlockWithNotify((i-1)+1,j+1,k+1,0);
  384. world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3);
  385. world.setBlockAndMetadataWithNotify(i,j+2,k+1,0, 11);
  386. world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,0, 10);
  387. world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 2);
  388. world.setBlockWithNotify(i-1,j+2,k+1,0);
  389. world.setBlockWithNotify(i+1,j+2,k+1,0);
  390. world.setBlockWithNotify(i+1,j+1,k-1,0);
  391. world.setBlockAndMetadataWithNotify(i,j+1,k-1,0, 3);
  392. world.setBlockWithNotify(i+1,j+2,k,0) ;
  393. world.setBlockAndMetadataWithNotify(i+1,j+1,k,0, 3);
  394. world.setBlockAndMetadataWithNotify(i,j,k,0,metadata);
  395. }
  396. if(rotation == 3)
  397. {
  398. int metadata = world.getBlockMetadata(i, j, k);
  399. world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 0);
  400. world.setBlockAndMetadataWithNotify(i-1,j+2,k,0, 8);
  401. world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3);
  402. world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,0, 11);
  403. for (int i1 = 0; i1 < 5; i1++)
  404. {
  405. for (int j1 = 0; j1 < 4; j1++)
  406. {
  407. world.setBlockAndMetadataWithNotify(i-1,j+j1,(k+i1)-2,0,metadata);
  408. world.setBlockAndMetadataWithNotify(i+2,j+j1,(k+i1)-2,0,metadata);
  409. world.setBlockAndMetadataWithNotify((i+j1)-1,j,(k+i1)-2,0,metadata);
  410. }
  411. }
  412. world.setBlockWithNotify(i-1,j+3,k-2,0);
  413. world.setBlockWithNotify(i,j+3,k-2,0);
  414. world.setBlockWithNotify(i+1,j+3,k-2,0);
  415. world.setBlockWithNotify(i+2,j+3,k-2,0);
  416. world.setBlockWithNotify(i-1,j+3,k+2,0);
  417. world.setBlockWithNotify(i,j+3,k+2,0);
  418. world.setBlockWithNotify(i+1,j+3,k+2,0);
  419. world.setBlockWithNotify(i+2,j+3,k+2,0);
  420. world.setBlockAndMetadataWithNotify(i-1,j+3,k,0,metadata);
  421. world.setBlockAndMetadataWithNotify(i,j+3,k,0,metadata);
  422. world.setBlockAndMetadataWithNotify(i+1,j+3,k,0,metadata);
  423. world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,0,metadata);
  424. world.setBlockAndMetadataWithNotify(i,j+3,k+1,0,metadata);
  425. world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,0,metadata);
  426. world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,0,metadata);
  427. world.setBlockAndMetadataWithNotify(i,j+3,k-1,0,metadata);
  428. world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,0,metadata);
  429. world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,0,metadata);
  430. world.setBlockAndMetadataWithNotify(i,j+1,k-2,0,metadata);
  431. world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,0,metadata);
  432. world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,0,metadata);
  433. world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,0,metadata);
  434. world.setBlockAndMetadataWithNotify(i,j+2,k-2,0,metadata);
  435. world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,0,metadata);
  436. world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,0,metadata);
  437. world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,0,metadata);
  438. world.setBlockAndMetadataWithNotify(i,j+1,k+2,0,metadata);
  439. world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,0,metadata);
  440. world.setBlockAndMetadataWithNotify(i+2,j+1,k+2,0,metadata);
  441. world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,0,metadata);
  442. world.setBlockAndMetadataWithNotify(i,j+2,k+2,0,metadata);
  443. world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,0,metadata);
  444. world.setBlockAndMetadataWithNotify(i+2,j+2,k+2,0,metadata);
  445. world.setBlockWithNotify(i-1,j+2,k,0);
  446. world.setBlockWithNotify(i-1,j+1,k,0);
  447. world.setBlockAndMetadataWithNotify(i-1,j+1,k,0, 0);
  448. world.setBlockAndMetadataWithNotify(i-1,j+2,k,0, 8);
  449. world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,0, 11);
  450. world.setBlockAndMetadataWithNotify(i,j+1,k+1,0, 3);
  451. world.setBlockWithNotify(i-1,j+2,k+1,0);
  452. world.setBlockWithNotify(i-1,j+2,k-1,0);
  453. world.setBlockWithNotify(i+1,j+1,k-1,0);
  454. world.setBlockAndMetadataWithNotify(i+1,j+1,k,0 , 3);
  455. world.setBlockWithNotify(i,j+2,k-1,0) ;
  456. world.setBlockAndMetadataWithNotify(i,j+1,k-1,0 , 3);
  457. world.setBlockAndMetadataWithNotify(i,j,k,0,metadata);
  458. }
  459. }
  460. public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
  461. {
  462. TileEntityTent tileentitytent = (TileEntityTent)world.getBlockTileEntity(i, j, k);
  463. ModLoader.OpenGUI(entityplayer, new GuiTent(entityplayer.inventory, tileentitytent));
  464. if(tileentitytent.charged)
  465. {
  466. tileentitytent.charge = 0;
  467. tileentitytent.charged = false;
  468. }
  469. //activateTent(world, i, j, k, entityplayer);
  470. return true;
  471. }
  472. private void activateTent(World world, int i, int j, int k, EntityPlayer entityplayer)
  473. {
  474. ModLoader.getMinecraftInstance().thePlayer.triggerAchievement(mod_instantTent.thatWasEasy);
  475. int metadata = world.getBlockMetadata(i, j, k);
  476. world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "random.pop", 1.0F, world.rand.nextFloat() * 0.1F + 0.9F);
  477. double d = (float)i + 0.5F;
  478. double d1 = (float)j + 0.7F;
  479. double d2 = (float)k + 0.5F;
  480. double d3 = 0.2199999988079071D;
  481. double d4 = 0.27000001072883606D;
  482. for (int count=0; count<50; count++)
  483. {
  484. world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 0.0D);
  485. world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 1.0D, 1.0D);
  486. world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, 1.0D);
  487. world.spawnParticle("portal", d - d4, d1 + d3, d2, 1.0D, 0.0D, 0.0D);
  488. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 0.0D);
  489. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 1.0D, 1.0D);
  490. world.spawnParticle("portal", d - d4, d1 + d3, d2, 0.0D, 1.0D, -1.0D);
  491. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, 0.0D);
  492. world.spawnParticle("portal", d - d4, d1 + d3, d2, -1.0D, 0.0D, -1.0D);
  493. }
  494. int instantTent = 200;
  495. int cloth = 201;
  496. int door = 202;
  497. int furnace = 203;
  498. int chest = 204;
  499. if(rotation == 0)
  500. {
  501. for (int i1 = 0; i1 < 5; i1++)
  502. {
  503. for (int j1 = 0; j1 < 4; j1++)
  504. {
  505. world.setBlockAndMetadataWithNotify((i+i1)-2,j+j1,k-1,cloth,metadata);
  506. world.setBlockAndMetadataWithNotify((i+i1)-2,j+j1,(k+4)-2,cloth,metadata);
  507. world.setBlockAndMetadataWithNotify((i+i1)-2,j,(k+j1)-1,cloth,metadata);
  508. }
  509. }
  510. world.setBlockWithNotify(i-2,j+3,k-1,0);
  511. world.setBlockWithNotify(i-2,j+3,k,0);
  512. world.setBlockWithNotify(i-2,j+3,k+1,0);
  513. world.setBlockWithNotify(i-2,j+3,k+2,0);
  514. world.setBlockWithNotify(i+2,j+3,k-1,0);
  515. world.setBlockWithNotify(i+2,j+3,k,0);
  516. world.setBlockWithNotify(i+2,j+3,k+1,0);
  517. world.setBlockWithNotify(i+2,j+3,k+2,0);
  518. world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata);
  519. world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata);
  520. world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata);
  521. world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata);
  522. world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata);
  523. world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata);
  524. world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata);
  525. world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata);
  526. world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata);
  527. world.setBlockAndMetadataWithNotify(i-2,j+1,k-1,cloth,metadata);
  528. world.setBlockAndMetadataWithNotify(i-2,j+1,k,cloth,metadata);
  529. world.setBlockAndMetadataWithNotify(i-2,j+1,k+1,cloth,metadata);
  530. world.setBlockAndMetadataWithNotify(i-2,j+1,k+2,cloth,metadata);
  531. world.setBlockAndMetadataWithNotify(i-2,j+2,k-1,cloth,metadata);
  532. world.setBlockAndMetadataWithNotify(i-2,j+2,k,cloth,metadata);
  533. world.setBlockAndMetadataWithNotify(i-2,j+2,k+1,cloth,metadata);
  534. world.setBlockAndMetadataWithNotify(i-2,j+2,k+2,cloth,metadata);
  535. world.setBlockAndMetadataWithNotify(i+2,j+1,k-1,cloth,metadata);
  536. world.setBlockAndMetadataWithNotify(i+2,j+1,k,cloth,metadata);
  537. world.setBlockAndMetadataWithNotify(i+2,j+1,k+1,cloth,metadata);
  538. world.setBlockAndMetadataWithNotify(i+2,j+1,k+2,cloth,metadata);
  539. world.setBlockAndMetadataWithNotify(i+2,j+2,k-1,cloth,metadata);
  540. world.setBlockAndMetadataWithNotify(i+2,j+2,k,cloth,metadata);
  541. world.setBlockAndMetadataWithNotify(i+2,j+2,k+1,cloth,metadata);
  542. world.setBlockAndMetadataWithNotify(i+2,j+2,k+2,cloth,metadata);
  543. world.setBlockWithNotify((i+1)-1,j+2,k-1,0);
  544. world.setBlockWithNotify((i+1)-1,j+1,k-1,0);
  545. world.setBlockAndMetadataWithNotify((i+1)-1,j+1,k-1,Block.doorWood.blockID, 1);
  546. world.setBlockAndMetadataWithNotify((i+1)-1,j+2,k-1,Block.doorWood.blockID, 9);
  547. world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,Block.blockBed.blockID, 8);
  548. world.setBlockAndMetadataWithNotify(i+1,j+1,k,Block.blockBed.blockID, 0);
  549. world.setBlockWithNotify(i+1,j+2,k-1,Block.glass.blockID);
  550. world.setBlockWithNotify(i-1,j+2,k-1,Block.glass.blockID);
  551. world.setBlockWithNotify(i-1,j+1,k+1,Block.workbench.blockID);
  552. world.setBlockAndMetadataWithNotify(i,j+1,k+1,chest , 3);
  553. world.setBlockWithNotify(i-1,j+2,k,Block.cake.blockID) ;
  554. world.setBlockAndMetadataWithNotify(i-1,j+1,k,furnace , 3);
  555. world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata);
  556. }
  557. if(rotation == 1)
  558. {
  559. for (int i1 = 0; i1 < 5; i1++)
  560. {
  561. for (int j1 = 0; j1 < 4; j1++)
  562. {
  563. world.setBlockAndMetadataWithNotify(i+1,j+j1,(k-i1)+2,cloth,metadata);
  564. world.setBlockAndMetadataWithNotify(i-2,j+j1,(k-i1)+2,cloth,metadata);
  565. world.setBlockAndMetadataWithNotify((i-j1)+1,j,(k-i1)+2,cloth,metadata);
  566. }
  567. }
  568. world.setBlockWithNotify(i+1,j+3,k+2,0);
  569. world.setBlockWithNotify(i,j+3,k+2,0);
  570. world.setBlockWithNotify(i-1,j+3,k+2,0);
  571. world.setBlockWithNotify(i-2,j+3,k+2,0);
  572. world.setBlockWithNotify(i+1,j+3,k-2,0);
  573. world.setBlockWithNotify(i,j+3,k-2,0);
  574. world.setBlockWithNotify(i-1,j+3,k-2,0);
  575. world.setBlockWithNotify(i-2,j+3,k-2,0);
  576. world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata);
  577. world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata);
  578. world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata);
  579. world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata);
  580. world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata);
  581. world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata);
  582. world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata);
  583. world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata);
  584. world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata);
  585. world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,cloth,metadata);
  586. world.setBlockAndMetadataWithNotify(i,j+1,k+2,cloth,metadata);
  587. world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,cloth,metadata);
  588. world.setBlockAndMetadataWithNotify(i-2,j+1,k+2,cloth,metadata);
  589. world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,cloth,metadata);
  590. world.setBlockAndMetadataWithNotify(i,j+2,k+2,cloth,metadata);
  591. world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,cloth,metadata);
  592. world.setBlockAndMetadataWithNotify(i-2,j+2,k+2,cloth,metadata);
  593. world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,cloth,metadata);
  594. world.setBlockAndMetadataWithNotify(i,j+1,k-2,cloth,metadata);
  595. world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,cloth,metadata);
  596. world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,cloth,metadata);
  597. world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,cloth,metadata);
  598. world.setBlockAndMetadataWithNotify(i,j+2,k-2,cloth,metadata);
  599. world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,cloth,metadata);
  600. world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,cloth,metadata);
  601. world.setBlockWithNotify(i+1,j+2,k,0);
  602. world.setBlockWithNotify(i+1,j+1,k,0);
  603. world.setBlockAndMetadataWithNotify(i+1,j+1,k,Block.doorWood.blockID, 2);
  604. world.setBlockAndMetadataWithNotify(i+1,j+2,k,Block.doorWood.blockID, 10);
  605. world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,Block.blockBed.blockID, 9);
  606. world.setBlockAndMetadataWithNotify(i,j+1,k-1,Block.blockBed.blockID, 1);
  607. world.setBlockWithNotify(i+1,j+2,k-1,Block.glass.blockID);
  608. world.setBlockWithNotify(i+1,j+2,k+1,Block.glass.blockID);
  609. world.setBlockWithNotify(i-1,j+1,k+1,Block.workbench.blockID);
  610. world.setBlockAndMetadataWithNotify(i-1,j+1,k,chest , 3);
  611. world.setBlockWithNotify(i,j+2,k+1,Block.cake.blockID) ;
  612. world.setBlockAndMetadataWithNotify(i,j+1,k+1,furnace , 3);
  613. world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata);
  614. }
  615. if(rotation == 2)
  616. {
  617. for (int i1 = 0; i1 < 5; i1++)
  618. {
  619. for (int j1 = 0; j1 < 4; j1++)
  620. {
  621. world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,k+1,cloth,metadata);
  622. world.setBlockAndMetadataWithNotify((i-i1)+2,j+j1,(k-4)+2,cloth,metadata);
  623. world.setBlockAndMetadataWithNotify((i-i1)+2,j,(k-j1)+1,cloth,metadata);
  624. }
  625. }
  626. world.setBlockWithNotify(i+2,j+3,k+1,0);
  627. world.setBlockWithNotify(i+2,j+3,k,0);
  628. world.setBlockWithNotify(i+2,j+3,k+1,0);
  629. world.setBlockWithNotify(i+2,j+3,k-2,0);
  630. world.setBlockWithNotify(i-2,j+3,k+1,0);
  631. world.setBlockWithNotify(i-2,j+3,k,0);
  632. world.setBlockWithNotify(i-2,j+3,k-1,0);
  633. world.setBlockWithNotify(i-2,j+3,k-2,0);
  634. world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata);
  635. world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata);
  636. world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata);
  637. world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata);
  638. world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata);
  639. world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata);
  640. world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata);
  641. world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata);
  642. world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata);
  643. world.setBlockAndMetadataWithNotify(i+2,j+1,k+1,cloth,metadata);
  644. world.setBlockAndMetadataWithNotify(i+2,j+1,k,cloth,metadata);
  645. world.setBlockAndMetadataWithNotify(i+2,j+1,k-1,cloth,metadata);
  646. world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,cloth,metadata);
  647. world.setBlockAndMetadataWithNotify(i+2,j+2,k+1,cloth,metadata);
  648. world.setBlockAndMetadataWithNotify(i+2,j+2,k,cloth,metadata);
  649. world.setBlockAndMetadataWithNotify(i+2,j+2,k-1,cloth,metadata);
  650. world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,cloth,metadata);
  651. world.setBlockAndMetadataWithNotify(i-2,j+1,k+1,cloth,metadata);
  652. world.setBlockAndMetadataWithNotify(i-2,j+1,k,cloth,metadata);
  653. world.setBlockAndMetadataWithNotify(i-2,j+1,k-1,cloth,metadata);
  654. world.setBlockAndMetadataWithNotify(i-2,j+1,k-2,cloth,metadata);
  655. world.setBlockAndMetadataWithNotify(i-2,j+2,k+1,cloth,metadata);
  656. world.setBlockAndMetadataWithNotify(i-2,j+2,k,cloth,metadata);
  657. world.setBlockAndMetadataWithNotify(i-2,j+2,k-1,cloth,metadata);
  658. world.setBlockAndMetadataWithNotify(i-2,j+2,k-2,cloth,metadata);
  659. world.setBlockWithNotify((i-1)+1,j+2,k+1,0);
  660. world.setBlockWithNotify((i-1)+1,j+1,k+1,0);
  661. world.setBlockAndMetadataWithNotify(i,j+1,k+1,Block.doorWood.blockID, 3);
  662. world.setBlockAndMetadataWithNotify(i,j+2,k+1,Block.doorWood.blockID, 11);
  663. world.setBlockAndMetadataWithNotify(i-1,j+1,k-1,Block.blockBed.blockID, 10);
  664. world.setBlockAndMetadataWithNotify(i-1,j+1,k,Block.blockBed.blockID, 2);
  665. world.setBlockWithNotify(i-1,j+2,k+1,Block.glass.blockID);
  666. world.setBlockWithNotify(i+1,j+2,k+1,Block.glass.blockID);
  667. world.setBlockWithNotify(i+1,j+1,k-1,Block.workbench.blockID);
  668. world.setBlockAndMetadataWithNotify(i,j+1,k-1,chest , 3);
  669. world.setBlockWithNotify(i+1,j+2,k,Block.cake.blockID) ;
  670. world.setBlockAndMetadataWithNotify(i+1,j+1,k,furnace , 3);
  671. world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata);
  672. }
  673. if(rotation == 3)
  674. {
  675. for (int i1 = 0; i1 < 5; i1++)
  676. {
  677. for (int j1 = 0; j1 < 4; j1++)
  678. {
  679. world.setBlockAndMetadataWithNotify(i-1,j+j1,(k+i1)-2,cloth,metadata);
  680. world.setBlockAndMetadataWithNotify(i+2,j+j1,(k+i1)-2,cloth,metadata);
  681. world.setBlockAndMetadataWithNotify((i+j1)-1,j,(k+i1)-2,cloth,metadata);
  682. }
  683. }
  684. world.setBlockWithNotify(i-1,j+3,k-2,0);
  685. world.setBlockWithNotify(i,j+3,k-2,0);
  686. world.setBlockWithNotify(i+1,j+3,k-2,0);
  687. world.setBlockWithNotify(i+2,j+3,k-2,0);
  688. world.setBlockWithNotify(i-1,j+3,k+2,0);
  689. world.setBlockWithNotify(i,j+3,k+2,0);
  690. world.setBlockWithNotify(i+1,j+3,k+2,0);
  691. world.setBlockWithNotify(i+2,j+3,k+2,0);
  692. world.setBlockAndMetadataWithNotify(i-1,j+3,k,cloth,metadata);
  693. world.setBlockAndMetadataWithNotify(i,j+3,k,cloth,metadata);
  694. world.setBlockAndMetadataWithNotify(i+1,j+3,k,cloth,metadata);
  695. world.setBlockAndMetadataWithNotify(i-1,j+3,k+1,cloth,metadata);
  696. world.setBlockAndMetadataWithNotify(i,j+3,k+1,cloth,metadata);
  697. world.setBlockAndMetadataWithNotify(i+1,j+3,k+1,cloth,metadata);
  698. world.setBlockAndMetadataWithNotify(i-1,j+3,k-1,cloth,metadata);
  699. world.setBlockAndMetadataWithNotify(i,j+3,k-1,cloth,metadata);
  700. world.setBlockAndMetadataWithNotify(i+1,j+3,k-1,cloth,metadata);
  701. world.setBlockAndMetadataWithNotify(i-1,j+1,k-2,cloth,metadata);
  702. world.setBlockAndMetadataWithNotify(i,j+1,k-2,cloth,metadata);
  703. world.setBlockAndMetadataWithNotify(i+1,j+1,k-2,cloth,metadata);
  704. world.setBlockAndMetadataWithNotify(i+2,j+1,k-2,cloth,metadata);
  705. world.setBlockAndMetadataWithNotify(i-1,j+2,k-2,cloth,metadata);
  706. world.setBlockAndMetadataWithNotify(i,j+2,k-2,cloth,metadata);
  707. world.setBlockAndMetadataWithNotify(i+1,j+2,k-2,cloth,metadata);
  708. world.setBlockAndMetadataWithNotify(i+2,j+2,k-2,cloth,metadata);
  709. world.setBlockAndMetadataWithNotify(i-1,j+1,k+2,cloth,metadata);
  710. world.setBlockAndMetadataWithNotify(i,j+1,k+2,cloth,metadata);
  711. world.setBlockAndMetadataWithNotify(i+1,j+1,k+2,cloth,metadata);
  712. world.setBlockAndMetadataWithNotify(i+2,j+1,k+2,cloth,metadata);
  713. world.setBlockAndMetadataWithNotify(i-1,j+2,k+2,cloth,metadata);
  714. world.setBlockAndMetadataWithNotify(i,j+2,k+2,cloth,metadata);
  715. world.setBlockAndMetadataWithNotify(i+1,j+2,k+2,cloth,metadata);
  716. world.setBlockAndMetadataWithNotify(i+2,j+2,k+2,cloth,metadata);
  717. world.setBlockWithNotify(i-1,j+2,k,0);
  718. world.setBlockWithNotify(i-1,j+1,k,0);
  719. world.setBlockAndMetadataWithNotify(i-1,j+1,k,Block.doorWood.blockID, 0);
  720. world.setBlockAndMetadataWithNotify(i-1,j+2,k,Block.doorWood.blockID, 8);
  721. world.setBlockAndMetadataWithNotify(i+1,j+1,k+1,Block.blockBed.blockID, 11);
  722. world.setBlockAndMetadataWithNotify(i,j+1,k+1,Block.blockBed.blockID, 3);
  723. world.setBlockWithNotify(i-1,j+2,k+1,Block.glass.blockID);
  724. world.setBlockWithNotify(i-1,j+2,k-1,Block.glass.blockID);
  725. world.setBlockWithNotify(i+1,j+1,k-1,Block.workbench.blockID);
  726. world.setBlockAndMetadataWithNotify(i+1,j+1,k,chest , 3);
  727. world.setBlockWithNotify(i,j+2,k-1,Block.cake.blockID) ;
  728. world.setBlockAndMetadataWithNotify(i,j+1,k-1,furnace , 3);
  729. world.setBlockAndMetadataWithNotify(i,j,k,instantTent,metadata);
  730. }
  731. }
  732. private int rotation;
  733. public GuiTent tentGUI; 
  734. public TileEntityTent tent;
  735. public static final String prefix = "tent";
  736. public static final String prefix_ = prefix + "_";
  737. }