/** * Project: mFC * * <p>Class: CommonIds * * @author v3XzZ * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html) */ public class CommonIds { public static final int GUI_KEG = 87; public static final int GUI_SHELF = 88; public static EnumToolMaterial TOOL_OBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN", 2, 3000, 6F, 1F, 2); public static EnumToolMaterial TOOL_KNIFE = EnumHelper.addToolMaterial("KNIFE", 0, 200, 1.0F, 2.0F, 0); public static final byte PACKET_PLATE = 0; public static final byte PACKET_SHELF = 1; public static final byte PACKET_CAULDRON = 2; public static final byte PACKET_RENDER = 3; public static final byte PACKET_PLAYERDATA = 4; public static final byte PACKET_BARREL = 5; public static final String DRINK_BEER = "beer"; public static final String DRINK_WHITEWINE = "whitewine"; public static final String DRINK_REDWINE = "redwine"; public static final String DRINK_JULMUST = "julmust"; public static final String DRINK_WATER = "water"; public static final int MAX_GRAIN_STACK = 4; public static final Integer[] appleColors = new Integer[] {0x75FF83, 0xFFE270, 0xFF0000}; public static final Integer[] orangeColors = new Integer[] {0x008C00, 0x6BFF68, 0xFFD400}; public static final Integer[] avocadoColors = new Integer[] {0x9DFF96, 0x74BC6F, 0x467043}; }
public class RegistrySword { public static ArrayList<Sword> swords = new ArrayList<Sword>(); public static EnumRarity legendary; public static int LEGENDARY = 0, ANCIENT = 1, COMMON = 2; public static EnumToolMaterial[] material = { EnumHelper.addToolMaterial("LEGENDARY", 3, 2000, 4F, 6, 10), EnumHelper.addToolMaterial("ANCIENT", 2, 225, 1.1F, 8, 40), EnumHelper.addToolMaterial("COMMON", 2, 250, 6F, 3, 18) }; public RegistrySword() { MinecraftForgeClient.preloadTexture("/okushama/humansplus/swords.png"); legendary = EnumHelperClient.addRarity("legendary", 5, "Legendary"); // Sword Registration! add(846, "Hidden Blade", material[COMMON]); add(847, "Journeyman's Blade", material[COMMON]); add(848, "Ornate Blade", material[ANCIENT]); add(849, "Broken Blade", material[COMMON]); add(850, "Katana", material[COMMON]); add(851, "Devouros", material[ANCIENT]); add(852, "Gladios", material[ANCIENT]); add(853, "Lich Bane", material[ANCIENT]); add(854, "Bastard Sword", material[COMMON]); add(855, "Malaikah", material[ANCIENT]); add(856, "Aquatos", material[LEGENDARY]); add(857, "Infernos", material[LEGENDARY]); add(858, "Epachos", material[LEGENDARY]); add(859, "Solanis", material[LEGENDARY]); add(860, "Lunos", material[LEGENDARY]); add(861, "Mortis", material[LEGENDARY]); } public void add(int id, String name, EnumToolMaterial mat) { swords.add(new Sword(id, name, mat)); } public static class Sword { public String swordName; public EnumToolMaterial material; public okushama.humansplus.Sword theSword; int id; public Sword(int i, String name, EnumToolMaterial equiv) { id = i; swordName = name; material = equiv; theSword = (okushama.humansplus.Sword) (new okushama.humansplus.Sword(id, material) .setIconCoord(id - 846, 0) .setItemName(swordName) .setCreativeTab(CreativeTabs.tabCombat)); LanguageRegistry.addName(theSword, swordName); } } }
public static void initModEnumToolMaterial() { COPPER = EnumHelper.addToolMaterial("COPPER", 1, 156, 4.5F, 1, 10); TIN = EnumHelper.addToolMaterial("TIN", 1, 198, 5.0F, 2, 12); ALUMINIUM = EnumHelper.addToolMaterial("ALUMINIUM", 1, 16, 1.0F, 2, 12); ZINC = EnumHelper.addToolMaterial("ZINC", 1, 234, 5.5F, 2, 10); SILVER = EnumHelper.addToolMaterial("SILVER", 2, 963, 7.0F, 2, 18); OBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN", 3, 2341, 5.0F, 2, 4); BRONZE = EnumHelper.addToolMaterial("BRONZE", 2, 531, 6.0F, 2, 12); BRASS = EnumHelper.addToolMaterial("BRASS", 2, 752, 6.5F, 2, 14); }
private void initBlazeArmor() { /** * CLOTH(5, new int[]{1, 3, 2, 1}, 15), CHAIN(15, new int[]{2, 5, 4, 1}, 12), IRON(15, new * int[]{2, 6, 5, 2}, 9), GOLD(7, new int[]{2, 5, 3, 1}, 25), DIAMOND(33, new int[]{3, 8, 6, 3}, * 10); */ BlazeArmorMaterial = EnumHelper.addArmorMaterial("blazeIngot", 33, new int[] {2, 6, 5, 2}, 9); BlazeHelmet = (new BlazeItemArmor(DefaultProps.BLAZE_HELMET_ID, BlazeArmorMaterial, 1, 0)) .setIconCoord(7, 0) .setItemName("blazeHelmet"); LanguageRegistry.addName(BlazeHelmet, DefaultNames.EN.BLAZE_HELMET); LanguageRegistry.instance() .addNameForObject(BlazeHelmet, "ja_JP", DefaultNames.JP.BLAZE_HELMET); GameRegistry.addRecipe( new ItemStack(BlazeHelmet, 1), new Object[] {"XXX", "X X", Character.valueOf('X'), BlazeIngot}); BlazeChestPlate = (new BlazeItemArmor(DefaultProps.BLAZE_CHESTPLATE_ID, BlazeArmorMaterial, 1, 1)) .setIconCoord(8, 0) .setItemName("blazeChestPlate"); LanguageRegistry.addName(BlazeChestPlate, DefaultNames.EN.BLAZE_CHESTPLATE); LanguageRegistry.instance() .addNameForObject(BlazeChestPlate, "ja_JP", DefaultNames.JP.BLAZE_CHESTPLATE); GameRegistry.addRecipe( new ItemStack(BlazeChestPlate, 1), new Object[] {"X X", "XXX", "XXX", Character.valueOf('X'), BlazeIngot}); BlazeLeggings = (new BlazeItemArmor(DefaultProps.BLAZE_LEGGINGS_ID, BlazeArmorMaterial, 1, 2)) .setIconCoord(9, 0) .setItemName("blazeLeggings"); LanguageRegistry.addName(BlazeLeggings, DefaultNames.EN.BLAZE_LEGGINGS); LanguageRegistry.instance() .addNameForObject(BlazeLeggings, "ja_JP", DefaultNames.JP.BLAZE_LEGGINGS); GameRegistry.addRecipe( new ItemStack(BlazeLeggings, 1), new Object[] {"XXX", "X X", "X X", Character.valueOf('X'), BlazeIngot}); BlazeBoots = (new BlazeItemArmor(DefaultProps.BLAZE_BOOTS_ID, BlazeArmorMaterial, 1, 3)) .setIconCoord(10, 0) .setItemName("blazeBoots"); LanguageRegistry.addName(BlazeBoots, DefaultNames.EN.BLAZE_BOOTS); LanguageRegistry.instance().addNameForObject(BlazeBoots, "ja_JP", DefaultNames.JP.BLAZE_BOOTS); GameRegistry.addRecipe( new ItemStack(BlazeBoots, 1), new Object[] {"X X", "X X", Character.valueOf('X'), BlazeIngot}); }
// Just Some Basic Info @Mod( modid = "hazzachooks_star_wars_addon", name = "Hazzchooks Star Wars Mod Addon", version = "1.0.1-Pre-Alpha") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class StarWarsAddon_Core { // Creative Tab public static CreativeTabs hazzachooks_star_wars_addon_tab; // Our Items public static Item darkBlade; // Mob ID's static int startEntityId = 300; // Enum Material public static EnumToolMaterial dark_blade_enum = EnumHelper.addToolMaterial("dark_blade_enum", 3, 1507, 8.0F, 4.0F, 0); // Mob Generation public static int getUniqueEntityId() { do { startEntityId++; } while (EntityList.getStringFromID(startEntityId) != null); return startEntityId++; } public static void registerEntityEgg( Class<? extends Entity> entity, int primaryColor, int secondaryColor) { int id = getUniqueEntityId(); EntityList.IDtoClassMapping.put(id, entity); EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor)); } @EventHandler public void Load(FMLPreInitializationEvent Event) { // Settings For Our Creative Tab hazzachooks_star_wars_addon_tab = new CreativeTabs("hazzachooks_star_wars_addon_tab") { public ItemStack getIconItemStack() { return new ItemStack(darkBlade, 1, 0); } }; LanguageRegistry.instance() .addStringLocalization( "itemGroup.hazzachooks_star_wars_addon_tab", "en_US", "Hazzachooks Star Wars Addon Tab"); // Settings For Our Items darkBlade = new DarkBlade(2000, dark_blade_enum) .setUnlocalizedName("dark blade") .setCreativeTab(this.hazzachooks_star_wars_addon_tab); // Settings For Our Mobs EntityRegistry.registerGlobalEntityID(Entity_deathwatch.class, "Deathwatch", 1); EntityRegistry.addSpawn(Entity_deathwatch.class, 20, 5, 20, EnumCreatureType.monster); EntityRegistry.findGlobalUniqueEntityId(); registerEntityEgg(Entity_deathwatch.class, 0xF1EDED, 0x0020C2); RenderingRegistry.registerEntityRenderingHandler( Entity_deathwatch.class, new Renderdeathwatch(new Model_deathwatch(), 0.3F)); EntityRegistry.registerGlobalEntityID(Entity_pre_vizsla.class, "Pre-Vizsla", 1); EntityRegistry.addSpawn(Entity_pre_vizsla.class, 20, 5, 20, EnumCreatureType.monster); registerEntityEgg(Entity_pre_vizsla.class, 0xF1EDED, 0x0020C2); RenderingRegistry.registerEntityRenderingHandler( Entity_pre_vizsla.class, new Renderprevizsla(new Model_pre_vizsla(), 0.3F)); // Register Our Items GameRegistry.registerItem(darkBlade, "darkBlade"); LanguageRegistry.addName(darkBlade, "Dark Saber"); } }
/** * @author Azanor * <p>IMPORTANT: If you are adding your own aspects to items it is a good idea to do it AFTER * Thaumcraft adds its aspects, otherwise odd things may happen. */ public class ThaumcraftApi { // Materials public static EnumToolMaterial toolMatThaumium = EnumHelper.addToolMaterial("THAUMIUM", 3, 400, 7F, 2, 22); public static EnumToolMaterial toolMatElemental = EnumHelper.addToolMaterial("THAUMIUM_ELEMENTAL", 3, 1500, 10F, 3, 18); public static EnumArmorMaterial armorMatThaumium = EnumHelper.addArmorMaterial("THAUMIUM", 25, new int[] {2, 6, 5, 2}, 25); public static EnumArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 25, new int[] {1, 3, 2, 1}, 25); // Miscellaneous /** * Portable Hole Block-id Blacklist. Simply add the block-id's of blocks you don't want the * portable hole to go through. */ public static ArrayList<Integer> portableHoleBlackList = new ArrayList<Integer>(); // RESEARCH///////////////////////////////////////// public static Document researchDoc = null; public static ArrayList<String> apiResearchFiles = new ArrayList<String>(); public static ArrayList<IScanEventHandler> scanEventhandlers = new ArrayList<IScanEventHandler>(); /** * Used to add your own xml files that the research system will check of recipes and descriptions * of custom research * * @param resourceLoc The xml file. For example The default file used by TC is * "/thaumcraft/resources/research.xml" */ public static void registerResearchXML(String resourceLoc) { if (!apiResearchFiles.contains(resourceLoc)) apiResearchFiles.add(resourceLoc); } public static void registerScanEventhandler(IScanEventHandler scanEventHandler) { scanEventhandlers.add(scanEventHandler); } // RECIPES///////////////////////////////////////// private static ArrayList crucibleRecipes = new ArrayList(); private static List craftingRecipes = new ArrayList(); private static HashMap<List, ItemStack> smeltingBonus = new HashMap<List, ItemStack>(); private static ArrayList<List> smeltingBonusExlusion = new ArrayList<List>(); /** * This method is used to determine what bonus items are generated when the infernal furnace * smelts items * * @param in The result (not input) of the smelting operation. e.g. new ItemStack(ingotGold) * @param out The bonus item that can be produced from the smelting operation e.g. new * ItemStack(nuggetGold,0,0). Stacksize should be 0 unless you want to guarantee that at least * 1 item is always produced. */ public static void addSmeltingBonus(ItemStack in, ItemStack out) { smeltingBonus.put( Arrays.asList(in.itemID, in.getItemDamage()), new ItemStack(out.itemID, 0, out.getItemDamage())); } /** * Returns the bonus item produced from a smelting operation in the infernal furnace * * @param in The result of the smelting operation. e.g. new ItemStack(ingotGold) * @return the The bonus item that can be produced */ public static ItemStack getSmeltingBonus(ItemStack in) { return smeltingBonus.get(Arrays.asList(in.itemID, in.getItemDamage())); } /** * Excludes specific items from producing bonus items when they are smelted in the infernal * furnace, even if their smelt result would normally produce a bonus item. * * @param in The item to be smelted that should never produce a bonus item (e.g. the various * macerated dusts form IC2) Even though they produce gold, iron, etc. ingots, they should NOT * produce bonus nuggets as well. */ public static void addSmeltingBonusExclusion(ItemStack in) { smeltingBonusExlusion.add(Arrays.asList(in.itemID, in.getItemDamage())); } /** * Sees if an item is allowed to produce bonus items when smelted in the infernal furnace * * @param in The item you wish to check * @return true or false */ public static boolean isSmeltingBonusExluded(ItemStack in) { return smeltingBonusExlusion.contains(Arrays.asList(in.itemID, in.getItemDamage())); } public static List getCraftingRecipes() { return craftingRecipes; } /** * NOTE: All arcane and infusion crafting recipes are NBT sensitive. Simply add as much nbt data * to the crafting ingredient itemstacks as you wish to match with the actual input items. For * example this recipe will turn a warded jar filled with crystal essentia into a stack of * diamonds: * * <p>ItemStack is = new ItemStack(itemJarFilled); is.setTagInfo("tag", new NBTTagByte("tag", * (byte) EnumTag.CRYSTAL.id)); is.setTagInfo("amount", new NBTTagByte("amount", (byte) 64)); * ThaumcraftApi.addShapelessArcaneCraftingRecipe("THEJARISNOWDIAMONDS", 50, new * ItemStack(Item.diamond,64,0), new Object[] { is }); * * <p>If no tag was added for "amount" then the jar would simply have had to contain any amount of * crystal essentia. */ /** * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param cost the vis cost * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes */ public static void addArcaneCraftingRecipe( String key, int cost, ItemStack par1ItemStack, Object... par2ArrayOfObj) { String var3 = ""; int var4 = 0; int var5 = 0; int var6 = 0; int var9; if (par2ArrayOfObj[var4] instanceof String[]) { String[] var7 = (String[]) ((String[]) par2ArrayOfObj[var4++]); String[] var8 = var7; var9 = var7.length; for (int var10 = 0; var10 < var9; ++var10) { String var11 = var8[var10]; ++var6; var5 = var11.length(); var3 = var3 + var11; } } else { while (par2ArrayOfObj[var4] instanceof String) { String var13 = (String) par2ArrayOfObj[var4++]; ++var6; var5 = var13.length(); var3 = var3 + var13; } } HashMap var14; for (var14 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2) { Character var16 = (Character) par2ArrayOfObj[var4]; ItemStack var17 = null; if (par2ArrayOfObj[var4 + 1] instanceof Item) { var17 = new ItemStack((Item) par2ArrayOfObj[var4 + 1]); } else if (par2ArrayOfObj[var4 + 1] instanceof Block) { var17 = new ItemStack((Block) par2ArrayOfObj[var4 + 1], 1, -1); } else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack) { var17 = (ItemStack) par2ArrayOfObj[var4 + 1]; } var14.put(var16, var17); } ItemStack[] var15 = new ItemStack[var5 * var6]; for (var9 = 0; var9 < var5 * var6; ++var9) { char var18 = var3.charAt(var9); if (var14.containsKey(Character.valueOf(var18))) { var15[var9] = ((ItemStack) var14.get(Character.valueOf(var18))).copy(); } else { var15[var9] = null; } } craftingRecipes.add( new ShapedArcaneCraftingRecipes(key, var5, var6, var15, par1ItemStack, cost)); } /** * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param recipeKey a string value of the key used in your research.xml for this recipe to display * in the thaumonomicon * @param cost the vis cost * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes */ public static void addArcaneCraftingRecipe( String key, String recipeKey, int cost, ItemStack par1ItemStack, Object... par2ArrayOfObj) { addArcaneCraftingRecipe(key, cost, par1ItemStack, par2ArrayOfObj); ResearchList.craftingRecipesForResearch.put( recipeKey, Arrays.asList(getCraftingRecipes().size() - 1)); } /** * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param cost the vis cost * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes */ public static void addShapelessArcaneCraftingRecipe( String key, int cost, ItemStack par1ItemStack, Object... par2ArrayOfObj) { ArrayList var3 = new ArrayList(); Object[] var4 = par2ArrayOfObj; int var5 = par2ArrayOfObj.length; for (int var6 = 0; var6 < var5; ++var6) { Object var7 = var4[var6]; if (var7 instanceof ItemStack) { var3.add(((ItemStack) var7).copy()); } else if (var7 instanceof Item) { var3.add(new ItemStack((Item) var7)); } else { if (!(var7 instanceof Block)) { throw new RuntimeException("Invalid shapeless recipe!"); } var3.add(new ItemStack((Block) var7)); } } craftingRecipes.add(new ShapelessArcaneCraftingRecipes(key, par1ItemStack, var3, cost)); } /** * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param recipeKey a string value of the key used in your research.xml for this recipe to display * in the thaumonomicon * @param cost the vis cost * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes */ public static void addShapelessArcaneCraftingRecipe( String key, String recipeKey, int cost, ItemStack par1ItemStack, Object... par2ArrayOfObj) { addShapelessArcaneCraftingRecipe(key, cost, par1ItemStack, par2ArrayOfObj); ResearchList.craftingRecipesForResearch.put( recipeKey, Arrays.asList(getCraftingRecipes().size() - 1)); } /** * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param cost the vis cost * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects * should be used in a recipe. * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes */ public static void addInfusionCraftingRecipe( String key, int cost, ObjectTags tags, ItemStack par1ItemStack, Object... par2ArrayOfObj) { String var3 = ""; int var4 = 0; int var5 = 0; int var6 = 0; int var9; if (par2ArrayOfObj[var4] instanceof String[]) { String[] var7 = (String[]) ((String[]) par2ArrayOfObj[var4++]); String[] var8 = var7; var9 = var7.length; for (int var10 = 0; var10 < var9; ++var10) { String var11 = var8[var10]; ++var6; var5 = var11.length(); var3 = var3 + var11; } } else { while (par2ArrayOfObj[var4] instanceof String) { String var13 = (String) par2ArrayOfObj[var4++]; ++var6; var5 = var13.length(); var3 = var3 + var13; } } HashMap var14; for (var14 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2) { Character var16 = (Character) par2ArrayOfObj[var4]; ItemStack var17 = null; if (par2ArrayOfObj[var4 + 1] instanceof Item) { var17 = new ItemStack((Item) par2ArrayOfObj[var4 + 1]); } else if (par2ArrayOfObj[var4 + 1] instanceof Block) { var17 = new ItemStack((Block) par2ArrayOfObj[var4 + 1], 1, -1); } else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack) { var17 = (ItemStack) par2ArrayOfObj[var4 + 1]; } var14.put(var16, var17); } ItemStack[] var15 = new ItemStack[var5 * var6]; for (var9 = 0; var9 < var5 * var6; ++var9) { char var18 = var3.charAt(var9); if (var14.containsKey(Character.valueOf(var18))) { var15[var9] = ((ItemStack) var14.get(Character.valueOf(var18))).copy(); } else { var15[var9] = null; } } craftingRecipes.add( new ShapedInfusionCraftingRecipes(key, var5, var6, var15, par1ItemStack, cost, tags)); } /** * Recipe is NBT sensitive * * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param recipeKey a string value of the key used in your research.xml for this recipe to display * in the thaumonomicon * @param cost the vis cost * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects * should be used in a recipe. * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes */ public static void addInfusionCraftingRecipe( String key, String recipeKey, int cost, ObjectTags tags, ItemStack par1ItemStack, Object... par2ArrayOfObj) { addInfusionCraftingRecipe(key, cost, tags, par1ItemStack, par2ArrayOfObj); ResearchList.craftingRecipesForResearch.put( recipeKey, Arrays.asList(getCraftingRecipes().size() - 1)); } /** * Recipe is NBT sensitive * * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param cost the vis cost * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects * should be used in a recipe. * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes */ public static void addShapelessInfusionCraftingRecipe( String key, int cost, ObjectTags tags, ItemStack par1ItemStack, Object... par2ArrayOfObj) { ArrayList var3 = new ArrayList(); Object[] var4 = par2ArrayOfObj; int var5 = par2ArrayOfObj.length; for (int var6 = 0; var6 < var5; ++var6) { Object var7 = var4[var6]; if (var7 instanceof ItemStack) { var3.add(((ItemStack) var7).copy()); } else if (var7 instanceof Item) { var3.add(new ItemStack((Item) var7)); } else { if (!(var7 instanceof Block)) { throw new RuntimeException("Invalid shapeless recipe!"); } var3.add(new ItemStack((Block) var7)); } } craftingRecipes.add(new ShapelessInfusionCraftingRecipes(key, par1ItemStack, var3, cost, tags)); } /** * Recipe is NBT sensitive * * @param key the research key required for this recipe to work. Leave blank if it will work * without research * @param recipeKey a string value of the key used in your research.xml for this recipe to display * in the thaumonomicon * @param cost the vis cost * @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects * should be used in a recipe. * @param par1ItemStack the recipe output * @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes */ public static void addShapelessInfusionCraftingRecipe( String key, String recipeKey, int cost, ObjectTags tags, ItemStack par1ItemStack, Object... par2ArrayOfObj) { addShapelessInfusionCraftingRecipe(key, cost, tags, par1ItemStack, par2ArrayOfObj); ResearchList.craftingRecipesForResearch.put( recipeKey, Arrays.asList(getCraftingRecipes().size() - 1)); } /** * @param key the research key required for this recipe to work. Unlike the arcane crafting and * infusion crafting recipes a recipe key is automatically created using the same key. See * method below if the research and recipes keys do not match * @param result the output result * @param cost the vis cost * @param tags the aspects required to craft this */ public static void addCrucibleRecipe(String key, ItemStack result, int cost, ObjectTags tags) { getCrucibleRecipes().add(new RecipeCrucible(key, result, tags, cost)); } /** * @param key the research key required for this recipe to work. * @param recipeKey a string value of the key used in your research.xml for this recipe to display * in the thaumonomicon * @param result the output result * @param cost the vis cost * @param tags the aspects required to craft this */ public static void addCrucibleRecipe( String key, String recipeKey, ItemStack result, int cost, ObjectTags tags) { getCrucibleRecipes().add(new RecipeCrucible(key, recipeKey, result, tags, cost)); } /** * @param key the recipe key (NOT research key) * @return the recipe */ public static RecipeCrucible getCrucibleRecipe(String key) { for (Object r : getCrucibleRecipes()) { if (r instanceof RecipeCrucible) { if (((RecipeCrucible) r).key.equals(key)) return (RecipeCrucible) r; } } return null; } /** * @param stack the recipe result * @return the recipe */ public static RecipeCrucible getCrucibleRecipe(ItemStack stack) { for (Object r : getCrucibleRecipes()) { if (r instanceof RecipeCrucible) { if (((RecipeCrucible) r).recipeOutput.isItemEqual(stack)) return (RecipeCrucible) r; } } return null; } /** * @param stack the item * @return the thaumcraft recipe key that produces that item. Used by the thaumonomicon drilldown * feature. */ public static String getCraftingRecipeKey(ItemStack stack) { for (Object r : getCraftingRecipes()) { if (r instanceof IArcaneRecipe) { if (ThaumcraftApiHelper.areItemsEqual(stack, ((IArcaneRecipe) r).getRecipeOutput())) return ((IArcaneRecipe) r).getKey(); } if (r instanceof IInfusionRecipe) { if (ThaumcraftApiHelper.areItemsEqual(stack, ((IInfusionRecipe) r).getRecipeOutput())) return ((IInfusionRecipe) r).getKey(); } } return ""; } // TAGS//////////////////////////////////////// public static Map<List, ObjectTags> objectTags = new HashMap<List, ObjectTags>(); /** * Checks to see if the passed item/block already has aspects associated with it. * * @param id * @param meta * @return */ public static boolean exists(int id, int meta) { ObjectTags tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id, meta)); if (tmp == null) { tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id, -1)); if (meta == -1 && tmp == null) { int index = 0; do { tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id, index)); index++; } while (index < 16 && tmp == null); } if (tmp == null) return false; } return true; } /** * Used to assign apsects to the given item/block. Here is an example of the declaration for * cobblestone: * * <p><i>ThaumcraftApi.registerObjectTag(Block.cobblestone.blockID, -1, (new * ObjectTags()).add(EnumTag.ROCK, 1).add(EnumTag.DESTRUCTION, 1));</i> * * @param id * @param meta pass -1 if all damage values of this item/block should have the same aspects * @param aspects A ObjectTags object of the associated aspects */ public static void registerObjectTag(int id, int meta, ObjectTags aspects) { aspects = ThaumcraftApiHelper.cullTags(aspects); objectTags.put(Arrays.asList(id, meta), aspects); } /** * Used to assign aspects to the given item/block. Attempts to automatically generate aspect tags * by checking registered recipes. Here is an example of the declaration for pistons: * * <p><i>ThaumcraftApi.registerComplexObjectTag(Block.pistonBase.blockID, 0, (new * ObjectTags()).add(EnumTag.MECHANISM, 2).add(EnumTag.MOTION, 4));</i> * * @param id * @param meta pass -1 if all damage values of this item/block should have the same aspects * @param aspects A ObjectTags object of the associated aspects */ public static void registerComplexObjectTag(int id, int meta, ObjectTags aspects) { if (!exists(id, meta)) { ObjectTags tmp = ThaumcraftApiHelper.generateTags(id, meta); if (tmp != null && tmp.size() > 0) { for (EnumTag tag : tmp.getAspects()) { aspects.add(tag, tmp.getAmount(tag)); } } registerObjectTag(id, meta, aspects); } else { ObjectTags tmp = ThaumcraftApiHelper.getObjectTags(new ItemStack(id, 1, meta)); for (EnumTag tag : aspects.getAspects()) { tmp.merge(tag, tmp.getAmount(tag)); } registerObjectTag(id, meta, tmp); } } public static ArrayList getCrucibleRecipes() { return crucibleRecipes; } // AURAS////////////////////////////////////////////////// private static Method addFluxToClosest; /** * Adds flux to the node closest to the given location * * @param world * @param x * @param y * @param z * @param tags ObjectTags list of all the EnumTags and amounts of flux to add. */ public static void addFluxToClosest(World world, float x, float y, float z, ObjectTags tags) { try { if (addFluxToClosest == null) { Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); addFluxToClosest = fake.getMethod( "addFluxToClosest", World.class, float.class, float.class, float.class, ObjectTags.class); } addFluxToClosest.invoke(null, world, x, y, z, tags); } catch (Exception ex) { FMLLog.warning( "[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method addFluxToClosest"); } } private static Method decreaseClosestAura; /** * Removes an amount of vis from the aura node closest to the given location * * @param world * @param x * @param y * @param z * @param amount The amount of vis to remove * @param doit If set to false it will merely perform a check to see if there is enough vis to * perform the operation. If set to true it will actually decrease the vis as well. * @return It will return true if there was enough vis to perform this operation */ public static boolean decreaseClosestAura( World world, double x, double y, double z, int amount, boolean doit) { boolean ret = false; try { if (decreaseClosestAura == null) { Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); decreaseClosestAura = fake.getMethod( "decreaseClosestAura", World.class, double.class, double.class, double.class, int.class, boolean.class); } ret = (Boolean) decreaseClosestAura.invoke(null, world, x, y, z, amount, doit); } catch (Exception ex) { FMLLog.warning( "[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method decreaseClosestAura"); } return ret; } private static Method increaseLowestAura; /** * Increases the lowest aura near the given location. * * @param world * @param x * @param y * @param z * @param amount * @return it will return true if the operation was a success */ public static boolean increaseLowestAura(World world, double x, double y, double z, int amount) { boolean ret = false; try { if (increaseLowestAura == null) { Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); increaseLowestAura = fake.getMethod( "increaseLowestAura", World.class, double.class, double.class, double.class, int.class); } ret = (Boolean) increaseLowestAura.invoke(null, world, x, y, z, amount); } catch (Exception ex) { FMLLog.warning( "[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method increaseLowestAura"); } return ret; } private static Method getClosestAuraWithinRange; /** * Gets the id of the closest aura node within range of the given coordinates. Only checks loaded * chunks * * @param world * @param x * @param y * @param z * @param range distance (in blocks) to check * @return returns -1 if no aura is found, otherwise returns the aura node id. */ public static int getClosestAuraWithinRange( World world, double x, double y, double z, double range) { int ret = -1; try { if (getClosestAuraWithinRange == null) { Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); getClosestAuraWithinRange = fake.getMethod( "getClosestAuraWithinRange", World.class, double.class, double.class, double.class, double.class); } ret = (Integer) getClosestAuraWithinRange.invoke(null, world, x, y, z, range); } catch (Exception ex) { FMLLog.warning( "[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method getClosestAuraWithinRange"); } return ret; } private static Method getNodeCopy; /** * Gets an copy of the AuraNode object for the given node * * @param nodeId the int key of the aura node * @return returns a COPY of the auranode object, not the object itself. Auranode values should * only be altered via queNodeChanges - NEVER directly */ public static AuraNode getNodeCopy(int nodeId) { AuraNode node = null; try { if (getNodeCopy == null) { Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); getNodeCopy = fake.getMethod("getNodeCopy", int.class); } node = (AuraNode) getNodeCopy.invoke(null, nodeId); } catch (Exception ex) { FMLLog.warning( "[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method getNodeCopy"); } return node; } private static Method queueNodeChanges; /** * This method is used to alter the values of aura nodes. The changes specified are placed in a * queue for processing by the aura thread.<br> * For example:<br> * queNodeChanges(55,8,0,false,null,0,0,0); //will increase node 55's current vis by 8<br> * queNodeChanges(55,0,0,false,new ObjectTags().remove(EnumTag.FIRE,3),0,0,0); //will reduce node * 55's FIRE flux levels by 3<br> * queNodeChanges(55,11,11,false,null,0,.5f,0); //will increase node 55's current and base level * by 11 and increase its y pos by .5f<br> * * @param nodeId * @param levelMod the amount by which the auras vis level should be changed (positive or * negative) * @param baseMod the amount by which the auras max vis level should be changed (positive or * negative) * @param toggleLock if set to true the nodes lock state will toggle to its opposite value. * Currently doesn't do much * @param flx a ObjectTags collection of the all the flux to add (if positive) or remove (if * negative) to the node * @param x by how much the nodes x position should be altered. Should usually be less than 1 * @param y by how much the nodes y position should be altered. Should usually be less than 1 * @param z by how much the nodes z position should be altered. Should usually be less than 1 */ public static void queueNodeChanges( int nodeId, int levelMod, int baseMod, boolean toggleLock, ObjectTags flux, float x, float y, float z) { try { if (queueNodeChanges == null) { Class fake = Class.forName("thaumcraft.common.aura.AuraManager"); queueNodeChanges = fake.getMethod( "queueNodeChanges", int.class, int.class, int.class, boolean.class, ObjectTags.class, float.class, float.class, float.class); } queueNodeChanges.invoke(null, nodeId, levelMod, baseMod, toggleLock, flux, x, y, z); } catch (Exception ex) { FMLLog.warning( "[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method queueNodeChanges"); } } // BIOMES////////////////////////////////////////////////// @Deprecated public static HashMap<Integer, List> biomeInfo = new HashMap<Integer, List>(); /** * Registers custom biomes with thaumcraft @Deprecated I will be switching over the the forge * BiomeDictionary system in the future so any mods that add biomes should just make sure they are * tagged correctly * * @param biomeID The id of the biome * @param visLevel The average vis level of nodes generated in this biome * @param tag The EnumTag associated with this biome (used to determine infused ore spawns among * other things) * @param greatwood Does this biome support greatwood trees * @param silverwood Does this biome support silverwood trees */ @Deprecated public static void registerBiomeInfo( int biomeID, int visLevel, EnumTag tag, boolean greatwood, boolean silverwood) { biomeInfo.put(biomeID, Arrays.asList(visLevel, tag, greatwood, silverwood)); } @Deprecated public static int getBiomeAura(int biomeId) { try { return (Integer) biomeInfo.get(biomeId).get(0); } catch (Exception e) { } return 200; } @Deprecated public static EnumTag getBiomeTag(int biomeId) { try { return (EnumTag) biomeInfo.get(biomeId).get(1); } catch (Exception e) { } return EnumTag.UNKNOWN; } @Deprecated public static boolean getBiomeSupportsGreatwood(int biomeId) { try { return (Boolean) biomeInfo.get(biomeId).get(2); } catch (Exception e) { } return false; } @Deprecated public static boolean getBiomeSupportsSilverwood(int biomeId) { try { return (Boolean) biomeInfo.get(biomeId).get(3); } catch (Exception e) { } return false; } // CROPS // ////////////////////////////////////////////////////////////////////////////////////////// /** * To define mod crops you need to use FMLInterModComms in your @Mod.Init method. There are two * 'types' of crops you can add. Standard crops and clickable crops. * * <p>Standard crops work like normal vanilla crops - they grow until a certain metadata value is * reached and you harvest them by destroying the block and collecting the blocks. You need to * create and ItemStack that tells the golem what block id and metadata represents the crop when * fully grown. Example for vanilla wheat: FMLInterModComms.sendMessage("Thaumcraft", * "harvestStandardCrop", new ItemStack(Block.crops,1,7)); * * <p>Clickable crops are crops that you right click to gather their bounty instead of destroying * them. As for standard crops, you need to create and ItemStack that tells the golem what block * id and metadata represents the crop when fully grown. The golem will trigger the blocks * onBlockActivated method. Example (this will technically do nothing since clicking wheat does * nothing, but you get the idea): FMLInterModComms.sendMessage("Thaumcraft", * "harvestClickableCrop", new ItemStack(Block.crops,1,7)); */ @Deprecated public static HashMap<Integer, Integer> crops = new HashMap<Integer, Integer>(); /** * This is used to add mod crops to the list of crops harvested by golems that do not use the * standard crop growth pattern<br> * (i.e. being an instance of BlockCrops and being fully grown at meta 7).<br> * Only seeds implementing IPlantable will be replanted. * * @param blockID the block id of the crop * @param grownMeta the metadata value when the crop is considered fully grown. The block with * this id and meta will be the one the golem breaks. */ @Deprecated public static void addHarvestableCrop(int blockID, int grownMeta) { crops.put(blockID, grownMeta); } }
static { EnumToolMaterial enumt = EnumHelper.addToolMaterial("pellep", 5, 2000, 5F, 5, 15); block = (Item) (new ItemSpade(804, enumt)).setUnlocalizedName("pelleOD"); }
private void initBlazeTools() { /** * WOOD(0, 59, 2.0F, 0, 15), STONE(1, 131, 4.0F, 1, 5), IRON(2, 250, 6.0F, 2, 14), EMERALD(3, * 1561, 8.0F, 3, 10), GOLD(0, 32, 12.0F, 0, 22); */ blazeToolMaterial = EnumHelper.addToolMaterial("BLAZEINGOT", 2, 1561, 6.0f, 2, 14); blazeSword = (new BlazeItemSword(DefaultProps.BLAZE_SWORD_ID, blazeToolMaterial)) .setIconCoord(2, 0) .setItemName("blazesword"); blazeShovel = (new BlazeItemShovel(DefaultProps.BLAZE_SHOVEL_ID, blazeToolMaterial)) .setIconCoord(3, 0) .setItemName("blazeshovel"); blazePickaxe = (new BlazeItemPickaxe(DefaultProps.BLAZE_PICKAXE_ID, blazeToolMaterial)) .setIconCoord(4, 0) .setItemName("blazepickaxe"); blazeAxe = (new BlazeItemAxe(DefaultProps.BLAZE_AXE_ID, blazeToolMaterial)) .setIconCoord(5, 0) .setItemName("blazeaxe"); blazeHoe = (new BlazeItemHoe(DefaultProps.BLAZE_HOE_ID, blazeToolMaterial)) .setIconCoord(6, 0) .setItemName("blazehoe"); LanguageRegistry.addName(blazeSword, DefaultNames.EN.BLAZE_SWORD); LanguageRegistry.instance().addNameForObject(blazeSword, "ja_JP", DefaultNames.JP.BLAZE_SWORD); LanguageRegistry.addName(blazeShovel, DefaultNames.EN.BLAZE_SHOVEL); LanguageRegistry.instance() .addNameForObject(blazeShovel, "ja_JP", DefaultNames.JP.BLAZE_SHOVEL); LanguageRegistry.addName(blazePickaxe, DefaultNames.EN.BLAZE_PICKAXE); LanguageRegistry.instance() .addNameForObject(blazePickaxe, "ja_JP", DefaultNames.JP.BLAZE_PICKAXE); LanguageRegistry.addName(blazeAxe, DefaultNames.EN.BLAZE_AXE); LanguageRegistry.instance().addNameForObject(blazeAxe, "ja_JP", DefaultNames.JP.BLAZE_AXE); LanguageRegistry.addName(blazeHoe, DefaultNames.EN.BLAZE_HOE); LanguageRegistry.instance().addNameForObject(blazeHoe, "ja_JP", DefaultNames.JP.BLAZE_HOE); GameRegistry.addRecipe( new ItemStack(blazeSword, 1), new Object[] { "X", "X", "S", Character.valueOf('X'), BlazeIngot, Character.valueOf('S'), Item.blazeRod }); GameRegistry.addRecipe( new ItemStack(blazeHoe, 1), new Object[] { "XX", " S", " S", Character.valueOf('X'), BlazeIngot, Character.valueOf('S'), Item.blazeRod }); GameRegistry.addRecipe( new ItemStack(blazeShovel, 1), new Object[] { "X", "S", "S", Character.valueOf('X'), BlazeIngot, Character.valueOf('S'), Item.blazeRod }); GameRegistry.addRecipe( new ItemStack(blazePickaxe, 1), new Object[] { "XXX", " S ", " S ", Character.valueOf('X'), BlazeIngot, Character.valueOf('S'), Item.blazeRod }); GameRegistry.addRecipe( new ItemStack(blazeAxe, 1), new Object[] { "XX", "XS", " S", Character.valueOf('X'), BlazeIngot, Character.valueOf('S'), Item.blazeRod }); BlazeShears = (new BlazeItemShears(DefaultProps.BLAZE_SHEARS_ID)) .setIconCoord(1, 1) .setItemName("blazeShears"); LanguageRegistry.addName(BlazeShears, DefaultNames.EN.BLAZE_SHEARS); LanguageRegistry.instance() .addNameForObject(BlazeShears, "ja_JP", DefaultNames.JP.BLAZE_SHEARS); GameRegistry.addRecipe( new ItemStack(BlazeShears, 1), new Object[] { " X", "X ", Character.valueOf('X'), BlazeIngot, }); FlintAndBlazeIngot = (new FlintAndBlazeIngotItemFlintAndSteel(DefaultProps.FLINT_AND_BLAZE_INGOT_ID)) .setIconCoord(15, 0) .setItemName("flintAndBlazeIngot"); LanguageRegistry.addName(FlintAndBlazeIngot, DefaultNames.EN.FLINT_AND_BLAZE_INGOT); LanguageRegistry.instance() .addNameForObject(FlintAndBlazeIngot, "ja_JP", DefaultNames.JP.FLINT_AND_BLAZE_INGOT); GameRegistry.addRecipe( new ItemStack(FlintAndBlazeIngot, 1), new Object[] { "S ", " X", Character.valueOf('S'), BlazeIngot, Character.valueOf('X'), Item.flint }); BlazeBow = (new BlazeItemBow(DefaultProps.BLAZE_BOW_ID, 768)) .setIconCoord(11, 0) .setItemName("blazeBow"); LanguageRegistry.addName(BlazeBow, DefaultNames.EN.BLAZE_BOW); LanguageRegistry.instance().addNameForObject(BlazeBow, "ja_JP", DefaultNames.JP.BLAZE_BOW); GameRegistry.addRecipe( new ItemStack(BlazeBow, 1), new Object[] { "SX ", "S X", "SX ", Character.valueOf('X'), Item.blazeRod, Character.valueOf('S'), Item.silk }); }
public class GCJupiterItems { public static Item jupiterItemBasic; public static Item spaceshipT5; // public static Item schematic; public static Item clearDiamondPickaxe; public static Item clearDiamondAxe; public static Item clearDiamondHoe; public static Item clearDiamondSpade; public static Item clearDiamondSword; public static Item clearDiamondHelmet; public static Item clearDiamondChestplate; public static Item clearDiamondLeggings; public static Item clearDiamondBoots; public static EnumArmorMaterial ARMORCLEARDIAMOND = EnumHelper.addArmorMaterial("ClearDiamond", 42, new int[] {4, 9, 7, 4}, 12); public static EnumToolMaterial TOOLCLEARDIAMOND = EnumHelper.addToolMaterial("ClearDiamond", 3, 1024, 5.0F, 2.5F, 8); public static void initItems() { GCJupiterItems.jupiterItemBasic = new GCJupiterItem(GCJupiterConfigManager.idItemJupiterBasic) .setUnlocalizedName("jupiterBasic"); GCJupiterItems.spaceshipT5 = new SCCoreItemSpaceshipTier5(GCJupiterConfigManager.idItemSpaceshipTier5) .setUnlocalizedName("spaceshipTier5"); // SCCoreItems.schematic = new // SCCoreItemSchematic(SCCoreConfigManager.idItemSchematicMars).setUnlocalizedName("schematic"); GCJupiterItems.clearDiamondPickaxe = new SCCoreItemClearDiamondPickaxe( GCJupiterConfigManager.idToolClearDiamondPickaxe, GCJupiterItems.TOOLCLEARDIAMOND) .setUnlocalizedName("ClearDiamondPick"); GCJupiterItems.clearDiamondAxe = new SCCoreItemClearDiamondAxe( GCJupiterConfigManager.idToolClearDiamondAxe, GCJupiterItems.TOOLCLEARDIAMOND) .setUnlocalizedName("ClearDiamondAxe"); GCJupiterItems.clearDiamondHoe = new SCCoreItemClearDiamondHoe( GCJupiterConfigManager.idToolClearDiamondHoe, GCJupiterItems.TOOLCLEARDIAMOND) .setUnlocalizedName("ClearDiamondHoe"); GCJupiterItems.clearDiamondSpade = new SCCoreItemClearDiamondSpade( GCJupiterConfigManager.idToolClearDiamondSpade, GCJupiterItems.TOOLCLEARDIAMOND) .setUnlocalizedName("ClearDiamondSpade"); GCJupiterItems.clearDiamondSword = new SCCoreItemClearDiamondSword( GCJupiterConfigManager.idToolClearDiamondSword, GCJupiterItems.TOOLCLEARDIAMOND) .setUnlocalizedName("ClearDiamondSword"); GCJupiterItems.clearDiamondHelmet = new SCCoreItemClearDiamondArmor( GCJupiterConfigManager.idArmorClearDiamondHelmet, GCJupiterItems.ARMORCLEARDIAMOND, 7, 0, false) .setUnlocalizedName("ClearDiamondHelmet"); GCJupiterItems.clearDiamondChestplate = new SCCoreItemClearDiamondArmor( GCJupiterConfigManager.idArmorClearDiamondChestplate, GCJupiterItems.ARMORCLEARDIAMOND, 7, 1, false) .setUnlocalizedName("ClearDiamondChestplate"); GCJupiterItems.clearDiamondLeggings = new SCCoreItemClearDiamondArmor( GCJupiterConfigManager.idArmorClearDiamondLeggings, GCJupiterItems.ARMORCLEARDIAMOND, 7, 2, false) .setUnlocalizedName("ClearDiamondLeggings"); GCJupiterItems.clearDiamondBoots = new SCCoreItemClearDiamondArmor( GCJupiterConfigManager.idArmorClearDiamondBoots, GCJupiterItems.ARMORCLEARDIAMOND, 7, 3, false) .setUnlocalizedName("ClearDiamondBoots"); } public static void registerHarvestLevels() {} }
public class AlloyFantasyEnum extends IMetalSetEnum { public static int numMetals = 5; public static String[] names = new String[] {"Black Steel", "Quicksilver", "Haderoth", "Celenegil", "Tartarite"}; public static String imageName = "/shadow/MetallurgyFantasyAlloys.png"; private int[] expValues = new int[] {4, 9, 6, 25, 13}; private int[] harvestLevels = new int[] {2, 4, 4, 5, 6}; private int[] pickLevels = new int[] {2, 4, 4, 5, 6}; private int[] metalLevels = new int[] {4, 9, 9, 11, 12}; public static EnumArmorMaterial blackSteelArmor = EnumHelper.addArmorMaterial("Black Steel", 22, new int[] {3, 6, 5, 3}, 17); public static EnumArmorMaterial quicksilverArmor = EnumHelper.addArmorMaterial("Quicksilver", 30, new int[] {4, 7, 5, 4}, 20); public static EnumArmorMaterial haderothArmor = EnumHelper.addArmorMaterial("Haderoth", 32, new int[] {4, 7, 5, 4}, 19); public static EnumArmorMaterial celenegilArmor = EnumHelper.addArmorMaterial("Celenegil", 36, new int[] {5, 7, 6, 4}, 50); public static EnumArmorMaterial tartariteArmor = EnumHelper.addArmorMaterial("Tartarite", 42, new int[] {5, 7, 6, 5}, 25); public int numMetals() { return numMetals; } public int startID(int var1) { return ConfigFantasy.ItemStartID + 600 + var1 * 50; } public String name(int var1) { return names[var1]; } public int expValue(int var1) { return this.expValues[var1]; } public int oreHarvestLevel(int var1) { return this.harvestLevels[var1]; } public int brickHarvestLevel(int var1) { return this.harvestLevels[var1]; } public int pickLevel(int var1) { return this.pickLevels[var1]; } public String image() { return imageName; } public boolean isAlloy() { return true; } public int veinCount(int var1) { return 0; } public int oreCount(int var1) { return 0; } public int oreHeight(int var1) { return 0; } public int oreID() { return 0; } public int brickID() { return ConfigFantasy.FantasyAlloysBrickID; } public String getSetName() { return "FantasyAlloy"; } public MetallurgyEnumToolMaterial toolEnum(int var1) { switch (var1) { case 0: return MetallurgyEnumToolMaterial.BlackSteel; case 1: return MetallurgyEnumToolMaterial.Quicksilver; case 2: return MetallurgyEnumToolMaterial.Haderoth; case 3: return MetallurgyEnumToolMaterial.Celenegil; case 4: return MetallurgyEnumToolMaterial.Tartarite; default: return MetallurgyEnumToolMaterial.BlackSteel; } } public EnumArmorMaterial armorEnum(int var1) { switch (var1) { case 0: return blackSteelArmor; case 1: return quicksilverArmor; case 2: return haderothArmor; case 3: return celenegilArmor; case 4: return tartariteArmor; default: return blackSteelArmor; } } public boolean isCatalyst(int var1) { return false; } public int dungeonLootChance(int var1) { return 0; } public int dungeonLootAmount(int var1) { return 0; } public int numRails(int var1) { return 0; } public boolean spawnsInDimension(int var1) { return false; } public boolean metalEnabled(int var1) { return ConfigFantasy.alloyEnabled[var1]; } public int oreMinHeight(int var1) { return 0; } public int level(int var1) { return this.metalLevels[var1]; } public boolean hasMetalBlock() { return true; } public int blockID() { return ConfigFantasy.alloysBlockID; } public CreativeTabs getCreativeTab() { return MetallurgyFantasy.creativeTab; } }
@Override public void init() { GameRegistry.registerWorldGenerator(GenerationManager.instance); itemWoolGin = new ItemWoolGin(Configurator.item_woolginID.getInt()); itemBackpack = new ItemBackpack(Configurator.item_backpackID.getInt()); blockOres = new BlockOre(Configurator.block_oresID.getInt()); GameRegistry.registerBlock(blockOres, ItemBlockOre.class, "projectred.exploration.ore"); for (EnumOre o : EnumOre.VALID_ORES) { MinecraftForge.setBlockHarvestLevel(blockOres, "pickaxe", o.harvesLevel); } blockStones = new BlockSpecialStone(Configurator.block_stonesID.getInt()); GameRegistry.registerBlock( blockStones, ItemBlockSpecialStone.class, "projectred.exploration.stone"); if (Configurator.gen_SpreadingMoss.getBoolean(true)) { int mc = Block.cobblestoneMossy.blockID; Block.blocksList[mc] = null; new BlockPhotosyntheticCobblestone(mc); int sb = Block.stoneBrick.blockID; Block.blocksList[sb] = null; new BlockPhotosyntheticStoneBrick(sb); } toolMaterialRuby = EnumHelper.addToolMaterial("RUBY", 2, 500, 8.0F, 4, 12); toolMaterialSapphire = EnumHelper.addToolMaterial("SAPPHIRE", 2, 500, 8.0F, 3, 16); toolMaterialPeridot = EnumHelper.addToolMaterial("PERIDOT", 2, 500, 8.75F, 3.25F, 12); itemRubyAxe = new ItemGemAxe(Configurator.item_rubyAxe.getInt(), EnumSpecialTool.RUBYAXE); itemSapphireAxe = new ItemGemAxe(Configurator.item_sapphireAxe.getInt(), EnumSpecialTool.SAPPHIREAXE); itemPeridotAxe = new ItemGemAxe(Configurator.item_peridotAxe.getInt(), EnumSpecialTool.PERIDOTAXE); MinecraftForge.setToolClass(itemRubyAxe, "axe", 2); MinecraftForge.setToolClass(itemSapphireAxe, "axe", 2); MinecraftForge.setToolClass(itemPeridotAxe, "axe", 2); itemRubyHoe = new ItemGemHoe(Configurator.item_rubyHoe.getInt(), EnumSpecialTool.RUBYHOE); itemSapphireHoe = new ItemGemHoe(Configurator.item_sapphireHoe.getInt(), EnumSpecialTool.SAPPHIREHOE); itemPeridotHoe = new ItemGemHoe(Configurator.item_peridotHoe.getInt(), EnumSpecialTool.PERIDOTHOE); MinecraftForge.setToolClass(itemRubyHoe, "hoe", 2); MinecraftForge.setToolClass(itemSapphireHoe, "hoe", 2); MinecraftForge.setToolClass(itemPeridotHoe, "hoe", 2); itemRubyPickaxe = new ItemGemPickaxe(Configurator.item_rubyPickaxe.getInt(), EnumSpecialTool.RUBYPICKAXE); itemSapphirePickaxe = new ItemGemPickaxe( Configurator.item_sapphirePickaxe.getInt(), EnumSpecialTool.SAPPHIREPICKAXE); itemPeridotPickaxe = new ItemGemPickaxe( Configurator.item_peridotPickaxe.getInt(), EnumSpecialTool.PERIDOTPICKAXE); MinecraftForge.setToolClass(itemRubyPickaxe, "pickaxe", 2); MinecraftForge.setToolClass(itemSapphirePickaxe, "pickaxe", 2); MinecraftForge.setToolClass(itemPeridotPickaxe, "pickaxe", 2); itemRubyShovel = new ItemGemShovel(Configurator.item_rubyShovel.getInt(), EnumSpecialTool.RUBYSHOVEL); itemSapphireShovel = new ItemGemShovel( Configurator.item_sapphireShovel.getInt(), EnumSpecialTool.SAPPHIRESHOVEL); itemPeridotShovel = new ItemGemShovel(Configurator.item_peridotShovel.getInt(), EnumSpecialTool.PERIDOTSHOVEL); MinecraftForge.setToolClass(itemRubyShovel, "shovel", 2); MinecraftForge.setToolClass(itemSapphireShovel, "shovel", 2); MinecraftForge.setToolClass(itemPeridotShovel, "shovel", 2); itemRubySword = new ItemGemSword(Configurator.item_rubySword.getInt(), EnumSpecialTool.RUBYSWORD); itemSapphireSword = new ItemGemSword(Configurator.item_sapphireSword.getInt(), EnumSpecialTool.SAPPHIRESWORD); itemPeridotSword = new ItemGemSword(Configurator.item_peridotSword.getInt(), EnumSpecialTool.PERIDOTSWORD); MinecraftForge.setToolClass(itemRubySword, "sword", 2); MinecraftForge.setToolClass(itemSapphireSword, "sword", 2); MinecraftForge.setToolClass(itemPeridotSword, "sword", 2); itemWoodSaw = new ItemGemSaw(Configurator.item_woodSaw.getInt(), EnumSpecialTool.WOODSAW); itemStoneSaw = new ItemGemSaw(Configurator.item_stoneSaw.getInt(), EnumSpecialTool.STONESAW); itemIronSaw = new ItemGemSaw(Configurator.item_ironSaw.getInt(), EnumSpecialTool.IRONSAW); itemGoldSaw = new ItemGemSaw(Configurator.item_goldSaw.getInt(), EnumSpecialTool.GOLDSAW); itemRubySaw = new ItemGemSaw(Configurator.item_rubySaw.getInt(), EnumSpecialTool.RUBYSAW); itemSapphireSaw = new ItemGemSaw(Configurator.item_sapphireSaw.getInt(), EnumSpecialTool.SAPPHIRESAW); itemPeridotSaw = new ItemGemSaw(Configurator.item_peridotSaw.getInt(), EnumSpecialTool.PERIDOTSAW); itemDiamondSaw = new ItemGemSaw(Configurator.item_diamondSaw.getInt(), EnumSpecialTool.DIAMONDSAW); itemWoodSickle = new ItemGemSickle(Configurator.item_woodSickle.getInt(), EnumSpecialTool.WOODSICKLE); itemStoneSickle = new ItemGemSickle(Configurator.item_stoneSickle.getInt(), EnumSpecialTool.STONESICKLE); itemIronSickle = new ItemGemSickle(Configurator.item_ironSickle.getInt(), EnumSpecialTool.IRONSICKLE); itemGoldSickle = new ItemGemSickle(Configurator.item_goldSickle.getInt(), EnumSpecialTool.GOLDSICKLE); itemRubySickle = new ItemGemSickle(Configurator.item_rubySickle.getInt(), EnumSpecialTool.RUBYSICKLE); itemSapphireSickle = new ItemGemSickle( Configurator.item_sapphireSickle.getInt(), EnumSpecialTool.SAPPHIRESICKLE); itemPeridotSickle = new ItemGemSickle(Configurator.item_peridotSickle.getInt(), EnumSpecialTool.PERIDOTSICKLE); itemDiamondSickle = new ItemGemSickle(Configurator.item_diamondSickle.getInt(), EnumSpecialTool.DIAMONDSICKLE); for (EnumSpecialStone s : EnumSpecialStone.VALID_STONE) { MicroMaterialRegistry.registerMaterial( new BlockMicroMaterial(ProjectRedExploration.blockStones, s.meta), ProjectRedExploration.blockStones.getUnlocalizedName() + (s.meta > 0 ? "_" + s.meta : "")); } }
public class OreBaseEnum extends IMetalSetEnum { public static final int numMetals = 3; public static final String[] names = {"Copper", "Tin", "Manganese"}; private final int[] expValues = {1, 1, 3}; private final int[] harvestLevels = {1, 1, 2}; private final int[] pickLevels = {1, 0, 0}; private int[] metalLevels = {1, 2, 4}; private final int[] dungeonLootChances = {120, 100, 45}; private final int[] dungeonLootAmounts = {6, 4, 2}; public static int[] defaultVeinCount = {12, 10, 4}; public static int[] defaultOreCount = {6, 7, 4}; public static int[] defaultOreHeight = {128, 128, 128}; public static int[] numRails = {4, 0, 0}; public static EnumArmorMaterial copperArmor = EnumHelper.addArmorMaterial("Copper", 10, new int[] {2, 3, 2, 1}, 5); @Override public int numMetals() { return numMetals; } @Override public int startID(int i) { return ConfigBase.ItemStartID + (i * 50); } @Override public String name(int i) { return names[i]; } @Override public int expValue(int i) { return expValues[i]; } @Override public int oreHarvestLevel(int i) { return harvestLevels[i]; } @Override public int brickHarvestLevel(int i) { return harvestLevels[i]; } @Override public int pickLevel(int i) { return pickLevels[i]; } @Override public String image() { return "/shadow/MetallurgyBaseMetals.png"; } @Override public boolean isAlloy() { return false; } @Override public int veinCount(int i) { return ConfigBase.VeinCount[i]; } @Override public int oreCount(int i) { return ConfigBase.OreCount[i]; } @Override public int oreHeight(int i) { return ConfigBase.OreHeight[i]; } @Override public int oreID() { return ConfigBase.baseMetalsVeinID; } @Override public int brickID() { return ConfigBase.baseMetalsBrickID; } @Override public String getSetName() { return "BaseMetal"; } @Override public MetallurgyEnumToolMaterial toolEnum(int i) { switch (i) { case (0): return MetallurgyEnumToolMaterial.Copper; } return MetallurgyEnumToolMaterial.Copper; } @Override public boolean isCatalyst(int i) { if (i == 1 || i == 2) return true; return false; } @Override public int dungeonLootChance(int i) { return dungeonLootChances[i]; } @Override public int dungeonLootAmount(int i) { return dungeonLootAmounts[i]; } @Override public int numRails(int i) { return numRails[i]; } @Override public boolean spawnsInDimension(int i) { for (String str : ConfigBase.dimensions.split(" ")) { if (str.matches("[0-9]+-[0-9]+")) { int start = Integer.parseInt(str.split("-")[0]); int end = Integer.parseInt(str.split("-")[1]); if (i >= start && i <= end) return true; } else { if (i == Integer.parseInt(str)) return true; } } return false; } @Override public boolean metalEnabled(int i) { return ConfigBase.metalEnabled[i]; } @Override public EnumArmorMaterial armorEnum(int i) { return copperArmor; } @Override public int oreMinHeight(int i) { return ConfigBase.OreMinHeight[i]; } @Override public int level(int i) { return metalLevels[i]; } public boolean hasMetalBlock() { return true; } public int blockID() { return ConfigBase.baseMetalsBlockID; } @Override public CreativeTabs getCreativeTab() { return MetallurgyBaseMetals.baseTab; } }
@Mod(modid = "KodeKishin", name = "ME-Craft", version = "a0.0.1") @NetworkMod( clientSideRequired = true, serverSideRequired = false, channels = "ME-Craft", packetHandler = PacketManager.class) public class Core { public static int ItemID = 2789; public static int BlockID = 901; public static int BiomeBlockID = 250; public static int BiomeID = 23; public static int AchievementID = 2001; public static int x1 = 901 + 34; public static int x2 = 901 + 35; public static boolean INITIALIZED = false; @Mod.PreInit public static void preInit(FMLPreInitializationEvent event) { // Config(Ayarlar) Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); ItemID = config.get("Item:", "Base Item ID", 2789).getInt(); BlockID = config.get("Block:", "Base Block ID", 901).getInt(); x1 = config.get("Block:", "Pressure Machine Idle ID", 901 + 34).getInt(); x2 = config.get("Block:", "Pressure Machine Runing ID", 901 + 35).getInt(); BiomeBlockID = config.get("Biome:", "Biome Block ID", 250).getInt(); BiomeID = config.get("Biome:", "Biome ID", 23).getInt(); AchievementID = config.get("Achievement:", "Base Achievement ID", 2001).getInt(); config.save(); } public static void init() { if (!INITIALIZED) { System.out.println("ME-Craft Loaded:"); INITIALIZED = true; } } public static final String modid = "KodeKishin"; public static String CHANNEL = "ME-Craft"; public static final ArrayList bcDependants = new ArrayList(); int x = Color.black.getRed() << 16 + (Color.white.getGreen() << 8); int y = Color.white.getRed() << 16 + (Color.white.getGreen() << 8); public static CreativeTabs MEC = new CreativeTabs("MEC") { public ItemStack getIconItemStack() { return new ItemStack(Core.Heart, 1, 0); } }; @Instance(Core.modid) public static Core instance = new Core(); private GuiHandler guihandler = new GuiHandler(); public MECBucketHandler dirtBucket; public static Item MECBucket; public static Item Batery; public static Item IBatery; public static Item Heart = new Heart(ItemID, 10, 12, true) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("heart"); public static Item GHeart = new GHeart(ItemID + 1, -10, 12, true) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("gheart"); public static Item MECWrench; public static Item IronPlate; public static Item GoldPlate; public static Item CopperPlate; public static Item SteelPlate; public static Item CopperIngot; public static Item SteelIngot; public static ItemArmor CPHelmet; public static ItemArmor CPChestPlate; public static ItemArmor CPChestPlateWW; public static ItemArmor CPLeggings; public static ItemArmor CPBoots; public static Item CPSword; public static Item CSoulPart; public static Item PSoulPart; public static Item CWSoulPart; public static Item ESoulPart; public static Item ZSoulPart; public static Item CRSoulPart; public static Item SSoulPart; public static Item HSoulPart; public static Material MaterialMECLiquid = (new MaterialMECLiquid(MapColor.iceColor)).water; public static Material MaterialMEC = (new MaterialMEC(MapColor.iceColor).rock); public static final Block Deneme = new Deneme((x1), false).setHardness(1.5F).setCreativeTab(MEC); public static final Block CPSnad = new CPSand(BiomeBlockID).setHardness(0.1F).setCreativeTab(MEC).setUnlocalizedName("cpsand"); public static final Block CopperOre = new CopperOre(BlockID + 37) .setHardness(1.5F) .setCreativeTab(MEC) .setUnlocalizedName("copperOre"); public static final Block CopperCable = new CopperCable(BlockID + 40).setCreativeTab(MEC).setUnlocalizedName("copperWire2"); public static final Block DenemeB = new Deneme((x2), true).setHardness(1.5F); public static final BlockBasicMachine blockMachine = new BlockBasicMachine(BlockID + 36); public static final BlockSolarGenerator blocksolar = new BlockSolarGenerator(BlockID + 42); public static final BlockBatteryBox blockbat = new BlockBatteryBox(BlockID + 43); public static final Block MECLiquid = new MECLiquid(BlockID + 38, MaterialMECLiquid).setHardness(100.0F); public static final Block MECLiquidStill = (new MECLiquidStill(BlockID + 39, MaterialMECLiquid)).setHardness(100.0F); public static final Block MermerB = (new SMermer(BlockID + 33)) .setHardness(1.5F) .setResistance(10.0F) .setUnlocalizedName("mermerb") .setCreativeTab(MEC); public static final Block Mermer = (new Mermer(BlockID)) .setHardness(1.5F) .setResistance(10.0F) .setUnlocalizedName("mermer") .setCreativeTab(MEC); public static final Block SMermer = (new SMermer(BlockID + 2)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("sermer") .setCreativeTab(MEC); public static final Block AMermer = (new SMermer(BlockID + 3)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("acik mavi mermer") .setCreativeTab(MEC); public static final Block BMermer = (new SMermer(BlockID + 4)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("acik gri mermer") .setCreativeTab(MEC); public static final Block CMermer = (new SMermer(BlockID + 5)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("acik yesil mermer") .setCreativeTab(MEC); public static final Block DMermer = (new SMermer(BlockID + 6)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("eflatun mermer") .setCreativeTab(MEC); public static final Block EMermer = (new SMermer(BlockID + 7)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("gri mermer") .setCreativeTab(MEC); public static final Block FMermer = (new SMermer(BlockID + 8)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("kahve rengi mermer") .setCreativeTab(MEC); public static final Block GMermer = (new SMermer(BlockID + 9)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("kirmizi mermer") .setCreativeTab(MEC); public static final Block HMermer = (new SMermer(BlockID + 10)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("mavi mermer") .setCreativeTab(MEC); public static final Block IMermer = (new SMermer(BlockID + 11)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("mor mermer") .setCreativeTab(MEC); public static final Block JMermer = (new SMermer(BlockID + 12)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("pembe mermer") .setCreativeTab(MEC); public static final Block KMermer = (new SMermer(BlockID + 13)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("sari mermer") .setCreativeTab(MEC); public static final Block LMermer = (new SMermer(BlockID + 14)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("siyah mermer") .setCreativeTab(MEC); public static final Block MMermer = (new SMermer(BlockID + 15)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("turkuaz mermer") .setCreativeTab(MEC); public static final Block NMermer = (new SMermer(BlockID + 16)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("turuncu mermer") .setCreativeTab(MEC); public static final Block OMermer = (new SMermer(BlockID + 17)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("yesil mermer") .setCreativeTab(MEC); public static final Block AMermerB = (new SMermer(BlockID + 18)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("acik mavi tugla") .setCreativeTab(MEC); public static final Block BMermerB = (new SMermer(BlockID + 19)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("acik gri tugla") .setCreativeTab(MEC); public static final Block CMermerB = (new SMermer(BlockID + 20)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("koyu yesil tugla") .setCreativeTab(MEC); public static final Block DMermerB = (new SMermer(BlockID + 21)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("eflatun tugla") .setCreativeTab(MEC); public static final Block EMermerB = (new SMermer(BlockID + 22)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("gri tugla") .setCreativeTab(MEC); public static final Block FMermerB = (new SMermer(BlockID + 23)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("kahverengi tugla") .setCreativeTab(MEC); public static final Block GMermerB = (new SMermer(BlockID + 24)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("kirmizi tugla") .setCreativeTab(MEC); public static final Block HMermerB = (new SMermer(BlockID + 25)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("mavi tugla") .setCreativeTab(MEC); public static final Block IMermerB = (new SMermer(BlockID + 26)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("mor tugla") .setCreativeTab(MEC); public static final Block JMermerB = (new SMermer(BlockID + 27)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("pembe tugla") .setCreativeTab(MEC); public static final Block KMermerB = (new SMermer(BlockID + 28)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("sari tugla") .setCreativeTab(MEC); public static final Block LMermerB = (new SMermer(BlockID + 29)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("siyah tugla") .setCreativeTab(MEC); public static final Block MMermerB = (new SMermer(BlockID + 30)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("turkuaz tugla") .setCreativeTab(MEC); public static final Block NMermerB = (new SMermer(BlockID + 31)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("turuncu tugla") .setCreativeTab(MEC); public static final Block OMermerB = (new SMermer(BlockID + 32)) .setHardness(3.5F) .setResistance(10.0F) .setUnlocalizedName("yesil tugla") .setCreativeTab(MEC); public static final Block KirikMermer = (new KMermer(BlockID + 1)) .setHardness(2.0F) .setResistance(10.0F) .setUnlocalizedName("kermer") .setCreativeTab(MEC); public static MECWorldGenerator worldGen = new MECWorldGenerator(); public static MECWorldGenerator2 worldGenCopper = new MECWorldGenerator2(); public static MECWorldGenerator3 worldGenML = new MECWorldGenerator3(); public static WorldGenFuelLakes worldGen3 = new WorldGenFuelLakes(MECLiquid.blockID); public static WorldGenLiquids worldGen2 = new WorldGenLiquids(MECLiquid.blockID); public static final BiomeGenBase MarbleBiome = (new BiomeGenMarble(BiomeID)).setBiomeName("The Corruption"); public static final int dimension = 9; public static final int MECGUiID = 0; public static final Achievement timeAchieve = new Achievement(AchievementID, "Marble", 1, -2, KirikMermer, null) .registerAchievement() .setSpecial(); public static final Achievement timeAchieve3 = new Achievement(AchievementID + 3, "Pressure", 1, -5, Deneme, timeAchieve) .registerAchievement() .setSpecial(); public static final Achievement timeAchieve2 = new Achievement(AchievementID + 1, "Marble2", -4, -5, Mermer, timeAchieve3) .registerAchievement() .setSpecial(); public static final Achievement timh = new Achievement(AchievementID + 5, "Heart", -4, 0, Heart, timeAchieve) .registerAchievement() .setSpecial(); public static final Achievement timg = new Achievement(AchievementID + 4, "GHeart", 4, 0, GHeart, timeAchieve) .registerAchievement() .setSpecial(); public static final Achievement cc = new Achievement(AchievementID + 2, "Copper", 4, -2, CopperOre, null) .registerAchievement() .setSpecial(); public static AchievementPage page1 = new AchievementPage("ME-Craft", timeAchieve, timeAchieve3, timeAchieve2, cc, timh, timg); public static EnumToolMaterial CP = EnumHelper.addToolMaterial("cp", 5, 20000, 20.0f, 5, 30); public static EnumArmorMaterial CPA = EnumHelper.addArmorMaterial("cp", 50, new int[] {6, 16, 12, 6}, 30); @SidedProxy(clientSide = "KodeKishin.ClientProxy", serverSide = "KodeKishin.CommonProxy") public static CommonProxy proxy; @Init public void load(FMLInitializationEvent event) { proxy.registerRenderers(); } @PreInit public void postInit(FMLPreInitializationEvent event) { // Registers(Kayitlar) MinecraftForge.EVENT_BUS.register(new SoundHandler()); RenderingRegistry.registerEntityRenderingHandler( ghost.class, new render(new ghostmodel(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler( Badghost.class, new Badghostrender(new ghostmodel(), 0.3F)); ClientRegistry.bindTileEntitySpecialRenderer( TileEntityCopperWire.class, new RenderCopperWire()); ClientRegistry.bindTileEntitySpecialRenderer( TileEntitySolarGenerator.class, new RenderSolarPanel()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBatteryBox.class, new RenderBattery()); ClientRegistry.bindTileEntitySpecialRenderer( TileEntityCoalGenerator.class, new RenderGenerator()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEF.class, new RenderEFurnace()); if (MECLiquid.blockID + 1 != MECLiquidStill.blockID) { throw new RuntimeException("Liquid Still id must be Liquid Moving id + 1"); } dirtBucket = (MECBucketHandler) new MECBucketHandler(); MinecraftForge.EVENT_BUS.register(new MECBucketHandler()); ModLoader.registerEntityID(Badghost.class, "Banion", 8, x, y); ModLoader.registerEntityID(ghost.class, "Mip", 7, x, y); ModLoader.getUniqueEntityId(); ModLoader.addSpawn(ghost.class, 10, 4, 7, EnumCreatureType.ambient, MarbleBiome); ModLoader.addSpawn(Badghost.class, 14, 4, 7, EnumCreatureType.ambient, MarbleBiome); LanguageRegistry.instance().addStringLocalization("entity.Mip.name", "en_US", "Mip"); LanguageRegistry.instance().addStringLocalization("entity.Banion.name", "en_US", "Banion"); IronPlate = new IronPlate(ItemID + 5) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateIron"); GoldPlate = new IronPlate(ItemID + 6) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateGold"); CopperPlate = new IronPlate(ItemID + 7) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateCopper"); SteelPlate = new IronPlate(ItemID + 8) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("plateSteel"); CopperIngot = new ItemMEC(ItemID + 9) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("ingotCopper"); SteelIngot = new ItemMEC(ItemID + 10) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("ingotSteel"); Heart = new Heart(ItemID, 10, 12, true) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("heart"); GHeart = new GHeart(ItemID + 1, -10, 12, true) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("gheart"); MECBucket = new MECBucket(ItemID + 2) .setCreativeTab(MEC) .setUnlocalizedName("mbucket") .setContainerItem(Item.bucketEmpty); MECWrench = new MECWrench(ItemID + 17) .setMaxStackSize(64) .setCreativeTab(MEC) .setUnlocalizedName("wrench"); Batery = new ItemBattery("battery", ItemID + 3).setMaxStackSize(1); IBatery = new ItemInfiniteBattery("infinitebattery", ItemID + 4).setMaxDamage(1); CPHelmet = (ItemArmor) (new ItemArmorCP(ItemID + 11, CPA, proxy.addArmor(CPA.name()), 0)) .setUnlocalizedName("cp_helmet") .func_111206_d("cp_helmet"); CPChestPlate = (ItemArmor) (new ItemArmorCP(ItemID + 12, CPA, proxy.addArmor(CPA.name()), 1)) .setUnlocalizedName("cp_chestplate") .func_111206_d("cp_chestplate"); // CPChestPlateWW = (ItemArmor)(new ItemArmorCP(ItemID + 15, CPA, proxy.addArmor(CPA.name()), // 1)).setUnlocalizedName("cp_chestplate").func_111206_d("cp_chestplate"); CPLeggings = (ItemArmor) (new ItemArmorCP(ItemID + 13, CPA, proxy.addArmor(CPA.name()), 2)) .setUnlocalizedName("cp_leggings") .func_111206_d("cp_leggings"); CPBoots = (ItemArmor) (new ItemArmorCP(ItemID + 14, CPA, proxy.addArmor(CPA.name()), 3)) .setUnlocalizedName("cp_boots") .func_111206_d("cp_boots"); CPSword = new ItemSwordCP(ItemID + 16, CP).setUnlocalizedName("cp_sword"); CSoulPart = new ItemMEC(ItemID + 18).setUnlocalizedName("csp"); PSoulPart = new ItemMEC(ItemID + 19).setUnlocalizedName("psp"); CWSoulPart = new ItemMEC(ItemID + 20).setUnlocalizedName("cwsp"); ESoulPart = new ItemMEC(ItemID + 21).setUnlocalizedName("esp"); ZSoulPart = new ItemMEC(ItemID + 22).setUnlocalizedName("zsp"); CRSoulPart = new ItemMEC(ItemID + 23).setUnlocalizedName("crsp"); SSoulPart = new ItemMEC(ItemID + 24).setUnlocalizedName("ssp"); HSoulPart = new ItemMEC(ItemID + 25).setUnlocalizedName("hsp"); GameRegistry.registerItem(CSoulPart, "Chicken Soul Part"); GameRegistry.registerItem(PSoulPart, "Pig Soul Part"); GameRegistry.registerItem(CWSoulPart, "Cow Soul Part"); GameRegistry.registerItem(ESoulPart, "Enderman Soul Part"); GameRegistry.registerItem(ZSoulPart, "Zombie Soul Part"); GameRegistry.registerItem(CRSoulPart, "Creeper Soul Part"); GameRegistry.registerItem(SSoulPart, "Spider Soul Part"); GameRegistry.registerItem(HSoulPart, "Horse Soul Part"); GameRegistry.registerItem(CPSword, "Corruption Sword"); GameRegistry.registerItem(CPHelmet, "Corruption Helmet"); GameRegistry.registerItem(CPChestPlate, "Corruption Chestplate"); GameRegistry.registerItem(CPLeggings, "Corruption Leggings"); GameRegistry.registerItem(CPBoots, "Corruption Boots"); GameRegistry.registerItem(IronPlate, "Iron Plate"); GameRegistry.registerItem(GoldPlate, "Gold Plate"); GameRegistry.registerItem(CopperPlate, "Copper Plate"); GameRegistry.registerItem(SteelPlate, "Steel Plate"); GameRegistry.registerItem(CopperIngot, "Copper Ingot"); GameRegistry.registerItem(SteelIngot, "Steel Ingot"); GameRegistry.registerItem(Heart, "Innocent Heart"); GameRegistry.registerItem(GHeart, "Guilty Heart"); GameRegistry.registerItem(MECWrench, "MEC Wrench"); GameRegistry.registerItem(MECBucket, "Pressure Machine Fuel"); GameRegistry.registerItem(Batery, "Battery"); GameRegistry.registerItem(IBatery, "Infinite Battery"); GameRegistry.registerPickupHandler(new PickupHandler()); GameRegistry.registerCraftingHandler(new CraftingHandler()); LanguageRegistry.addName(CSoulPart, "\u00A7c" + "Chicken Soul Part"); LanguageRegistry.addName(PSoulPart, "\u00A7c" + "Pig Soul Part"); LanguageRegistry.addName(CWSoulPart, "\u00A7c" + "Cow Soul Part"); LanguageRegistry.addName(ESoulPart, "\u00A7c" + "Enderman Soul Part"); LanguageRegistry.addName(ZSoulPart, "\u00A7c" + "Zombie Soul Part"); LanguageRegistry.addName(CRSoulPart, "\u00A7c" + "Creeper Soul Part"); LanguageRegistry.addName(SSoulPart, "\u00A7c" + "Spider Soul Part"); LanguageRegistry.addName(HSoulPart, "\u00A7c" + "Horse Soul Part"); LanguageRegistry.addName(CPSword, "\u00A7e" + "Corruption Sword"); LanguageRegistry.addName(CPHelmet, "\u00A7e" + "Corruption Helmet"); LanguageRegistry.addName(CPChestPlate, "\u00A7e" + "Corruption Chestplate"); LanguageRegistry.addName(CPLeggings, "\u00A7e" + "Corruption Leggings"); LanguageRegistry.addName(CPBoots, "\u00A7e" + "Corruption Boots"); LanguageRegistry.addName(IronPlate, "" + "Iron Plate"); LanguageRegistry.addName(GoldPlate, "Gold Plate"); LanguageRegistry.addName(CopperPlate, "Copper Plate"); LanguageRegistry.addName(SteelPlate, "Steel Plate"); LanguageRegistry.addName(CopperIngot, "Copper Ingot"); LanguageRegistry.addName(SteelIngot, "Steel Ingot"); LanguageRegistry.addName(Batery, "Battery"); LanguageRegistry.addName(IBatery, "Infinite Battery"); LanguageRegistry.instance().addStringLocalization("itemGroup.MEC", "en_US", "ME-Craft"); LanguageRegistry.addName(Heart, "Innocent Heart"); LanguageRegistry.addName(GHeart, "Guilty Heart"); LanguageRegistry.addName(MECBucket, "Pressure Machine Fuel"); LanguageRegistry.addName(MECWrench, "MEC Wrench"); GameRegistry.registerBlock(blocksolar, "Solar Generator"); GameRegistry.registerBlock(blockbat, "Battery Box"); GameRegistry.registerBlock(CPSnad, "Corruption Sand"); GameRegistry.registerBlock(CopperOre, "Copper Ore"); GameRegistry.registerBlock(Mermer, "Marble"); GameRegistry.registerBlock(KirikMermer, "Cobblemurble"); GameRegistry.registerBlock(AMermer, "Light Blue Marble"); GameRegistry.registerBlock(BMermer, "Light Gray Marble"); GameRegistry.registerBlock(CMermer, "Lime Marble"); GameRegistry.registerBlock(DMermer, "Magenta Marble"); GameRegistry.registerBlock(EMermer, "Gray Marble"); GameRegistry.registerBlock(FMermer, "Brown Marble"); GameRegistry.registerBlock(GMermer, "Red Marble"); GameRegistry.registerBlock(HMermer, "Blue Marble"); GameRegistry.registerBlock(SMermer, "Fake Marble"); GameRegistry.registerBlock(IMermer, "Purple Marble"); GameRegistry.registerBlock(JMermer, "Pink Marble"); GameRegistry.registerBlock(KMermer, "Yellow Marble"); GameRegistry.registerBlock(LMermer, "Black Marble"); GameRegistry.registerBlock(MMermer, "Cyan Marble"); GameRegistry.registerBlock(NMermer, "Orange Marble"); GameRegistry.registerBlock(OMermer, "Green Marble"); GameRegistry.registerBlock(AMermerB, "Light Blue Marble Brick"); GameRegistry.registerBlock(BMermerB, "Light Gray Marble Brick"); GameRegistry.registerBlock(CMermerB, "Lime Marble Brick"); GameRegistry.registerBlock(DMermerB, "Magenta Marble Brick"); GameRegistry.registerBlock(EMermerB, "Gray Marble Brick"); GameRegistry.registerBlock(FMermerB, "Brown Marble Brick"); GameRegistry.registerBlock(GMermerB, "Red Marble Brick"); GameRegistry.registerBlock(HMermerB, "Blue Marble Brick"); GameRegistry.registerBlock(IMermerB, "Purple Marble Brick"); GameRegistry.registerBlock(JMermerB, "Pink Marble Brick"); GameRegistry.registerBlock(KMermerB, "Yellow Marble Brick"); GameRegistry.registerBlock(LMermerB, "Black Marble Brick"); GameRegistry.registerBlock(MMermerB, "Cyan Marble Brick"); GameRegistry.registerBlock(NMermerB, "Orange Marble Brick"); GameRegistry.registerBlock(OMermerB, "Green Marble Brick"); GameRegistry.registerBlock(MermerB, "Marble Brick"); GameRegistry.registerBlock(Deneme, "Pressure Machine"); GameRegistry.registerBlock(DenemeB, "Pressure Machine Working"); ClientRegistry.bindTileEntitySpecialRenderer( TileEntityCopperWire.class, new RenderCopperWire()); ClientRegistry.bindTileEntitySpecialRenderer( TileEntitySolarGenerator.class, new RenderSolarPanel()); GameRegistry.registerTileEntity(TileEntityCopperWire.class, "Copper Cable"); GameRegistry.registerBlock(CopperCable, ItemBlockCopperWire.class, ""); proxy.registerCopperWireTileEntity(); proxy.registerSG(); proxy.registerBB(); GameRegistry.registerBlock(MECLiquid, "MECLiquid"); GameRegistry.registerBlock(MECLiquidStill, "MECLiquidStill"); GameRegistry.registerTileEntity(MECTileEntity.class, "MECTile"); NetworkRegistry.instance().registerGuiHandler(this, guihandler); LanguageRegistry.addName(blockbat, "Battery Box"); LanguageRegistry.addName(blocksolar, "Solar Generator"); LanguageRegistry.addName(MECLiquid, "MECLiquid"); LanguageRegistry.addName(MECLiquidStill, "MECLiquidStill"); LanguageRegistry.addName(KirikMermer, "CobbleMurble"); LanguageRegistry.addName(CPSnad, "Corruption Sand"); LanguageRegistry.addName(CopperOre, "Copper Ore"); LanguageRegistry.addName(Mermer, "Marble"); LanguageRegistry.addName(Deneme, "Pressure Machine"); LanguageRegistry.addName(DenemeB, "Pressure Machine"); LanguageRegistry.addName(MermerB, "Marble Brick"); LanguageRegistry.addName(SMermer, "Fake Marble"); LanguageRegistry.addName(AMermer, "Light Blue Marble"); LanguageRegistry.addName(BMermer, "Light Gray Marble"); LanguageRegistry.addName(CMermer, "Lime Marble"); LanguageRegistry.addName(DMermer, "Magenta Marble"); LanguageRegistry.addName(EMermer, "Gray Marble"); LanguageRegistry.addName(FMermer, "Brown Marble"); LanguageRegistry.addName(GMermer, "Red Marble"); LanguageRegistry.addName(HMermer, "Blue Marble"); LanguageRegistry.addName(IMermer, "Purple Marble"); LanguageRegistry.addName(JMermer, "Pink Marble"); LanguageRegistry.addName(KMermer, "Yellow Marble"); LanguageRegistry.addName(LMermer, "Black Marble"); LanguageRegistry.addName(MMermer, "Cyan Marble"); LanguageRegistry.addName(NMermer, "Orange Marble"); LanguageRegistry.addName(OMermer, "Green Marble"); LanguageRegistry.addName(AMermerB, "Light Blue Marble Brick"); LanguageRegistry.addName(BMermerB, "Light Gray Marble Brick"); LanguageRegistry.addName(CMermerB, "Lime Marble Brick"); LanguageRegistry.addName(DMermerB, "Magenta Marble Brick"); LanguageRegistry.addName(EMermerB, "Gray Marble Brick"); LanguageRegistry.addName(FMermerB, "Brown Marble Brick"); LanguageRegistry.addName(GMermerB, "Red Marble Brick"); LanguageRegistry.addName(HMermerB, "Blue Marble Brick"); LanguageRegistry.addName(IMermerB, "Purple Marble Brick"); LanguageRegistry.addName(JMermerB, "Pink Marble Brick"); LanguageRegistry.addName(KMermerB, "Yellow Marble Brick"); LanguageRegistry.addName(LMermerB, "Black Marble Brick"); LanguageRegistry.addName(MMermerB, "Cyan Marble Brick"); LanguageRegistry.addName(NMermerB, "Orange Marble Brick"); LanguageRegistry.addName(OMermerB, "Green Marble Brick"); OreDictionary.registerOre("copperWire", new ItemStack(CopperCable, 1, 0)); UniversalElectricity.isVoltageSensitive = true; UniversalElectricity.isNetworkActive = true; GameRegistry.registerTileEntity(TileEntityCoalGenerator.class, "Generator"); GameRegistry.registerTileEntity(TileEntityElectricFurnace.class, "PM"); GameRegistry.registerTileEntity(TileEntityBatteryBox.class, "BB"); GameRegistry.registerTileEntity(TileEntityEF.class, "EF"); GameRegistry.registerTileEntity(TileEntitySolarGenerator.class, "SG"); GameRegistry.registerBlock(blockMachine, ItemBlockBasicMachine.class, "Temel Machine"); OreDictionary.registerOre("generator", ((BlockBasicMachine) blockMachine).getCoalGenerator()); OreDictionary.registerOre("PM", ((BlockBasicMachine) blockMachine).getElectricFurnace()); OreDictionary.registerOre("EM", ((BlockBasicMachine) blockMachine).getAS()); OreDictionary.registerOre("SG", new ItemStack(blocksolar, 1)); LanguageRegistry.addName(blockMachine.getCoalGenerator(), "Generator"); LanguageRegistry.addName(blockMachine.getElectricFurnace(), "Electric Pressure Machine"); LanguageRegistry.addName(blockMachine.getAS(), "Electric Furnace"); LanguageRegistry.addName(CopperCable, "Copper Cable"); if (CopperCable != null) { UniversalElectricity.isNetworkActive = true; } this.addAchievementLocalizations(); LanguageRegistry.instance().addStringLocalization("achievement.Marble", "Start the Mod"); LanguageRegistry.instance() .addStringLocalization("achievement.Marble.desc", "You are starting the Mod"); LanguageRegistry.instance().addStringLocalization("achievement.Marble2", "Get The Marble"); LanguageRegistry.instance() .addStringLocalization("achievement.Marble2.desc", "You are Learning Something!"); LanguageRegistry.instance().addStringLocalization("achievement.Copper", "Find Copper"); LanguageRegistry.instance() .addStringLocalization("achievement.Copper.desc", "You found a new Ore"); LanguageRegistry.instance() .addStringLocalization("achievement.Pressure", "Make a Pressure Machine"); LanguageRegistry.instance() .addStringLocalization("achievement.Pressure.desc", "You can make awesome things!"); LanguageRegistry.instance().addStringLocalization("achievement.Heart", "Friend Slayer"); LanguageRegistry.instance() .addStringLocalization("achievement.Heart.desc", "You killed a Friend Mip"); LanguageRegistry.instance().addStringLocalization("achievement.GHeart", "Enemy Slayer"); LanguageRegistry.instance() .addStringLocalization("achievement.GHeart.desc", "You killed a Enemy Banion"); MinecraftForge.EVENT_BUS.register(new Sounds()); ModLoader.addBiome(MarbleBiome); GameRegistry.registerWorldGenerator(worldGen); GameRegistry.registerWorldGenerator(worldGenCopper); GameRegistry.registerWorldGenerator(worldGenML); // GameRegistry.registerTileEntity(TileEntityRedstoneWireBlock.class, // "TileEntityRedstoneWireBlock"); AchievementPage.registerAchievementPage(page1); GameRegistry.registerTileEntity(TileEntityHiveCore.class, "TileEntityRedstoneNetworkCore"); // GameRegistry.registerTileEntity(TileEntityRedstoneWireBlock.class, // "TileEntityRedstoneWireBlock"); // Recipes(Formuller): ModLoader.addShapelessRecipe( new ItemStack(SMermer, 2), Block.stone, new ItemStack(Item.dyePowder, 1, 15)); ModLoader.addShapelessRecipe( new ItemStack(AMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 12)); ModLoader.addShapelessRecipe( new ItemStack(BMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 7)); ModLoader.addShapelessRecipe( new ItemStack(CMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 10)); ModLoader.addShapelessRecipe( new ItemStack(DMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 13)); ModLoader.addShapelessRecipe( new ItemStack(EMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 8)); ModLoader.addShapelessRecipe( new ItemStack(FMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 3)); ModLoader.addShapelessRecipe( new ItemStack(GMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 1)); ModLoader.addShapelessRecipe( new ItemStack(HMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 4)); ModLoader.addShapelessRecipe( new ItemStack(IMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 5)); ModLoader.addShapelessRecipe( new ItemStack(JMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 9)); ModLoader.addShapelessRecipe( new ItemStack(KMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 11)); ModLoader.addShapelessRecipe( new ItemStack(LMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 0)); ModLoader.addShapelessRecipe( new ItemStack(MMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 6)); ModLoader.addShapelessRecipe( new ItemStack(NMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 14)); ModLoader.addShapelessRecipe( new ItemStack(OMermer, 2), Mermer, new ItemStack(Item.dyePowder, 1, 2)); ModLoader.addShapelessRecipe( new ItemStack(AMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 12)); ModLoader.addShapelessRecipe( new ItemStack(BMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 7)); ModLoader.addShapelessRecipe( new ItemStack(CMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 10)); ModLoader.addShapelessRecipe( new ItemStack(DMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 13)); ModLoader.addShapelessRecipe( new ItemStack(EMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 8)); ModLoader.addShapelessRecipe( new ItemStack(FMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 3)); ModLoader.addShapelessRecipe( new ItemStack(GMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 1)); ModLoader.addShapelessRecipe( new ItemStack(HMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 4)); ModLoader.addShapelessRecipe( new ItemStack(IMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 5)); ModLoader.addShapelessRecipe( new ItemStack(JMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 9)); ModLoader.addShapelessRecipe( new ItemStack(KMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 11)); ModLoader.addShapelessRecipe( new ItemStack(LMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 0)); ModLoader.addShapelessRecipe( new ItemStack(MMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 6)); ModLoader.addShapelessRecipe( new ItemStack(NMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 14)); ModLoader.addShapelessRecipe( new ItemStack(OMermer, 2), SMermer, new ItemStack(Item.dyePowder, 1, 2)); ModLoader.addRecipe(new ItemStack(MermerB, 4), "xx", "xx", 'x', Mermer); ModLoader.addRecipe(new ItemStack(MermerB, 4), "xx", "xx", 'x', SMermer); ModLoader.addRecipe(new ItemStack(AMermerB, 4), "xx", "xx", 'x', AMermer); ModLoader.addRecipe(new ItemStack(BMermerB, 4), "xx", "xx", 'x', BMermer); ModLoader.addRecipe(new ItemStack(CMermerB, 4), "xx", "xx", 'x', CMermer); ModLoader.addRecipe(new ItemStack(DMermerB, 4), "xx", "xx", 'x', DMermer); ModLoader.addRecipe(new ItemStack(EMermerB, 4), "xx", "xx", 'x', EMermer); ModLoader.addRecipe(new ItemStack(FMermerB, 4), "xx", "xx", 'x', FMermer); ModLoader.addRecipe(new ItemStack(GMermerB, 4), "xx", "xx", 'x', GMermer); ModLoader.addRecipe(new ItemStack(HMermerB, 4), "xx", "xx", 'x', HMermer); ModLoader.addRecipe(new ItemStack(IMermerB, 4), "xx", "xx", 'x', IMermer); ModLoader.addRecipe(new ItemStack(JMermerB, 4), "xx", "xx", 'x', JMermer); ModLoader.addRecipe(new ItemStack(KMermerB, 4), "xx", "xx", 'x', KMermer); ModLoader.addRecipe(new ItemStack(LMermerB, 4), "xx", "xx", 'x', LMermer); ModLoader.addRecipe(new ItemStack(MMermerB, 4), "xx", "xx", 'x', MMermer); ModLoader.addRecipe(new ItemStack(NMermerB, 4), "xx", "xx", 'x', NMermer); ModLoader.addRecipe(new ItemStack(OMermerB, 4), "xx", "xx", 'x', OMermer); ModLoader.addRecipe( new ItemStack(Deneme, 1), "xxx", "yzy", "xxx", 'x', SteelIngot, 'y', Block.pistonBase, 'z', Block.stone); ModLoader.addRecipe( new ItemStack(Batery, 1), " x ", "yzy", "yzy", 'x', CopperCable, 'y', SteelIngot, 'z', Item.redstone); ModLoader.addRecipe( new ItemStack(SteelIngot, 1), " x ", "xyx", " x ", 'x', Item.coal, 'y', Item.ingotIron); ModLoader.addSmelting(CopperOre.blockID, new ItemStack(CopperIngot, 1), 2.0f); ModLoader.addShapelessRecipe(new ItemStack(SteelIngot, 2), Item.ingotIron, CopperIngot); TickRegistry.registerTickHandler(new TickHandler(), Side.SERVER); } private void addAchievementName(String ach, String name) { LanguageRegistry.instance().addStringLocalization("achievement." + ach, "en_US", name); } private void addAchievementDesc(String ach, String desc) { LanguageRegistry.instance() .addStringLocalization("achievement." + ach + ".desc", "en_US", desc); } public void addAchievementLocalizations() { this.addAchievementName("Marble", "Start the Mod"); this.addAchievementDesc("Marble", "You are starting the Mod"); this.addAchievementName("Marble2", "Get The Marble"); this.addAchievementDesc("Marble2", "You are Learning Something!"); this.addAchievementName("Copper", "Find Copper"); this.addAchievementDesc("Copper", "You found a new Ore"); this.addAchievementName("Pressure", "Make A Pressure Machine"); this.addAchievementDesc("Pressure", "You can make awesome things!"); this.addAchievementName("Heart", "Friend Killer"); this.addAchievementDesc("Heart", "You killed a Friend Mip"); this.addAchievementName("GHeart", "Enemy Killer"); this.addAchievementDesc("GHeart", "You killed a Enemy Banion"); } public void ArmorHUD() {} public static Object getFirstDependant() { if (bcDependants.size() > 0) { return bcDependants.get(0); } return null; } }
@Mod(modid = "WarpCraft", name = "WarpCraft", version = "Version 2.0 [MC 1.4.2]") @NetworkMod( channels = {"WarpCraft"}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) public class WarpCraft { @Instance("WarpCraft") public static WarpCraft instance; @SidedProxy( clientSide = "warpcraft.client.handlers.ClientProxy", serverSide = "warpcraft.common.handlers.CommonProxy") public static CommonProxy proxy; // Dimension // Blocks public static EventSounds soundHandler = new EventSounds(); public static GuiHandler guiHandler = new GuiHandler(); public static ItemHandler itemHandler = new ItemHandler(null); public static WorldProviderWarp WarpProvider = new WorldProviderWarp(); static EnumToolMaterial EnumToolMaterialWARP1 = EnumHelper.addToolMaterial("WARP1", 7, 2500, 30.0F, 10, 25); static EnumToolMaterial EnumToolMaterialWARP = EnumHelper.addToolMaterial("WARP2", 3, 4000, 8.0F, 25, 10); static EnumArmorMaterial EnumArmorMaterialCRYSTALITE = EnumHelper.addArmorMaterial("CRYSTALITE", 35, new int[] {4, 9, 7, 6}, 15); public static CreativeTabs warpTabBlocks = new WarpTabBlocks("warpTabBlocks"); public static CreativeTabs warpTabItems = new WarpTabItems("warpTabItems"); // Config Values // DIM public static int DIM; public static int BIOME; public static int SKY_COLOUR; public static int VSSuit1; public static int VSSuit2; // Achievements public static int Achievement1; public static int Achievement2; public static int Achievement3; private Object worldObj; private static final int WorldProviderWarp = DIM; @PreInit public void preInit(FMLPreInitializationEvent event) { WCConfig.preInit(event); WCMCMod.preInit(event); WCBlockIDs.init(); WCItemIDs.init(); WCRecipes.init(); WCAchievements.init(); MinecraftForge.EVENT_BUS.register(new EventSounds()); MinecraftForge.EVENT_BUS.register(new EventHookHandler()); NetworkRegistry.instance().registerGuiHandler(this, guiHandler); GameRegistry.registerPickupHandler(itemHandler); DimensionManager.registerProviderType(DIM, WorldProviderWarp.class, true); DimensionManager.registerDimension(DIM, DIM); } @Init public void init(FMLInitializationEvent evt) { WCLanguage.init(evt); GameRegistry.registerTileEntity(TileEntityWarpInfuser.class, "Infuser"); // Ore Generation GameRegistry.registerWorldGenerator(new WorldGeneratorWarpCraft()); // Register Rendering Information proxy.registerRenderInformation(); proxy.registerEntityInformation(); // Register Dimension EntityRegistry.addSpawn( EntityRat.class, 5, 2, 3, EnumCreatureType.monster, WCBiomeGenBase.warp); EntityRegistry.addSpawn( EntitySquig.class, 2, 1, 2, EnumCreatureType.monster, WCBiomeGenBase.warp); // stuff TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT); } @PostInit public void postInit(FMLPostInitializationEvent evt) { // TODO: Add Post-Initialization code such as mod hooks } }