Guest User

Untitled

a guest
Dec 19th, 2015
54
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package mod.mcreator;//based on master condiguration
  2.  
  3. import cpw.mods.fml.client.*;
  4. import cpw.mods.fml.client.registry.*;
  5. import cpw.mods.fml.common.*;
  6. import cpw.mods.fml.common.asm.*;
  7. import cpw.mods.fml.common.asm.transformers.*;
  8. import cpw.mods.fml.common.discovery.*;
  9. import cpw.mods.fml.common.discovery.asm.*;
  10. import cpw.mods.fml.common.event.*;
  11. import cpw.mods.fml.common.functions.*;
  12. import cpw.mods.fml.common.network.*;
  13. import cpw.mods.fml.common.registry.*;
  14. import cpw.mods.fml.common.toposort.*;
  15. import cpw.mods.fml.common.versioning.*;
  16. import cpw.mods.fml.relauncher.*;
  17. import cpw.mods.fml.server.*;
  18. import net.minecraft.block.*;
  19. import net.minecraft.block.material.*;
  20. import net.minecraft.client.*;
  21. import net.minecraft.client.audio.*;
  22. import net.minecraft.client.entity.*;
  23. import net.minecraft.client.gui.*;
  24. import net.minecraft.client.gui.achievement.*;
  25. import net.minecraft.client.gui.inventory.*;
  26. import net.minecraft.client.model.*;
  27. import net.minecraft.client.multiplayer.*;
  28. import net.minecraft.client.particle.*;
  29. import net.minecraft.client.renderer.*;
  30. import net.minecraft.client.renderer.culling.*;
  31. import net.minecraft.client.renderer.entity.*;
  32. import net.minecraft.client.renderer.tileentity.*;
  33. import net.minecraft.client.settings.*;
  34. import net.minecraft.command.*;
  35. import net.minecraft.crash.*;
  36. import net.minecraft.creativetab.*;
  37. import net.minecraft.dispenser.*;
  38. import net.minecraft.enchantment.*;
  39. import net.minecraft.entity.*;
  40. import net.minecraft.entity.ai.*;
  41. import net.minecraft.entity.boss.*;
  42. import net.minecraft.entity.effect.*;
  43. import net.minecraft.entity.item.*;
  44. import net.minecraft.entity.monster.*;
  45. import net.minecraft.entity.passive.*;
  46. import net.minecraft.entity.player.*;
  47. import net.minecraft.entity.projectile.*;
  48. import net.minecraft.inventory.*;
  49. import net.minecraft.item.*;
  50. import net.minecraft.item.crafting.*;
  51. import net.minecraft.nbt.*;
  52. import net.minecraft.network.*;
  53. import net.minecraft.network.rcon.*;
  54. import net.minecraft.pathfinding.*;
  55. import net.minecraft.potion.*;
  56. import net.minecraft.profiler.*;
  57. import net.minecraft.server.*;
  58. import net.minecraft.server.dedicated.*;
  59. import net.minecraft.server.gui.*;
  60. import net.minecraft.server.integrated.*;
  61. import net.minecraft.server.management.*;
  62. import net.minecraft.src.*;
  63. import net.minecraft.stats.*;
  64. import net.minecraft.tileentity.*;
  65. import net.minecraft.util.*;
  66. import net.minecraft.village.*;
  67. import net.minecraft.world.*;
  68. import net.minecraft.world.biome.*;
  69. import net.minecraft.world.chunk.*;
  70. import net.minecraft.world.chunk.storage.*;
  71. import net.minecraft.world.demo.*;
  72. import net.minecraft.world.gen.*;
  73. import net.minecraft.world.gen.feature.*;
  74. import net.minecraft.world.gen.layer.*;
  75. import net.minecraft.world.gen.structure.*;
  76. import net.minecraft.world.storage.*;
  77. import net.minecraftforge.classloading.*;
  78. import net.minecraftforge.client.*;
  79. import net.minecraftforge.client.event.*;
  80. import net.minecraftforge.client.event.sound.*;
  81. import net.minecraftforge.common.*;
  82. import net.minecraftforge.event.*;
  83. import net.minecraftforge.event.entity.*;
  84. import net.minecraftforge.event.entity.item.*;
  85. import net.minecraftforge.event.entity.living.*;
  86. import net.minecraftforge.event.entity.minecart.*;
  87. import net.minecraftforge.event.entity.player.*;
  88. import net.minecraftforge.event.terraingen.*;
  89. import net.minecraftforge.event.world.*;
  90. import net.minecraftforge.oredict.*;
  91. import net.minecraftforge.transformers.*;
  92. import net.minecraft.init.*;
  93. import java.util.Random;
  94.  
  95. import java.util.Random;
  96.  
  97. public class mcreator_test{
  98.  
  99. public Object instance;
  100.  
  101. public mcreator_test(){}
  102.  
  103. public void load(FMLInitializationEvent event){
  104.     ChestGenHooks chestcontents = ChestGenHooks.getInfo("Category"); // create registered ChestGenHooks
  105. chestcontents.addItem(new WeightedRandomChestContent(Item.dyePowder, 3, 4, 6, 10)); // 4-6 cocoa beans
  106. chestcontents.addItem(new WeightedRandomChestContent(new ItemStack(Block.cloth, 1, 15), 2, 3, 20)); // 2-3 black wool
  107.  
  108. ItemStack itemStack = new ItemStack(Item.shovelIron);
  109. itemStack.addEnchantment(Enchantment.efficiency, 1);
  110. chestcontents.addItem(new WeightedRandomChestContent(itemStack, 1, 2, 5)); // 1-2 Efficiency I enchanted iron shovels
  111.  
  112. chestcontents.setMin(7); // inclusive
  113. chestcontents.setMax(9); // exclusive
  114. }
  115.  
  116.  
  117.     public void generateSurface(World world, Random random, int i2, int k2){
  118.  
  119. int i = i2 + random.nextInt(15);
  120. int k = k2 + random.nextInt(15);
  121.  
  122. int j = world.getHeightValue(i,k)-1;
  123.  
  124. if((random.nextInt(1000000)+1)<=100){
  125. boolean place = true;
  126.  
  127. for (int y = 0; y<7; y++)
  128. for (int z = 0; z<4; z++)
  129. for (int x = 0; x<5; x++)
  130. if(world.getBlock(i+x,j+y+1,k+z)!=Blocks.air)
  131. place = false;
  132.  
  133. if(place){
  134. world.setBlock(i+0, j+0, k+0, Block.getBlockById(0), 0, 2);
  135. world.setBlock(i+1, j+0, k+0, Block.getBlockById(0), 0, 2);
  136. world.setBlock(i+2, j+0, k+0, Block.getBlockById(0), 0, 2);
  137. world.setBlock(i+3, j+0, k+0, Block.getBlockById(0), 0, 2);
  138. world.setBlock(i+4, j+0, k+0, Block.getBlockById(0), 0, 2);
  139. world.setBlock(i+0, j+0, k+1, Block.getBlockById(0), 0, 2);
  140. world.setBlock(i+1, j+0, k+1, Block.getBlockById(17), 0, 2);
  141. world.setBlock(i+2, j+0, k+1, Block.getBlockById(0), 0, 2);
  142. world.setBlock(i+3, j+0, k+1, Block.getBlockById(0), 0, 2);
  143. world.setBlock(i+4, j+0, k+1, Block.getBlockById(0), 0, 2);
  144. world.setBlock(i+0, j+0, k+2, Block.getBlockById(0), 0, 2);
  145. world.setBlock(i+1, j+0, k+2, Block.getBlockById(0), 0, 2);
  146. world.setBlock(i+2, j+0, k+2, Block.getBlockById(0), 0, 2);
  147. world.setBlock(i+3, j+0, k+2, Block.getBlockById(0), 0, 2);
  148. world.setBlock(i+4, j+0, k+2, Block.getBlockById(0), 0, 2);
  149. world.setBlock(i+0, j+0, k+3, Block.getBlockById(0), 0, 2);
  150. world.setBlock(i+1, j+0, k+3, Block.getBlockById(0), 0, 2);
  151. world.setBlock(i+2, j+0, k+3, Block.getBlockById(0), 0, 2);
  152. world.setBlock(i+3, j+0, k+3, Block.getBlockById(0), 0, 2);
  153. world.setBlock(i+4, j+0, k+3, Block.getBlockById(0), 0, 2);
  154. world.setBlock(i+0, j+1, k+0, Block.getBlockById(0), 0, 2);
  155. world.setBlock(i+1, j+1, k+0, Block.getBlockById(0), 0, 2);
  156. world.setBlock(i+2, j+1, k+0, Block.getBlockById(0), 0, 2);
  157. world.setBlock(i+3, j+1, k+0, Block.getBlockById(0), 0, 2);
  158. world.setBlock(i+4, j+1, k+0, Block.getBlockById(0), 0, 2);
  159. world.setBlock(i+0, j+1, k+1, Block.getBlockById(0), 0, 2);
  160. world.setBlock(i+1, j+1, k+1, Block.getBlockById(17), 0, 2);
  161. world.setBlock(i+2, j+1, k+1, Block.getBlockById(0), 0, 2);
  162. world.setBlock(i+3, j+1, k+1, Block.getBlockById(0), 0, 2);
  163. world.setBlock(i+4, j+1, k+1, Block.getBlockById(0), 0, 2);
  164. world.setBlock(i+0, j+1, k+2, Block.getBlockById(0), 0, 2);
  165. world.setBlock(i+1, j+1, k+2, Block.getBlockById(0), 0, 2);
  166. world.setBlock(i+2, j+1, k+2, Block.getBlockById(0), 0, 2);
  167. world.setBlock(i+3, j+1, k+2, Block.getBlockById(0), 0, 2);
  168. world.setBlock(i+4, j+1, k+2, Block.getBlockById(0), 0, 2);
  169. world.setBlock(i+0, j+1, k+3, Block.getBlockById(0), 0, 2);
  170. world.setBlock(i+1, j+1, k+3, Block.getBlockById(0), 0, 2);
  171. world.setBlock(i+2, j+1, k+3, Block.getBlockById(0), 0, 2);
  172. world.setBlock(i+3, j+1, k+3, Block.getBlockById(0), 0, 2);
  173. world.setBlock(i+4, j+1, k+3, Block.getBlockById(0), 0, 2);
  174. world.setBlock(i+0, j+2, k+0, Block.getBlockById(0), 0, 2);
  175. world.setBlock(i+1, j+2, k+0, Block.getBlockById(0), 0, 2);
  176. world.setBlock(i+2, j+2, k+0, Block.getBlockById(0), 0, 2);
  177. world.setBlock(i+3, j+2, k+0, Block.getBlockById(0), 0, 2);
  178. world.setBlock(i+4, j+2, k+0, Block.getBlockById(0), 0, 2);
  179. world.setBlock(i+0, j+2, k+1, Block.getBlockById(0), 0, 2);
  180. world.setBlock(i+1, j+2, k+1, Block.getBlockById(17), 0, 2);
  181. world.setBlock(i+2, j+2, k+1, Block.getBlockById(0), 0, 2);
  182. world.setBlock(i+3, j+2, k+1, Block.getBlockById(0), 0, 2);
  183. world.setBlock(i+4, j+2, k+1, Block.getBlockById(0), 0, 2);
  184. world.setBlock(i+0, j+2, k+2, Block.getBlockById(0), 0, 2);
  185. world.setBlock(i+1, j+2, k+2, Block.getBlockById(0), 0, 2);
  186. world.setBlock(i+2, j+2, k+2, Block.getBlockById(0), 0, 2);
  187. world.setBlock(i+3, j+2, k+2, Block.getBlockById(0), 0, 2);
  188. world.setBlock(i+4, j+2, k+2, Block.getBlockById(0), 0, 2);
  189. world.setBlock(i+0, j+2, k+3, Block.getBlockById(0), 0, 2);
  190. world.setBlock(i+1, j+2, k+3, Block.getBlockById(0), 0, 2);
  191. world.setBlock(i+2, j+2, k+3, Block.getBlockById(0), 0, 2);
  192. world.setBlock(i+3, j+2, k+3, Block.getBlockById(0), 0, 2);
  193. world.setBlock(i+4, j+2, k+3, Block.getBlockById(0), 0, 2);
  194. world.setBlock(i+0, j+3, k+0, Block.getBlockById(0), 0, 2);
  195. world.setBlock(i+1, j+3, k+0, Block.getBlockById(0), 0, 2);
  196. world.setBlock(i+2, j+3, k+0, Block.getBlockById(0), 0, 2);
  197. world.setBlock(i+3, j+3, k+0, Block.getBlockById(0), 0, 2);
  198. world.setBlock(i+4, j+3, k+0, Block.getBlockById(0), 0, 2);
  199. world.setBlock(i+0, j+3, k+1, Block.getBlockById(17), 4, 2);
  200. world.setBlock(i+1, j+3, k+1, Block.getBlockById(17), 0, 2);
  201. world.setBlock(i+2, j+3, k+1, Block.getBlockById(0), 0, 2);
  202. world.setBlock(i+3, j+3, k+1, Block.getBlockById(0), 0, 2);
  203. world.setBlock(i+4, j+3, k+1, Block.getBlockById(0), 0, 2);
  204. world.setBlock(i+0, j+3, k+2, Block.getBlockById(0), 0, 2);
  205. world.setBlock(i+1, j+3, k+2, Block.getBlockById(0), 0, 2);
  206. world.setBlock(i+2, j+3, k+2, Block.getBlockById(0), 0, 2);
  207. world.setBlock(i+3, j+3, k+2, Block.getBlockById(0), 0, 2);
  208. world.setBlock(i+4, j+3, k+2, Block.getBlockById(0), 0, 2);
  209. world.setBlock(i+0, j+3, k+3, Block.getBlockById(0), 0, 2);
  210. world.setBlock(i+1, j+3, k+3, Block.getBlockById(0), 0, 2);
  211. world.setBlock(i+2, j+3, k+3, Block.getBlockById(0), 0, 2);
  212. world.setBlock(i+3, j+3, k+3, Block.getBlockById(0), 0, 2);
  213. world.setBlock(i+4, j+3, k+3, Block.getBlockById(0), 0, 2);
  214. world.setBlock(i+0, j+4, k+0, Block.getBlockById(0), 0, 2);
  215. world.setBlock(i+1, j+4, k+0, Block.getBlockById(17), 8, 2);
  216. world.setBlock(i+2, j+4, k+0, Block.getBlockById(0), 0, 2);
  217. world.setBlock(i+3, j+4, k+0, Block.getBlockById(0), 0, 2);
  218. world.setBlock(i+4, j+4, k+0, Block.getBlockById(0), 0, 2);
  219. world.setBlock(i+0, j+4, k+1, Block.getBlockById(0), 0, 2);
  220. world.setBlock(i+1, j+4, k+1, Block.getBlockById(17), 0, 2);
  221. world.setBlock(i+2, j+4, k+1, Block.getBlockById(0), 0, 2);
  222. world.setBlock(i+3, j+4, k+1, Block.getBlockById(0), 0, 2);
  223. world.setBlock(i+4, j+4, k+1, Block.getBlockById(0), 0, 2);
  224. world.setBlock(i+0, j+4, k+2, Block.getBlockById(0), 0, 2);
  225. world.setBlock(i+1, j+4, k+2, Block.getBlockById(0), 0, 2);
  226. world.setBlock(i+2, j+4, k+2, Block.getBlockById(0), 0, 2);
  227. world.setBlock(i+3, j+4, k+2, Block.getBlockById(0), 0, 2);
  228. world.setBlock(i+4, j+4, k+2, Block.getBlockById(0), 0, 2);
  229. world.setBlock(i+0, j+4, k+3, Block.getBlockById(0), 0, 2);
  230. world.setBlock(i+1, j+4, k+3, Block.getBlockById(0), 0, 2);
  231. world.setBlock(i+2, j+4, k+3, Block.getBlockById(0), 0, 2);
  232. world.setBlock(i+3, j+4, k+3, Block.getBlockById(0), 0, 2);
  233. world.setBlock(i+4, j+4, k+3, Block.getBlockById(0), 0, 2);
  234. world.setBlock(i+0, j+5, k+0, Block.getBlockById(0), 0, 2);
  235. world.setBlock(i+1, j+5, k+0, Block.getBlockById(0), 0, 2);
  236. world.setBlock(i+2, j+5, k+0, Block.getBlockById(0), 0, 2);
  237. world.setBlock(i+3, j+5, k+0, Block.getBlockById(17), 8, 2);
  238. world.setBlock(i+4, j+5, k+0, Block.getBlockById(0), 0, 2);
  239. world.setBlock(i+0, j+5, k+1, Block.getBlockById(0), 0, 2);
  240. world.setBlock(i+1, j+5, k+1, Block.getBlockById(17), 0, 2);
  241. world.setBlock(i+2, j+5, k+1, Block.getBlockById(17), 4, 2);
  242. world.setBlock(i+3, j+5, k+1, Block.getBlockById(17), 4, 2);
  243. world.setBlock(i+4, j+5, k+1, Block.getBlockById(17), 4, 2);
  244. world.setBlock(i+0, j+5, k+2, Block.getBlockById(0), 0, 2);
  245. world.setBlock(i+1, j+5, k+2, Block.getBlockById(17), 8, 2);
  246. world.setBlock(i+2, j+5, k+2, Block.getBlockById(0), 0, 2);
  247. world.setBlock(i+3, j+5, k+2, Block.getBlockById(0), 0, 2);
  248. world.setBlock(i+4, j+5, k+2, Block.getBlockById(0), 0, 2);
  249. world.setBlock(i+0, j+5, k+3, Block.getBlockById(0), 0, 2);
  250. world.setBlock(i+1, j+5, k+3, Block.getBlockById(17), 8, 2);
  251. world.setBlock(i+2, j+5, k+3, Block.getBlockById(0), 0, 2);
  252. world.setBlock(i+3, j+5, k+3, Block.getBlockById(0), 0, 2);
  253. world.setBlock(i+4, j+5, k+3, Block.getBlockById(0), 0, 2);
  254. world.setBlock(i+0, j+6, k+0, Block.getBlockById(0), 0, 2);
  255. world.setBlock(i+1, j+6, k+0, Block.getBlockById(0), 0, 2);
  256. world.setBlock(i+2, j+6, k+0, Block.getBlockById(0), 0, 2);
  257. world.setBlock(i+3, j+6, k+0, Block.getBlockById(0), 0, 2);
  258. world.setBlock(i+4, j+6, k+0, Block.getBlockById(0), 0, 2);
  259. world.setBlock(i+0, j+6, k+1, Block.getBlockById(0), 0, 2);
  260. world.setBlock(i+1, j+6, k+1, Block.getBlockById(17), 0, 2);
  261. world.setBlock(i+2, j+6, k+1, Block.getBlockById(0), 0, 2);
  262. world.setBlock(i+3, j+6, k+1, Block.getBlockById(0), 0, 2);
  263. world.setBlock(i+4, j+6, k+1, Block.getBlockById(0), 0, 2);
  264. world.setBlock(i+0, j+6, k+2, Block.getBlockById(0), 0, 2);
  265. world.setBlock(i+1, j+6, k+2, Block.getBlockById(0), 0, 2);
  266. world.setBlock(i+2, j+6, k+2, Block.getBlockById(0), 0, 2);
  267. world.setBlock(i+3, j+6, k+2, Block.getBlockById(0), 0, 2);
  268. world.setBlock(i+4, j+6, k+2, Block.getBlockById(0), 0, 2);
  269. world.setBlock(i+0, j+6, k+3, Block.getBlockById(0), 0, 2);
  270. world.setBlock(i+1, j+6, k+3, Block.getBlockById(0), 0, 2);
  271. world.setBlock(i+2, j+6, k+3, Block.getBlockById(0), 0, 2);
  272. world.setBlock(i+3, j+6, k+3, Block.getBlockById(0), 0, 2);
  273. world.setBlock(i+4, j+6, k+3, Block.getBlockById(0), 0, 2);
  274. world.setBlock(i, j, k, Block.getBlockById(0), 0, 2);
  275.  
  276. TileEntity te = world.getBlockTileEntity(i, j, k);
  277. if (te instanceof IInventory)
  278. {
  279. ChestGenHooks info = ChestGenHooks.getInfo("Category");
  280. WeightedRandomChestContent.generateChestContents(random, info.getItems(random), te, info.getCount(random));
  281. }
  282. }}
  283. }
  284.  
  285. public void generateNether(World world, Random random, int chunkX, int chunkZ){}
  286.  
  287.    public int addFuel(ItemStack fuel){
  288.        return 0;
  289.    }
  290.    public void serverLoad(FMLServerStartingEvent event){}
  291.    public void preInit(FMLPreInitializationEvent event){}
  292.    public void registerRenderers(){}
  293.  
  294.  
  295. }
RAW Paste Data