Hey techguy :D, I was wondering if you found out how to make an Item (When rite clicked..) open a gui menu, and when you click on the custom mob you want to spawn, it takes away XP.
I know I asked this already, I was just wondering if you figured it out yet :S... Thanks!
my mob does not look right. i made it so it had new blocks on the body to look like bodyfat, and it wont render them in the game, but it wil in techne.
the code is
// Date: 3/12/2012 11:05:50 AM
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package net.minecraft.src;
import java.util.Random;
public class WorldGenUraniumOre extends WorldGenerator
{
public WorldGenUraniumOre()
{
}
public boolean generate(World world, Random random, int i, int j, int k)
{
int UraniumOre = Block.UraniumOre.blockID;
world.setBlockWithNotify(i, j, k, UraniumOre);
world.setBlockAndMetadataWithNotify(i, j + 1, k, UraniumOre, 1);
return true;
}
}
Error
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -g -source 1.6 -target 1.6 -class
path "lib;lib\*;jars\...' failed : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\WorldGenUraniumOre.java:13: error: cannot find s
ymbol
int UraniumOre = Block.UraniumOre.blockID;
^
symbol: variable UraniumOre
location: class Block
1 error
1 warning
==================
== Recompiling server ==
> Cleaning bin
> Recompiling
- Done in 7.42 seconds
Press any key to continue . . .
the tamable thing dident work but i was just wondering if you no how to make one mob always attack another mob e.g. batman attacks joker and one more thing do u no how to make mobs fly
my mob does not look right. i made it so it had new blocks on the body to look like bodyfat, and it wont render them in the game, but it wil in techne.
the code is
// Date: 3/12/2012 11:05:50 AM
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
I'm getting problems with net.minecraft.src and .RegisterBlock
package net.minecraft.src
import net.minecraft.src.Block;
import net.minecraft.src.BlockSugarGrass;
public class mod_SugarGrass extends BaseMod
{
public static final Block SugarGrass = new BlockSugarGrass(901, 0).setBlockName("SugarGrass").setHardness(3F).setResistance(4F).setLightValue(1F);
private static int blockIndexInTexture;
public void load()
{
mod_SugarGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/bin/minecraft/SugarGrass.png");
ModLoader.registerBlock(SugarGrass);
ModLoader.addName(SugarGrass, "Sugar Grass");
}
public String getVersion()
{
return "1.1";
}
}
Does anyone know what to do?
You are probably getting problems with the registerBlock method because your have done the addOverride method incorrectly.
You need to assign the block that is getting the texture, not the class that it is in. It needs to be like this:
package net.minecraft.src;
import java.util.Random;
public class WorldGenUraniumOre extends WorldGenerator
{
public WorldGenUraniumOre()
{
}
public boolean generate(World world, Random random, int i, int j, int k)
{
int UraniumOre = Block.UraniumOre.blockID;
world.setBlockWithNotify(i, j, k, UraniumOre);
world.setBlockAndMetadataWithNotify(i, j + 1, k, UraniumOre, 1);
return true;
}
}
Error
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -g -source 1.6 -target 1.6 -class
path "lib;lib\*;jars\...' failed : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\WorldGenUraniumOre.java:13: error: cannot find s
ymbol
int UraniumOre = Block.UraniumOre.blockID;
^
symbol: variable UraniumOre
location: class Block
1 error
1 warning
==================
== Recompiling server ==
> Cleaning bin
> Recompiling
- Done in 7.42 seconds
Press any key to continue . . .
Thanks for taking a look!
Your block isn't in Block.java, so you dont put Block. before it. You reference that your block is in your mod_ class, so it would be something like this:
int UraniumOre = mod_Namehere.UraniumOre.blockID;
the tamable thing dident work but i was just wondering if you no how to make one mob always attack another mob e.g. batman attacks joker and one more thing do u no how to make mobs fly
Not sure about the flying, but for the mobs attacking each other, have a look in EntityZombie in the constructor at the line that says this:
field_48105_bU.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityVillager.class, 16F, 0, false));
You should be able to put that in your constructor and change the EntityVillager to the name of your batman class.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
How would I go about making my UraniumOre drop Uranium upon breaking?
wouldnt I do somthing like this?
package net.minecraft.src;
import java.util.Random;
public class BlockUraniumOre extends Block
{
public BlockUraniumOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_UraniumOre.Uranium.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
that gives me an error though
EDIT: never mind, I figured it out, it is
public int idDropped(int i, Random random, int j)
{
return mod_Uranium.Uranium.shiftedIndex;
}
public int quantityDropped(Random random)
the tamable thing dident work but i was just wondering if you no how to make one mob always attack another mob e.g. batman attacks joker and one more thing do u no how to make mobs
With new AI you can use task.addtask Just use the attacking AI and type the entity you want to get attacked in the perimeters
I am afraid I have yet another issue, this is with the crafting with my own item that I made... Also there is an error for the stone? take a look
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -g -source 1.6 -target 1.6 -class
path "lib;lib\*;jars\...' failed : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy
mbol
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object
[] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf
('%'), Block.Stone});
^
symbol: variable Uranium
location: class Item
src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy
mbol
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object
[] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf
('%'), Block.Stone});
^
symbol: variable Stone
location: class Block
src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy
mbol
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object
[] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf
('%'), Block.Stone});
^
symbol: method AddRecipe(ItemStack,Object[])
location: class ModLoader
3 errors
1 warning
==================
== Recompiling server ==
> Cleaning bin
> Recompiling
- Done in 8.28 seconds
Press any key to continue . . .
and here is my code
package net.minecraft.src;
public class mod_FluxCapacitor extends BaseMod
{
public static final Item FluxCapacitor = new ItemFluxCapacitor(1550).setItemName("Flux Capacitor");
public void load()
{
FluxCapacitor.iconIndex = ModLoader.addOverride("/gui/items.png", "/New/FluxCapacitor.png");
ModLoader.addName(FluxCapacitor, "Flux Capacitor");
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object [] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf('%'), Block.Stone});
}
public String getVersion()
{
return "1.0";
}
}
I believe the problem is because you don't have the Item of uranium in that mod_ file, I would suggest that if you have it in other files that you combine it into one mod_ file, if you do then it should work. also, AddRecipe is now addRecipe
I am afraid I have yet another issue, this is with the crafting with my own item that I made... Also there is an error for the stone? take a look
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -g -source 1.6 -target 1.6 -class
path "lib;lib\*;jars\...' failed : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy
mbol
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object
[] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf
('%'), Block.Stone});
^
symbol: variable Uranium
location: class Item
src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy
mbol
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object
[] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf
('%'), Block.Stone});
^
symbol: variable Stone
location: class Block
src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy
mbol
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object
[] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf
('%'), Block.Stone});
^
symbol: method AddRecipe(ItemStack,Object[])
location: class ModLoader
3 errors
1 warning
==================
== Recompiling server ==
> Cleaning bin
> Recompiling
- Done in 8.28 seconds
Press any key to continue . . .
and here is my code
package net.minecraft.src;
public class mod_FluxCapacitor extends BaseMod
{
public static final Item FluxCapacitor = new ItemFluxCapacitor(1550).setItemName("Flux Capacitor");
public void load()
{
FluxCapacitor.iconIndex = ModLoader.addOverride("/gui/items.png", "/New/FluxCapacitor.png");
ModLoader.addName(FluxCapacitor, "Flux Capacitor");
ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object [] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf('%'), Block.Stone});
}
public String getVersion()
{
return "1.0";
}
}
Uranium one: Uranium (since you modded it in, not Notch/Jeb) is not in the Item.class, and therefore is not prefixed with Item.. Remove that, its just Uranium.
Stone one: Java is case sensitive, it might have to be: Block.stone not Block.Stone
Also change the version to 1.2_03 not 1.0
for the third error, ModLoader has been changed to camel case, so it would be:
addRecipe
not
AddRecipe
Koadmaster is partially right, you need to add the uranium item into your mod_ file. However, the stone should be fine.
Uranium one: Uranium (since you modded it in, not Notch/Jeb) is not in the Item.class, and therefore is not prefixed with Item.. Remove that, its just Uranium.
Stone one: Java is case sensitive, it might have to be: Block.stone not Block.Stone
Also change the version to 1.2_03 not 1.0
for the third error, ModLoader has been changed to camel case, so it would be:
addRecipe
not
AddRecipe
Koadmaster is partially right, you need to add the uranium item into your mod_ file. However, the stone should be fine.
OOOOHHHH I didn't know i even could combine the files lol, ill start messing around...
1. how do you make spoilers where you don't have to show this whole huge thing?
2. How do you respond to people directly EX.- like that orange box saying what they said than what you responded to them.
3. sorry this has code. My ore won't spawn and here i have an example of an ore i made. Do i have to like
register my ore in the BlockOre.java file?
public static final Block herobrineOre =
new HerobrineOre(204, 0).setHardness(5.0F).setResistance(20.0F).setLightValue(1.5F).setBlockName("herobrineOre");
public class HerobrineOre extends Block
{
protected HerobrineOre(int i, int j)
{
super(i,j,Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Ore2.herobrineOre.blockID;
}
public int quantityDropped(Random random)
{
return 2;
}
}
Finally! My mobs won't drop items! I put a different code called "protected void dropFewItems()"
Here's the code.
package net.minecraft.src;
import java.util.Random;
public class EntityPerson extends EntityMob
{
public EntityPerson(World world)
{
super(world);
texture = "/Person.png";
moveSpeed = 3.5F;
attackStrength = 1; //take this line out if this class doesn't extend EntityMob.
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.stick, 1);
}
btw if your making a delorean time machine in minecraft i want it lol
Epictaco, there are lots of buttons at the top where you write your post. The one that looks like this but blue (< >) is for code tags, the one that looks like a speech bubble is quote tags, and you do ['spoiler]inserttexthere[/spoiler'] but without the apostrophes inside the [spoiler] brackets.
btw if your making a delorean time machine in minecraft i want it lol
Epictaco, there are lots of buttons at the top where you write your post. The one that looks like this but blue (< >) is for code tags, the one that looks like a speech bubble is quote tags, and you do ['spoiler]inserttexthere[/spoiler'] but without the apostrophes inside the [spoiler] brackets.
Lol.. the mod brings you back to the midevil age and you get stuck there so you have to do quests and level up with the kingdom so they trust you enough with more uranium so that you can get back to your time and perfect your machine...
Lol tell me if you like the idea and if you would download it!
Here, ill merge them into the correct file format for you
keep following that format (the one i give you)
the code itself may not be entirely correct, but you'll see how the organization works
I would definitely download that btw. However you might want to start with slightly smaller mods, getting the world generation+time travel (multiworld) as well as the Kingdom's AI would be rather complicated.
I know I asked this already, I was just wondering if you figured it out yet :S... Thanks!
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumthe code is
// Date: 3/12/2012 11:05:50 AM
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX
package net.minecraft.src;
public class ModelJordan extends ModelBiped
{
//fields
ModelRenderer Shape7;
ModelRenderer Shape8;
ModelRenderer Shape4;
ModelRenderer Shape5;
ModelRenderer Shape3;
ModelRenderer Shape2;
ModelRenderer Shape6;
ModelRenderer head;
ModelRenderer body;
ModelRenderer rightarm;
ModelRenderer leftarm;
ModelRenderer rightleg;
ModelRenderer leftleg;
ModelRenderer Shape1;
public ModelJordan()
{
textureWidth = 64;
textureHeight = 32;
Shape7 = new ModelRenderer(this, 37, 0);
Shape7.addBox(0F, 0F, 0F, 8, 4, 1);
Shape7.setRotationPoint(-6F, 8F, 4F);
Shape7.setTextureSize(64, 32);
Shape7.mirror = true;
setRotation(Shape7, 0F, 1.570796F, 0F);
Shape8 = new ModelRenderer(this, 39, 0);
Shape8.addBox(0F, 0F, 0F, 6, 4, 1);
Shape8.setRotationPoint(-5F, 7F, 3F);
Shape8.setTextureSize(64, 32);
Shape8.mirror = true;
setRotation(Shape8, 0F, 1.570796F, 0F);
Shape4 = new ModelRenderer(this, 39, 0);
Shape4.addBox(0F, 0F, 0F, 6, 4, 1);
Shape4.setRotationPoint(4F, 7F, 3F);
Shape4.setTextureSize(64, 32);
Shape4.mirror = true;
setRotation(Shape4, 0F, 1.570796F, 0F);
Shape5 = new ModelRenderer(this, 37, 0);
Shape5.addBox(0F, 0F, 0F, 8, 4, 1);
Shape5.setRotationPoint(5F, 8F, 4F);
Shape5.setTextureSize(64, 32);
Shape5.mirror = true;
setRotation(Shape5, 0F, 1.570796F, 0F);
Shape3 = new ModelRenderer(this, 35, 0);
Shape3.addBox(0F, 0F, 0F, 10, 4, 1);
Shape3.setRotationPoint(-5F, 7F, 2F);
Shape3.setTextureSize(64, 32);
Shape3.mirror = true;
setRotation(Shape3, 0F, 0F, 0F);
Shape2 = new ModelRenderer(this, 33, 0);
Shape2.addBox(0F, 0F, 0F, 12, 4, 1);
Shape2.setRotationPoint(-6F, 8F, 3F);
Shape2.setTextureSize(64, 32);
Shape2.mirror = true;
setRotation(Shape2, 0F, 0F, 0F);
Shape6 = new ModelRenderer(this, 33, 11);
Shape6.addBox(0F, 0F, 0F, 12, 4, 1);
Shape6.setRotationPoint(-6F, 8F, -4F);
Shape6.setTextureSize(64, 32);
Shape6.mirror = true;
setRotation(Shape6, 0F, 0F, 0F);
head = new ModelRenderer(this, 0, 0);
head.addBox(-4F, -8F, -4F, 8, 8, 8);
head.setRotationPoint(0F, 0F, 0F);
head.setTextureSize(64, 32);
head.mirror = true;
setRotation(head, 0F, 0F, 0F);
body = new ModelRenderer(this, 16, 16);
body.addBox(-4F, 0F, -2F, 8, 12, 4);
body.setRotationPoint(0F, 0F, 0F);
body.setTextureSize(64, 32);
body.mirror = true;
setRotation(body, 0F, 0F, 0F);
rightarm = new ModelRenderer(this, 40, 16);
rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
rightarm.setRotationPoint(-5F, 2F, 0F);
rightarm.setTextureSize(64, 32);
rightarm.mirror = true;
setRotation(rightarm, 0F, 0F, 0.4089647F);
leftarm = new ModelRenderer(this, 40, 16);
leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
leftarm.setRotationPoint(5F, 2F, 0F);
leftarm.setTextureSize(64, 32);
leftarm.mirror = true;
setRotation(leftarm, 0F, 0F, -0.4089647F);
rightleg = new ModelRenderer(this, 0, 16);
rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
rightleg.setRotationPoint(-2F, 12F, 0F);
rightleg.setTextureSize(64, 32);
rightleg.mirror = true;
setRotation(rightleg, 0F, 0F, 0F);
leftleg = new ModelRenderer(this, 0, 16);
leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
leftleg.setRotationPoint(2F, 12F, 0F);
leftleg.setTextureSize(64, 32);
leftleg.mirror = true;
setRotation(leftleg, 0F, 0F, 0F);
Shape1 = new ModelRenderer(this, 35, 0);
Shape1.addBox(0F, 0F, 0F, 10, 4, 1);
Shape1.setRotationPoint(-5F, 7F, -3F);
Shape1.setTextureSize(64, 32);
Shape1.mirror = true;
setRotation(Shape1, 0F, 0F, 0F);
}
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);
Shape7.render(f5);
Shape8.render(f5);
Shape4.render(f5);
Shape5.render(f5);
Shape3.render(f5);
Shape2.render(f5);
Shape6.render(f5);
head.render(f5);
body.render(f5);
rightarm.render(f5);
leftarm.render(f5);
rightleg.render(f5);
leftleg.render(f5);
Shape1.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);
}
}
it just wont show the bodyfat, only a regular character with a messed up texture.
I noticed your banner, more food more fun :D? Check out my mod :D!
package net.minecraft.src import net.minecraft.src.Block; import net.minecraft.src.BlockSugarGrass; public class mod_SugarGrass extends BaseMod { public static final Block SugarGrass = new BlockSugarGrass(901, 0).setBlockName("SugarGrass").setHardness(3F).setResistance(4F).setLightValue(1F); private static int blockIndexInTexture; public void load() { mod_SugarGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/bin/minecraft/SugarGrass.png"); ModLoader.registerBlock(SugarGrass); ModLoader.addName(SugarGrass, "Sugar Grass"); } public String getVersion() { return "1.1"; } }Does anyone know what to do?
Code
package net.minecraft.src; import java.util.Random; public class WorldGenUraniumOre extends WorldGenerator { public WorldGenUraniumOre() { } public boolean generate(World world, Random random, int i, int j, int k) { int UraniumOre = Block.UraniumOre.blockID; world.setBlockWithNotify(i, j, k, UraniumOre); world.setBlockAndMetadataWithNotify(i, j + 1, k, UraniumOre, 1); return true; } }Error
Thanks for taking a look!
if (!super.shouldSideBeRendered(iblockaccess, i, j, k, l)) { return false; }and also in the mod_Block Character.valueOf gets a error i installed MCP correctly wtf is wrong
Post your mod_Namehere class code.
You are probably getting problems with the registerBlock method because your have done the addOverride method incorrectly.
You need to assign the block that is getting the texture, not the class that it is in. It needs to be like this:
SugarGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SugarGrass.png");Also notice that I removed the /bin/minecraft. You don't need this as that is already one of the default directories for the location of images.
Your block isn't in Block.java, so you dont put Block. before it. You reference that your block is in your mod_ class, so it would be something like this:
int UraniumOre = mod_Namehere.UraniumOre.blockID;
Not sure about the flying, but for the mobs attacking each other, have a look in EntityZombie in the constructor at the line that says this:
You should be able to put that in your constructor and change the EntityVillager to the name of your batman class.
Why do you have an EntitySlab? Post the whole class, and your mod_ class too.
together they are powerful beyond imagination."
wouldnt I do somthing like this?
package net.minecraft.src; import java.util.Random; public class BlockUraniumOre extends Block { public BlockUraniumOre(int i, int j) { super(i, j, Material.rock); } public int idDropped(int i, Random random, int j) { return mod_UraniumOre.Uranium.blockID; } public int quantityDropped(Random random) { return 1; }}that gives me an error though
EDIT: never mind, I figured it out, it is
public int idDropped(int i, Random random, int j) { return mod_Uranium.Uranium.shiftedIndex; } public int quantityDropped(Random random)With new AI you can use task.addtask Just use the attacking AI and type the entity you want to get attacked in the perimeters
It is all good, except it tells me that "valueOf(char) in java.lang.Character cannot be applied to (java.lang.String)" in my recipes.
Here is my code:
package net.minecraft.src; public class mod_CakeInAJar extends BaseMod { public static final Item CakeInAJar = new ItemFood(3600, 6, 3F, false).setItemName("CakeInAJar"); public static final Item RainbowInAJar = new ItemFood(3601, 10, 5F, false).setPotionEffect(Potion.moveSpeed.id, 120, 0, 1F).setItemName("RainbowInAJar"); public void load() { ModLoader.addName(RainbowInAJar, "Rainbow in a Jar"); ModLoader.addName(CakeInAJar, "Cake in a Jar"); ModLoader.addRecipe(new ItemStack(CakeInAJar, 1), new Object [] {" # ", " X ", Character.valueOf("#"), Item.cake, Character.valueOf("X"), Item.glassBottle}); ModLoader.addRecipe(new ItemStack(RainbowInAJar, 1), new Object [] {" # ", "@%X", " $ ", Character.valueOf("#"), new ItemStack(Item.dyePowder, 1, 1), Character.valueOf("@"), new ItemStack(Item.dyePowder, 1, 2), Character.valueOf("X"), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf("$"), new ItemStack(Item.dyePowder, 1, 11), Character.valueOf("%"), CakeInAJar}); CakeInAJar.iconIndex = ModLoader.addOverride("/gui/items.png", "/platypus364/cakeInAJar.png"); RainbowInAJar.iconIndex = ModLoader.addOverride("/gui/items.png", "/platypus364/rainbowInAJar.png"); } public String getVersion() { return "1.2_03"; } }you need to add a semicolon after "net.minecraft.src"
If I helped you at all or made a nice post, go ahead and click the green plus over there if you want.
== MCP 6.0 (data: 6.0, client: 1.2.3, server: 1.2.3) == # found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa ram csvs, astyle, astyle config == Recompiling client == > Cleaning bin > Recompiling '"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -g -source 1.6 -target 1.6 -class path "lib;lib\*;jars\...' failed : 1 == ERRORS FOUND == warning: [options] bootstrap class path not set in conjunction with -source 1.6 src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy mbol ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object [] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf ('%'), Block.Stone}); ^ symbol: variable Uranium location: class Item src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy mbol ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object [] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf ('%'), Block.Stone}); ^ symbol: variable Stone location: class Block src\minecraft\net\minecraft\src\mod_FluxCapacitor.java:11: error: cannot find sy mbol ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object [] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf ('%'), Block.Stone}); ^ symbol: method AddRecipe(ItemStack,Object[]) location: class ModLoader 3 errors 1 warning ================== == Recompiling server == > Cleaning bin > Recompiling - Done in 8.28 seconds Press any key to continue . . .and here is my code
package net.minecraft.src; public class mod_FluxCapacitor extends BaseMod { public static final Item FluxCapacitor = new ItemFluxCapacitor(1550).setItemName("Flux Capacitor"); public void load() { FluxCapacitor.iconIndex = ModLoader.addOverride("/gui/items.png", "/New/FluxCapacitor.png"); ModLoader.addName(FluxCapacitor, "Flux Capacitor"); ModLoader.AddRecipe(new ItemStack(FluxCapacitor, 2), new Object [] {"###", "%%%", "###", Character.valueOf('#'), Item.Uranium, Character.valueOf('%'), Block.Stone}); } public String getVersion() { return "1.0"; } }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI believe the problem is because you don't have the Item of uranium in that mod_ file, I would suggest that if you have it in other files that you combine it into one mod_ file, if you do then it should work. also, AddRecipe is now addRecipe
Uranium one: Uranium (since you modded it in, not Notch/Jeb) is not in the Item.class, and therefore is not prefixed with Item.. Remove that, its just Uranium.
Stone one: Java is case sensitive, it might have to be: Block.stone not Block.Stone
Also change the version to 1.2_03 not 1.0
for the third error, ModLoader has been changed to camel case, so it would be:
addRecipe
not
AddRecipe
Koadmaster is partially right, you need to add the uranium item into your mod_ file. However, the stone should be fine.
If I helped you at all or made a nice post, go ahead and click the green plus over there if you want.
1. how do you make spoilers where you don't have to show this whole huge thing?
2. How do you respond to people directly EX.- like that orange box saying what they said than what you responded to them.
3. sorry this has code. My ore won't spawn and here i have an example of an ore i made. Do i have to like
register my ore in the BlockOre.java file?
(mod_Ore2.java)
package net.minecraft.src;
import java.util.Random;
public class mod_Ore2 extends BaseMod
{
public static final Block herobrineOre =
new HerobrineOre(204, 0).setHardness(5.0F).setResistance(20.0F).setLightValue(1.5F).setBlockName("herobrineOre");
public void load()
{
ModLoader.registerBlock(herobrineOre);
herobrineOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Herobrine.png");
ModLoader.addName(herobrineOre, "HerobrineOre");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for (int i = 0; i< 40; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(60);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(herobrineOre.blockID, 50)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.2.3";
}
}
(
(HerobrineOre.java)
package net.minecraft.src;
import java.util.Random;
public class HerobrineOre extends Block
{
protected HerobrineOre(int i, int j)
{
super(i,j,Material.iron);
}
public int idDropped(int i, Random random)
{
return mod_Ore2.herobrineOre.blockID;
}
public int quantityDropped(Random random)
{
return 2;
}
}
Finally! My mobs won't drop items! I put a different code called "protected void dropFewItems()"
Here's the code.
package net.minecraft.src;
import java.util.Random;
public class EntityPerson extends EntityMob
{
public EntityPerson(World world)
{
super(world);
texture = "/Person.png";
moveSpeed = 3.5F;
attackStrength = 1; //take this line out if this class doesn't extend EntityMob.
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.stick, 1);
}
private static final ItemStack defaultHeldItem;
public int getMaxHealth()
{
return 35;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected void dropFewItems()
{
dropItem(Item.stick.shiftedIndex, 1);
dropItem(Item.ingotGold.shiftedIndex, 1);
dropItem(Item.bootsGold.shiftedIndex, 1);
}
protected boolean canDespawn()
{
return false;
}
}
btw if your making a delorean time machine in minecraft i want it lol
Epictaco, there are lots of buttons at the top where you write your post. The one that looks like this but blue (< >) is for code tags, the one that looks like a speech bubble is quote tags, and you do ['spoiler]inserttexthere[/spoiler'] but without the apostrophes inside the [spoiler] brackets.
If I helped you at all or made a nice post, go ahead and click the green plus over there if you want.
http://dl.dropbox.co...472288/Mods.zip
The file explains everything...
Lol.. the mod brings you back to the midevil age and you get stuck there so you have to do quests and level up with the kingdom so they trust you enough with more uranium so that you can get back to your time and perfect your machine...
Lol tell me if you like the idea and if you would download it!
and a better way to explain it would be
keep following that format (the one i give you)
the code itself may not be entirely correct, but you'll see how the organization works
I would definitely download that btw. However you might want to start with slightly smaller mods, getting the world generation+time travel (multiworld) as well as the Kingdom's AI would be rather complicated.
If I helped you at all or made a nice post, go ahead and click the green plus over there if you want.