Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package xchow;
- import xchow.Handlers.Handler;
- import xchow.Proxy.Proxy;
- import io.netty.handler.codec.http.HttpHeaders.Values;
- import xchow.Handlers.*;
- import xchow.Item.*;
- import xchow.Potion.*;
- import xchow.Proxy.*;
- import xchow.Blocks.*;
- import xchow.Armor.*;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.entity.EnumCreatureType;
- import net.minecraft.entity.passive.EntityVillager;
- import net.minecraft.init.Blocks;
- import net.minecraft.init.Items;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemArmor;
- import net.minecraft.item.ItemArmor.ArmorMaterial;
- import net.minecraft.item.ItemMultiTexture;
- import net.minecraft.item.ItemSeeds;
- import net.minecraft.item.ItemStack;
- import net.minecraft.potion.Potion;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.util.WeightedRandomChestContent;
- import net.minecraft.village.Village;
- import net.minecraftforge.client.event.sound.SoundSetupEvent;
- import net.minecraftforge.common.ChestGenHooks;
- import net.minecraftforge.common.DungeonHooks;
- import net.minecraftforge.common.ForgeHooks;
- import net.minecraftforge.common.MinecraftForge;
- import net.minecraftforge.common.config.Configuration;
- import net.minecraftforge.common.util.EnumHelper;
- import net.minecraftforge.event.terraingen.BiomeEvent.GetVillageBlockMeta;
- import net.minecraftforge.oredict.OreDictionary;
- import net.minecraftforge.oredict.ShapedOreRecipe;
- import net.minecraftforge.oredict.ShapelessOreRecipe;
- import net.minecraft.world.biome.BiomeGenBase;
- import net.minecraft.world.gen.structure.StructureComponent;
- import cpw.mods.fml.common.FMLCommonHandler;
- import cpw.mods.fml.common.Mod;
- import cpw.mods.fml.common.Mod.EventHandler;
- import cpw.mods.fml.common.Mod.Instance;
- import cpw.mods.fml.common.SidedProxy;
- import cpw.mods.fml.common.event.FMLInitializationEvent;
- import cpw.mods.fml.common.event.FMLInterModComms;
- import cpw.mods.fml.common.event.FMLPreInitializationEvent;
- import cpw.mods.fml.common.event.FMLServerStartingEvent;
- import cpw.mods.fml.common.registry.EntityRegistry;
- import cpw.mods.fml.common.registry.GameRegistry;
- import cpw.mods.fml.common.registry.LanguageRegistry;
- import cpw.mods.fml.common.registry.VillagerRegistry;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import com.flansmod.common.FlansMod;
- @Mod(modid = "xchow", name = "Test", version = Main.VERSION)
- public class Main {
- //public static final String MODID = "xchow";
- //public static final String MODNAME = "Infection Z";
- public static final String VERSION = "1.0.0";
- @SidedProxy(clientSide = "xchow.Proxy.ClientProxy", serverSide = "xchow.Proxy.Proxy")
- public static Proxy proxy;
- public static CreativeTabs tabInfection = new ZTab(CreativeTabs.getNextID(), "Zombie");
- //Effects
- public static Potion strongopiatePotion;
- public static Potion overdosePotion;
- //public static Potion nullPotion;
- public static Potion antibacteriaPotion;
- //Items
- public static Item painpill;
- public static Item caffeine;
- public static Item soda;
- public static Item energydrink;
- public static Item can;
- public static Item penicillin;
- public static Item Coin;
- public static Item lighter;
- public static Item creativetool;
- public static Item syringe;
- public static Item needle;
- public static Item dirtysyringe;
- public static Item milk;
- public static Item morphinebottle;
- public static Item morphineneedle;
- public static Item ak47;
- //Armor static
- public static Item bandithelmet;
- public static Item banditvest;
- public static Item banditpants;
- public static Item banditboots;
- public static Item ghilliehelmet;
- public static Item ghillievest;
- public static Item ghilliepants;
- public static Item ghillieboots;
- public static Item herohelmet;
- public static Item herovest;
- public static Item heropants;
- public static Item heroboots;
- //Blocks
- public static Block industrialloot;
- static ItemArmor.ArmorMaterial armorBandit = EnumHelper.addArmorMaterial("BANDIT", 20, new int[] { 1, 3, 3, 2 }, 20);
- public static int villagerDealerID = 8;
- Handler events = new Handler();
- @EventHandler
- public void preinit(FMLPreInitializationEvent event)
- {
- MinecraftForge.EVENT_BUS.register(new Handler());
- MinecraftForge.EVENT_BUS.register(new DropHandler());
- FMLInterModComms.sendMessage("OpenBlocks", "donateUrl", "http://infinitewarfare.enjin.com/shop");
- proxy.initCapes();
- //metadata of the mod. Displays info about the mod in the mods section
- event.getModMetadata().autogenerated = false;
- event.getModMetadata().description = "Adds drugs into your game";
- event.getModMetadata().authorList.add("XxCh0wxX");
- Configuration ZombieConfig = new Configuration(event.getSuggestedConfigurationFile());
- ZombieConfig.load();
- ZombieConfig.save();
- for (int i = 0; i < 5; ++i) {
- VillagerRegistry.instance().registerVillageTradeHandler(i, new TradeHandler());}
- VillagerRegistry.instance().registerVillagerId(8);
- VillagerRegistry.instance().registerVillagerSkin(8, new ResourceLocation("xchow", "textures/dealer.png"));
- VillagerRegistry.instance().registerVillageTradeHandler(8, new TradeHandler());
- VillagerRegistry.instance().getRegisteredVillagers();
- }
- @EventHandler
- public void init(FMLInitializationEvent event)
- {
- FMLCommonHandler.instance().bus().register(new Handler());
- antibacteriaPotion = (new EffectAntiBacteria(24));
- LanguageRegistry.instance().addStringLocalization("potion.xchow.antibacteria", "Anti-Bacteria");
- /*EntityRegistry.addSpawn(EntityVillager.class, 2, 0, 0, EnumCreatureType.monster, BiomeGenBase.plains);
- System.out.println("Villager Spawned"); */
- //Blocks
- //Registering Items
- GameRegistry.registerItem(painpill, "DrugPainPill");
- GameRegistry.registerItem(Coin, "ironCoin");
- GameRegistry.registerItem(soda, "soda");
- GameRegistry.registerItem(can, "Can");
- GameRegistry.registerItem(energydrink, "energydrink");
- GameRegistry.registerItem(penicillin, "DrugPenicillin");
- GameRegistry.registerItem(lighter, "lighter");
- GameRegistry.registerItem(creativetool, "creativetool");
- GameRegistry.registerItem(syringe, "syringe");
- GameRegistry.registerItem(dirtysyringe, "dirtysyringe");
- GameRegistry.registerItem(needle, "needle");
- GameRegistry.registerItem(morphinebottle, "DrugMorphineBottle");
- GameRegistry.registerItem(morphineneedle, "DrugMorphine");
- //Armor
- GameRegistry.registerItem(herohelmet, "armorHeroHelmet");
- GameRegistry.registerItem(herovest, "armorHeroVest");
- GameRegistry.registerItem(heropants, "armorHeroPants");
- GameRegistry.registerItem(heroboots, "armorHeroBoots");
- GameRegistry.registerItem(bandithelmet, "armorBanditHelmet");
- GameRegistry.registerItem(banditvest, "armorBanditVest");
- GameRegistry.registerItem(banditpants, "armorBanditPants");
- GameRegistry.registerItem(banditboots, "armorBanditBoots");
- GameRegistry.registerItem(ghilliehelmet, "armorGhillieHelmet");
- GameRegistry.registerItem(ghillievest, "armorGhillieVest");
- GameRegistry.registerItem(ghilliepants, "armorGhilliePants");
- GameRegistry.registerItem(ghillieboots, "armorGhillieBoots");
- GameRegistry.findItem(FlansMod.MODID, "ak47");
- GameRegistry.registerBlock(industrialloot = new IndustrialSpawner("crate", Material.wood), "crate");
- //ChestGen
- ChestGenHooks.addItem(ChestGenHooks.VILLAGE_BLACKSMITH, new WeightedRandomChestContent(new ItemStack(morphinebottle), 1, 1, 1));
- //Seed Gen (Disabled
- //MinecraftForge.addGrassSeed(new ItemStack(Main.Disabled), 1);
- //ore dictionary
- addNames();
- oreRegistration();
- addOreRecipes();
- }
- public static void addNames()
- {
- }
- public static void oreRegistration() {
- //Registering the ore dictionary names of certain items
- OreDictionary.registerOre("coinIron", new ItemStack(Main.Coin));
- OreDictionary.registerOre("drugPainPill", new ItemStack(Main.painpill));
- OreDictionary.registerOre("drugOTC", new ItemStack(Main.painpill));
- OreDictionary.registerOre("drugPenicillin", new ItemStack(Main.penicillin));
- OreDictionary.registerOre("drugPrescription", new ItemStack(Main.penicillin));
- OreDictionary.registerOre("drugMorphine", new ItemStack(Main.morphineneedle));
- OreDictionary.registerOre("drugPrescription", new ItemStack(Main.morphineneedle));
- OreDictionary.registerOre("drugPrescription", new ItemStack(Main.morphinebottle));
- OreDictionary.registerOre("drugMorphineBottle", new ItemStack(Main.morphinebottle));
- OreDictionary.registerOre("chest", new ItemStack(Blocks.chest));
- OreDictionary.registerOre("coal", new ItemStack(Items.coal));
- OreDictionary.registerOre("fuelCoal", new ItemStack(Items.coal));
- OreDictionary.registerOre("syringe", new ItemStack(Main.syringe));
- }
- public static void addOreRecipes()
- {
- GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Main.morphineneedle, 1), new ItemStack(Main.morphinebottle.setContainerItem(Main.morphinebottle), 1, OreDictionary.WILDCARD_VALUE), "syringe"));
- GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Main.soda, 1), new ItemStack(Items.sugar), new ItemStack(Items.sugar), new ItemStack(Main.can),"drugCaffeinePowder", new ItemStack(Items.water_bucket)));
- GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Main.caffeine, 1), new ItemStack(Items.sugar), "dyeBrown"));
- GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Main.energydrink, 1), new ItemStack(Items.sugar), new ItemStack(Items.sugar), new ItemStack(Main.can), "drugCaffeinePowder", "drugCaffeinePowder", new ItemStack(Items.water_bucket)));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Main.can, 3), new Object[]{
- " A ",
- "A A",
- "AAA",
- 'A', "ingotIron"
- }));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Main.Coin, 2), new Object[]{
- " I ",
- "I I",
- " I ",
- 'I', "ingotIron"
- }));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Main.lighter, 1), new Object[]{
- " D ",
- "ACA",
- "ABA",
- 'A', "ingotIron",'B',"coal",'C',Items.flint_and_steel,'D',Items.string
- }));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Main.needle, 1), new Object[]{
- " A",
- " A ",
- "A ",
- 'A',"ingotIron"
- }));
- GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Main.syringe, 1), new Object[]{
- " A",
- " B ",
- "C ",
- 'B', "paneGlass",'A',"ingotIron",'C',Main.needle
- }));
- }{
- //declaring items and blocks
- //Items
- Coin = new ItemClass(4200).setUnlocalizedName("currency").setTextureName("xchow:currency").setCreativeTab(CreativeTabs.tabMisc).setMaxStackSize(32);
- caffeine = new ItemClass(4201).setUnlocalizedName("caffeine").setTextureName("xchow:caffeine").setCreativeTab(Main.tabInfection);
- can = new ItemClass(4202).setUnlocalizedName("can").setTextureName("xchow:can").setCreativeTab(CreativeTabs.tabMisc);
- lighter = new LighterItem(4203).setUnlocalizedName("lighter").setTextureName("xchow:lighter").setCreativeTab(CreativeTabs.tabTools);
- creativetool = new ItemCreative(4204).setUnlocalizedName("creativetool").setTextureName("xchow:creativetool").setCreativeTab(Main.tabInfection);
- syringe = new ItemClass(4205).setUnlocalizedName("syringe").setMaxStackSize(3).setTextureName("xchow:syringe").setCreativeTab(CreativeTabs.tabMisc);
- dirtysyringe = new ItemClass(4206).setUnlocalizedName("dirtysyringe").setMaxStackSize(3).setTextureName("xchow:dirtysyringe").setCreativeTab(CreativeTabs.tabMisc);
- needle = new ItemClass(4207).setUnlocalizedName("needle").setTextureName("xchow:needle").setCreativeTab(CreativeTabs.tabMisc);
- soda = new SodaItem(0, 0.5F, false).setMaxStackSize(1).setUnlocalizedName("Soda").setTextureName("xchow:soda").setCreativeTab(CreativeTabs.tabFood);
- energydrink = new EnergyDrinkItem(0, 0.3F, false).setMaxStackSize(1).setUnlocalizedName("EnergyDrink").setTextureName("xchow:energydrink").setCreativeTab(CreativeTabs.tabFood);
- morphineneedle= new ItemMorphineNeedle(0, 0.0F, false).setUnlocalizedName("morphineneedle").setTextureName("xchow:morphineneedle").setCreativeTab(Main.tabInfection).setMaxStackSize(1);
- penicillin= new PenicillinItem(0, 0.0F, false).setUnlocalizedName("penicillin").setTextureName("xchow:penicillin").setCreativeTab(Main.tabInfection);
- painpill= new PainpillItem(0, 0.0F, false).setUnlocalizedName("painpill").setTextureName("xchow:painpill").setCreativeTab(Main.tabInfection);
- morphinebottle= new ItemMorphineBottle(0, 0.0F, false).setUnlocalizedName("morphinebottle").setTextureName("xchow:morphinebottle").setCreativeTab(Main.tabInfection);
- //Armor
- bandithelmet = new banditarmor(4208, armorBandit, 0, 0).setUnlocalizedName("bandithelmet").setTextureName("xchow:bandithelmet").setCreativeTab(CreativeTabs.tabCombat);
- banditvest = new banditarmor(4209, armorBandit, 0, 1).setUnlocalizedName("banditvest").setTextureName("xchow:banditvest").setCreativeTab(CreativeTabs.tabCombat);
- banditpants = new banditarmor(4210, armorBandit, 0, 2).setUnlocalizedName("banditpants").setTextureName("xchow:banditpants").setCreativeTab(CreativeTabs.tabCombat);
- banditboots = new banditarmor(4211, armorBandit, 0, 3).setUnlocalizedName("banditboots").setTextureName("xchow:banditboots").setCreativeTab(CreativeTabs.tabCombat);
- herohelmet = new heroarmor(4212, armorBandit, 0, 0).setUnlocalizedName("herohelmet").setTextureName("xchow:herohelmet").setCreativeTab(CreativeTabs.tabCombat);
- herovest = new heroarmor(4213, armorBandit, 0, 1).setUnlocalizedName("herovest").setTextureName("xchow:herovest").setCreativeTab(CreativeTabs.tabCombat);
- heropants = new heroarmor(4214, armorBandit, 0, 2).setUnlocalizedName("heropants").setTextureName("xchow:heropants").setCreativeTab(CreativeTabs.tabCombat);
- heroboots = new heroarmor(4215, armorBandit, 0, 3).setUnlocalizedName("heroboots").setTextureName("xchow:heroboots").setCreativeTab(CreativeTabs.tabCombat);
- ghilliehelmet = new ghilliearmor(4216, armorBandit, 0, 0).setUnlocalizedName("ghilliehelmet").setTextureName("xchow:ghilliehelmet").setCreativeTab(CreativeTabs.tabCombat);
- ghillievest = new ghilliearmor(4217, armorBandit, 0, 1).setUnlocalizedName("ghillievest").setTextureName("xchow:ghillievest").setCreativeTab(CreativeTabs.tabCombat);
- ghilliepants = new ghilliearmor(4218, armorBandit, 0, 2).setUnlocalizedName("ghilliepants").setTextureName("xchow:ghilliepants").setCreativeTab(CreativeTabs.tabCombat);
- ghillieboots = new ghilliearmor(4219, armorBandit, 0, 3).setUnlocalizedName("ghillieboots").setTextureName("xchow:ghillieboots").setCreativeTab(CreativeTabs.tabCombat);
- //Language Registry
- //Note: Need to move to language files.
- //Blocks
- //Items
- LanguageRegistry.addName(painpill, "Acetaminophen Pill 250mg");
- LanguageRegistry.addName(Coin, "Iron Coin");
- LanguageRegistry.addName(caffeine, "Caffeine Powder");
- LanguageRegistry.addName(soda, "Soda");
- LanguageRegistry.addName(can, "Empty Can");
- LanguageRegistry.addName(energydrink, "Energy Drink");
- LanguageRegistry.addName(penicillin, "Penicillin Pill 75mg");
- LanguageRegistry.addName(lighter, "Lighter");
- LanguageRegistry.addName(creativetool, "Creative Tool");
- LanguageRegistry.addName(syringe, "Empty Syringe");
- LanguageRegistry.addName(needle, "Needle");
- LanguageRegistry.addName(dirtysyringe, "Dirty Syringe");
- LanguageRegistry.addName(morphineneedle, "Morphine Bottle");
- //Armor
- LanguageRegistry.addName(bandithelmet, "Bandit Helmet");
- LanguageRegistry.addName(banditvest, "Bandit Vest");
- LanguageRegistry.addName(banditpants, "Bandit Pants");
- LanguageRegistry.addName(banditboots, "Bandit Boots");
- //smelting
- GameRegistry.addSmelting(new ItemStack(Main.dirtysyringe), new ItemStack(Main.syringe), 0.0F);
- GameRegistry.addSmelting(new ItemStack(Main.Coin), new ItemStack(Items.iron_ingot), 0.0F);
- }{
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment