These tutorials are the best! I've learned a ton from them and can't wait to try them out! I was wondering if you could do the tutorial on trees and also crops like wheat. I've seen some tree tuts, but they don't really explain a lot and you do a great job at that. And all the tree tutorials make basic trees I wana learn how to make em super tall etc.
so ive een a sub of yours for a few weeks for this series, and ive been searching around for tutorials on how to make generations, like trees, villages, and stuff like that but i cant find one! At least not one that actually makes sense, so could you maybe make one on this since your tutorials are so awesome!?!?
I just don't seem to be able to get my mob to be shown holding an item.
public class EntityEternalSlave extends EntityMob
{
public EntityEternalSlave(World world)
{
super(world);
texture = "/slave.png";
moveSpeed = 1.5F;
attackStrength = 3;
}
public int getMaxHealth()
{
return 2;
}
protected String getLivingSound()
{
return "mob.ghast.moan";
}
protected String getHurtSound()
{
return "mob.zombiehurt";
}
protected int getDropItemId()
{
return Item.glassBottle.shiftedIndex;
}
protected void dropFewItems(boolean flag, int i)
{
int j = rand.nextInt(2) + rand.nextInt(1 + i);
for(int k = 0; k < j; k++)
{
dropItem(Item.appleRed.shiftedIndex, 1);
}
j = rand.nextInt(3) + rand.nextInt(1 + i);
for(int l = 0; l < j; l++)
{
dropItem(Item.cookie.shiftedIndex, 1);
}
j = rand.nextInt(3) + rand.nextInt(1 + i);
for(int l = 0; l < j; l++)
{
dropItem(Item.gunpowder.shiftedIndex, 1);
}
j = rand.nextInt(3) + rand.nextInt(1 + i);
for(int l = 0; l < j; l++)
{
dropItem(Item.ingotIron.shiftedIndex, 1);
}
}
public ItemStack getHeldItem()
{
return heldItem;
}
public static final ItemStack heldItem = new ItemStack(Item.swordGold, 1);
}
I was also wondering if you could do a litle exploration on using different existing render types for created mobs. I tried to create a replica of a skeleton that drops a special item using the methods below, and while I got skeleton behavior, the texture or model got screwed up and it ended up looking like a regular skeleton-textured biped (and without a held bow for that matter).
I have been following your tutorials for about a week now, and I was wondering if you could make a tutorial about making a mod with a config to change id's of blocks and items. That would help so much
Thank you for making these videos, they have helped me so much
EDIT: I was thinking of a crossbow type weapon that when you right click, it would remove the crossbow from your inventory, replacing it with a loaded crossbow, consuming you ammo/arrows, then when you right click with the loaded crossbow, it would fire the arrow, and simultaneously remove the loaded crossbow, switching it back the unloaded crossbow. Could you do a tutorial on how to code that if you know how to? I am hoping to add that to a mod I am making.
... Well, I would have to say its a little bit pointless (for me anyway) because I think most people who don't know how to mod know no java what so ever :\
I learned some java purely from watching the videos, as he does explain each thing as best he can
I have been following your tutorials for about a week now, and I was wondering if you could make a tutorial about making a mod with a config to change id's of blocks and items. That would help so much
Thank you for making these videos, they have helped me so much
EDIT: I was thinking of a crossbow type weapon that when you right click, it would remove the crossbow from your inventory, replacing it with a loaded crossbow, consuming you ammo/arrows, then when you right click with the loaded crossbow, it would fire the arrow, and simultaneously remove the loaded crossbow, switching it back the unloaded crossbow. Could you do a tutorial on how to code that if you know how to? I am hoping to add that to a mod I am making.
That is a pretty cool idea, I might do that tonight as I just got home and I already know how to do that :ohmy.gif:, you'll probably see this tonight.
I learned some java purely from watching the videos, as he does explain each thing as best he can
I was thinking of doing Java tutorials to help out with all the modding stuff, but I want to move my channel towards a gaming channel and don't really want to venture out into the How-To's too much, Minecraft Modding is about as far as I'll go lol.
That is a pretty cool idea, I might do that tonight as I just got home and I already know how to do that :ohmy.gif:, you'll probably see this tonight.
I look forward to it :laugh.gif:
Quote from x2robbie2x »
I was thinking of doing Java tutorials to help out with all the modding stuff, but I want to move my channel towards a gaming channel and don't really want to venture out into the How-To's too much, Minecraft Modding is about as far as I'll go lol.
To be honest, I think I learn more from Minecraft modding than I would from generic Java tutorials, as Minecraft is something I like, and I generally learn more about things when they are intertwined/linked with things I like, such as games.
To be honest, I think I learn more from Minecraft modding than I would from generic Java tutorials, as Minecraft is something I like, and I generally learn more about things when they are intertwined/linked with things I like, such as games.
Well I was going to incorporate the Java tutorials with Minecraft Modding, kind of targetting what I teach to explain the things you see in the Minecraft classes. A lot of the errors from people that I see come from simple wrong code placement, and I don't think some people understand what I mean when I say "method" or "class" or etc, some programming terms. I'd like to do it just to eliminate most of the errors that are coming up.
Great tutorials! They are a big help. Any chance that you could do a tutorial on ore generation in the Nether? It seems to be different from the generatesurface method.
After watching (and following) your transforming items into new items video, I get this error:
--- BEGIN ERROR REPORT 141ccf11 --------
Generated 20/12/11 8:56 PM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel(R) HD Graphics Family version 3.0.0 - Build 8.15.10.2291, Intel
java.lang.ExceptionInInitializerError
at net.minecraft.src.mod_Weapons.<clinit>(mod_Weapons.java:8)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ItemStack.<init>(ItemStack.java:41)
at net.minecraft.src.ItemCrossbow.<clinit>(ItemCrossbow.java:5)
... 16 more
--- END ERROR REPORT 411eea76 ----------
It's a tutorial on how to make new materials without editing the bu.class (EnumToolToolMaterial.java. Would you be able to review it and make a 1.0.0 version of this in a tutorial? I'm going to try to understand this and turn it into a 1.0.0 version myself, but I'll likely need your help. I think this was either 1.7 or 1.8.
Also, could you link thenewboston's java playlist for people who want to learn mods, but don't know any Java? I think Bucky does some of the best programming tutorials I've seen on YouTube.
It's a tutorial on how to make new materials without editing the bu.class (EnumToolToolMaterial.java. Would you be able to review it and make a 1.0.0 version of this in a tutorial? I'm going to try to understand this and turn it into a 1.0.0 version myself, but I'll likely need your help. I think this was either 1.7 or 1.8.
He is planning on making a tutorial on making materials without editing EnumToolMaterial (well, similar)
He is planning on making a tutorial on making materials without editing EnumToolMaterial (well, similar)
I didn't see that, I haven't read all of the posts, but I saw on one video that he didn't know how to do it. I'm actually trying to figure it out myself, but I'm not doing such a good job.
After watching (and following) your transforming items into new items video, I get this error:
--- BEGIN ERROR REPORT 141ccf11 --------
Generated 20/12/11 8:56 PM
Minecraft: Minecraft 1.0.0
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel(R) HD Graphics Family version 3.0.0 - Build 8.15.10.2291, Intel
java.lang.ExceptionInInitializerError
at net.minecraft.src.mod_Weapons.<clinit>(mod_Weapons.java:8)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:265)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1214)
at net.minecraft.src.ModLoader.init(ModLoader.java:733)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:162)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:104)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:42)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:314)
at net.minecraft.client.Minecraft.run(Minecraft.java:613)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ItemStack.<init>(ItemStack.java:41)
at net.minecraft.src.ItemCrossbow.<clinit>(ItemCrossbow.java:5)
... 16 more
--- END ERROR REPORT 411eea76 ----------
I'm not entirely sure what it's telling me
You got the same error as me, I suggest doing what I did in the tutorial at the end and instead of making a class variable ItemStack namehere = new ItemStack(blah blah, 1), delete that line of code and in the return statement in the RightClick method type
return new ItemStack(mod_blockium.blockiumCrossbow);
Of course replacing the "mod_blockium.blockiumCrossbow" with your own item.
It's a tutorial on how to make new materials without editing the bu.class (EnumToolToolMaterial.java. Would you be able to review it and make a 1.0.0 version of this in a tutorial? I'm going to try to understand this and turn it into a 1.0.0 version myself, but I'll likely need your help. I think this was either 1.7 or 1.8.
Also, could you link thenewboston's java playlist for people who want to learn mods, but don't know any Java? I think Bucky does some of the best programming tutorials I've seen on YouTube.
I have known how to make custom Enums for a while now, the problem is that even when you create a custom one, and have two different ones, the ID's of the two new custom Enum classes will clash, causing an error. I'm trying to figure out how to make a new one, but so it's also compatible with other mods. The one in that tutorial does absolutely nothing for compatibility, it simply makes a class similar to the old one, and does the same thing as you could of done in the original class. If you make two classes and your two custom "metals" both have an ID of 8 for example, it's just going to give you an error.
And yeah I love thenewboston, his tutorials taught me all about UDK. Beginner Java tutorials wouldn't explain much in the context of Minecraft though, since most of the classes use interfaces, aggregation, composition, etc. I didn't learn about that stuff in detail until second year programming. The beginner tutorials are more about the basics, user input/output, math algorithms, simple arrays, simple classes, and simple data types. Almost none of those can really be applied to Minecraft, so I wouldn't suggest learning first year Java if your only intent is modding. If you actually want to learn how to program, go right ahead.
ive followed your tuts and i get no recompileing errors and my ore doesnot show up in the world ive changed how common it is and were it can be found
package net.minecraft.src;
import java.util.Random;
public class Mod_Crystalite extends BaseMod
{
public static final Block CrystaliteBlock = new BlockCrystalite(201,0).setHardness(1F).setLightValue(1.0F).setBlockName("Crystalite Block");
public static final Item CrystaliteIngot = new ItemCrystaliteIngot(602).setItemName("Crystalite Ingot");
public static final Item CrystalitePickaxe = new ItemPickaxe(603, EnumToolMaterial.Crystalite).setItemName("Crystalite Pick");
public static final Item CrystaliteAxe = new ItemAxe(604, EnumToolMaterial.Crystalite).setItemName("Crystalite Axe");
public static final Item CrystaliteSword = new ItemSword(605, EnumToolMaterial.Crystalite).setItemName("Crystalite Sword");
public static final Item CrystaliteShovel = new ItemSpade(606, EnumToolMaterial.Crystalite).setItemName("Crystalite Shovel");
public static final Item CrystaliteHoe = new ItemHoe(607, EnumToolMaterial.Crystalite).setItemName("Crystalite");
public static final Item CrystaliteHelmet = new ItemArmor(608, EnumArmorMaterial.Crystalite, ModLoader.AddArmor("Crystalite"), 0).setItemName("Crystalite Helmet");
public static final Item CrystaliteChest = new ItemArmor(609, EnumArmorMaterial.Crystalite, ModLoader.AddArmor("Crystalite"), 1).setItemName("Crystalite Chest");
public static final Item CrystaliteLegs = new ItemArmor(610, EnumArmorMaterial.Crystalite, ModLoader.AddArmor("Crystalite"), 2).setItemName("CrystaliteLegs");
public static final Item CrystaliteBoots = new ItemArmor(611, EnumArmorMaterial.Crystalite, ModLoader.AddArmor("Crystalite"), 3).setItemName("Crystalite Boots");
public Mod_Crystalite()
{
//Block
ModLoader.RegisterBlock(CrystaliteBlock);
ModLoader.AddName(CrystaliteBlock, "Crystalite Ore");
CrystaliteBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Crystalite.png");
//Ingot
ModLoader.AddName(CrystaliteIngot, "Crystalite Ingot");
CrystaliteIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteIngot.png");
ModLoader.AddSmelting(Mod_Crystalite.CrystaliteBlock.blockID, new ItemStack(Mod_Crystalite.CrystaliteIngot, 1));
//Pickaxe
ModLoader.AddName(CrystalitePickaxe, "Crystalite Pickaxe");
CrystalitePickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystalitePickaxe.png");
ModLoader.AddRecipe(new ItemStack(CrystalitePickaxe, 1) , new Object[]{
"###", " X ", " X ", Character.valueOf('#'), CrystaliteIngot, Character.valueOf('X'), Item.stick
});
//Axe
ModLoader.AddName(CrystaliteAxe, "Crystalite Axe");
CrystaliteAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteAxe.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteAxe, 1) , new Object[]{
"## ", "#X ", " X ", Character.valueOf('#'), CrystaliteIngot, Character.valueOf('X'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(CrystaliteAxe, 1) , new Object[]{
" ##", " X#", " X ", Character.valueOf('#'), CrystaliteIngot, Character.valueOf('X'), Item.stick
});
//Sword
ModLoader.AddName(CrystaliteSword, "Crystalite Sword");
CrystaliteSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteSword.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteSword, 1) , new Object[]{
" # ", " # ", " X ", Character.valueOf('#'), CrystaliteIngot, Character.valueOf('X'), Item.stick
});
//Shovel
ModLoader.AddName(CrystaliteShovel, "Crystalite Shovel");
CrystaliteShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteShovel.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteShovel, 1) , new Object[]{
" # ", " X ", " X ", Character.valueOf('#'), CrystaliteIngot, Character.valueOf('X'), Item.stick
});
//Hoe
ModLoader.AddName(CrystaliteHoe, "Crystalite Hoe");
CrystaliteHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteHoe.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteHoe, 1) , new Object[]{
"## ", " X ", " X ", Character.valueOf('#'), CrystaliteIngot, Character.valueOf('X'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(CrystaliteHoe, 1) , new Object[]{
" ##", " X ", " X ", Character.valueOf('#'), CrystaliteIngot, Character.valueOf('X'), Item.stick
});
//Helmet
ModLoader.AddName(CrystaliteHelmet,"Crystalite Helmet");
CrystaliteHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteHelmet.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteHelmet, 1) , new Object[]{
"###", "# #", Character.valueOf('#'), CrystaliteIngot
});
//Chest
ModLoader.AddName(CrystaliteChest, "Crystalite Chestplate");
CrystaliteChest.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteChest.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteChest, 1), new Object[]{
"# #", "###", "###", Character.valueOf('#'), CrystaliteIngot
});
//Legs
ModLoader.AddName(CrystaliteLegs, "Crystalite Legs");
CrystaliteLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteLegs.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteLegs, 1) , new Object[]{
"###", "# #", "# #", Character.valueOf('#'), CrystaliteIngot
});
//Boots
ModLoader.AddName(CrystaliteBoots, "Blockium Boots");
CrystaliteBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/CrystaliteBoots.png");
ModLoader.AddRecipe(new ItemStack(CrystaliteBoots, 1) , new Object[]{
"# #", "# #", Character.valueOf('#'), CrystaliteIngot
});
//Bug Testing Recipes
ModLoader.AddRecipe(new ItemStack(Block.obsidian, 10) , new Object[]{
"#", Character.valueOf('#'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(Block.bed, 1) , new Object[]{
"###", Character.valueOf('#'), Block.dirt
});
/*
* Crafting and Smelting Recipe
*
ModLoader.AddRecipe(new ItemStack(Class.Object, 1), new Object[] {
"###", "#X#", "###", Character.valueOf('#'), Class.Object, Character.valueOf('X'), Class.Object
});
ModLoader.AddSmelting(Class.Object.blockID/shiftedIndex, new ItemStack(Class.Object, 1));
*/
}
public static Block crystaliteblock;
World world;
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i< 2; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(60);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(CrystaliteBlock.blockID, 35)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public void load(){}
public String getVersion()
{
return "1.0.1";
}
}
thats the Mod_Crystalite file
Please put your code in spoiler brackets next time to reduce me having to scroll for a long time.
Try creating a new class that starts with mod_ not Mod_, java is case sensitive. If that doesn't work, report back.
I was also wondering if you could do a litle exploration on using different existing render types for created mobs. I tried to create a replica of a skeleton that drops a special item using the methods below, and while I got skeleton behavior, the texture or model got screwed up and it ended up looking like a regular skeleton-textured biped (and without a held bow for that matter).
-Main mod_ class
-Entity class
Thank you for making these videos, they have helped me so much
EDIT: I was thinking of a crossbow type weapon that when you right click, it would remove the crossbow from your inventory, replacing it with a loaded crossbow, consuming you ammo/arrows, then when you right click with the loaded crossbow, it would fire the arrow, and simultaneously remove the loaded crossbow, switching it back the unloaded crossbow. Could you do a tutorial on how to code that if you know how to? I am hoping to add that to a mod I am making.
I learned some java purely from watching the videos, as he does explain each thing as best he can
That is a pretty cool idea, I might do that tonight as I just got home and I already know how to do that :ohmy.gif:, you'll probably see this tonight.
I was thinking of doing Java tutorials to help out with all the modding stuff, but I want to move my channel towards a gaming channel and don't really want to venture out into the How-To's too much, Minecraft Modding is about as far as I'll go lol.
I look forward to it :laugh.gif:
To be honest, I think I learn more from Minecraft modding than I would from generic Java tutorials, as Minecraft is something I like, and I generally learn more about things when they are intertwined/linked with things I like, such as games.
Well I was going to incorporate the Java tutorials with Minecraft Modding, kind of targetting what I teach to explain the things you see in the Minecraft classes. A lot of the errors from people that I see come from simple wrong code placement, and I don't think some people understand what I mean when I say "method" or "class" or etc, some programming terms. I'd like to do it just to eliminate most of the errors that are coming up.
I'm not entirely sure what it's telling me
Click.
It's a tutorial on how to make new materials without editing the bu.class (EnumToolToolMaterial.java. Would you be able to review it and make a 1.0.0 version of this in a tutorial? I'm going to try to understand this and turn it into a 1.0.0 version myself, but I'll likely need your help. I think this was either 1.7 or 1.8.
Also, could you link thenewboston's java playlist for people who want to learn mods, but don't know any Java? I think Bucky does some of the best programming tutorials I've seen on YouTube.
I attempt to entertain on YouTube. Channel
He is planning on making a tutorial on making materials without editing EnumToolMaterial (well, similar)
I didn't see that, I haven't read all of the posts, but I saw on one video that he didn't know how to do it. I'm actually trying to figure it out myself, but I'm not doing such a good job.
I attempt to entertain on YouTube. Channel
You got the same error as me, I suggest doing what I did in the tutorial at the end and instead of making a class variable ItemStack namehere = new ItemStack(blah blah, 1), delete that line of code and in the return statement in the RightClick method type
Of course replacing the "mod_blockium.blockiumCrossbow" with your own item.
I have known how to make custom Enums for a while now, the problem is that even when you create a custom one, and have two different ones, the ID's of the two new custom Enum classes will clash, causing an error. I'm trying to figure out how to make a new one, but so it's also compatible with other mods. The one in that tutorial does absolutely nothing for compatibility, it simply makes a class similar to the old one, and does the same thing as you could of done in the original class. If you make two classes and your two custom "metals" both have an ID of 8 for example, it's just going to give you an error.
And yeah I love thenewboston, his tutorials taught me all about UDK. Beginner Java tutorials wouldn't explain much in the context of Minecraft though, since most of the classes use interfaces, aggregation, composition, etc. I didn't learn about that stuff in detail until second year programming. The beginner tutorials are more about the basics, user input/output, math algorithms, simple arrays, simple classes, and simple data types. Almost none of those can really be applied to Minecraft, so I wouldn't suggest learning first year Java if your only intent is modding. If you actually want to learn how to program, go right ahead.
Please put your code in spoiler brackets next time to reduce me having to scroll for a long time.
Try creating a new class that starts with mod_ not Mod_, java is case sensitive. If that doesn't work, report back.