Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sometimesHardcoreSometimes;
- import org.lwjgl.input.Keyboard;
- import net.minecraft.block.Block;
- import net.minecraft.client.settings.KeyBinding;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.entity.EnumCreatureType;
- import net.minecraft.item.EnumToolMaterial;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemFood;
- import net.minecraft.item.ItemStack;
- import net.minecraft.potion.Potion;
- import net.minecraft.world.biome.BiomeGenBase;
- import net.minecraftforge.common.Configuration;
- import net.minecraftforge.common.MinecraftForge;
- 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.FMLPostInitializationEvent;
- import cpw.mods.fml.common.event.FMLPreInitializationEvent;
- import cpw.mods.fml.common.network.NetworkMod;
- import cpw.mods.fml.common.registry.EntityRegistry;
- import cpw.mods.fml.common.registry.GameRegistry;
- import cpw.mods.fml.common.registry.LanguageRegistry;
- /* _=-*CURRENT MOD NAME*-=_
- *
- * "The" Botany Mod
- *
- */
- /** -- CHANGELOG -- **\
- * -implementation of Base, CommonProxy, and ClientProxy classes
- * -ground work done
- * -added changelog :D
- * -added custom creative tab "Sometimes Tab"
- * -began documentation
- * -created default config. file skeleton
- * -added methods:
- * PreInit - for config files and such in the future
- * Load - where all blocks, items, etc are loaded into game
- * PostInit - not sure why...internet told me to!
- * LangReg - used for language registry
- * GameReg - used for game registry
- * CreativeTabs - for creative tab icon
- *
- * Date: 14 March 2014
- * Version: 0.0.0
- * ---------------------------------------------------------------
- * -added @NetWorkMod for more integration
- * -added modid String for easier texture calling
- * -registry's changed to handle modid implementation
- * -folders added for Block and Item textures
- * -block init's moved to PreInit for optimization
- * -GamReg added for ore generation
- * -EventManager object class implemented for ore generation
- * -Blocks Added:
- * Lava Infused Stone - 1000
- * -Items Added:
- * Obsidian Fleck - 5000
- *
- * Date: 15 March 2014
- * Version: 0.0.1
- * ---------------------------------------------------------------
- * -Lava Infused Obsidian:
- * added smoke particle effects
- * added bounding box for damage on collision
- * sets fire and deals damage to !EntityItem
- *
- * Date: 16 March 2014
- * Version: 0.0.2
- * ---------------------------------------------------------------
- * -Blocks Added:
- * Solid Matter - 1001
- * Going to be used for portal block
- *
- * Date: 17 March 2014
- * Version: 0.0.3
- * ---------------------------------------------------------------
- * -Handlers for vanilla mob drop changes added *See 'DropHandlersInit' class
- * -Items Added:
- * zombie arm - 5001
- * cow utter - 5002
- * creeper mouth - 5003
- * pig snout - 5004
- * sheep leg - 5005
- * skeleton ribcage - 5006
- *
- * Date: 19 March 2014
- * Version: 0.0.4
- * ---------------------------------------------------------------
- * -6 classes added
- * -Entities Added:
- * -grean baen!
- * -Fungle Crab!
- *
- * Date: 20 March 2014
- * Version: 0.0.5
- * ---------------------------------------------------------------
- *- ~30 items added:
- * BASE ITEMS --
- * Tool Binding, Rune , Rune Part
- * 3 sub , 9 sub, 24 sub
- * **NOTE**
- * No textures added as of yet, code finished for simple
- * items, tool ideas + recipes in development.
- *
- * Date: 24 March 2014
- * Version: 0.0.6
- * ---------------------------------------------------------------
- * Classes created:
- * BlockPhotosynthesizer --NOT IN USE--
- * ContainerPhotosynthesizer --NOT IN USE--
- * HandlerGuiPhotosynthesizer --NOT IN USE--
- * PhotosynthesizerRecipes --NOT IN USE--
- * SlotPhotosynthesizer --NOT IN USE--
- * TileEntityPhotosynthesizer --NOT IN USE--
- *
- * Textures added for:
- * Rune Handle
- * Rune Pick
- * Rune Axe
- * Rune Shovel
- * Rune Sword
- * Rune Hoe
- * Rune Quickaxe
- *
- * Date: 26 March 2014
- * Version: 0.0.7
- * ---------------------------------------------------------------
- * Texutres added for:
- * All runic tool parts
- * Rune Skinning Knife
- * Rune Notched Blade
- * Runic Ore
- * Bindings
- *
- * Entity added:
- * Barbed Spike
- * Entity class,
- * Model class,
- * Render class.
- * Arrow Fish
- * Entity class,
- * Model class,
- * Render class.
- *
- * --Major updates on items. All mob drops changed to same id with meta data.
- * Items Added:
- * itemMatter - Decomposing, Gelatinous, and Protein Ball metas
- * itemIncediarySlimeball
- *
- * Crafting Recipes
- * Crafting Handler class added for damage to axes during crafting handles.
- *
- * Date: 27 March 2014
- * Version: 0.0.8
- * ---------------------------------------------------------------
- * Blocks added:
- * vile mushroom
- * gem root parts
- *
- * Date: 28 March 2014
- * Version: 0.0.9
- * ---------------------------------------------------------------
- *
- * -=-WORK-IN-PROGRESS CODE REMOVED-=-
- *
- * Items added:
- * Plant Greens
- * -Part of mob parts, used in crafting of compost, missing texture
- * -Dropped from plant mobs
- * Compost
- * -Works like a 5 use bonemeal, missing texure
- *
- * Date: 16 June 2014
- * Version: 0.0.10
- * ---------------------------------------------------------------
- * Altered Barbed Spike mob
- * -Given no movement speed
- * -Now extends EntityMob rather than EntityAnimal
- * -Burns in daylight (does NOT drop greens if death occurs from burning)
- * -Given knockback
- * ObsidianFleck
- * -Given a rendered "thrown" texture
- * -On impact, spawns "explode" particles
- * ItemMobSpawnEgg
- * -Added, not implemented
- * -Missing Texture
- * -Incomplete
- *
- * Date: 17 June 2014
- * Version: 0.0.11
- * ---------------------------------------------------------------
- * Items Added:
- * Sapphire Berry
- * -Throw-able berry dropped from Sapphire Lawncher and sheared from Sapphire Crops
- * -Oh gosh...it knocks monsters up in the air and deals damage (no damage to enderman so they don't tele),
- * heals players hit, knocks ghasts down and deals damage, and else spawns a barbed spike riding a pig (lols)
- * Blocks Added:
- * Sapphire Crop
- * -Given bounding box, Tile Entity file; still missing textures + model
- * -Not implemented yet, needs model
- * -Will be shearable for Sapphire Berries (seven times, then must re-grow)
- * =NOTE= Will act like melon stem; once sheared, will slowly re-grow (change texture) over time
- * -NEEDS -- Model, Textures, Funtionality with shears, and finally Implementation.
- *
- * Date: 18 June 2014
- * Version: 0.1.0
- * ---------------------------------------------------------------
- * BlockSapphireCrop - Given partial functionality, shearing drop a sapphire berry.
- * -Given a directional placement
- * -=-NOTE-=-
- * -Shears do NOT take durability damage
- * -Texture and amount of block and berries given no funcitonality
- * -Texture always has 7 berries
- * -Allowed to shear as much as you want
- *
- * Date: 20 June 2014
- * Version: 0.1.1
- * ---------------------------------------------------------------
- * Added a TileEntityReg(); function to support tile entity texture mapping
- *
- * Date: 21 June 2014
- * Version: 0.1.2
- * ---------------------------------------------------------------
- */
- @Mod(modid = Base.modid, name = "sometimes", version = "0.1.2")
- @NetworkMod(clientSideRequired = true, serverSideRequired = false,
- channels={"sometimes"}, packetHandler = PacketHandler.class)
- public class Base
- {
- @Instance(value = "sometimes_hardcore")
- public static Base instance;
- public static final String modid = "sometimes_hardcore";
- @SidedProxy(clientSide = "sometimesHardcoreSometimes.ClientProxy",
- serverSide = "sometimesHardcoreSometimes.CommonProxy")
- public static CommonProxy proxy;
- //Used for ore generation
- EventManager eventManager = new EventManager();
- //Biomes
- public static BiomeGenBase blight;
- /** Block & Block ID Declarations **/
- public static Block blockLavaInfusedStone;
- public static int blockLavaInfusedStoneID;
- public static Block blockMatter;
- public static int blockMatterID;
- public static Block blockRunicOre;
- public static int blockRunicOreID;
- public static Block blockFungleDirt;
- public static int blockFungleDirtID;
- public static Block blockFungleGrass;
- public static int blockFungleGrassID;
- public static Block blockInfectedLeaf;
- public static int blockInfectedLeafID;
- public static Block blockInfectedLog;
- public static int blockInfectedLogID;
- public static Block blockInfectedSapling;
- public static int blockInfectedSaplingID;
- public static Block blockVileMushroom;
- public static int blockVileMushroomID;
- public static Block blockBlueMushroom;
- public static int blockBlueMushroomID;
- public static Block blockBlueMushroomStem;
- public static int blockBlueMushroomStemID;
- public static Block blockRottenPlanks;
- public static int blockRottenPlanksID;
- public static Block blockMushroomGiant;
- public static int blockMushroomGiantID;
- public static Block blockPhotoStick;
- public static int blockPhotoStickID;
- public static Block blockSapphireCrop;
- public static int blockSapphireCropID;
- public static Block blockPowerBulb;
- public static int blockPowerBulbID;
- public static Block blockCropStaff;
- public static int blockCropStaffID;
- public static Block blockPedestal;
- public static int blockPedestalID;
- public static Block blockGemRoot;
- public static int blockGemRootID;
- public static Block blockShroomWood;
- public static int blockShroomWoodID;
- public static Block blockSalvagedPlanks;
- public static int blockSalvagedPlanksID;
- public static Block blockGemGlass;
- public static int blockGemGlassID;
- /** Item & Item ID Declarations **/
- public static Item itemObsidianFleck;
- public static int itemObsidianFleckID;
- public static Item itemMobPart;
- public static int itemMobPartID;
- public static Item itemToolBinding;
- public static int itemToolBindingID;
- public static Item itemRune;
- public static int itemRuneID;
- public static Item itemRunePart;
- public static int itemRunePartID;
- public static Item itemMatter;
- public static int itemMatterID;
- public static Item itemIncendiarySlimeball;
- public static int itemIncendiarySlimeballID;
- public static Item itemCarbonFiberBow;
- public static int itemCarbonFiberBowID;
- public static Item itemArrow;
- public static int itemArrowID;
- public static Item itemDiamondQuickPick;
- public static Item itemGoldQuickPick;
- public static Item itemIronQuickPick;
- public static int itemDiamondQuickPickID;
- public static int itemGoldQuickPickID;
- public static int itemIronQuickPickID;
- public static Item itemBioBottle;
- public static int itemBioBottleID;
- public static Item itemBioBottleCooked;
- public static int itemBioBottleCookedID;
- public static Item itemCompost;
- public static int itemCompostID;
- public static Item itemMobSpawnEgg;
- public static int itemMobSpawnEggID;
- public static Item itemSapphireBerry;
- public static int itemSapphireBerryID;
- public static Item itemThornedBranch;
- public static int itemThornedBranchID;
- public static Item itemStoneCrown;
- public static int itemStoneCrownID;
- public static Item itemCrabMorsel;
- public static int itemCrabMorselID;
- public static Item itemCookedCrabMorsel;
- public static int itemCookedCrabMorselID;
- public static Item itemVileFlesh;
- public static int itemVileFleshID;
- public static Item itemCleansingPowder;
- public static int itemCleansingPowderID;
- @EventHandler
- public void PreInit(FMLPreInitializationEvent event)
- {
- //Creation and loading of default config file
- Configuration config = new Configuration(event.getSuggestedConfigurationFile());
- config.load();
- /* example config file
- * ------------------------------
- * Block - someBlockID = config.getBlock("someBlockID", ###).getInt();
- * Item - someItemID = config.getItem("someItemID", ###).getInt();
- *
- * Such that:
- * some[]ID : Block/Items declaration name
- * "some[]ID" : Name that shows up in generated config file
- * ### : The default value of said declaration
- * ------------------------------
- * Note: May also inclue other values users may with to change i.e.:
- * -Drop rates
- * -Booleans
- */
- //Block IDs
- blockFungleDirtID = config.getBlock("blockFungleDirt", 250).getInt();
- blockFungleGrassID = config.getBlock("blockFungleGrass", 251).getInt();
- blockLavaInfusedStoneID = config.getBlock("blockLavaInfusedStone", 1000).getInt();
- blockMatterID = config.getBlock("blockMatter", 1001).getInt();
- blockRunicOreID = config.getBlock("blockRunicOre", 1002).getInt();
- blockInfectedLeafID = config.getBlock("blockInfectedLeaf", 1005).getInt();
- blockInfectedLogID = config.getBlock("blockInfectedLog", 1006).getInt();
- blockInfectedSaplingID = config.getBlock("blockInfectedSapling", 1007).getInt();
- blockVileMushroomID = config.getBlock("blockVileMushroom", 1009).getInt();
- blockBlueMushroomID = config.getBlock("blockBlueMushroom", 1010).getInt();
- blockBlueMushroomStemID = config.getBlock("blockBlueMushroomStem", 1011).getInt();
- blockRottenPlanksID = config.getBlock("blockRottenPlanks", 1012).getInt();
- blockMushroomGiantID = config.getBlock("blockMushroomGiant", 1013).getInt();
- blockPhotoStickID = config.getBlock("blockPhotoStick", 1014).getInt();
- blockSapphireCropID = config.getBlock("blockSapphireCrop", 1015).getInt();
- blockPowerBulbID = config.getBlock("blockPowerBulb", 1016).getInt();
- blockCropStaffID = config.getBlock("blockCropStaff", 1017).getInt();
- blockPedestalID = config.getBlock("blockPedestal", 1018).getInt();
- blockGemRootID = config.getBlock("blockGemRoot", 1019).getInt();
- blockShroomWoodID = config.getBlock("blockShroomWood", 1020).getInt();
- blockSalvagedPlanksID = config.getBlock("blockSalvagedPlanks", 1021).getInt();
- blockGemGlassID = config.getBlock("blockGemGlass", 1022).getInt();
- //Item IDs
- itemObsidianFleckID = config.getItem("itemObisidianFleck", 5000).getInt();
- itemMobPartID = config.getItem("itemMobPart", 5001).getInt();
- itemToolBindingID = config.getItem("itemToolBinding", 5002).getInt();
- itemRuneID = config.getItem("itemRune", 5003).getInt();
- itemRunePartID = config.getItem("itemRunePart", 5004).getInt();
- itemMatterID = config.getItem("itemMatter", 5005).getInt();
- itemIncendiarySlimeballID = config.getItem("itemIncendiarySlimeball", 5006).getInt();
- itemCarbonFiberBowID = config.getItem("itemCarbonFiberBow", 5007).getInt();
- itemArrowID = config.getItem("itemArrow", 5008).getInt();
- itemDiamondQuickPickID = config.getItem("itemDiamondQuickPick", 5009).getInt();
- itemGoldQuickPickID = config.getItem("itemGoldQuickPick", 5010).getInt();
- itemIronQuickPickID = config.getItem("itemIronQuickPick", 5011).getInt();
- itemBioBottleID = config.getItem("itemBioBottle", 5012).getInt();
- itemBioBottleCookedID = config.getItem("itemBioBottleCooked", 5013).getInt();
- itemCompostID = config.getItem("itemCompost", 5014).getInt();
- itemMobSpawnEggID = config.getItem("itemMobSpawnEgg", 5015).getInt();
- itemSapphireBerryID = config.getItem("itemSapphireBerry", 5016).getInt();
- itemThornedBranchID = config.getItem("itemThornedBranch", 5017).getInt();
- itemStoneCrownID = config.getItem("itemStoneCrown", 5018).getInt();
- itemCrabMorselID = config.getItem("itemCrabMorsel", 5019).getInt();
- itemCookedCrabMorselID = config.getItem("itemCookedCrabMorsel", 5020).getInt();
- itemVileFleshID = config.getItem("itemVileFlesh", 5021).getInt();
- itemCleansingPowderID = config.getItem("itemCleansingPowder", 5022).getInt();
- //Drop Handlers -- Has boolean drops AND chances -- CHANGED FROM 'DropHandlersInit' CLASS! (given defaults)
- DropHandlersInit.zombieArmDrop = config.get(Configuration.CATEGORY_GENERAL, "zombieArmDrop", DropHandlersInit.zombieArmDrop).getBoolean(DropHandlersInit.zombieArmDrop);
- DropHandlersInit.zombieArm_CHANCE = config.get(Configuration.CATEGORY_GENERAL, "zombieArmChance", DropHandlersInit.zombieArm_CHANCE).getDouble(DropHandlersInit.zombieArm_CHANCE);
- DropHandlersInit.cowUtterDrop = config.get(Configuration.CATEGORY_GENERAL, "cowUtterDrop", DropHandlersInit.cowUtterDrop).getBoolean(DropHandlersInit.cowUtterDrop);
- DropHandlersInit.cowUtter_CHANCE = config.get(Configuration.CATEGORY_GENERAL, "cowUtterChance", DropHandlersInit.cowUtter_CHANCE).getDouble(DropHandlersInit.cowUtter_CHANCE);
- DropHandlersInit.creeperMouthDrop = config.get(Configuration.CATEGORY_GENERAL, "creeperMouthDrop", DropHandlersInit.creeperMouthDrop).getBoolean(DropHandlersInit.creeperMouthDrop);
- DropHandlersInit.creeperMouth_CHANCE = config.get(Configuration.CATEGORY_GENERAL, "creeperMouthChance", DropHandlersInit.creeperMouth_CHANCE).getDouble(DropHandlersInit.creeperMouth_CHANCE);
- DropHandlersInit.pigSnoutDrop = config.get(Configuration.CATEGORY_GENERAL, "pigSnoutDrop", DropHandlersInit.pigSnoutDrop).getBoolean(DropHandlersInit.pigSnoutDrop);
- DropHandlersInit.pigSnout_CHANCE = config.get(Configuration.CATEGORY_GENERAL, "pigSnoutChance", DropHandlersInit.pigSnout_CHANCE).getDouble(DropHandlersInit.pigSnout_CHANCE);
- DropHandlersInit.sheepLegDrop = config.get(Configuration.CATEGORY_GENERAL, "sheepLegDrop", DropHandlersInit.sheepLegDrop).getBoolean(DropHandlersInit.sheepLegDrop);
- DropHandlersInit.sheepLeg_CHANCE = config.get(Configuration.CATEGORY_GENERAL, "sheepLegChance", DropHandlersInit.sheepLeg_CHANCE).getDouble(DropHandlersInit.sheepLeg_CHANCE);
- DropHandlersInit.skeletonRibcageDrop = config.get(Configuration.CATEGORY_GENERAL, "skeletonRibcageDrop", DropHandlersInit.skeletonRibcageDrop).getBoolean(DropHandlersInit.skeletonRibcageDrop);
- DropHandlersInit.skeletonRibcage_CHANCE = config.get(Configuration.CATEGORY_GENERAL, "skeletonRibcageChance", DropHandlersInit.skeletonRibcage_CHANCE).getDouble(DropHandlersInit.skeletonRibcage_CHANCE);
- // DropHandlersInit.runicItemsDrop = config.get(Configuration.CATEGORY_GENERAL, "itemRuneDrop", DropHandlersInit.runicItemsDrop).getBoolean(DropHandlersInit.runicItemsDrop);
- // DropHandlersInit.runicItem_CHANCE = config.get(Configuration.CATEGORY_GENERAL, "itemRuneChance", DropHandlersInit.runicItem_CHANCE).getDouble(DropHandlersInit.runicItem_CHANCE);
- //Saves config.
- config.save();
- //---------------------- END OF CONFIGURATION FILE ----------------------//
- /** Block Init. **/
- blockLavaInfusedStone = new BlockLavaInfusedStone(blockLavaInfusedStoneID);
- blockMatter = new BlockMatter(blockMatterID);
- blockRunicOre = new BlockRunicOre(blockRunicOreID);
- blockFungleDirt = new BlockFungleDirt(blockFungleDirtID);
- blockFungleGrass = new BlockFungleGrass(blockFungleGrassID);
- blockInfectedLeaf = new BlockInfectedLeaf(blockInfectedLeafID);
- blockInfectedLog = new BlockInfectedLog(blockInfectedLogID);
- blockInfectedSapling = new BlockInfectedSapling(blockInfectedSaplingID);
- blockVileMushroom = new BlockVileMushroom(blockVileMushroomID);
- blockBlueMushroom = new BlockBlueMushroom(blockBlueMushroomID);
- blockBlueMushroomStem = new BlockBlueMushroomStem(blockBlueMushroomStemID);
- blockRottenPlanks = new BlockRottenPlanks(blockRottenPlanksID);
- blockMushroomGiant = new BlockMushroomGiant(blockMushroomGiantID);
- blockPhotoStick = new BlockPhotoStick(blockPhotoStickID);
- blockSapphireCrop = new BlockSapphireCrop(blockSapphireCropID);
- blockPowerBulb = new BlockPowerBulb(blockPowerBulbID);
- blockCropStaff = new BlockCropStaff(blockCropStaffID);
- blockPedestal = new BlockPedestal(blockPedestalID);
- blockGemRoot = new BlockGemRoot(blockGemRootID);
- blockShroomWood = new BlockShroomWood(blockShroomWoodID);
- blockSalvagedPlanks = new BlockSalvagedPlanks(blockSalvagedPlanksID);
- blockGemGlass = new BlockGemGlass(blockGemGlassID);
- /** Item Init. **/
- itemObsidianFleck = new ItemObsidianFleck(itemObsidianFleckID);
- itemMobPart = new ItemMobPart(itemMobPartID);
- itemToolBinding = new ItemToolBinding(itemToolBindingID);
- itemRune = new ItemRune(itemRuneID);
- itemRunePart = new ItemRunePart(itemRunePartID);
- itemMatter = new ItemMatter(itemMatterID);
- itemIncendiarySlimeball = new ItemIncendiarySlimeball(itemIncendiarySlimeballID);
- itemCarbonFiberBow = new ItemCarbonFiberBow(itemCarbonFiberBowID);
- itemArrow = new ItemArrow(itemArrowID);
- // itemDiamondQuickPick = new ItemQuickPick(itemDiamondQuickPickID, EnumRune.DIAMOND_QUICK, 0, "diamond");
- // itemGoldQuickPick = new ItemQuickPick(itemGoldQuickPickID, EnumRune.GOLD_QUICK, 0, "gold");
- // itemIronQuickPick = new ItemQuickPick(itemIronQuickPickID, EnumRune.IRON_QUICK, 0, "iron");
- itemBioBottle = new ItemBioBottle(itemBioBottleID);
- itemBioBottleCooked = new ItemBioBottleCooked(itemBioBottleCookedID);
- itemCompost = new ItemCompost(itemCompostID);
- itemMobSpawnEgg = new ItemMobSpawnEgg(itemMobSpawnEggID);
- itemSapphireBerry = new ItemSapphireBerry(itemSapphireBerryID);
- itemThornedBranch = new ItemThornedBranch(itemThornedBranchID);
- itemStoneCrown = new ItemStoneCrown(itemStoneCrownID);
- itemCrabMorsel = new ItemCrabMorsel(itemCrabMorselID, 2, 0.3F, false);
- itemCookedCrabMorsel = new ItemCookedCrabMorsel(itemCookedCrabMorselID, 6, 0.7F, false);
- itemVileFlesh = new ItemVileFlesh(itemVileFleshID);
- itemCleansingPowder = new ItemCleansingPowder(itemCleansingPowderID);
- //Biomes
- blight = new BiomeGenBlight(50);
- }
- @EventHandler
- public void Load(FMLInitializationEvent load)
- {
- //Proxy Calls to Renderers and Sounds
- proxy.registerRenderers();
- proxy.registerSound();
- //Event Handlers
- DropHandlersInit.init(); //Vanilla Mob Drops
- MobDrops(); //Our Mob Drops
- MinecraftForge.EVENT_BUS.register(new EventBonemealClass());
- //Call to crafting and smelting recipes
- Crafting.addRecipes();
- //Call to registry's
- LangReg();//Language
- GameReg();//Game
- EntityReg();//Entity
- TileEntityReg();//Tile Entities
- }
- @EventHandler
- public void PostInit(FMLPostInitializationEvent event) {}
- // -- Language Registry -- \\
- // -For naming items, blocks, etc.
- public void LangReg()
- {
- //Creative Tabs
- LanguageRegistry.instance().addStringLocalization("itemGroup.tabSometimes", "en_US", "Sometimes Hardcore");
- //Blocks\\ LanguageRegistry.addName(block, ""); <-- SKELETON
- LanguageRegistry.addName(blockLavaInfusedStone, "Lava Infused Stone");
- LanguageRegistry.addName(blockMatter, "Solid Matter");
- LanguageRegistry.addName(blockRunicOre, "Runic Ore");
- LanguageRegistry.addName(blockFungleDirt, "Fungle Soil");
- LanguageRegistry.addName(blockFungleGrass, "Fungle Grass");
- LanguageRegistry.addName(blockInfectedLeaf, "Infected Leaf");
- LanguageRegistry.addName(blockInfectedLog, "Infected Log");
- LanguageRegistry.addName(blockInfectedSapling, "Infected Sapling");
- LanguageRegistry.addName(blockVileMushroom, "Vile Mushroom");
- LanguageRegistry.addName(blockBlueMushroom, "Blue Mushroom Cap");
- LanguageRegistry.addName(blockBlueMushroomStem, "Blue Mushroom Stem");
- LanguageRegistry.addName(blockRottenPlanks, "Rotten Planks");
- LanguageRegistry.addName(blockMushroomGiant, "Giant Mushroom");
- LanguageRegistry.addName(blockPhotoStick, "Stick o' Might");
- LanguageRegistry.addName(blockSapphireCrop, "Sapphire Crop");
- LanguageRegistry.addName(blockPowerBulb, "Bulb Of Power");
- LanguageRegistry.addName(blockCropStaff, "Cropular Staff");
- LanguageRegistry.addName(blockPedestal, "Growth Pedestal");
- LanguageRegistry.addName(blockGemRoot, "Gem Root");
- LanguageRegistry.addName(blockShroomWood, "Shroom Wood");
- LanguageRegistry.addName(blockSalvagedPlanks, "Salvaged Planks");
- LanguageRegistry.addName(blockGemGlass, "Gem Glass");
- //Items\\ LanguageRegistry.addName(item, ""); <-- SKELETON
- LanguageRegistry.addName(itemObsidianFleck, "Obsidian Fleck");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 0), "Cow Utter");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 1), "Mouth Of Creeper");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 2), "Pig Snout");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 3), "Sheep Leg");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 4), "Skeleton Ribcage");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 5), "Zombie Arm");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 6), "Plant Greens");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 7), "Basilisk Fang");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 8), "Basilisk Hide");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 9), "Basilisk Scale");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 10), "Strange Barb");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 11), "Large Green Scale");
- LanguageRegistry.addName(new ItemStack(itemMobPart, 1, 12), "Gem Root Shard");
- LanguageRegistry.addName(new ItemStack(itemMatter, 1, 0), "Decomposing Matter");
- LanguageRegistry.addName(new ItemStack(itemMatter, 1, 1), "Gelatinous Matter");
- LanguageRegistry.addName(new ItemStack(itemMatter, 1, 2), "Protein Ball");
- LanguageRegistry.addName(new ItemStack(itemMatter, 1, 3), "Vile Matter");
- LanguageRegistry.addName(itemIncendiarySlimeball, "Incediary Slimeball");
- LanguageRegistry.addName(new ItemStack(itemToolBinding, 1, 0), "String Binding");
- LanguageRegistry.addName(new ItemStack(itemToolBinding, 1, 1), "Redstone Binding");
- LanguageRegistry.addName(new ItemStack(itemToolBinding, 1, 2), "Lapis Lazuli Binding");
- LanguageRegistry.addName(new ItemStack(itemToolBinding, 1, 3), "Glowstone Binding");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 0), "Handle Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 1), "Pick Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 2), "Axe Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 3), "Shovel Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 4), "Sword Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 5), "Hoe Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 6), "Quick-Axe Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 7), "Skinning Rune");
- LanguageRegistry.addName(new ItemStack(itemRune, 1, 8), "Notched Rune");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 0), "Diamond Pick Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 1), "Gold Pick Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 2), "Iron Pick Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 3), "Diamond Axe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 4), "Gold Axe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 5), "Iron Axe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 6), "Diamond Shovel Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 7), "Gold Shovel Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 8), "Iron Shovel Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 9), "Diamond Sword Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 10), "Gold Sword Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 11), "Iron Sword Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 12), "Diamond Hoe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 13), "Gold Hoe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 14), "Iron Hoe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 15), "Diamond Quick-Axe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 16), "Gold Quick-Axe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 17), "Iron Quick-Axe Head");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 18), "Diamond Skinning Knife Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 19), "Gold Skinning Knife Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 20), "Iron Skinning Knife Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 21), "Diamond Notched Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 22), "Gold Notched Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 23), "Iron Notched Blade");
- LanguageRegistry.addName(new ItemStack(itemRunePart, 1, 24), "Runic Tool Handle");
- LanguageRegistry.addName(itemCarbonFiberBow, "Carbon Fiber Bow");
- LanguageRegistry.addName(new ItemStack(itemArrow, 1, 0), "Explosive Arrow");
- // LanguageRegistry.addName(itemDiamondQuickPick, "Diamond Quick-Pick");
- // LanguageRegistry.addName(itemGoldQuickPick, "Gold Quick-Pick");
- // LanguageRegistry.addName(itemIronQuickPick, "Iron Quick-Pick");
- LanguageRegistry.addName(new ItemStack(itemBioBottle, 1, 0), "Empty Bottle");
- LanguageRegistry.addName(new ItemStack(itemBioBottle, 1, 1), "Bottle of Matter");
- LanguageRegistry.addName(itemBioBottleCooked, "Bottle of Biology");
- LanguageRegistry.addName(itemCompost, "Compost");
- LanguageRegistry.addName(itemSapphireBerry, "Sapphire Berry");
- LanguageRegistry.addName(itemThornedBranch, "Thorned Branch");
- LanguageRegistry.addName(itemStoneCrown, "Stone Crown");
- LanguageRegistry.addName(itemCrabMorsel, "Crab Morsel");
- LanguageRegistry.addName(itemCookedCrabMorsel, "Cooked Crab Morsel");
- LanguageRegistry.addName(itemVileFlesh, "Vile Flesh");
- LanguageRegistry.addName(itemCleansingPowder, "Cleansing Powder");
- //Entities\\ LanguageRegistry.instance().addStringLocalization("entity..name", "en_US", ""); <-- SKELETON
- LanguageRegistry.instance().addStringLocalization("entity.GreanBaen.name", "en_US", "Grean Baen");
- LanguageRegistry.instance().addStringLocalization("entity.FungleCrab.name", "en_US", "Fungle Crab");
- LanguageRegistry.instance().addStringLocalization("entity.PrizeRunner.name", "en_US", "Prize Runner");
- LanguageRegistry.instance().addStringLocalization("entity.BarbedSpike.name", "en_US", "Barbed Spike");
- LanguageRegistry.instance().addStringLocalization("entity.ArrowFish.name", "en_US", "Arrow Fish");
- LanguageRegistry.instance().addStringLocalization("entity.Mongrel.name", "en_US", "Mongrel");
- LanguageRegistry.instance().addStringLocalization("entity.SapphireLawncher.name", "en_US", "Sapphire Lawncher");
- LanguageRegistry.instance().addStringLocalization("entity.WanderingShoot.name", "en_US", "Wandering Shoot");
- LanguageRegistry.instance().addStringLocalization("entity.SporeRay.name", "en_US", "Spore Ray");
- LanguageRegistry.instance().addStringLocalization("entity.Basilisk.name", "en_US", "Basilisk");
- }
- // -- Game Registry -- \\
- // -For registering blocks to forge
- public void GameReg()
- {
- //Crafting Handler <-- For tools taking damage on crafting
- GameRegistry.registerCraftingHandler(new CraftingHandler());
- //World Generation Generation
- GameRegistry.registerWorldGenerator(eventManager);
- GameRegistry.registerWorldGenerator(new WorldGenInfectedTree(false));
- GameRegistry.registerWorldGenerator(new WorldGenMushroomGiant());
- //Blocks --GameRegistry.registerBlock(block, modid + block.getUnlocalizedName().substring(5)); <-- SKELETON
- GameRegistry.registerBlock(blockLavaInfusedStone, modid + blockLavaInfusedStone.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockMatter, modid + blockMatter.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockRunicOre, modid + blockRunicOre.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockFungleDirt, modid + blockFungleDirt.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockFungleGrass, modid + blockFungleGrass.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockInfectedLeaf, modid + blockInfectedLeaf.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockInfectedLog, modid + blockInfectedLog.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockInfectedSapling, modid + blockInfectedSapling.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockVileMushroom, modid + blockVileMushroom.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockBlueMushroom, modid + blockBlueMushroom.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockBlueMushroomStem, modid + blockBlueMushroomStem.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockRottenPlanks, modid + blockRottenPlanks.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockMushroomGiant, modid + blockMushroomGiant.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockPhotoStick, modid + blockPhotoStick.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockCropStaff, modid + blockCropStaff.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockSapphireCrop, modid + blockSapphireCrop.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockPowerBulb, modid + blockPowerBulb.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockPedestal, modid + blockPedestal.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockGemRoot, modid + blockGemRoot.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockShroomWood, modid + blockShroomWood.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockSalvagedPlanks, modid + blockSalvagedPlanks.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockGemGlass, modid + blockGemGlass.getUnlocalizedName().substring(5));
- //Biome Registry (Done AFTER blocks so that top/filler blocks are registered before biome is registered)
- GameRegistry.addBiome(blight);
- }
- // -- Entity Registry -- \\
- //-For registering entites (mobs) -- EntityRegistry.registerModEntity(Entity.class, "", id, this, 80, 1, true);
- public void EntityReg()
- {
- int id = 0;
- EntityRegistry.registerModEntity(EntityGreanBaen.class, "Grean Baen", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntityFungleCrab.class, "Fungle Crab", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntityPrizeRunner.class, "Prize Runner", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntityObsidianFleck.class, "Obsidian Fleck", id, this, 64, 10, true);
- id++;
- EntityRegistry.registerModEntity(EntityBarbedSpike.class, "Barbed Spike", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntityArrowFish.class, "Arrow Fish", id, this, 80, 1, true);
- id++;
- EntityRegistry.addSpawn(EntityArrowFish.class, 5, 15, 40, EnumCreatureType.waterCreature, BiomeGenBase.ocean);
- EntityRegistry.registerModEntity(EntityMongrel.class, "Mongrel", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntitySapphireLawncher.class, "Sapphire Lawncher", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntityWanderingShoot.class, "Wandering Shoot", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntitySapphireBerry.class, "Sapphire Berry", id, this, 64, 10, true);
- id++;
- EntityRegistry.registerModEntity(EntitySporeRay.class, "Spore Ray", id, this, 80, 1, true);
- id++;
- EntityRegistry.registerModEntity(EntityBasilisk.class, "Basilisk", id, this, 80, 1, true);
- }
- // -- Tile Entity Registry -- \\
- //-For registering custom rendered blocks -- GameRegistry.registerTileEntity(TileEntity.class, "");
- public void TileEntityReg()
- {
- GameRegistry.registerTileEntity(TileEntityPhotoStick.class, "Photo Stick");
- GameRegistry.registerTileEntity(TileEntitySapphireCrop.class, "Sapphire Crop");
- GameRegistry.registerTileEntity(TileEntityPowerBulb.class, "Power Bulb");
- GameRegistry.registerTileEntity(TileEntityCropStaff.class, "Staff Crop");
- GameRegistry.registerTileEntity(TileEntityPedestal.class, "Growth Pedestal");
- }
- public void MobDrops()
- {
- MinecraftForge.EVENT_BUS.register(new HandlerPlantGreens());
- }
- // -- Creative Tab -- \\
- // -Default custom tab for modded items + blocks
- public static CreativeTabs tabSometimes = new CreativeTabs("tabSometimes")
- {
- public ItemStack getIconItemStack()
- {
- return new ItemStack(Base.itemCompost, 1, 0);
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement