It seems as every time i add somethin i get one or two errors i cant fix D: i added a item and i got errors il post the code
[spoiler]
mod_Zimmite
package net.minecraft.src;
import java.util.Random;
public class mod_Zimmite extends BaseMod
{
public static final Block Zimmite = new BlockZimmite(255, ModLoader.addOverride("/terrain.png", "/zimmy.png")).setHardness(15F).setResistance(200F).setStepSound(Block.soundStoneFootstep).setBlockName("zimmite"); // It's recommended to have non-screen names starting with a lower case character just for preference
public void load()
{
}
public mod_Zimmite()
{
ModLoader.registerBlock(Zimmite);
ModLoader.addName(Zimmite, "Zimmite Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(Zimmite, 1));
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(20);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(Zimmite.blockID, 8)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}
BlockZimmite
package net.minecraft.src;
import java.util.Random;
public class BlockZimmite extends Block
{
public BlockZimmite(int i, int j)
{
super(i, j, Material.rock);
}
public int quantityDropped(Random random)
{
return 1;
}
public int idDropped(int i, Random random, int j)
{
return Item.coal.shiftedIndex;
}
}
OK heres the ingot's codes
I think i named it right lol
mod_ItemZImmiteingot
package net.minecraft.src;
public class Item_Zimmiteingot extends BaseMod
{
public static final Item Zimmiteingot = new ItemZimmiteingot(5000).setItemname("zimmiteingot");
public void load()
{
Zimmiteingot.iconIndex = ModLoader.addOverride("/gui/items.png", "zimmiteingot.png");
ModLoader.addName(Zimmiteingot, "Zimmite Ingot");
ModLoader.addSmelting(Zimmite.shiftedIndex, new ItemStack(zimmiteingot, 1));
}
public String getVersion()
{
return "1.2.5";
}
}
ItemZimmiteingot
package net.minecraft.src;
public class ItemZimmiteingot extends Item
{
public ItemZimmiteingot(int i)
{
super(i);
maxStackSize = 64;
}
}
I really need help im not very good but im getting better atleast
heres the error
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
> Searching for javac.exe in C:\Program Files
# 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" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ItemZimmiteingot.java:3: error: class Item_Z
immiteingot is public, should be declared in a file named Item_Zimmiteingot.java
public class Item_Zimmiteingot extends BaseMod
^
src\minecraft\net\minecraft\src\mod_ItemZimmiteingot.java:5: error: cannot find
symbol
public static final Item Zimmiteingot = new ItemZimmiteingot(5000).setIt
emname("zimmiteingot");
^
symbol: method setItemname(String)
location: class ItemZimmiteingot
src\minecraft\net\minecraft\src\mod_ItemZimmiteingot.java:11: error: cannot find
symbol
ModLoader.addSmelting(Zimmite.shiftedIndex, new ItemStack(zimmit
eingot, 1));
^
symbol: variable Zimmite
location: class Item_Zimmiteingot
src\minecraft\net\minecraft\src\mod_ItemZimmiteingot.java:11: error: cannot find
symbol
ModLoader.addSmelting(Zimmite.shiftedIndex, new ItemStack(zimmit
eingot, 1));
^
symbol: variable zimmiteingot
location: class Item_Zimmiteingot
4 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
[/spoiler]
Firstly, use spoilers.
Secondly: merge your mod_classes (there is a tutorial on that in the OP)
Thrirdly: Java is case sensative, so your "setItemname" should be "setItemName" and your "zimmiteingot" should be what you declared it to be in the public static final line (which was "Zimmiteingot")
I'm trying to make a biome mod now and I have even MORE questions.
When using the code this.maxHeight or this.minHeight what exactly do they change? How can I get mountains goinose to y256? For some reason there are no trees in my biome. (It's a snow biome fyi) There are also no grass and flowers. I even tried setting it to 20 trees per chunk. Now the problem might be that the top layer is the thin snow block. The filler layer is dirt of course. How can I make snow and grass on the top layer? Also does setting the this.temperature higher make it warmer or colder? What does it need to be to snow?
Sorry for asking all these questions if there is a good tutorial that covers these I could also do that.
Okay, I was watching a video tutorial (from someone else) and they made a new class called Enum***ToolMaterial. Is this a way to add custom Enum Tool Materials without overriding the base class EnumToolMaterial? If so, can you add multiple custom EnumToolMaterials to it? Like if I wanted a custom slimeball ETM and a custom brick ETM, could I make a class called EnumCustomToolMaterial and add the custom details to it? Thanks, although I'm pretty sure you can.
He will get to making that (most likely, but even so, he is not taking requests at this time), and he has stated before that asking will only slow down the speed in which he gets it out
Okay, I was watching a video tutorial (from someone else) and they made a new class called Enum***ToolMaterial. Is this a way to add custom Enum Tool Materials without overriding the base class EnumToolMaterial? If so, can you add multiple custom EnumToolMaterials to it? Like if I wanted a custom slimeball ETM and a custom brick ETM, could I make a class called EnumCustomToolMaterial and add the custom details to it? Thanks, although I'm pretty sure you can.
Yes, you can use it for several different tool material types
Ok never mind any of my other questions just these ones:
-How do you make mountains generate to around 256?
-How do you make pine trees generate?
This is my code: I just need to know what to change or add.
Yes, you can use it for several different tool material types
okay thanks. But in my CustomItemSword.java, I get this error at my
super(par1);
that says "Constructor call must be the first statement in a constructor". What should I do? This is the second CustomItemSword Thing that I've tried to add.
So...
I´ve finished version 1.2 of my mod but when I try to install it, minecraft crashes:
Mods loaded: 3
ModLoader 1.2.5
mod_coloredglass 1.2.5
Minema 1.32
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 6807966e --------
Generated 23.07.12 19:28
Minecraft: Minecraft 1.2.5
OS: Mac OS X (x86_64) version 10.7.4
Java: 1.6.0_33, Apple Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
LWJGL: 2.4.2
OpenGL: Intel HD Graphics 3000 OpenGL Engine version 2.1 APPLE-7.18.18, Intel Inc.
java.lang.RuntimeException: java.lang.Exception: Image not found: /cg/Bluesand.png
at ModLoader.registerAllTextureOverrides(ModLoader.java:1356)
at ModLoader.onTick(ModLoader.java:1074)
at EntityRendererProxy.b(EntityRendererProxy.java:22)
at net.minecraft.client.Minecraft.x(SourceFile:752)
at net.minecraft.client.Minecraft.run(SourceFile:671)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.Exception: Image not found: /cg/Bluesand.png
at ModLoader.loadImage(ModLoader.java:1015)
at ModLoader.registerAllTextureOverrides(ModLoader.java:1348)
... 5 more
--- END ERROR REPORT d451957 ----------
It says : Image not found: /cg/Bluesand.png but the folder should be in the jar:
I patched my mod and modloader with mcpatcher as usual
thank you for your help
It's looking for "/cg/Bluesand.png" and you have "/cg/bluesand.png"
Ok never mind any of my other questions just these ones:
-How do you make mountains generate to around 256?
-How do you make pine trees generate?
This is my code: I just need to know what to change or add.
I do not know, as I haven't done much with biomes, you may want to try posting in mod development, I find that there are lots of experienced and helpful people there
okay thanks. But in my CustomItemSword.java, I get this error at my
super(par1);
that says "Constructor call must be the first statement in a constructor". What should I do? This is the second CustomItemSword Thing that I've tried to add.
hey techguy just wondering can you do a tutorial on making a vehicle like a boat or a minecart that would realy help me thanks
He does say that he is not taking requests at this time, so please, wait until he finishes the tutorials on his list and opens it up for requests again before you post asking
What you will want to do it make a new mob with the new AI (you can just copy the Zombie code if you want) and then you will want to remove all the AI tasks, this is the Zombie code:
package net.minecraft.src;
import java.util.Random;
public class EntityZombie extends EntityMob
{
public EntityZombie(World par1World)
{
super(par1World);
texture = "/mob/zombie.png";
moveSpeed = 0.23F;
attackStrength = 4;
getNavigator().setBreakDoors(true);
tasks.addTask(0, new EntityAISwimming(this));
tasks.addTask(1, new EntityAIBreakDoor(this));
tasks.addTask(2, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityPlayer.class, moveSpeed, false));
tasks.addTask(3, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityVillager.class, moveSpeed, true));
tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, moveSpeed));
tasks.addTask(5, new EntityAIMoveThroughVillage(this, moveSpeed, false));
tasks.addTask(6, new EntityAIWander(this, moveSpeed));
tasks.addTask(7, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 8F));
tasks.addTask(7, new EntityAILookIdle(this));
targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityPlayer.class, 16F, 0, true));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityVillager.class, 16F, 0, false));
}
public int getMaxHealth()
{
return 20;
}
/**
* Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
*/
public int getTotalArmorValue()
{
return 2;
}
/**
* Returns true if the newer Entity AI code should be run
*/
protected boolean isAIEnabled()
{
return true;
}
/**
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
* use this to react to sunlight and start to burn.
*/
public void onLivingUpdate()
{
if (worldObj.isDaytime() && !worldObj.isRemote)
{
float f = getBrightness(1.0F);
if (f > 0.5F && worldObj.canBlockSeeTheSky(MathHelper.floor_double(posX), MathHelper.floor_double(posY), MathHelper.floor_double(posZ)) && rand.nextFloat() * 30F < (f - 0.4F) * 2.0F)
{
setFire(8);
}
}
super.onLivingUpdate();
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.zombie";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.zombiehurt";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.zombiedeath";
}
/**
* Returns the item ID for the item the mob drops on death.
*/
protected int getDropItemId()
{
return Item.rottenFlesh.shiftedIndex;
}
/**
* Get this Entity's EnumCreatureAttribute
*/
public EnumCreatureAttribute getCreatureAttribute()
{
return EnumCreatureAttribute.UNDEAD;
}
protected void dropRareDrop(int par1)
{
switch (rand.nextInt(4))
{
case 0:
dropItem(Item.swordSteel.shiftedIndex, 1);
break;
case 1:
dropItem(Item.helmetSteel.shiftedIndex, 1);
break;
case 2:
dropItem(Item.ingotIron.shiftedIndex, 1);
break;
case 3:
dropItem(Item.shovelSteel.shiftedIndex, 1);
break;
}
}
}
and these are the tasks, which you will likely want to take out:
tasks.addTask(0, new EntityAISwimming(this));
tasks.addTask(1, new EntityAIBreakDoor(this));
tasks.addTask(2, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityPlayer.class, moveSpeed, false));
tasks.addTask(3, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityVillager.class, moveSpeed, true));
tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, moveSpeed));
tasks.addTask(5, new EntityAIMoveThroughVillage(this, moveSpeed, false));
tasks.addTask(6, new EntityAIWander(this, moveSpeed));
tasks.addTask(7, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 8F));
tasks.addTask(7, new EntityAILookIdle(this));
targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityPlayer.class, 16F, 0, true));
targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityVillager.class, 16F, 0, false));
I have some errors with the multi-textures. Posting code here:
Unlike everyone else, I actually READ the post and know to put it in this spoiler...
mod_CL
package net.minecraft.src;
import java.util.Random;
public class mod_CL extends BaseMod
{
public static final Block cDirt = new BlockCDirt(150, 0).setHardness(1F).setResistance(2F).setBlockName("cana");
public static final Block cGrass = new BlockCGrass(151,0).setHardness(2F).setResistance(3F).setBlockName("canb")
public static int cGrassBottom = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassBottom.png");
public static int cGrassTop = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassTop.png");
public static int cGrassSides = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassSides.png");
public mod_CL()
{
setTextures();
}
public void setTextures()
{
//Using cGrassBottom to texture dirt fully. cGrassTop is just a placeholder, does not get used.
cDirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassBottom.png");
cGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassTop.png");
}
BlockCGrass
package net.minecraft.src;
import java.util.Random;
public class BlockCGrass extends Block
{
public BlockCGrass(int i, int j)
{
super(i,j,Material.grass);
setTickRandomly(true);
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_CL.cGrassBottom;
}
if (i == 1)
{
return mod_CL.cGrassTop;
}
else
{
return mod_CL.cGrassSides;
}
}
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (par1World.isRemote)
{
return;
}
if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2)
{
par1World.setBlockWithNotify(par2, par3, par4, mod_CL.cDirt.blockID);
}
else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9)
{
for (int i = 0; i < 4; i++)
{
int j = (par2 + par5Random.nextInt(3)) - 1;
int k = (par3 + par5Random.nextInt(5)) - 3;
int l = (par4 + par5Random.nextInt(3)) - 1;
int i1 = par1World.getBlockId(j, k + 1, l);
if (par1World.getBlockId(j, k, l) == mod_CL.cDirt.blockID && par1World.getBlockLightValue(j, k + 1, l) >= 4 && Block.lightOpacity[i1] <= 2)
{
par1World.setBlockWithNotify(j, k, l, mod_CL.cGrass.blockID);
}
}
}
}
public int idDropped(int i, Random random)
{
return mod_CL.cDirt.blockID;
}
}
im having only one error after fixing a few others, but i can get this one fixed help please?
The error is
src\minecraft\net\minecraft\src\Osmium.java:13 error ';' expected
return mod_Block.Osmium.160, 0;
Here is my code
package net.minecraft.src;
import java.util.Random;
public class Osmium extends Block
{
public Osmium (int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_Block.Osmiun.160, 0;
}
public int quantityDropped(Random random)
{
return 1;
}}
I have some errors with the multi-textures. Posting code here:
Unlike everyone else, I actually READ the post and know to put it in this spoiler...
mod_CL
package net.minecraft.src;
import java.util.Random;
public class mod_CL extends BaseMod
{
public static final Block cDirt = new BlockCDirt(150, 0).setHardness(1F).setResistance(2F).setBlockName("cana");
public static final Block cGrass = new BlockCGrass(151,0).setHardness(2F).setResistance(3F).setBlockName("canb")
public static int cGrassBottom = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassBottom.png");
public static int cGrassTop = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassTop.png");
public static int cGrassSides = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassSides.png");
public mod_CL()
{
setTextures();
}
public void setTextures()
{
//Using cGrassBottom to texture dirt fully. cGrassTop is just a placeholder, does not get used.
cDirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassBottom.png");
cGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassTop.png");
}
BlockCGrass
package net.minecraft.src;
import java.util.Random;
public class BlockCGrass extends Block
{
public BlockCGrass(int i, int j)
{
super(i,j,Material.grass);
setTickRandomly(true);
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_CL.cGrassBottom;
}
if (i == 1)
{
return mod_CL.cGrassTop;
}
else
{
return mod_CL.cGrassSides;
}
}
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (par1World.isRemote)
{
return;
}
if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2)
{
par1World.setBlockWithNotify(par2, par3, par4, mod_CL.cDirt.blockID);
}
else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9)
{
for (int i = 0; i < 4; i++)
{
int j = (par2 + par5Random.nextInt(3)) - 1;
int k = (par3 + par5Random.nextInt(5)) - 3;
int l = (par4 + par5Random.nextInt(3)) - 1;
int i1 = par1World.getBlockId(j, k + 1, l);
if (par1World.getBlockId(j, k, l) == mod_CL.cDirt.blockID && par1World.getBlockLightValue(j, k + 1, l) >= 4 && Block.lightOpacity[i1] <= 2)
{
par1World.setBlockWithNotify(j, k, l, mod_CL.cGrass.blockID);
}
}
}
}
public int idDropped(int i, Random random)
{
return mod_CL.cDirt.blockID;
}
}
I tryed to add a smelting recipe and i dont under stand whats wrong D:
heres my code and the error (Its so frustrating that it's raping my mind)
mod_Zimmite:
package net.minecraft.src;
import java.util.Random;
public class mod_Zimmite extends BaseMod
{
public static final Block Zimmite = new BlockZimmite(255, ModLoader.addOverride("/terrain.png", "/zimmy.png")).setHardness(15F).setResistance(200F).setStepSound(Block.soundStoneFootstep).setBlockName("Zimmite"); // It's recommended to have non-screen names starting with a lower case character just for preference
public void load()
{
}
public mod_Zimmite()
{
ModLoader.registerBlock(Zimmite);
ModLoader.addName(Zimmite, "Zimmite Ore");
ModLoader.addSmelting(Block.planks.blockID, new ItemStack(Zimmite, 1));
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(20);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(Zimmite.blockID, 8)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.2.5";
}
}
mod_ItemZimmiteingot:
package net.minecraft.src;
public class mod_ItemZimmiteingot extends BaseMod
{
public static final Item Zimmiteingot = new ItemZimmiteingot(5000).setItemName("Zimmiteingot");
public void load()
{
Zimmiteingot.iconIndex = ModLoader.addOverride("/gui/items.png", "zimmiteingot.png");
ModLoader.addName(Zimmiteingot, "Zimmite Ingot");
ModLoader.addSmelting(Zimmite.shiftedIndex, newItemStack(Zimmiteingot, 1));
}
public String getVersion()
{
return "1.2.5";
}
}
ItemZimmiteingot:
package net.minecraft.src;
public class ItemZimmiteingot extends Item
{
public ItemZimmiteingot(int i)
{
super(i);
maxStackSize = 64;
}
}
Error:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
> Searching for javac.exe in C:\Program Files
# 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" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_ItemZimmiteingot.java:11: error: cannot find
symbol
ModLoader.addSmelting(Zimmite.shiftedIndex, newItemStack(Zimmite
ingot, 1));
^
symbol: variable Zimmite
location: class mod_ItemZimmiteingot
src\minecraft\net\minecraft\src\mod_ItemZimmiteingot.java:11: error: cannot find
symbol
ModLoader.addSmelting(Zimmite.shiftedIndex, newItemStack(Zimmite
ingot, 1));
^
symbol: method newItemStack(Item,int)
location: class mod_ItemZimmiteingot
2 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Sorry about that. What I meant was, none of the textures are showing up. The sides of the cGrass block work fine but the top and bottom appear as a weird pink mesh.
Oh yeah, and my cGrass block does not drop a cDirt block when I break it.
Nevermind, I already fixed that part. I was using the wrong idDropped method, silly me!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumA NPC Series is on his to do list, but I am not sure if he will do that sort of thing
Firstly, use spoilers.
Secondly: merge your mod_classes (there is a tutorial on that in the OP)
Thrirdly: Java is case sensative, so your "setItemname" should be "setItemName" and your "zimmiteingot" should be what you declared it to be in the public static final line (which was "Zimmiteingot")
acuatly you nead a "/" at the start of the second one, so:
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHe will get to making that (most likely, but even so, he is not taking requests at this time), and he has stated before that asking will only slow down the speed in which he gets it out
Yes, you can use it for several different tool material types
-How do you make mountains generate to around 256?
-How do you make pine trees generate?
This is my code: I just need to know what to change or add.
package net.minecraft.src; import java.util.Random; import java.util.List; public class BiomeGenSnowMountains extends BiomeGenBase { public BiomeGenSnowMountains(int par1) { super(par1); spawnableCreatureList.clear(); topBlock = (byte)Block.grass.blockID; fillerBlock = (byte)Block.dirt.blockID; biomeDecorator.treesPerChunk = 20; biomeDecorator.flowersPerChunk = 5; biomeDecorator.grassPerChunk = 5; biomeDecorator.generateLakes = true; this.minHeight = 0.8F; this.maxHeight = 5.0F; this.setEnableSnow(); this.temperature = 0.0F; } }okay thanks. But in my CustomItemSword.java, I get this error at my that says "Constructor call must be the first statement in a constructor". What should I do? This is the second CustomItemSword Thing that I've tried to add.
public void CustomItemSword1(int par1, EnumCustomToolMaterial GLASS) { super(par1); toolMaterial = GLASS; maxStackSize = 1; setMaxDamage(GLASS.getMaxUses()); weaponDamage = 4 + GLASS.getDamageVsEntity();-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI made this mistake many times as well
how do I do this?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI do not know, as I haven't done much with biomes, you may want to try posting in mod development, I find that there are lots of experienced and helpful people there
To be honest, I am not sure, it would be nice if you posted the full code, otherwise ether wait for Techguy, or ask in mod development
He does say that he is not taking requests at this time, so please, wait until he finishes the tutorials on his list and opens it up for requests again before you post asking
What you will want to do it make a new mob with the new AI (you can just copy the Zombie code if you want) and then you will want to remove all the AI tasks, this is the Zombie code:
package net.minecraft.src; import java.util.Random; public class EntityZombie extends EntityMob { public EntityZombie(World par1World) { super(par1World); texture = "/mob/zombie.png"; moveSpeed = 0.23F; attackStrength = 4; getNavigator().setBreakDoors(true); tasks.addTask(0, new EntityAISwimming(this)); tasks.addTask(1, new EntityAIBreakDoor(this)); tasks.addTask(2, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityPlayer.class, moveSpeed, false)); tasks.addTask(3, new EntityAIAttackOnCollide(this, net.minecraft.src.EntityVillager.class, moveSpeed, true)); tasks.addTask(4, new EntityAIMoveTwardsRestriction(this, moveSpeed)); tasks.addTask(5, new EntityAIMoveThroughVillage(this, moveSpeed, false)); tasks.addTask(6, new EntityAIWander(this, moveSpeed)); tasks.addTask(7, new EntityAIWatchClosest(this, net.minecraft.src.EntityPlayer.class, 8F)); tasks.addTask(7, new EntityAILookIdle(this)); targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityPlayer.class, 16F, 0, true)); targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, net.minecraft.src.EntityVillager.class, 16F, 0, false)); } public int getMaxHealth() { return 20; } /** * Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue */ public int getTotalArmorValue() { return 2; } /** * Returns true if the newer Entity AI code should be run */ protected boolean isAIEnabled() { return true; } /** * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */ public void onLivingUpdate() { if (worldObj.isDaytime() && !worldObj.isRemote) { float f = getBrightness(1.0F); if (f > 0.5F && worldObj.canBlockSeeTheSky(MathHelper.floor_double(posX), MathHelper.floor_double(posY), MathHelper.floor_double(posZ)) && rand.nextFloat() * 30F < (f - 0.4F) * 2.0F) { setFire(8); } } super.onLivingUpdate(); } /** * Returns the sound this mob makes while it's alive. */ protected String getLivingSound() { return "mob.zombie"; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.zombiehurt"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.zombiedeath"; } /** * Returns the item ID for the item the mob drops on death. */ protected int getDropItemId() { return Item.rottenFlesh.shiftedIndex; } /** * Get this Entity's EnumCreatureAttribute */ public EnumCreatureAttribute getCreatureAttribute() { return EnumCreatureAttribute.UNDEAD; } protected void dropRareDrop(int par1) { switch (rand.nextInt(4)) { case 0: dropItem(Item.swordSteel.shiftedIndex, 1); break; case 1: dropItem(Item.helmetSteel.shiftedIndex, 1); break; case 2: dropItem(Item.ingotIron.shiftedIndex, 1); break; case 3: dropItem(Item.shovelSteel.shiftedIndex, 1); break; } } }The error is
src\minecraft\net\minecraft\src\Osmium.java:13 error ';' expected
return mod_Block.Osmium.160, 0;
Here is my code
package net.minecraft.src;
import java.util.Random;
public class Osmium extends Block
{
public Osmium (int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_Block.Osmiun.160, 0;
}
public int quantityDropped(Random random)
{
return 1;
}}
Unlike everyone else, I actually READ the post and know to put it in this spoiler...
package net.minecraft.src; import java.util.Random; public class mod_CL extends BaseMod { public static final Block cDirt = new BlockCDirt(150, 0).setHardness(1F).setResistance(2F).setBlockName("cana"); public static final Block cGrass = new BlockCGrass(151,0).setHardness(2F).setResistance(3F).setBlockName("canb") public static int cGrassBottom = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassBottom.png"); public static int cGrassTop = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassTop.png"); public static int cGrassSides = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassSides.png"); public mod_CL() { setTextures(); } public void setTextures() { //Using cGrassBottom to texture dirt fully. cGrassTop is just a placeholder, does not get used. cDirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassBottom.png"); cGrass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sonic/cGrassTop.png"); }package net.minecraft.src; import java.util.Random; public class BlockCGrass extends Block { public BlockCGrass(int i, int j) { super(i,j,Material.grass); setTickRandomly(true); } public int getBlockTextureFromSideAndMetadata(int i, int j) { return getBlockTextureFromSide(i); } public int getBlockTextureFromSide(int i) { if (i == 0) { return mod_CL.cGrassBottom; } if (i == 1) { return mod_CL.cGrassTop; } else { return mod_CL.cGrassSides; } } public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (par1World.isRemote) { return; } if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && Block.lightOpacity[par1World.getBlockId(par2, par3 + 1, par4)] > 2) { par1World.setBlockWithNotify(par2, par3, par4, mod_CL.cDirt.blockID); } else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { for (int i = 0; i < 4; i++) { int j = (par2 + par5Random.nextInt(3)) - 1; int k = (par3 + par5Random.nextInt(5)) - 3; int l = (par4 + par5Random.nextInt(3)) - 1; int i1 = par1World.getBlockId(j, k + 1, l); if (par1World.getBlockId(j, k, l) == mod_CL.cDirt.blockID && par1World.getBlockLightValue(j, k + 1, l) >= 4 && Block.lightOpacity[i1] <= 2) { par1World.setBlockWithNotify(j, k, l, mod_CL.cGrass.blockID); } } } } public int idDropped(int i, Random random) { return mod_CL.cDirt.blockID; } }kind of like a bow, and item that shoots out entities
example:
i want to make a kamehameha wave mod
how?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou need to have:
instead of:
What are the errors?
There is a link to a gun tutorial in the
OPsecond postheres my code and the error (Its so frustrating that it's raping my mind)
mod_Zimmite:
package net.minecraft.src; import java.util.Random; public class mod_Zimmite extends BaseMod { public static final Block Zimmite = new BlockZimmite(255, ModLoader.addOverride("/terrain.png", "/zimmy.png")).setHardness(15F).setResistance(200F).setStepSound(Block.soundStoneFootstep).setBlockName("Zimmite"); // It's recommended to have non-screen names starting with a lower case character just for preference public void load() { } public mod_Zimmite() { ModLoader.registerBlock(Zimmite); ModLoader.addName(Zimmite, "Zimmite Ore"); ModLoader.addSmelting(Block.planks.blockID, new ItemStack(Zimmite, 1)); } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { for(int i = 0; i < 7; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(20); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(Zimmite.blockID, 8)).generate(world, random, randPosX, randPosY, randPosZ); } } public String getVersion() { return "1.2.5"; } }mod_ItemZimmiteingot:
package net.minecraft.src; public class mod_ItemZimmiteingot extends BaseMod { public static final Item Zimmiteingot = new ItemZimmiteingot(5000).setItemName("Zimmiteingot"); public void load() { Zimmiteingot.iconIndex = ModLoader.addOverride("/gui/items.png", "zimmiteingot.png"); ModLoader.addName(Zimmiteingot, "Zimmite Ingot"); ModLoader.addSmelting(Zimmite.shiftedIndex, newItemStack(Zimmiteingot, 1)); } public String getVersion() { return "1.2.5"; } }ItemZimmiteingot:
package net.minecraft.src; public class ItemZimmiteingot extends Item { public ItemZimmiteingot(int i) { super(i); maxStackSize = 64; } }Error:
Sorry about that. What I meant was, none of the textures are showing up. The sides of the cGrass block work fine but the top and bottom appear as a weird pink mesh.
Oh yeah, and my cGrass block does not drop a cDirt block when I break it.Nevermind, I already fixed that part. I was using the wrong idDropped method, silly me!