Hey man, long time no see! You might not remember me, but I remember you Anyways, this is looking nice so far! I was actually thinking of starting my own tutorials, too. Only thing I'd change about this right now, would be to add a tutorial for setting up your environment (MCP, Eclipse, Java, etc.). I mean, I know how to do all those things, but I suppose this is kind of for more advanced users
Hey man, long time no see! You might not remember me, but I remember you Anyways, this is looking nice so far! I was actually thinking of starting my own tutorials, too. Only thing I'd change about this right now, would be to add a tutorial for setting up your environment (MCP, Eclipse, Java, etc.). I mean, I know how to do all those things, but I suppose this is kind of for more advanced users
Glad you like them! And The only reason I wont do an environment setup tutorial is because it would be different from mac to PC, program to program, etc., where with code tutorials they are always the same.
I am unable to use the function 92014 but must instead use the function 92058.My problem lies in the fact that it isn't used in the same way that the 92014 function is used.How would I go about using this function instead?Thanks for the help in advance.
public class ERPGMPickupHandler implements IPickupNotifier
{
@Override
public void notifyPickup(EntityItem item, EntityPlayer player)
{
if(item.func_92058_a(null).itemID == Mod_main.Voidessence.itemID)
{
player.addStat(Mod_main.Newbeginning, 1);
}
if(item.func_92058_a(null).itemID == Mod_main.Chaosdust.itemID)
{
player.addStat(Mod_main.Chaosstarts, 1);
}
}
}
Not quite sure I haven't really looked at it. I'll update this tutorial though as soon as 1.5 comes out, so all of the issues people are having will be fixed.
All tutorials updated for 1.5.2 It's summer break for me now so I'm getting everything updated.
Lucky *******. I can't wait for MY summer break... (end of June) Then I can finally update all my mods to 1.5.2 XD And in addition, I can finally remake my backup mod, and develop a massive achievments mod I've been working on for quite a while Anyways, I'm glad these are still going, I always like looking at a few tutorials to see if someone does something differently from how I do it, and I like to see if it's better or not
Lucky *******. I can't wait for MY summer break... (end of June) Then I can finally update all my mods to 1.5.2 XD And in addition, I can finally remake my backup mod, and develop a massive achievments mod I've been working on for quite a while Anyways, I'm glad these are still going, I always like looking at a few tutorials to see if someone does something differently from how I do it, and I like to see if it's better or not
Great tutorials! I like text tutorials because then I can go at my own pace and don't have to stop a video every time I write something. I haven't tried these out but based on the comments it looks good! Might try it soon.
Great tutorials! I like text tutorials because then I can go at my own pace and don't have to stop a video every time I write something. I haven't tried these out but based on the comments it looks good! Might try it soon.
Well, a few requests for tutorials:
- Items (For example, Coal)
- Crafting Recipes
- Furnace Recipes
- Food
- Crops (This could somehow go in the food tutorial)
- Adding to the block tutorial, Ore generation.
- Also if you could also add Nether Ore generation.
I'll edit this if I think of any more.
Well, a few requests for tutorials:
- Items (For example, Coal)
- Crafting Recipes
- Furnace Recipes
- Food
- Crops (This could somehow go in the food tutorial)
- Adding to the block tutorial, Ore generation.
- Also if you could also add Nether Ore generation.
I'll edit this if I think of any more.
@Mod(modid = Base_Upgrades.modid, name = "Upgrades Mod", version = "1.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Base_Upgrades {
public static final String modid = "mod_upgrades";
//Blocks
public static Block UpgemOre;
//Items
public static Item Upgem;
public static Item UpgemMix;
public static Item BottledUpgemConcentrate;
public static Item UpgemMetal;
public static Item UpFuel;
public static Item UpDiamond;
public static Item UpDiamondPick;
public static Item UpDiamondHoe;
public static Item UpDiamondAxe;
public static Item UpDiamondSword;
public static Item UpDiamondSpade;
//Achievements and Achievement Pages
public static Achievement UpgemGet;
public static Achievement UpMetalMake;
public static AchievementPage UpgradesPage;
//Creative Tab(s)
public static CreativeTabs UpgradesTab = new CreativeTabs("tGM_UpgradesTab"){
public ItemStack getIconItemStack(){
return new ItemStack(Upgem);
}
};
@EventHandler
public void load(FMLInitializationEvent event){
/*Fills in information for achievements
* Only put here to load in Custom Icons
*/
UpgemGet = (new Achievement(300, "upgemGet", 0, 0, Upgem, (Achievement)null)).setIndependent().registerAchievement().setSpecial();
UpMetalMake = (new Achievement(301, "upmetalMake", 2, 0, UpgemMetal, UpgemGet)).registerAchievement();
UpgradesPage = new AchievementPage("Upgrades", UpgemGet, UpMetalMake);
AchievementPage.registerAchievementPage(UpgradesPage);
public void addAchievementLocalizations(){
addAchievementName("upmetalMake", "Oooh Shiny");
addAchievementDescription("upmetalMake", "Craft an Upgem Metal");
addAchievementName("upgemGet", "New Beginnings");
addAchievementDescription("upgemGet", "Harvest an Upgem");
}
Send me your code
Here it is:
But you mainly need to focus on this part:
Achievement pages will glitch up if you only have one achievement. It's weird, I know, but unfortunately it happens.
Glad you like them! And The only reason I wont do an environment setup tutorial is because it would be different from mac to PC, program to program, etc., where with code tutorials they are always the same.
Not quite sure I haven't really looked at it. I'll update this tutorial though as soon as 1.5 comes out, so all of the issues people are having will be fixed.
Lucky *******. I can't wait for MY summer break... (end of June) Then I can finally update all my mods to 1.5.2 XD And in addition, I can finally remake my backup mod, and develop a massive achievments mod I've been working on for quite a while Anyways, I'm glad these are still going, I always like looking at a few tutorials to see if someone does something differently from how I do it, and I like to see if it's better or not
Glad someone noticed I'm still around
Glad you like em! Any requests for other things?
Sorry I don't do vehicles
- Items (For example, Coal)
- Crafting Recipes
- Furnace Recipes
- Food
- Crops (This could somehow go in the food tutorial)
- Adding to the block tutorial, Ore generation.
- Also if you could also add Nether Ore generation.
I'll edit this if I think of any more.
I'll get to work on some of these soon
I'll try to do that one today because a lot of people are probably having trouble with that
Okay, thanks.
Working on updating insta house right now, but tutorial work will be right after that!
Okay good...
Here's my Main Class Code:
package mod_Upgrades.common;
import net.minecraft.block.Block;
import net.minecraft.block.StepSound;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = Base_Upgrades.modid, name = "Upgrades Mod", version = "1.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Base_Upgrades {
public static final String modid = "mod_upgrades";
//Blocks
public static Block UpgemOre;
//Items
public static Item Upgem;
public static Item UpgemMix;
public static Item BottledUpgemConcentrate;
public static Item UpgemMetal;
public static Item UpFuel;
public static Item UpDiamond;
public static Item UpDiamondPick;
public static Item UpDiamondHoe;
public static Item UpDiamondAxe;
public static Item UpDiamondSword;
public static Item UpDiamondSpade;
//Achievements and Achievement Pages
public static Achievement UpgemGet;
public static Achievement UpMetalMake;
public static AchievementPage UpgradesPage;
//Tool Materials
public static EnumToolMaterial UPDIAMOND = EnumHelper.addToolMaterial("UPDIAMOND", 3, 3122, 16.0F, 6.0F, 20);
//Creative Tab(s)
public static CreativeTabs UpgradesTab = new CreativeTabs("tGM_UpgradesTab"){
public ItemStack getIconItemStack(){
return new ItemStack(Upgem);
}
};
@EventHandler
public void load(FMLInitializationEvent event){
//Upgem Ore
UpgemOre = new UpgemOre(550, "upgemOre").setUnlocalizedName("upgemOre").setCreativeTab(UpgradesTab).setHardness(1.0F).setResistance(3.5F).setStepSound(Block.soundStoneFootstep);
registerBlock(UpgemOre, "Upgem Ore", UpgemOre.getUnlocalizedName());
//Upgem
Upgem = new Upgem(1000, "upgem").setCreativeTab(UpgradesTab).setUnlocalizedName("upgem");
registerItem(Upgem, "Upgem", Upgem.getUnlocalizedName());
//Upgem Mix
UpgemMix = new UpgemMix(1001, "upgem_mix").setCreativeTab(UpgradesTab).setUnlocalizedName("upgem_mix");
registerItem(UpgemMix, "Upgem Mix", UpgemMix.getUnlocalizedName());
//Bottled Upgem Concentrate
BottledUpgemConcentrate = new BottledUpgemConcentrate(1002, "upgem_bottle").setCreativeTab(UpgradesTab).setUnlocalizedName("upgem_bottle");
registerItem(BottledUpgemConcentrate, "Bottled Upgem Concentrate", BottledUpgemConcentrate.getUnlocalizedName());
//Upgem Metal
UpgemMetal = new UpgemMetal(1003, "upgem_metal").setCreativeTab(UpgradesTab).setUnlocalizedName("upgem_metal");
registerItem(UpgemMetal, "Upgem Metal", UpgemMetal.getUnlocalizedName());
//Upgraded Fuel
UpFuel = new UpgradedFuel(1004, "upfuel").setUnlocalizedName("upfuel").setCreativeTab(UpgradesTab);
registerItem(UpFuel, "Upgraded Fuel", UpFuel.getUnlocalizedName());
//Upgraded Diamond
UpDiamond = new UpgradedDiamond(1005, "updiamond").setUnlocalizedName("updiamond").setCreativeTab(UpgradesTab);
registerItem(UpDiamond, "Upgraded Diamond", UpDiamond.getUnlocalizedName());
//Upgraded Diamond Pickaxe
UpDiamondPick = new UpDiamondPick(1006, UPDIAMOND, "updiamondpick").setUnlocalizedName("updiamondpick").setCreativeTab(UpgradesTab);
registerItem(UpDiamondPick, "Upgraded Diamond Pickaxe", UpDiamondPick.getUnlocalizedName());
//Upgraded Diamond Sword
UpDiamondSword = new UpDiamondSword(1007, UPDIAMOND, "updiamondsword").setUnlocalizedName("updiamondsword").setCreativeTab(UpgradesTab);
registerItem(UpDiamondSword, "Upgraded Diamond Sword", UpDiamondSword.getUnlocalizedName());
//Upgraded Diamond Axe
UpDiamondAxe = new UpDiamondAxe(1008, UPDIAMOND, "updiamondaxe").setUnlocalizedName("updiamondaxe").setCreativeTab(UpgradesTab);
registerItem(UpDiamondAxe, "Upgraded Diamond Axe", UpDiamondAxe.getUnlocalizedName());
//Upgraded Diamond Hoe
UpDiamondHoe = new UpDiamondHoe(1009, UPDIAMOND, "updiamondhoe").setUnlocalizedName("updiamondhoe").setCreativeTab(UpgradesTab);
registerItem(UpDiamondHoe, "Upgraded Diamond Hoe", UpDiamondHoe.getUnlocalizedName());
//Upgraded Diamond Shovel
UpDiamondSpade = new UpDiamondSpade(1010, UPDIAMOND, "updiamondspade").setUnlocalizedName("updiamondspade").setCreativeTab(UpgradesTab);
registerItem(UpDiamondSpade, "Upgraded Diamond Shovel", UpDiamondSpade.getUnlocalizedName());
//Adds Achievements
addAchievementLocalizations();
//Calls the recipes to be loaded
craftingRecipes();
smeltingRecipes();
//Registers Mod World Generator
GameRegistry.registerWorldGenerator(new WorldGeneratorUpgrades());
//Registers tool specifically
MinecraftForge.setToolClass(UpDiamondPick, "pickaxe", 3);
//Names Creative Tabs
LanguageRegistry.instance().addStringLocalization("itemGroup.tGM_UpgradesTab", "Upgrades");
/*Fills in information for achievements
* Only put here to load in Custom Icons
*/
UpgemGet = (new Achievement(300, "upgemGet", 0, 0, Upgem, (Achievement)null)).setIndependent().registerAchievement().setSpecial();
UpMetalMake = (new Achievement(301, "upmetalMake", 2, 0, UpgemMetal, UpgemGet)).registerAchievement();
UpgradesPage = new AchievementPage("Upgrades", UpgemGet, UpMetalMake);
AchievementPage.registerAchievementPage(UpgradesPage);
//Registers Handlers
GameRegistry.registerCraftingHandler(new UpgradesCraftingHandler());
GameRegistry.registerPickupHandler(new UpgradesPickupHandler());
GameRegistry.registerFuelHandler(new UpgradesFuelHandler());
}
public void addAchievementLocalizations(){
addAchievementName("upmetalMake", "Oooh Shiny");
addAchievementDescription("upmetalMake", "Craft an Upgem Metal");
addAchievementName("upgemGet", "New Beginnings");
addAchievementDescription("upgemGet", "Harvest an Upgem");
}
public void addAchievementDescription(String par1String, String par2String){
LanguageRegistry.instance().addStringLocalization("achievement." + par1String + ".desc", "en_US", par2String);
}
public void addAchievementName(String par1String, String par2String) {
LanguageRegistry.instance().addStringLocalization("achievement." + par1String, "en_US", par2String);
}
//registers recipes
private static void craftingRecipes(){
//Upgem Mix Recipe
GameRegistry.addRecipe(new ItemStack(UpgemMix, 1), new Object[]{
"SUS", " S ",
'S', Block.sand,
'U', Upgem
});
//Upgraded Fuel
GameRegistry.addRecipe(new ItemStack(UpFuel, 1), new Object[]{
" U ", "MCM", " U ",
'M', UpgemMetal,
'U', Upgem,
'C', Item.coal
});
//Upgraded Fuel
GameRegistry.addRecipe(new ItemStack(UpFuel, 1), new Object[]{
" U ", "MCM", " U ",
'M', UpgemMetal,
'U', Upgem,
'C', new ItemStack(Item.coal, 1, 1)
});
//Upgem Metal Recipe
GameRegistry.addRecipe(new ItemStack(UpgemMetal, 1), new Object[]{
"III", "IBI", "III",
'I', Item.ingotIron,
'B', BottledUpgemConcentrate
});
//Upgraded Diamond Recipe
GameRegistry.addRecipe(new ItemStack(UpDiamond, 1), new Object[]{
"MUM", "MDM", "MUM",
'M', UpgemMetal,
'U', Upgem,
'D', Item.diamond
});
//Upgraded Diamond Pickaxe Recipe
GameRegistry.addRecipe(new ItemStack(UpDiamondPick, 1), new Object[]{
"UUU", " S ", " S ",
'U', UpDiamond,
'S', Item.stick
});
}
//registers smelting
private static void smeltingRecipes(){
GameRegistry.addSmelting(UpgemMix.itemID, new ItemStack(BottledUpgemConcentrate, 2), 0F);
}
//Lets you register blocks easily
public static void registerBlock(Block block, String name, String unlocalizedName){
GameRegistry.registerBlock(block, Base_Upgrades.modid + unlocalizedName);
LanguageRegistry.addName(block, name);
}
//Lets you register items easily
public static void registerItem(Item item, String name, String unlocalizedName){
GameRegistry.registerItem(item, Base_Upgrades.modid + unlocalizedName);
LanguageRegistry.addName(item, name);
}
}
And the PickupHandler:
package mod_Upgrades.common;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import cpw.mods.fml.common.IPickupNotifier;
public class UpgradesPickupHandler implements IPickupNotifier{
public void notifyPickup(EntityItem item, EntityPlayer player) {
if(item.getEntityItem().itemID == Base_Upgrades.Upgem.itemID){
player.addStat(Base_Upgrades.UpgemGet, 1);
}
}
}