In the pickaxe recipe, you need to add extra spaces to the first set of " ".
ModLoader.addRecipe(new ItemStack(CheesPickaxe, 1), new Object[]
{
" o ", " o ", "xxx", Character.valueOf('x'), Item.stick , Character.valueOf('o'), Block.dirt
});
@Everyone asking questions to whom I haven't replied yet
I'm going to reply to you all, but a lot of people are asking questions and it takes time to help so many people.
Help!
This is my code and when ever i create a new world the ore doesn't spawn
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
public class mod_Ores extends BaseMod
{
public static Block CheesOre = new CheesOre (190, 0).setHardness(1.0F).setResistance(1.0F).setBlockName("CheesOre");
public String getVersion()
{
return "1.2.3";
}
public mod_Ores()
{
}
public void load()
{
ModLoader.registerBlock(CheesOre);
CheesOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Chees/CheesOre.png");
ModLoader.addName(CheesOre, "CheesOre");
};
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 100; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Ores.CheesOre.blockID, 12)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
}
Help!
This is my code and when ever i create a new world the ore doesn't spawn
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
public class mod_Ores extends BaseMod
{
public static Block CheesOre = new CheesOre (190, 0).setHardness(1.0F).setResistance(1.0F).setBlockName("CheesOre");
public String getVersion()
{
return "1.2.3";
}
public mod_Ores()
{
}
public void load()
{
ModLoader.registerBlock(CheesOre);
CheesOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Chees/CheesOre.png");
ModLoader.addName(CheesOre, "CheesOre");
};
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 100; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Ores.CheesOre.blockID, 12)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
}
GenerateSurface
is now
generateSurface
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Tech can you make the Potions tut in the first place? I kinda need it...
And i remember that only month ago you had something like 400 posts xD you tripled it
Potions, ore generation and crops are the first on my tutorial list to do. (Not necessarily in that order though)
Can you make a tut on mob spawners?
cause I'd like to generate a Shop with a spawner of a mob. (Custom Modded mob)
I hope it's the first one to be released (:, I'm sure ever one else would like to see it too!
can you make a more detailed and simple way for making mobs with custom shape, and please give examples with pic's show diferent mob shapes. Thank You!
The custom mob tutorial isn't complete yet. I'm changing it around and improving it.
Thanks So much! But when I did that i saw random errors and i saw that my code wasn't the same as the template shows so i fixed it up a little. But now i only have one problem related to the block which is better than before! If you can help than THANKS!
public class BlockBedStone extends Block <[Error] one thats wrong.
{
public BlockBedStone(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return Item.bed.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}}
errors: 1.Project 'Server' is missing required library: 'jars/minecraft_server.jar'
2.The project cannot be built until build path errors are resolved.
Important error:1.The public type BlockBedStone must be defined in its own file
Just in case you want to see what i did to the "mod_BedStone.java"
mod_BedStone.java
package net.minecraft.src;
public class mod_BedStone extends BaseMod
{
public static final Block BedStone = new BlockBedStone(250, 0).setBlockName("asdf").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
BedStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/BedStone/image.png");
ModLoader.registerBlock(BedStone);
ModLoader.addName(BedStone, "BedStone");
ModLoader.addRecipe(new ItemStack(BedStone, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.3";
}
}
Make sure the actual name of the .java file is the same.
@Everyone
I think I've replied to everyone. Please let me know if I have missed your post and are still having problems.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey great tutorials, and i'm glad their updated for 1.2.3, but how about a tutorial for adding a new enchantment? I haven't seen any modLoader tutorials on it and not quite sure if it's possible.
I love these tutorials! Very helpful! If possible, could you make two tutorials, adding potion recipes, and making furnace/crafting tables with new recipes? That would be amazing. Thank you!
I'm trying to use items from other mods. (I am able to check their IDs using their .cfg files.)
EDIT: Apparently I'm just dumb and you can't add recipes during the modsLoaded() call. I got it working with the numerical constructor for ItemStack during the load() phase.
So now, the only issue is: How do I make sure all mods I want to use are loaded before my mod is?
*Also: How can I get the Modloader in my MCP to load other mods (for which I don't have the source) so I can test them? I tried putting them in the jars/mods folder, but they are ignored.
I'm trying to use items from other mods. (I am able to check their IDs using their .cfg files.)
EDIT: Apparently I'm just dumb and you can't add recipes during the modsLoaded() call. I got it working with the numerical constructor for ItemStack during the load() phase.
So now, the only issue is: How do I make sure all mods I want to use are loaded before my mod is?
*Also: How can I get the Modloader in my MCP to load other mods (for which I don't have the source) so I can test them? I tried putting them in the jars/mods folder, but they are ignored.
The way ModLoader works now is that it loads all the mod_ classes, then looks at the code in the load() method. If you have all your code in the load() method then you should be fine.
If you have the code in the standard java constructor, then it will be read before the rest of the mod_ classes are loaded.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm trying to use items from other mods. (I am able to check their IDs using their .cfg files.)
EDIT: Apparently I'm just dumb and you can't add recipes during the modsLoaded() call. I got it working with the numerical constructor for ItemStack during the load() phase.
So now, the only issue is: How do I make sure all mods I want to use are loaded before my mod is?
*Also: How can I get the Modloader in my MCP to load other mods (for which I don't have the source) so I can test them? I tried putting them in the jars/mods folder, but they are ignored.
To do that you need to install the "base mod" or the main one like buildcraft. then install the modifier like Ic2 buildcraft crossover.
So mod with the base mod inside then reob yours which will give you YOUR CLASSES ONLY. Install like i said above then.
Run recompile.bat in mcp then reobfuscate.bat. The class files will show in the reobf/minecraft folder, then you install them into your minecraft like you would with any other mod.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
package net.minecraft.src;
import java.util.Map;
public class mod_CheesModel extends BaseMod
{
public String getVersion()
{
return "1.2.3";
}
public mod_CheesModel()
{
ModLoader.registerEntityID(EntityCheesModel.class, "CheesModel", 117);
}
public void load()
{
}
public void AddRenderer(Map map)
{
map.put(EntityCheesModel.class, new RenderCheesModel(new ModelCheesModel(), 0.5F));
}
}
EntityCheesModel
package net.minecraft.src;
public abstract class EntityCheesModel extends EntityAnimal
{
public EntityCheesModel(World world)
{
super(world);
texture = "/Chees/CheesModel.png";
moveSpeed = 0.5F;
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound); // this saves the mob to disk, so it can be loaded later
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound); // this retrieves saved data about the mob from the hard drive
}
protected boolean canDespawn()
{
return false;
}
protected int getDropItemId()
{
return 0;
}
public int getMaxHealth()
{
return 12;
}
protected void func_40145_a(EntityAnimal entityanimal)
{
}
}
Thanks so much TechGuy you helped me make a mod!!! forget the last post about me having trouble i just was dumb and forgot to name something the right thing. Also if you didn't tell me a mistake that you saw I wouldve never seen that! I made a fiew mobs and ores but how do i make an audio file for my mobs?
Anyone who knows how to audio please tell me the code. Thanks!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Thanks Man And Nice Tutorials
This is my code and when ever i create a new world the ore doesn't spawn
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
public class mod_Ores extends BaseMod
{
public static Block CheesOre = new CheesOre (190, 0).setHardness(1.0F).setResistance(1.0F).setBlockName("CheesOre");
public String getVersion()
{
return "1.2.3";
}
public mod_Ores()
{
}
public void load()
{
ModLoader.registerBlock(CheesOre);
CheesOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Chees/CheesOre.png");
ModLoader.addName(CheesOre, "CheesOre");
};
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 100; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Ores.CheesOre.blockID, 12)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
}
is now
together they are powerful beyond imagination."
Potions, ore generation and crops are the first on my tutorial list to do. (Not necessarily in that order though)
Added to the list.
You need to create a custom model.
The custom mob tutorial isn't complete yet. I'm changing it around and improving it.
Make sure the actual name of the .java file is the same.
@Everyone
I think I've replied to everyone. Please let me know if I have missed your post and are still having problems.
together they are powerful beyond imagination."
Ok
Drewby's Mods [1.7.3] Extended Crafting Recipes, Redstone Atom Transferator
EDIT: Apparently I'm just dumb and you can't add recipes during the modsLoaded() call. I got it working with the numerical constructor for ItemStack during the load() phase.
So now, the only issue is: How do I make sure all mods I want to use are loaded before my mod is?
*Also: How can I get the Modloader in my MCP to load other mods (for which I don't have the source) so I can test them? I tried putting them in the jars/mods folder, but they are ignored.
http://www.minecraftsao.org/
Check it out!
See the textures tutorial...
Coding...
TROLOLOLOLOLOLOLOLOL
Sorry about that...
The way ModLoader works now is that it loads all the mod_ classes, then looks at the code in the load() method. If you have all your code in the load() method then you should be fine.
If you have the code in the standard java constructor, then it will be read before the rest of the mod_ classes are loaded.
Do you mean in MCP's client or in the actual game once you've finished coding?
As AvoadorasProductions said, see the textures tutorial.
together they are powerful beyond imagination."
To do that you need to install the "base mod" or the main one like buildcraft. then install the modifier like Ic2 buildcraft crossover.
So mod with the base mod inside then reob yours which will give you YOUR CLASSES ONLY. Install like i said above then.
Possibly. I can't cater for every type of advanced block as that would be simply impossible, but I might do this one.
I have my list to do, I will get around to all of them when I get enough time.
Run recompile.bat in mcp then reobfuscate.bat. The class files will show in the reobf/minecraft folder, then you install them into your minecraft like you would with any other mod.
together they are powerful beyond imagination."
mod_CheesModel
package net.minecraft.src; import java.util.Map; public class mod_CheesModel extends BaseMod { public String getVersion() { return "1.2.3"; } public mod_CheesModel() { ModLoader.registerEntityID(EntityCheesModel.class, "CheesModel", 117); } public void load() { } public void AddRenderer(Map map) { map.put(EntityCheesModel.class, new RenderCheesModel(new ModelCheesModel(), 0.5F)); } }EntityCheesModel
package net.minecraft.src; public abstract class EntityCheesModel extends EntityAnimal { public EntityCheesModel(World world) { super(world); texture = "/Chees/CheesModel.png"; moveSpeed = 0.5F; } public void writeEntityToNBT(NBTTagCompound nbttagcompound) { super.writeEntityToNBT(nbttagcompound); // this saves the mob to disk, so it can be loaded later } public void readEntityFromNBT(NBTTagCompound nbttagcompound) { super.readEntityFromNBT(nbttagcompound); // this retrieves saved data about the mob from the hard drive } protected boolean canDespawn() { return false; } protected int getDropItemId() { return 0; } public int getMaxHealth() { return 12; } protected void func_40145_a(EntityAnimal entityanimal) { } }ModelCheesModel
package net.minecraft.src; public class ModelCheesModel extends ModelBase { //fields ModelRenderer leg; ModelRenderer leg1; ModelRenderer body; ModelRenderer eye; ModelRenderer eye2; ModelRenderer beack; public ModelCheesModel () { textureWidth = 64; textureHeight = 32; leg = new ModelRenderer(this, 0, 0); leg.addBox(-1F, -1F, -2F, 3, 12, 3); leg.setRotationPoint(-4F, 13F, 0F); leg.setTextureSize(64, 32); leg.mirror = true; setRotation(leg, 0F, 0F, 0F); leg1 = new ModelRenderer(this, 0, 0); leg1.addBox(1F, -1F, -2F, 3, 12, 3); leg1.setRotationPoint(1F, 13F, 0F); leg1.setTextureSize(64, 32); leg1.mirror = true; setRotation(leg1, 0F, 0F, 0F); body = new ModelRenderer(this, 0, 0); body.addBox(2F, 0F, -5F, 11, 13, 12); body.setRotationPoint(6F, 0F, 0F); body.setTextureSize(64, 32); body.mirror = true; setRotation(body, 0F, 0F, 1.570796F); eye = new ModelRenderer(this, 0, 0); eye.addBox(4F, 0F, 0F, 3, 2, 5); eye.setRotationPoint(0F, 0F, 6F); eye.setTextureSize(64, 32); eye.mirror = true; setRotation(eye, 0F, 1.58825F, 1.570796F); eye2 = new ModelRenderer(this, 0, 0); eye2.addBox(0F, 0F, 0F, 3, 2, 5); eye2.setRotationPoint(-6F, 4F, 6F); eye2.setTextureSize(64, 32); eye2.mirror = true; setRotation(eye2, 0F, 1.58825F, 1.570796F); beack = new ModelRenderer(this, 0, 0); beack.addBox(8F, -8F, -3F, 3, 2, 5); beack.setRotationPoint(0F, 0F, 15F); beack.setTextureSize(64, 32); beack.mirror = true; setRotation(beack, 0F, 1.58825F, 1.570796F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); leg.render(f5); leg1.render(f5); body.render(f5); eye.render(f5); eye2.render(f5); beack.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5); } }RenderCheesModel
package net.minecraft.src; public class RenderCheesModel extends RenderLiving { public RenderCheesModel(ModelBase modelbase, float f) { super(modelbase, f); } public void renderCow(EntityCheesModel EntityCheesModel, double d, double d1, double d2, float f, float f1) { super.doRenderLiving(EntityCheesModel, d, d1, d2, f, f1); } public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2, float f, float f1) { renderCow((EntityCheesModel)entityliving, d, d1, d2, f, f1); } public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) { renderCow((EntityCheesModel)entity, d, d1, d2, f, f1); } }Anyone who knows how to audio please tell me the code. Thanks!