Advertisement
masterlilj

MCMODS Code for tent spawn by masterlilj

Jul 14th, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 8.97 KB | None | 0 0
  1. package net.minecraft.src;
  2. import java.util.*;
  3.  
  4. public class ItemTentBag extends Item {
  5.  
  6. public ItemTentBag(int i)
  7. {
  8. super(i);
  9. maxStackSize = 1;
  10. setMaxDamage(1);
  11.    }
  12.  
  13.          public static final Item ItemTentBag = new ItemTentBag(2118).setItemName("Tent");
  14.  
  15.         public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int i, int j, int k, int l)
  16.          {
  17.         par1ItemStack.damageItem(1, par2EntityPlayer);
  18.  
  19. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 1, k, Block.fence.blockID);
  20. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 2, k, Block.fence.blockID);
  21. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 1, k, Block.fence.blockID);
  22. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 2, k, Block.fence.blockID);
  23. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 1, k, Block.fence.blockID);
  24. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 2, k, Block.fence.blockID);
  25.  
  26. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 1, k-4, Block.fence.blockID);
  27. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 2, k-4, Block.fence.blockID);
  28. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 1, k-4, Block.fence.blockID);
  29. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 2, k-4, Block.fence.blockID);
  30. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 1, k-4, Block.fence.blockID);
  31. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 2, k-4, Block.fence.blockID);
  32.  
  33. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 1, k-1, Block.fence.blockID);
  34. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 2, k-2, Block.fence.blockID);
  35. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 1, k-3, Block.fence.blockID);
  36. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 2, k-4, Block.fence.blockID);
  37. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 1, k-2, Block.fence.blockID);
  38. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 2, k-3, Block.fence.blockID);
  39. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 1, k-4, Block.fence.blockID);
  40. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 2, k-1, Block.fence.blockID);
  41. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 1, k, Block.fence.blockID);
  42. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 2, k, Block.fence.blockID);
  43.  
  44. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 1, k-1, Block.fence.blockID);
  45. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 2, k-2, Block.fence.blockID);
  46. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 1, k-3, Block.fence.blockID);
  47. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 2, k-4, Block.fence.blockID);
  48. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 1, k-2, Block.fence.blockID);
  49. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 2, k-3, Block.fence.blockID);
  50. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 1, k-4, Block.fence.blockID);
  51. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 2, k-1, Block.fence.blockID);
  52. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 1, k, Block.fence.blockID);
  53. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 2, k, Block.fence.blockID);
  54.  
  55. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k, Block.wood.blockID);
  56. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3,k, Block.wood.blockID);
  57. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k, Block.wood.blockID);
  58. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k, Block.wood.blockID);
  59. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k, Block.wood.blockID);
  60. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k, Block.wood.blockID);
  61.  
  62. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-4, Block.wood.blockID);
  63. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-4, Block.wood.blockID);
  64. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-4, Block.wood.blockID);
  65. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-4, Block.wood.blockID);
  66. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-4, Block.wood.blockID);
  67. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-4, Block.wood.blockID);
  68.  
  69. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-1, Block.wood.blockID);
  70. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-2, Block.wood.blockID);
  71. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-3, Block.wood.blockID);
  72. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-4, Block.wood.blockID);
  73. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-2, Block.wood.blockID);
  74. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-3, Block.wood.blockID);
  75. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-4, Block.wood.blockID);
  76. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k-1, Block.wood.blockID);
  77. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k, Block.wood.blockID);
  78. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+3, j + 3, k, Block.wood.blockID);
  79.  
  80. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-1, Block.wood.blockID);
  81. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-2, Block.wood.blockID);
  82. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-3, Block.wood.blockID);
  83. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-4, Block.wood.blockID);
  84. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-2, Block.wood.blockID);
  85. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-3, Block.wood.blockID);
  86. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-4, Block.wood.blockID);
  87. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k-1, Block.wood.blockID);
  88. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k, Block.wood.blockID);
  89. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i, j + 3, k, Block.wood.blockID);
  90.  
  91. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-1, Block.wood.blockID);
  92. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-2, Block.wood.blockID);
  93. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-3, Block.wood.blockID);
  94. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-4, Block.wood.blockID);
  95. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-2, Block.wood.blockID);
  96. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-3, Block.wood.blockID);
  97. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-4, Block.wood.blockID);
  98. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k-1, Block.wood.blockID);
  99. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k, Block.wood.blockID);
  100. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 3, k, Block.wood.blockID);
  101.  
  102. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-1, Block.wood.blockID);
  103. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-2, Block.wood.blockID);
  104. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-3, Block.wood.blockID);
  105. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-4, Block.wood.blockID);
  106. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-2, Block.wood.blockID);
  107. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-3, Block.wood.blockID);
  108. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-4, Block.wood.blockID);
  109. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k-1, Block.wood.blockID);
  110. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k, Block.wood.blockID);
  111. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 3, k, Block.wood.blockID);
  112. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+2, j + 1, k-3, Block.chest.blockID);
  113. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 1, k, Block.fenceGate.blockID);
  114. ModLoader.getMinecraftInstance().theWorld.setBlockWithNotify(i+1, j + 2, k, Block.fenceGate.blockID);
  115.  
  116.  
  117.  
  118.  
  119.  
  120.           return true;
  121. }
  122. }
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. tent:)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement