Nope, that hasnt changed much at all, the error comes when i try to create a new, creative superflat map. It says 'loading world' and 'converting world'.
the error in eclipse, the actual window never turns to a crash screen.
Nov 13, 2012 2:56:33 PM net.minecraft.src.IntegratedServer startServer
INFO: Starting integrated minecraft server version 1.4.2
Nov 13, 2012 2:56:33 PM net.minecraft.src.IntegratedServer startServer
INFO: Generating keypair
Nov 13, 2012 2:56:34 PM net.minecraft.server.MinecraftServer convertMapIfNeeded
INFO: Converting map!
Scanning folders...
Total conversion count is 0
java.lang.ArrayIndexOutOfBoundsException: -117
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:79)
at net.minecraft.src.Chunk.setBlockIDWithMetadata(Chunk.java:598)
at net.minecraft.src.World.setBlockAndMetadataWithUpdate(World.java:406)
at net.minecraft.src.World.setBlockAndMetadata(World.java:384)
at net.minecraft.src.WorldGenDungeon1.generate(WorldGenDungeon1.java:36)
at net.minecraft.src.mod_WorldGenDungeon1.generateSurface(mod_WorldGenDungeon1.java:20)
at net.minecraft.src.ModLoader.populateChunk(ModLoader.java:1321)
at net.minecraft.src.ChunkProviderServer.populate(ChunkProviderServer.java:222)
at net.minecraft.src.Chunk.populateChunk(Chunk.java:1136)
at net.minecraft.src.ChunkProviderServer.loadChunk(ChunkProviderServer.java:116)
at net.minecraft.src.ChunkProviderServer.provideChunk(ChunkProviderServer.java:129)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:376)
at net.minecraft.src.World.getBlockId(World.java:283)
at net.minecraft.src.World.isAirBlock(World.java:296)
at net.minecraft.src.World.getFirstUncoveredBlock(World.java:270)
at net.minecraft.src.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:79)
at net.minecraft.src.WorldServer.createSpawnPosition(WorldServer.java:658)
at net.minecraft.src.WorldServer.initialize(WorldServer.java:622)
at net.minecraft.src.World.<init>(World.java:223)
at net.minecraft.src.WorldServer.<init>(WorldServer.java:47)
at net.minecraft.src.IntegratedServer.loadAllWorlds(IntegratedServer.java:73)
at net.minecraft.src.IntegratedServer.startServer(IntegratedServer.java:102)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:461)
at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer run
SEVERE: Encountered an unexpected exception ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException: -117
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:79)
at net.minecraft.src.Chunk.setBlockIDWithMetadata(Chunk.java:598)
at net.minecraft.src.World.setBlockAndMetadataWithUpdate(World.java:406)
at net.minecraft.src.World.setBlockAndMetadata(World.java:384)
at net.minecraft.src.WorldGenDungeon1.generate(WorldGenDungeon1.java:36)
at net.minecraft.src.mod_WorldGenDungeon1.generateSurface(mod_WorldGenDungeon1.java:20)
at net.minecraft.src.ModLoader.populateChunk(ModLoader.java:1321)
at net.minecraft.src.ChunkProviderServer.populate(ChunkProviderServer.java:222)
at net.minecraft.src.Chunk.populateChunk(Chunk.java:1136)
at net.minecraft.src.ChunkProviderServer.loadChunk(ChunkProviderServer.java:116)
at net.minecraft.src.ChunkProviderServer.provideChunk(ChunkProviderServer.java:129)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:376)
at net.minecraft.src.World.getBlockId(World.java:283)
at net.minecraft.src.World.isAirBlock(World.java:296)
at net.minecraft.src.World.getFirstUncoveredBlock(World.java:270)
at net.minecraft.src.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:79)
at net.minecraft.src.WorldServer.createSpawnPosition(WorldServer.java:658)
at net.minecraft.src.WorldServer.initialize(WorldServer.java:622)
at net.minecraft.src.World.<init>(World.java:223)
at net.minecraft.src.WorldServer.<init>(WorldServer.java:47)
at net.minecraft.src.IntegratedServer.loadAllWorlds(IntegratedServer.java:73)
at net.minecraft.src.IntegratedServer.startServer(IntegratedServer.java:102)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:461)
at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer run
SEVERE: This crash report has been saved to: C:\Users\Dyan L\Desktop\MCP\jars\.\crash-reports\crash-2012-11-13_14.56.38-server.txt
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer stopServer
INFO: Stopping server
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer stopServer
INFO: Saving players
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer stopServer
INFO: Saving worlds
java.lang.NullPointerException
at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:421)
at net.minecraft.src.IntegratedServer.stopServer(IntegratedServer.java:232)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540)
at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)
I just realised i havent even tried compiling and reobfuscating, then checking as a mod. One sec.
nope, just freezes at the aforementioned screen.
That crash report is showing an error that can only be resolved by using Forge.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I have an issue with a tool I have made, the tool I have made is a Pickaxe and I copied the code from the tut but when I mine something with my pickaxe no damage is taken from the tool so it is a infinite use tool, I would like the life to be longer than diamond and mine at the same speed as diamond.
I have an issue with a tool I have made, the tool I have made is a Pickaxe and I copied the code from the tut but when I mine something with my pickaxe no damage is taken from the tool so it is a infinite use tool, I would like the life to be longer than diamond and mine at the same speed as diamond.
The method func_77660 was renamed in 1.4. It is now onBlockDestroyed. The code you need to change is in ItemNameHereTool.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Post your ItemTool class and I'll point it out. I don't have the old code anymore.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I set up herobrine mod with modloader of course for 1.4.2 so when I got on the game when the mod was all set up I built the thing got soul sand and bone and put it the way it is to make the herobrine totem. As soon as I put all of it in right it didnt come up help me!
This isn't the place to be asking that question.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I have a question that I sincerely hope you can answer.
I am making a hat mod for Minecraft, and I'm trying to add the hats by extending the texture from 64 x 32 to 512 x 256 to fit all the hat textures into the player texture.
This is proving difficult to manage custom skins with, so I ask you this.
How can I make/modify a Model to have more than one texture?
Like the Head for example on the Player. It could have one texture, but the Hat part of the same model has another, separate texture.
I have seen it before, in Mo' Creatures Lion textures I believe.
Or I can have a separate Model file but it attaches to the player model?
Here is the code for my Tools, I want to make them mine, cut and dig as fast as Diamond and last longer that diamond, since my ore is rare
ItemTitaniumAxe.java
package net.minecraft.src;
public class ItemTitaniumAxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern};
protected ItemTitaniumAxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 3, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && par2Block.blockMaterial == Material.wood)
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumPickaxe.java
package net.minecraft.src;
public class ItemTitaniumPickaxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered};
protected ItemTitaniumPickaxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 2, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.obsidian)
{
return toolMaterial.getHarvestLevel() == 3;
}
if (par1Block == Block.blockDiamond || par1Block == Block.oreDiamond)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockGold || par1Block == Block.oreGold)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockSteel || par1Block == Block.oreIron)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.blockLapis || par1Block == Block.oreLapis)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.oreRedstone || par1Block == Block.oreRedstoneGlowing)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block.blockMaterial == Material.rock)
{
return true;
}
return par1Block.blockMaterial == Material.iron;
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && (par2Block.blockMaterial == Material.iron || par2Block.blockMaterial == Material.rock))
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumShovel.java
package net.minecraft.src;
public class ItemTitaniumShovel extends ItemTitaniumTool
{
private static Block blocksEffectiveAgainst[];
public ItemTitaniumShovel(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 1, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.snow)
{
return true;
}
return par1Block == Block.blockSnow;
}
static
{
blocksEffectiveAgainst = (new Block[]
{
Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium
});
}
}
ItemTitaniumSword.java
package net.minecraft.src;
public class ItemTitaniumSword extends Item
{
private int weaponDamage;
private final EnumToolMaterialTitanium toolMaterial;
public ItemTitaniumSword(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1);
toolMaterial = par2EnumToolMaterialTitanium;
maxStackSize = 1;
setMaxDamage(par2EnumToolMaterialTitanium.getMaxUses());
weaponDamage = 4 + par2EnumToolMaterialTitanium.getDamageVsEntity();
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return par2Block.blockID != Block.web.blockID ? 1.5F : 15F;
}
/**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
{
par1ItemStack.damageItem(2, par6EntityLiving);
return true;
}
/**
* Returns the damage against a given entity.
*/
public int getDamageVsEntity(Entity par1Entity)
{
return weaponDamage;
}
/**
* Returns True is the item is renderer in full 3D when hold.
*/
public boolean isFull3D()
{
return true;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.block;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
return par1Block.blockID == Block.web.blockID;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
Here is the code for my Tools, I want to make them mine, cut and dig as fast as Diamond and last longer that diamond, since my ore is rare
ItemTitaniumAxe.java
package net.minecraft.src;
public class ItemTitaniumAxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern};
protected ItemTitaniumAxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 3, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && par2Block.blockMaterial == Material.wood)
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumPickaxe.java
package net.minecraft.src;
public class ItemTitaniumPickaxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered};
protected ItemTitaniumPickaxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 2, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.obsidian)
{
return toolMaterial.getHarvestLevel() == 3;
}
if (par1Block == Block.blockDiamond || par1Block == Block.oreDiamond)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockGold || par1Block == Block.oreGold)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockSteel || par1Block == Block.oreIron)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.blockLapis || par1Block == Block.oreLapis)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.oreRedstone || par1Block == Block.oreRedstoneGlowing)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block.blockMaterial == Material.rock)
{
return true;
}
return par1Block.blockMaterial == Material.iron;
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && (par2Block.blockMaterial == Material.iron || par2Block.blockMaterial == Material.rock))
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumShovel.java
package net.minecraft.src;
public class ItemTitaniumShovel extends ItemTitaniumTool
{
private static Block blocksEffectiveAgainst[];
public ItemTitaniumShovel(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 1, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.snow)
{
return true;
}
return par1Block == Block.blockSnow;
}
static
{
blocksEffectiveAgainst = (new Block[]
{
Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium
});
}
}
ItemTitaniumSword.java
package net.minecraft.src;
public class ItemTitaniumSword extends Item
{
private int weaponDamage;
private final EnumToolMaterialTitanium toolMaterial;
public ItemTitaniumSword(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1);
toolMaterial = par2EnumToolMaterialTitanium;
maxStackSize = 1;
setMaxDamage(par2EnumToolMaterialTitanium.getMaxUses());
weaponDamage = 4 + par2EnumToolMaterialTitanium.getDamageVsEntity();
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return par2Block.blockID != Block.web.blockID ? 1.5F : 15F;
}
/**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
{
par1ItemStack.damageItem(2, par6EntityLiving);
return true;
}
/**
* Returns the damage against a given entity.
*/
public int getDamageVsEntity(Entity par1Entity)
{
return weaponDamage;
}
/**
* Returns True is the item is renderer in full 3D when hold.
*/
public boolean isFull3D()
{
return true;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.block;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
return par1Block.blockID == Block.web.blockID;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
So... what's the problem?
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
static EnumToolMaterial EnumToolMaterialTitanium=EnumHelper.addToolMaterial("Titanium",3,However many maximum uses you want,8.0F,3,10);
I believe he's using ModLoader, not Forge.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
I have a problem where my tools seem to not take any damage.It might be because I've set the EnumToolMaterial to be 2k uses, but I don't know. Do you need to see my ItemnameHerePickaxe, hoe etc. or my EnumToolMaterial file?
If you could show me your main class and all of the tool files that'd be great, I could help you with it.
Oh ok, I'm just so experienced with Forge. I have never tried ModLoader so I don't know the basics of it. I've heard that ModLoader is easier to code in, but I definetly know that Forge has more features.
Hey Techguy! Now.. I'm trying to make a mod that extends the uses for the nether. I've added many things so far(because of you, so thank you), but i was wondering if you knew how to create a biome that will spawn in the nether even if it edits base class files. If you can do this i will greatly appreciate it!
For the biomes tutorial, I'm pretty sure the limit for the blockID is 256. At least it was like that for my dimension. I think minecraft does -128 to 128 or whatever to 0 to 256
To fix that, in front of your items that are from your mod put you mods name. My mod is called Mo' Swords and say i want to put in my ruby ore, I would put
Here is the code for my tools that I have currently
ItemTitaniumAxe.java
package net.minecraft.src;
public class ItemTitaniumAxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern};
protected ItemTitaniumAxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 3, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && par2Block.blockMaterial == Material.wood)
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumPickaxe.java
package net.minecraft.src;
public class ItemTitaniumPickaxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered};
protected ItemTitaniumPickaxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 2, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.obsidian)
{
return toolMaterial.getHarvestLevel() == 3;
}
if (par1Block == Block.blockDiamond || par1Block == Block.oreDiamond)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockGold || par1Block == Block.oreGold)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockSteel || par1Block == Block.oreIron)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.blockLapis || par1Block == Block.oreLapis)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.oreRedstone || par1Block == Block.oreRedstoneGlowing)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block.blockMaterial == Material.rock)
{
return true;
}
return par1Block.blockMaterial == Material.iron;
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && (par2Block.blockMaterial == Material.iron || par2Block.blockMaterial == Material.rock))
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumShovel.java
package net.minecraft.src;
public class ItemTitaniumShovel extends ItemTitaniumTool
{
private static Block blocksEffectiveAgainst[];
public ItemTitaniumShovel(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 1, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.snow)
{
return true;
}
return par1Block == Block.blockSnow;
}
static
{
blocksEffectiveAgainst = (new Block[]
{
Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium
});
}
}
ItemTitaniumSword.java
package net.minecraft.src;
public class ItemTitaniumSword extends Item
{
private int weaponDamage;
private final EnumToolMaterialTitanium toolMaterial;
public ItemTitaniumSword(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1);
toolMaterial = par2EnumToolMaterialTitanium;
maxStackSize = 1;
setMaxDamage(par2EnumToolMaterialTitanium.getMaxUses());
weaponDamage = 4 + par2EnumToolMaterialTitanium.getDamageVsEntity();
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return par2Block.blockID != Block.web.blockID ? 1.5F : 15F;
}
/**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
{
par1ItemStack.damageItem(2, par6EntityLiving);
return true;
}
/**
* Returns the damage against a given entity.
*/
public int getDamageVsEntity(Entity par1Entity)
{
return weaponDamage;
}
/**
* Returns True is the item is renderer in full 3D when hold.
*/
public boolean isFull3D()
{
return true;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.block;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
return par1Block.blockID == Block.web.blockID;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
What I am trying to do is the following:
Strength of the Tools: better than Diamond strength (Last longer that diamond)
Speed: Mining, Chopping and digging same speed as diamond or a little faster
Please could someone help me I'm using 'ModLoader'.
Here is the code for my tools that I have currently
ItemTitaniumAxe.java
package net.minecraft.src;
public class ItemTitaniumAxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern};
protected ItemTitaniumAxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 3, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && par2Block.blockMaterial == Material.wood)
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumPickaxe.java
package net.minecraft.src;
public class ItemTitaniumPickaxe extends ItemTitaniumTool
{
private static Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered};
protected ItemTitaniumPickaxe(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 2, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.obsidian)
{
return toolMaterial.getHarvestLevel() == 3;
}
if (par1Block == Block.blockDiamond || par1Block == Block.oreDiamond)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockGold || par1Block == Block.oreGold)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block == Block.blockSteel || par1Block == Block.oreIron)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.blockLapis || par1Block == Block.oreLapis)
{
return toolMaterial.getHarvestLevel() >= 1;
}
if (par1Block == Block.oreRedstone || par1Block == Block.oreRedstoneGlowing)
{
return toolMaterial.getHarvestLevel() >= 2;
}
if (par1Block.blockMaterial == Material.rock)
{
return true;
}
return par1Block.blockMaterial == Material.iron;
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
if (par2Block != null && (par2Block.blockMaterial == Material.iron || par2Block.blockMaterial == Material.rock))
{
return efficiencyOnProperMaterial;
}
else
{
return super.getStrVsBlock(par1ItemStack, par2Block);
}
}
}
ItemTitaniumShovel.java
package net.minecraft.src;
public class ItemTitaniumShovel extends ItemTitaniumTool
{
private static Block blocksEffectiveAgainst[];
public ItemTitaniumShovel(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1, 1, par2EnumToolMaterialTitanium, blocksEffectiveAgainst);
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
if (par1Block == Block.snow)
{
return true;
}
return par1Block == Block.blockSnow;
}
static
{
blocksEffectiveAgainst = (new Block[]
{
Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium
});
}
}
ItemTitaniumSword.java
package net.minecraft.src;
public class ItemTitaniumSword extends Item
{
private int weaponDamage;
private final EnumToolMaterialTitanium toolMaterial;
public ItemTitaniumSword(int par1, EnumToolMaterialTitanium par2EnumToolMaterialTitanium)
{
super(par1);
toolMaterial = par2EnumToolMaterialTitanium;
maxStackSize = 1;
setMaxDamage(par2EnumToolMaterialTitanium.getMaxUses());
weaponDamage = 4 + par2EnumToolMaterialTitanium.getDamageVsEntity();
}
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return par2Block.blockID != Block.web.blockID ? 1.5F : 15F;
}
/**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
{
par1ItemStack.damageItem(1, par3EntityLiving);
return true;
}
public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving)
{
par1ItemStack.damageItem(2, par6EntityLiving);
return true;
}
/**
* Returns the damage against a given entity.
*/
public int getDamageVsEntity(Entity par1Entity)
{
return weaponDamage;
}
/**
* Returns True is the item is renderer in full 3D when hold.
*/
public boolean isFull3D()
{
return true;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.block;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
return par1Block.blockID == Block.web.blockID;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return toolMaterial.getEnchantability();
}
}
What I am trying to do is the following:
Strength of the Tools: better than Diamond strength (Last longer that diamond)
Speed: Mining, Chopping and digging same speed as diamond or a little faster
Please could someone help me I'm using 'ModLoader'.
Thanks,
-Vk
Go into EnumToolMaterial study what the numbers do by looking at the comments and make a new material ( you should put the code where it has wood and stone and all that), then change the material of the tools in the mod_** file to the new material.
That crash report is showing an error that can only be resolved by using Forge.
together they are powerful beyond imagination."
The method func_77660 was renamed in 1.4. It is now onBlockDestroyed. The code you need to change is in ItemNameHereTool.
together they are powerful beyond imagination."
Post your ItemTool class and I'll point it out. I don't have the old code anymore.
together they are powerful beyond imagination."
This isn't the place to be asking that question.
together they are powerful beyond imagination."
I am making a hat mod for Minecraft, and I'm trying to add the hats by extending the texture from 64 x 32 to 512 x 256 to fit all the hat textures into the player texture.
This is proving difficult to manage custom skins with, so I ask you this.
How can I make/modify a Model to have more than one texture?
Like the Head for example on the Player. It could have one texture, but the Hat part of the same model has another, separate texture.
I have seen it before, in Mo' Creatures Lion textures I believe.
Or I can have a separate Model file but it attaches to the player model?
- PSPSlimBoy
ItemTitaniumAxe.java
ItemTitaniumPickaxe.java
ItemTitaniumShovel.java
ItemTitaniumSword.java
So... what's the problem?
Well, go to your main class and do:
static EnumToolMaterial EnumToolMaterialTitanium=EnumHelper.addToolMaterial("Titanium",3,However many maximum uses you want,8.0F,3,10);
I believe he's using ModLoader, not Forge.
If you could show me your main class and all of the tool files that'd be great, I could help you with it.
Oh ok, I'm just so experienced with Forge. I have never tried ModLoader so I don't know the basics of it. I've heard that ModLoader is easier to code in, but I definetly know that Forge has more features.
I am using ModLoader, Could someone please help me.
ItemTitaniumAxe.java
ItemTitaniumPickaxe.java
ItemTitaniumShovel.java
ItemTitaniumSword.java
What I am trying to do is the following:
Strength of the Tools: better than Diamond strength (Last longer that diamond)
Speed: Mining, Chopping and digging same speed as diamond or a little faster
Please could someone help me I'm using 'ModLoader'.
Thanks,
-Vk
Go into EnumToolMaterial study what the numbers do by looking at the comments and make a new material ( you should put the code where it has wood and stone and all that), then change the material of the tools in the mod_** file to the new material.
Keep in mind that this does edit the base class.