Guest User

My Code Source

a guest
Feb 11th, 2016
209
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Here you go:
  2.  
  3. import net.minecraftforge.fml.client.registry.*;
  4. import net.minecraftforge.fml.common.*;
  5. import net.minecraftforge.fml.common.asm.*;
  6. import net.minecraftforge.fml.common.asm.transformers.*;
  7. import net.minecraftforge.fml.common.discovery.*;
  8. import net.minecraftforge.fml.common.discovery.asm.*;
  9. import net.minecraftforge.fml.common.event.*;
  10. import net.minecraftforge.fml.common.functions.*;
  11. import net.minecraftforge.fml.common.network.*;
  12. import net.minecraftforge.fml.common.registry.*;
  13. import net.minecraftforge.fml.common.toposort.*;
  14. import net.minecraftforge.fml.common.versioning.*;
  15. import net.minecraftforge.fml.relauncher.*;
  16. import net.minecraftforge.fml.server.*;
  17. import net.minecraft.block.*;
  18. import net.minecraft.block.material.*;
  19. import net.minecraft.client.*;
  20. import net.minecraft.client.audio.*;
  21. import net.minecraft.client.entity.*;
  22. import net.minecraft.client.gui.*;
  23. import net.minecraft.client.gui.achievement.*;
  24. import net.minecraft.client.gui.inventory.*;
  25. import net.minecraft.client.model.*;
  26. import net.minecraft.client.multiplayer.*;
  27. import net.minecraft.client.particle.*;
  28. import net.minecraft.client.renderer.*;
  29. import net.minecraft.client.renderer.culling.*;
  30. import net.minecraft.client.renderer.entity.*;
  31. import net.minecraft.client.renderer.tileentity.*;
  32. import net.minecraft.client.settings.*;
  33. import net.minecraft.command.*;
  34. import net.minecraft.crash.*;
  35. import net.minecraft.creativetab.*;
  36. import net.minecraft.dispenser.*;
  37. import net.minecraft.enchantment.*;
  38. import net.minecraft.entity.*;
  39. import net.minecraft.entity.ai.*;
  40. import net.minecraft.entity.boss.*;
  41. import net.minecraft.entity.effect.*;
  42. import net.minecraft.entity.item.*;
  43. import net.minecraft.entity.monster.*;
  44. import net.minecraft.entity.passive.*;
  45. import net.minecraft.entity.player.*;
  46. import net.minecraft.entity.projectile.*;
  47. import net.minecraft.inventory.*;
  48. import net.minecraft.item.*;
  49. import net.minecraft.item.crafting.*;
  50. import net.minecraft.nbt.*;
  51. import net.minecraft.network.*;
  52. import net.minecraft.network.rcon.*;
  53. import net.minecraft.pathfinding.*;
  54. import net.minecraft.potion.*;
  55. import net.minecraft.profiler.*;
  56. import net.minecraft.server.*;
  57. import net.minecraft.server.dedicated.*;
  58. import net.minecraft.server.gui.*;
  59. import net.minecraft.server.integrated.*;
  60. import net.minecraft.server.management.*;
  61. import net.minecraft.stats.*;
  62. import net.minecraft.tileentity.*;
  63. import net.minecraft.util.*;
  64. import net.minecraft.village.*;
  65. import net.minecraft.world.*;
  66. import net.minecraft.world.biome.*;
  67. import net.minecraft.world.chunk.*;
  68. import net.minecraft.world.chunk.storage.*;
  69. import net.minecraft.world.demo.*;
  70. import net.minecraft.world.gen.*;
  71. import net.minecraft.world.gen.feature.*;
  72. import net.minecraft.world.gen.layer.*;
  73. import net.minecraft.world.gen.structure.*;
  74. import net.minecraft.world.storage.*;
  75. import net.minecraftforge.classloading.*;
  76. import net.minecraftforge.client.*;
  77. import net.minecraftforge.client.event.*;
  78. import net.minecraftforge.client.event.sound.*;
  79. import net.minecraftforge.common.*;
  80. import net.minecraftforge.event.*;
  81. import net.minecraftforge.event.entity.*;
  82. import net.minecraftforge.event.entity.item.*;
  83. import net.minecraftforge.event.entity.living.*;
  84. import net.minecraftforge.event.entity.minecart.*;
  85. import net.minecraftforge.event.entity.player.*;
  86. import net.minecraftforge.event.terraingen.*;
  87. import net.minecraftforge.event.world.*;
  88. import net.minecraftforge.oredict.*;
  89. import net.minecraft.init.*;
  90. import java.util.*;
  91. import net.minecraftforge.common.util.*;
  92.  
  93. import org.lwjgl.opengl.GL11;
  94.  
  95. import net.minecraft.client.resources.model.*;
  96.  
  97.  
  98. @SuppressWarnings("unchecked")
  99. public class mcreator_fireWand{
  100.  
  101. public mcreator_fireWand(){}
  102.  
  103. public static Item block;public static Object instance;public void load(FMLInitializationEvent event){
  104. if(event.getSide() == Side.CLIENT)
  105. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(block, 0, new ModelResourceLocation("TestEnvironmentMod:FireWand", "inventory"));
  106. }
  107. public void generateNether(World world, Random random, int chunkX, int chunkZ){}
  108. public void generateSurface(World world, Random random, int chunkX, int chunkZ){}
  109. public int addFuel(ItemStack fuel){return 0;}
  110. public void serverLoad(FMLServerStartingEvent event){}
  111. public void preInit(FMLPreInitializationEvent event){}
  112. public void registerRenderers(){
  113. }
  114.  
  115.  
  116. static{
  117. block = (new ItemfireWand(435));
  118.  
  119. }
  120.  
  121. static class ItemfireWand extends Item{
  122.  
  123. public ItemfireWand(int par1){
  124. setMaxDamage(1);
  125. maxStackSize = 1;
  126. setUnlocalizedName("FireWand");
  127. GameRegistry.registerItem(this, "FireWand");
  128. setCreativeTab(CreativeTabs.tabCombat);
  129. }
  130. public int getItemEnchantability()
  131. {
  132. return 0;
  133. }
  134. public int getMaxItemUseDuration(ItemStack par1ItemStack)
  135. {
  136. return 30;
  137. }
  138. public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
  139. {
  140. return 2.0F;
  141. }
  142. @Override
  143. public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entity){
  144. float var4 = 1.0F;
  145. int i = (int)(entity.prevPosX + (entity.posX - entity.prevPosX) * (double)var4);
  146. int j = (int)(entity.prevPosY + (entity.posY - entity.prevPosY) * (double)var4 + 1.62D);
  147. int k = (int)(entity.prevPosZ + (entity.posZ - entity.prevPosZ) * (double)var4);
  148.  
  149. if(true){
  150. itemstack.damageItem(1, entity);
  151. }
  152.  
  153. return itemstack;
  154. }
  155. public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4)
  156. {
  157. list.add("Right click to shoot fireballs");
  158. }
  159. public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
  160. if (!world.isRemote) {
  161. Vec3 v3 = player.getLook(1);
  162. EntitySmallFireball smallfireball = new EntitySmallFireball(world, player.posX, player.posY + player.eyeHeight, player.posZ, v3.xCoord, v3.yCoord, v3.zCoord);
  163. smallfireball.shootingEntity = player;
  164. world.playSoundAtEntity(player, "mob.ghast.fireball", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
  165. world.spawnEntityInWorld(smallfireball);
  166. }
  167. return itemStack;
  168. }
  169.  
  170.  
  171.  
  172.  
  173. }}
RAW Paste Data