Hey, could you make a tut where you destroy a block with an item and the block destroys and drops an ITEM not the block iteself?
i.e.: You destroy cobblestone with a custom item, and it drops a stick, but when you destroy the cobble with an pick, it still drops cobble.
You make this =
Try this:
public int idDropped(int i, Random random)
{
if(EntityPlayer.inventory.getCurrentItem() == ITEM/MODNAMEHERE.PICKAXENAMEHERE.shiftedIndex)
{
return ITEMNAMEHERE.shiftedIndex; //returns an Item if you break it while holding a pickaxe.
}else
{
return blockID; //returns this block's blockID
}
}
public int idDropped(int i, Random random)
{
if(EntityPlayer.inventory.getCurrentItem() == ITEM/MODNAMEHERE.PICKAXENAMEHERE.shiftedIndex)
{
return ITEMNAMEHERE.shiftedIndex; //returns an Item if you break it while holding a pickaxe.
}else
{
return blockID; //returns this block's blockID
}
}
Tell me if it works :smile.gif:
thanks for helping people up.. do you want your name in the credits? you've helped me a lot!
Rollback Post to RevisionRollBack
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
ok, enumToolMaterialCow is called enumToolMaterial in the file, change the names in the file!
no no, silly, its a simple error, no need for that!
Alright, so I did that, and now I get these errors, and no matter what I do I can't get them to go away! What am I doing wrong?
errors:
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/mod_Metals.java:21: cannot find symbol
symbol : constructor ItemPickaxe(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemPickaxe
public static final Item dragonPick = (new ItemPickaxe(2003, EnumToolMaterialCow.DRAGON)).setItemName("dpick");
^
src/minecraft/net/minecraft/src/mod_Metals.java:22: cannot find symbol
symbol : constructor ItemSpade(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemSpade
public static final Item dragonShovel = new ItemSpade(2004, EnumToolMaterialCow.DRAGON).setItemName("dshovel");
^
src/minecraft/net/minecraft/src/mod_Metals.java:23: cannot find symbol
symbol : constructor ItemAxe(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemAxe
public static final Item dragonAxe = new ItemAxe(2005, EnumToolMaterialCow.DRAGON).setItemName("daxe");
^
src/minecraft/net/minecraft/src/mod_Metals.java:24: cannot find symbol
symbol : constructor ItemHoe(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemHoe
public static final Item dragonHoe = new ItemHoe(2006, EnumToolMaterialCow.DRAGON).setItemName("dhoe");
^
src/minecraft/net/minecraft/src/mod_Metals.java:25: cannot find symbol
symbol : constructor ItemSword(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemSword
public static final Item dragonSword = new ItemSword(2007, EnumToolMaterialCow.DRAGON).setItemName("dsword");
^
5 errors
==================
> Done in 29.62 seconds
> Recompiling server...
!! Can not find server sources !!
dylan-fontanas-macbook-pro:Current Mcp! reddingfontana$
mod_metals:
package net.minecraft.src;
import java.util.Random;
import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11;
public class mod_Metals extends BaseMod
{
//Blocks
public static final Block carbon = new BlockCarbon(150, 0).setHardness(1.0F).setResistance(100F).setBlockName("carbon");
public static final Block ccarbon = new BlockCcarbon(151, 0).setHardness(0.5F).setResistance(50F).setBlockName("ccarbon");
public static final Block comcarbon = new BlockComcarbon(152, 0).setHardness(2.0F).setResistance(200F).setBlockName("comcarbon");
public static final Block bounce = new BlockBounce(153,0).setHardness(2.0F).setResistance(200F).setBlockName("bounce");
public static final Block dragoniteore = new BlockDragoniteore(154,0).setHardness(1.0F).setResistance(2500F).setBlockName("dragoniteore");
public static final Block dragonite = new BlockDragonite(155,0).setHardness(0.5F).setResistance(2500F).setBlockName("dragonite");
//Items
public static final Item carbonItem = new ItemCarbon(2001).setItemName("carbonItem");
public static final Item dragoniteItem = new ItemDragonite(2002).setItemName("dragoniteItem");
//Tools
public static final Item dragonPick = new ItemPickaxe(2003, EnumToolMaterialCow.DRAGON).setItemName("dpick");
public static final Item dragonShovel = new ItemSpade(2004, EnumToolMaterialCow.DRAGON).setItemName("dshovel");
public static final Item dragonAxe = new ItemAxe(2005, EnumToolMaterialCow.DRAGON).setItemName("daxe");
public static final Item dragonHoe = new ItemHoe(2006, EnumToolMaterialCow.DRAGON).setItemName("dhoe");
public static final Item dragonSword = new ItemSword(2007, EnumToolMaterialCow.DRAGON).setItemName("dsword");
//Armors
public static Item dragonHelmet = (new ItemArmor(2008, 5, ModLoader.AddArmor("dragonArmor"), 0)).setItemName("dragonHelmet");
public static Item dragonBody = (new ItemArmor(2009, 5, ModLoader.AddArmor("dragonArmor"), 1)).setItemName("dragonBody");
public static Item dragonLegs = (new ItemArmor(2010, 5, ModLoader.AddArmor("dragonArmor"), 2)).setItemName("dragonLegs");
public static Item dragonBoots = (new ItemArmor(2011, 5, ModLoader.AddArmor("dragonArmor"), 3)).setItemName("dragonBoots");
//Spear
public static Item Spear = new ItemSpear(2012).setItemName("Spear");
//Dragon Blocks
public static final Block dragon;
public static final int id = 119;
public static int tex0 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex1 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex2 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex3 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex4 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex5 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex6 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex7 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex8 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex9 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex10 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex11 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex12 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex13 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex14 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex15 = ModLoader.getUniqueSpriteIndex("/terrain.png");
static {
dragon = (new BlockDragon(id, tex0, tex1, tex2, tex3, tex4, tex5, tex6, tex7, tex8, tex9, tex10, tex11, tex12, tex13, tex14, tex15, Material.wood)).setHardness(1.0F).setBlockName("multiblock").setRequiresSelfNotify();
}
public mod_Metals()
{
//Overlays
ModLoader.SetInGameHook(this, true, false);
//Registers
ModLoader.RegisterBlock(carbon);
ModLoader.RegisterBlock(ccarbon);
ModLoader.RegisterBlock(comcarbon);
ModLoader.RegisterBlock(bounce);
ModLoader.RegisterBlock(dragon);
ModLoader.RegisterBlock(dragoniteore);
ModLoader.RegisterBlock(dragonite);
//Name Statements
ModLoader.AddName(carbon, "Carbon Ore");
ModLoader.AddName(ccarbon, "Compressed Carbon");
ModLoader.AddName(carbonItem, "Carbon Particle");
ModLoader.AddName(comcarbon, "Compacted Carbon");
ModLoader.AddName(bounce, "Axgon");
ModLoader.AddName(dragon, "Dragon Relic");
ModLoader.AddName(dragoniteore, "Trapped Dragon Sole");
ModLoader.AddName(dragoniteItem, "Dragon Sole");
ModLoader.AddName(dragonite, "Dragon Sole Block");
ModLoader.AddName(dragonPick, "Dragonite Pickaxe");
ModLoader.AddName(dragonShovel, "Dragonite Shovel");
ModLoader.AddName(dragonAxe, "Dragonite Axe");
ModLoader.AddName(dragonHoe, "Dragonite Hoe");
ModLoader.AddName(dragonSword, "Dragonite Sword");
ModLoader.AddName(dragonHelmet, "Dragonite Helmet");
ModLoader.AddName(dragonLegs, "Dragonite Leggings");
ModLoader.AddName(dragonBoots, "Dragonite Boots");
ModLoader.AddName(dragonBody, "Dragonite Chestplate");
ModLoader.AddName(Spear, "Atlat");
//Overrides
carbon.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/CarbonOre.png");
ccarbon.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/CompressedCarbon.png");
comcarbon.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/CompactCarbon.png");
bounce.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/Axgon.png");
dragoniteore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/Dragonite.png");
dragonite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/DragoniteBlock.png");
ModLoader.addOverride("/terrain.png", "/metals/dragon/0.png", tex0);
ModLoader.addOverride("/terrain.png", "/metals/dragon/1.png", tex1);
ModLoader.addOverride("/terrain.png", "/metals/dragon/2.png", tex2);
ModLoader.addOverride("/terrain.png", "/metals/dragon/3.png", tex3);
ModLoader.addOverride("/terrain.png", "/metals/dragon/4.png", tex4);
ModLoader.addOverride("/terrain.png", "/metals/dragon/5.png", tex5);
ModLoader.addOverride("/terrain.png", "/metals/dragon/6.png", tex6);
ModLoader.addOverride("/terrain.png", "/metals/dragon/7.png", tex7);
ModLoader.addOverride("/terrain.png", "/metals/dragon/8.png", tex8);
ModLoader.addOverride("/terrain.png", "/metals/dragon/9.png", tex9);
ModLoader.addOverride("/terrain.png", "/metals/dragon/10.png", tex10);
ModLoader.addOverride("/terrain.png", "/metals/dragon/11.png", tex11);
ModLoader.addOverride("/terrain.png", "/metals/dragon/12.png", tex12);
ModLoader.addOverride("/terrain.png", "/metals/dragon/13.png", tex13);
ModLoader.addOverride("/terrain.png", "/metals/dragon/14.png", tex14);
ModLoader.addOverride("/terrain.png", "/metals/dragon/15.png", tex15);
carbonItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/CarbonItem.png");
dragoniteItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/DragonItem.png");
dragonPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dpick.png");
dragonShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dshovel.png");
dragonAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/daxe.png");
dragonHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dhoe.png");
dragonSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dsword.png");
dragonHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dhelmet.png");
dragonBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dbody.png");
dragonLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dlegs.png");
dragonBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dboots.png");
Spear.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/spear.png");
//Dragon Stuff
Item.itemsList[119] = new ItemDragon(119-256, dragon).setItemName("dragon");
//Dragonite Recipes
ModLoader.AddSmelting(dragoniteore.blockID, new ItemStack(dragoniteItem, 1));
ModLoader.AddRecipe(new ItemStack(dragonite, 1), new Object[] {
"XXX", "XXX", "XXX", Character.valueOf('X'), dragoniteItem
});
//Carbon Recipes
ModLoader.AddSmelting(carbon.blockID, new ItemStack(carbonItem, 1));
ModLoader.AddSmelting(ccarbon.blockID, new ItemStack(comcarbon, 1));
ModLoader.AddRecipe(new ItemStack(ccarbon, 1), new Object[] {
"XXX", "XXX", "XXX", Character.valueOf('X'), carbonItem
});
ModLoader.AddRecipe(new ItemStack(bounce, 1), new Object[] {
"XXX", "YYY", "# #", Character.valueOf('X'), Block.cloth, Character.valueOf('Y'), comcarbon, Character.valueOf('#'), Block.planks
});
//Dragon Recipes
ModLoader.AddRecipe(new ItemStack(dragon, 1, 0), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 1), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.stone
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 2), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.planks
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 3), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.cobblestone
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 4), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.sandStone
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 5), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.gravel
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 6), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.sand
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 7), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.brick
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 8), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.cloth
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 9), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.stoneBrick
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 10), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.pumpkin
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 11), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.wood
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 12), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.workbench
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 13), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), BlockFlower.plantYellow
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 14), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), BlockFlower.plantRed
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 15), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.chest
});
//Dragon Tools Recipes
ModLoader.AddRecipe(new ItemStack(dragonPick, 1), new Object[] {
"XXX", " | ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonShovel, 1), new Object[] {
" X ", " | ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonAxe, 1), new Object[] {
"XX ", "X| ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonHoe, 1), new Object[] {
"XX ", " | ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonSword, 1), new Object[] {
" X ", " X ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
//Dragon Armor Recipes
ModLoader.AddRecipe(new ItemStack(dragonHelmet, 1), new Object[] {"sss", "s s", " ", Character.valueOf('s'), dragoniteItem});
ModLoader.AddRecipe(new ItemStack(dragonBody, 1), new Object[] {"s s", "sss", "sss", Character.valueOf('s'), dragoniteItem});
ModLoader.AddRecipe(new ItemStack(dragonLegs, 1), new Object[] {"sss", "s s", "s s", Character.valueOf('s'), dragoniteItem});
ModLoader.AddRecipe(new ItemStack(dragonBoots, 1), new Object[] {" ", "s s", "s s", Character.valueOf('s'), dragoniteItem});
//Spear Recipe
ModLoader.AddRecipe(new ItemStack(Spear, 16), new Object[] {"s", "x", Character.valueOf('s'), Item.ingotIron, Character.valueOf('x'), carbonItem});
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(30);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Metals.carbon.blockID, 10)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 9; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(20);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Metals.dragoniteore.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
//Overlays
public boolean OnTickInGame(Minecraft minecraft)
{
if(minecraft == null)
{
minecraft = ModLoader.getMinecraftInstance();
}
if(minecraft.thePlayer == null || minecraft.theWorld == null)
{
return false;
}
if(minecraft != null && !minecraft.gameSettings.thirdPersonView && minecraft.thePlayer.inventory.armorItemInSlot(3) != null && minecraft.thePlayer.inventory.armorItemInSlot(3).itemID != Block.pumpkin.blockID && minecraft.thePlayer.inventory.armorItemInSlot(3).itemID == dragonHelmet.shiftedIndex)
{
overlay(minecraft, "%blur%/metals/Dragonoverlay.png");
}
return true;
}
public void overlay(Minecraft minecraft, String s)
{
ScaledResolution scaledresolution = new ScaledResolution(minecraft.gameSettings, minecraft.displayWidth, minecraft.displayHeight);
int i = scaledresolution.getScaledWidth();
int j = scaledresolution.getScaledHeight();
GL11.glEnable(3042 /*GL_BLEND*/);
GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
GL11.glDepthMask(false);
GL11.glBlendFunc(770, 771);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, minecraft.renderEngine.getTexture(s));
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, j, -90D, 0.0D, 1.0D);
tessellator.addVertexWithUV(i, j, -90D, 1.0D, 1.0D);
tessellator.addVertexWithUV(i, 0.0D, -90D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, -90D, 0.0D, 0.0D);
tessellator.draw();
GL11.glDepthMask(true);
GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3042 /*GL_BLEND*/);
}
//Minecraft version
public String Version()
{
return "1.8.1";
}
}
and the updated EnumToolMaterialCow:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
public enum EnumToolMaterialCow
{
WOOD("WOOD", 0, 0, 59, 2.0F, 0),
STONE("STONE", 1, 1, 131, 4F, 1),
IRON("IRON", 2, 2, 250, 6F, 2),
EMERALD("EMERALD", 3, 3, 1561, 8F, 3),
GOLD("GOLD", 4, 0, 32, 12F, 0),
DRAGON("DRAGON", 5, 1, 1000, 13F, 8);
/*
public static EnumToolMaterialCow[] values()
{
return (EnumToolMaterialCow[])allToolMaterials.clone();
}
public static EnumToolMaterialCow valueOf(String s)
{
return (EnumToolMaterialCow)Enum.valueOf(net.minecraft.src.EnumToolMaterialCow.class, s);
}
*/
private EnumToolMaterialCow(String s, int i, int j, int k, float f, int l)
{
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
/*
public static final EnumToolMaterialCow WOOD;
public static final EnumToolMaterialCow STONE;
public static final EnumToolMaterialCow IRON;
public static final EnumToolMaterialCow EMERALD;
public static final EnumToolMaterialCow GOLD;
public static final EnumToolMaterialCow DRAGON;
*/
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
// private static final EnumToolMaterialCow allToolMaterials[]; /* synthetic field */
/*
static
{
WOOD = new EnumToolMaterialCow("WOOD", 0, 0, 59, 2.0F, 0);
STONE = new EnumToolMaterialCow("STONE", 1, 1, 131, 4F, 1);
IRON = new EnumToolMaterialCow("IRON", 2, 2, 250, 6F, 2);
EMERALD = new EnumToolMaterialCow("EMERALD", 3, 3, 1561, 8F, 3);
GOLD = new EnumToolMaterialCow("GOLD", 4, 0, 32, 12F, 0);
DRAGON = new EnumToolMaterialCow("DRAGON", 5, 1, 1000, 13F, 8);
allToolMaterials = (new EnumToolMaterialCow[] {
WOOD, STONE, IRON, EMERALD, GOLD, DRAGON
});
}
*/
}
Rollback Post to RevisionRollBack
"Sometimes it's necessary to go a long distance out of the way in order to come back a short distance correctly."
Alright, so I did that, and now I get these errors, and no matter what I do I can't get them to go away! What am I doing wrong?
errors:
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/mod_Metals.java:21: cannot find symbol
symbol : constructor ItemPickaxe(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemPickaxe
public static final Item dragonPick = (new ItemPickaxe(2003, EnumToolMaterialCow.DRAGON)).setItemName("dpick");
^
src/minecraft/net/minecraft/src/mod_Metals.java:22: cannot find symbol
symbol : constructor ItemSpade(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemSpade
public static final Item dragonShovel = new ItemSpade(2004, EnumToolMaterialCow.DRAGON).setItemName("dshovel");
^
src/minecraft/net/minecraft/src/mod_Metals.java:23: cannot find symbol
symbol : constructor ItemAxe(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemAxe
public static final Item dragonAxe = new ItemAxe(2005, EnumToolMaterialCow.DRAGON).setItemName("daxe");
^
src/minecraft/net/minecraft/src/mod_Metals.java:24: cannot find symbol
symbol : constructor ItemHoe(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemHoe
public static final Item dragonHoe = new ItemHoe(2006, EnumToolMaterialCow.DRAGON).setItemName("dhoe");
^
src/minecraft/net/minecraft/src/mod_Metals.java:25: cannot find symbol
symbol : constructor ItemSword(int,net.minecraft.src.EnumToolMaterialCow)
location: class net.minecraft.src.ItemSword
public static final Item dragonSword = new ItemSword(2007, EnumToolMaterialCow.DRAGON).setItemName("dsword");
^
5 errors
==================
> Done in 29.62 seconds
> Recompiling server...
!! Can not find server sources !!
dylan-fontanas-macbook-pro:Current Mcp! reddingfontana$
mod_metals:
package net.minecraft.src;
import java.util.Random;
import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11;
public class mod_Metals extends BaseMod
{
//Blocks
public static final Block carbon = new BlockCarbon(150, 0).setHardness(1.0F).setResistance(100F).setBlockName("carbon");
public static final Block ccarbon = new BlockCcarbon(151, 0).setHardness(0.5F).setResistance(50F).setBlockName("ccarbon");
public static final Block comcarbon = new BlockComcarbon(152, 0).setHardness(2.0F).setResistance(200F).setBlockName("comcarbon");
public static final Block bounce = new BlockBounce(153,0).setHardness(2.0F).setResistance(200F).setBlockName("bounce");
public static final Block dragoniteore = new BlockDragoniteore(154,0).setHardness(1.0F).setResistance(2500F).setBlockName("dragoniteore");
public static final Block dragonite = new BlockDragonite(155,0).setHardness(0.5F).setResistance(2500F).setBlockName("dragonite");
//Items
public static final Item carbonItem = new ItemCarbon(2001).setItemName("carbonItem");
public static final Item dragoniteItem = new ItemDragonite(2002).setItemName("dragoniteItem");
//Tools
public static final Item dragonPick = new ItemPickaxe(2003, EnumToolMaterialCow.DRAGON).setItemName("dpick");
public static final Item dragonShovel = new ItemSpade(2004, EnumToolMaterialCow.DRAGON).setItemName("dshovel");
public static final Item dragonAxe = new ItemAxe(2005, EnumToolMaterialCow.DRAGON).setItemName("daxe");
public static final Item dragonHoe = new ItemHoe(2006, EnumToolMaterialCow.DRAGON).setItemName("dhoe");
public static final Item dragonSword = new ItemSword(2007, EnumToolMaterialCow.DRAGON).setItemName("dsword");
//Armors
public static Item dragonHelmet = (new ItemArmor(2008, 5, ModLoader.AddArmor("dragonArmor"), 0)).setItemName("dragonHelmet");
public static Item dragonBody = (new ItemArmor(2009, 5, ModLoader.AddArmor("dragonArmor"), 1)).setItemName("dragonBody");
public static Item dragonLegs = (new ItemArmor(2010, 5, ModLoader.AddArmor("dragonArmor"), 2)).setItemName("dragonLegs");
public static Item dragonBoots = (new ItemArmor(2011, 5, ModLoader.AddArmor("dragonArmor"), 3)).setItemName("dragonBoots");
//Spear
public static Item Spear = new ItemSpear(2012).setItemName("Spear");
//Dragon Blocks
public static final Block dragon;
public static final int id = 119;
public static int tex0 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex1 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex2 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex3 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex4 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex5 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex6 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex7 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex8 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex9 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex10 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex11 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex12 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex13 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex14 = ModLoader.getUniqueSpriteIndex("/terrain.png");
public static int tex15 = ModLoader.getUniqueSpriteIndex("/terrain.png");
static {
dragon = (new BlockDragon(id, tex0, tex1, tex2, tex3, tex4, tex5, tex6, tex7, tex8, tex9, tex10, tex11, tex12, tex13, tex14, tex15, Material.wood)).setHardness(1.0F).setBlockName("multiblock").setRequiresSelfNotify();
}
public mod_Metals()
{
//Overlays
ModLoader.SetInGameHook(this, true, false);
//Registers
ModLoader.RegisterBlock(carbon);
ModLoader.RegisterBlock(ccarbon);
ModLoader.RegisterBlock(comcarbon);
ModLoader.RegisterBlock(bounce);
ModLoader.RegisterBlock(dragon);
ModLoader.RegisterBlock(dragoniteore);
ModLoader.RegisterBlock(dragonite);
//Name Statements
ModLoader.AddName(carbon, "Carbon Ore");
ModLoader.AddName(ccarbon, "Compressed Carbon");
ModLoader.AddName(carbonItem, "Carbon Particle");
ModLoader.AddName(comcarbon, "Compacted Carbon");
ModLoader.AddName(bounce, "Axgon");
ModLoader.AddName(dragon, "Dragon Relic");
ModLoader.AddName(dragoniteore, "Trapped Dragon Sole");
ModLoader.AddName(dragoniteItem, "Dragon Sole");
ModLoader.AddName(dragonite, "Dragon Sole Block");
ModLoader.AddName(dragonPick, "Dragonite Pickaxe");
ModLoader.AddName(dragonShovel, "Dragonite Shovel");
ModLoader.AddName(dragonAxe, "Dragonite Axe");
ModLoader.AddName(dragonHoe, "Dragonite Hoe");
ModLoader.AddName(dragonSword, "Dragonite Sword");
ModLoader.AddName(dragonHelmet, "Dragonite Helmet");
ModLoader.AddName(dragonLegs, "Dragonite Leggings");
ModLoader.AddName(dragonBoots, "Dragonite Boots");
ModLoader.AddName(dragonBody, "Dragonite Chestplate");
ModLoader.AddName(Spear, "Atlat");
//Overrides
carbon.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/CarbonOre.png");
ccarbon.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/CompressedCarbon.png");
comcarbon.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/CompactCarbon.png");
bounce.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/Axgon.png");
dragoniteore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/Dragonite.png");
dragonite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/metals/DragoniteBlock.png");
ModLoader.addOverride("/terrain.png", "/metals/dragon/0.png", tex0);
ModLoader.addOverride("/terrain.png", "/metals/dragon/1.png", tex1);
ModLoader.addOverride("/terrain.png", "/metals/dragon/2.png", tex2);
ModLoader.addOverride("/terrain.png", "/metals/dragon/3.png", tex3);
ModLoader.addOverride("/terrain.png", "/metals/dragon/4.png", tex4);
ModLoader.addOverride("/terrain.png", "/metals/dragon/5.png", tex5);
ModLoader.addOverride("/terrain.png", "/metals/dragon/6.png", tex6);
ModLoader.addOverride("/terrain.png", "/metals/dragon/7.png", tex7);
ModLoader.addOverride("/terrain.png", "/metals/dragon/8.png", tex8);
ModLoader.addOverride("/terrain.png", "/metals/dragon/9.png", tex9);
ModLoader.addOverride("/terrain.png", "/metals/dragon/10.png", tex10);
ModLoader.addOverride("/terrain.png", "/metals/dragon/11.png", tex11);
ModLoader.addOverride("/terrain.png", "/metals/dragon/12.png", tex12);
ModLoader.addOverride("/terrain.png", "/metals/dragon/13.png", tex13);
ModLoader.addOverride("/terrain.png", "/metals/dragon/14.png", tex14);
ModLoader.addOverride("/terrain.png", "/metals/dragon/15.png", tex15);
carbonItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/CarbonItem.png");
dragoniteItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/DragonItem.png");
dragonPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dpick.png");
dragonShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dshovel.png");
dragonAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/daxe.png");
dragonHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dhoe.png");
dragonSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dsword.png");
dragonHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dhelmet.png");
dragonBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dbody.png");
dragonLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dlegs.png");
dragonBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/dboots.png");
Spear.iconIndex = ModLoader.addOverride("/gui/items.png", "/metals/spear.png");
//Dragon Stuff
Item.itemsList[119] = new ItemDragon(119-256, dragon).setItemName("dragon");
//Dragonite Recipes
ModLoader.AddSmelting(dragoniteore.blockID, new ItemStack(dragoniteItem, 1));
ModLoader.AddRecipe(new ItemStack(dragonite, 1), new Object[] {
"XXX", "XXX", "XXX", Character.valueOf('X'), dragoniteItem
});
//Carbon Recipes
ModLoader.AddSmelting(carbon.blockID, new ItemStack(carbonItem, 1));
ModLoader.AddSmelting(ccarbon.blockID, new ItemStack(comcarbon, 1));
ModLoader.AddRecipe(new ItemStack(ccarbon, 1), new Object[] {
"XXX", "XXX", "XXX", Character.valueOf('X'), carbonItem
});
ModLoader.AddRecipe(new ItemStack(bounce, 1), new Object[] {
"XXX", "YYY", "# #", Character.valueOf('X'), Block.cloth, Character.valueOf('Y'), comcarbon, Character.valueOf('#'), Block.planks
});
//Dragon Recipes
ModLoader.AddRecipe(new ItemStack(dragon, 1, 0), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 1), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.stone
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 2), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.planks
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 3), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.cobblestone
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 4), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.sandStone
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 5), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.gravel
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 6), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.sand
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 7), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.brick
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 8), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.cloth
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 9), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.stoneBrick
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 10), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.pumpkin
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 11), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.wood
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 12), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.workbench
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 13), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), BlockFlower.plantYellow
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 14), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), BlockFlower.plantRed
});
ModLoader.AddRecipe(new ItemStack(dragon, 1, 15), new Object[]{
"X", "Y", Character.valueOf('X'), comcarbon, Character.valueOf('Y'), Block.chest
});
//Dragon Tools Recipes
ModLoader.AddRecipe(new ItemStack(dragonPick, 1), new Object[] {
"XXX", " | ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonShovel, 1), new Object[] {
" X ", " | ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonAxe, 1), new Object[] {
"XX ", "X| ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonHoe, 1), new Object[] {
"XX ", " | ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(dragonSword, 1), new Object[] {
" X ", " X ", " | ", Character.valueOf('X'), dragoniteItem, Character.valueOf('|'), Item.stick
});
//Dragon Armor Recipes
ModLoader.AddRecipe(new ItemStack(dragonHelmet, 1), new Object[] {"sss", "s s", " ", Character.valueOf('s'), dragoniteItem});
ModLoader.AddRecipe(new ItemStack(dragonBody, 1), new Object[] {"s s", "sss", "sss", Character.valueOf('s'), dragoniteItem});
ModLoader.AddRecipe(new ItemStack(dragonLegs, 1), new Object[] {"sss", "s s", "s s", Character.valueOf('s'), dragoniteItem});
ModLoader.AddRecipe(new ItemStack(dragonBoots, 1), new Object[] {" ", "s s", "s s", Character.valueOf('s'), dragoniteItem});
//Spear Recipe
ModLoader.AddRecipe(new ItemStack(Spear, 16), new Object[] {"s", "x", Character.valueOf('s'), Item.ingotIron, Character.valueOf('x'), carbonItem});
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < 15; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(30);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Metals.carbon.blockID, 10)).generate(world, rand, randPosX, randPosY, randPosZ);
}
for(int i = 0; i < 9; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(20);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Metals.dragoniteore.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
//Overlays
public boolean OnTickInGame(Minecraft minecraft)
{
if(minecraft == null)
{
minecraft = ModLoader.getMinecraftInstance();
}
if(minecraft.thePlayer == null || minecraft.theWorld == null)
{
return false;
}
if(minecraft != null && !minecraft.gameSettings.thirdPersonView && minecraft.thePlayer.inventory.armorItemInSlot(3) != null && minecraft.thePlayer.inventory.armorItemInSlot(3).itemID != Block.pumpkin.blockID && minecraft.thePlayer.inventory.armorItemInSlot(3).itemID == dragonHelmet.shiftedIndex)
{
overlay(minecraft, "%blur%/metals/Dragonoverlay.png");
}
return true;
}
public void overlay(Minecraft minecraft, String s)
{
ScaledResolution scaledresolution = new ScaledResolution(minecraft.gameSettings, minecraft.displayWidth, minecraft.displayHeight);
int i = scaledresolution.getScaledWidth();
int j = scaledresolution.getScaledHeight();
GL11.glEnable(3042 /*GL_BLEND*/);
GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
GL11.glDepthMask(false);
GL11.glBlendFunc(770, 771);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3008 /*GL_ALPHA_TEST*/);
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, minecraft.renderEngine.getTexture(s));
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0.0D, j, -90D, 0.0D, 1.0D);
tessellator.addVertexWithUV(i, j, -90D, 1.0D, 1.0D);
tessellator.addVertexWithUV(i, 0.0D, -90D, 1.0D, 0.0D);
tessellator.addVertexWithUV(0.0D, 0.0D, -90D, 0.0D, 0.0D);
tessellator.draw();
GL11.glDepthMask(true);
GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
GL11.glEnable(3008 /*GL_ALPHA_TEST*/);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(3042 /*GL_BLEND*/);
}
//Minecraft version
public String Version()
{
return "1.8.1";
}
}
and the updated EnumToolMaterialCow:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
public enum EnumToolMaterialCow
{
WOOD("WOOD", 0, 0, 59, 2.0F, 0),
STONE("STONE", 1, 1, 131, 4F, 1),
IRON("IRON", 2, 2, 250, 6F, 2),
EMERALD("EMERALD", 3, 3, 1561, 8F, 3),
GOLD("GOLD", 4, 0, 32, 12F, 0),
DRAGON("DRAGON", 5, 1, 1000, 13F, 8);
/*
public static EnumToolMaterialCow[] values()
{
return (EnumToolMaterialCow[])allToolMaterials.clone();
}
public static EnumToolMaterialCow valueOf(String s)
{
return (EnumToolMaterialCow)Enum.valueOf(net.minecraft.src.EnumToolMaterialCow.class, s);
}
*/
private EnumToolMaterialCow(String s, int i, int j, int k, float f, int l)
{
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
/*
public static final EnumToolMaterialCow WOOD;
public static final EnumToolMaterialCow STONE;
public static final EnumToolMaterialCow IRON;
public static final EnumToolMaterialCow EMERALD;
public static final EnumToolMaterialCow GOLD;
public static final EnumToolMaterialCow DRAGON;
*/
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
// private static final EnumToolMaterialCow allToolMaterials[]; /* synthetic field */
/*
static
{
WOOD = new EnumToolMaterialCow("WOOD", 0, 0, 59, 2.0F, 0);
STONE = new EnumToolMaterialCow("STONE", 1, 1, 131, 4F, 1);
IRON = new EnumToolMaterialCow("IRON", 2, 2, 250, 6F, 2);
EMERALD = new EnumToolMaterialCow("EMERALD", 3, 3, 1561, 8F, 3);
GOLD = new EnumToolMaterialCow("GOLD", 4, 0, 32, 12F, 0);
DRAGON = new EnumToolMaterialCow("DRAGON", 5, 1, 1000, 13F, 8);
allToolMaterials = (new EnumToolMaterialCow[] {
WOOD, STONE, IRON, EMERALD, GOLD, DRAGON
});
}
*/
}
make a new itemTool, and itemPickaxe and all the other tools
rename them all to it, and call them something like... ItemPickaxe[YOURMODNAME]
Rollback Post to RevisionRollBack
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Can you help me make an auto-quarry mod? I've seen parts of this functionality other places but nothing that really pulls it all together and I don't know enough java to make something without help anytime this year.
As I'm quarrying through my world it occurred to me that there should be a better way... I've seen mods that allow you to move structures from one location to another (though I can't think of the name right now)... but I've never seen a mod that would allow me to remove and collect a large number of blocks at a time. What I'm picturing is:
1) You put down 1 block per corner (or 1 at each diagonal and have it assume a rectangle in between)
2) All of the blocks in that section would then auto-mine. (Maybe up to what is possible with TNT, leaving obsidian, lava, water, and bedrock)
3) Ideally, you would then spawn any chests in your inventory that would collect the floaters until full.
4) Anything left over you need to manually collect.
It seems like I am always trying to clear out large sections of the map to create flats to build on or to get materials to build with. A mod like this would be perfect and allow me to stay in survival rather than bouncing between survival and creative.
I've seen mods that:
- will spawn a chest from your inventory. (death chest)
- will auto mine a tree (Timber)
- will move structures from one location to another (don't recall this one)
So it seems possible that you could combine the functionality with what I'm looking for but I don't know how.
Can you help me make an auto-quarry mod? I've seen parts of this functionality other places but nothing that really pulls it all together and I don't know enough java to make something without help anytime this year.
As I'm quarrying through my world it occurred to me that there should be a better way... I've seen mods that allow you to move structures from one location to another (though I can't think of the name right now)... but I've never seen a mod that would allow me to remove and collect a large number of blocks at a time. What I'm picturing is:
1) You put down 1 block per corner (or 1 at each diagonal and have it assume a rectangle in between)
2) All of the blocks in that section would then auto-mine. (Maybe up to what is possible with TNT, leaving obsidian, lava, water, and bedrock)
3) Ideally, you would then spawn any chests in your inventory that would collect the floaters until full.
4) Anything left over you need to manually collect.
It seems like I am always trying to clear out large sections of the map to create flats to build on or to get materials to build with. A mod like this would be perfect and allow me to stay in survival rather than bouncing between survival and creative.
I've seen mods that:
- will spawn a chest from your inventory. (death chest)
- will auto mine a tree (Timber)
- will move structures from one location to another (don't recall this one)
So it seems possible that you could combine the functionality with what I'm looking for but I don't know how.
Is this crazy to make or just crazy hard?
Thanks.
you just struck my mind in how to do all that...
but yeah, pretty simple, there is a tutorial on how to make a block spawn when right clicking a block on zidMC, change that into spawning a BIG quarry :wink.gif:
if you want, i can make a code for you :wink.gif:
Rollback Post to RevisionRollBack
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
but yeah, pretty simple, there is a tutorial on how to make a block spawn when right clicking a block on zidMC, change that into spawning a BIG quarry :wink.gif:
if you want, i can make a code for you :wink.gif:
Hey man that would be great. I've started playing around with some other mods combos (Risugami's DeathChest + Pitman 87's Magic Box + TehKrush's Timber!) to select a region and try to spawn chests filled with the local blocks but I'm a good ways away from making something work. If you've got a way to do it that would be great. If it tried to spawn a quarry would the local blocks just get replaced or do they get broken and turned into items automatically?
Hey man that would be great. I've started playing around with some other mods combos (Risugami's DeathChest + Pitman 87's Magic Box + TehKrush's Timber!) to select a region and try to spawn chests filled with the local blocks but I'm a good ways away from making something work. If you've got a way to do it that would be great. If it tried to spawn a quarry would the local blocks just get replaced or do they get broken and turned into items automatically?
well, i wouldn't be able to make them drop, but they can break :tongue.gif:
Rollback Post to RevisionRollBack
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
ok, lets get right into it, first make a new block, then open up Blocknewblockthing
now pretty simple, put in this code, and it will make it will spawn lightning when redstone powered!
ok, now thats done!
you now know how to make it, here i will break it down
the is a simple constructer, just checks if the block next to it is powered redstone, then it will do the function, (i think)
world.entityJoinedWorld(new EntityLightningBolt(world, i, j, k));
you probably don't need the full code, its just one thing!
well, have fun
here are some examples of what entity's you can spawn, im not sure if they work with this code though
EntityLightningBolt
EntityCow
EntityZombie
EntityCreeper
EntityArrow
EntityYourGrenade (if you use this one you should make it resistant to TNT)
EntityMonster (not sure about this one, i think its a human looking guy that chases you)
EntityGiant (that would be fun)
good luck! :smile.gif:
Could you please update this tutorial, because my WIP mod needs this!
Thank you!
EDIT:
he errors by:
world.entityJoinedWorld(new EntityLightningBolt(world, i, j, k));
The word: world
He says: Multiple markers at this line
- world cannot be resolved
- world cannot be resolved to a
variable
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 98206c4d --------
Generated 10/17/11 3:14 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows Vista (x86) version 6.0
Java: 1.6.0_27, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 3200 Graphics version 2.1.7978 Release, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.Entity.moveEntity(Entity.java:484)
at net.minecraft.src.EntityLiving.moveEntityWithHeading(EntityLiving.java:600)
at net.minecraft.src.EntityLiving.onLivingUpdate(EntityLiving.java:753)
at net.minecraft.src.EntityMob.onLivingUpdate(EntityMob.java:33)
at net.minecraft.src.EntitySkeleton.onLivingUpdate(EntitySkeleton.java:68)
at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:255)
at net.minecraft.src.EntityMob.onUpdate(EntityMob.java:38)
at net.minecraft.src.World.updateEntityWithOptionalForce(World.java:1558)
at net.minecraft.src.World.updateEntity(World.java:1534)
at net.minecraft.src.World.updateEntities(World.java:1442)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1157)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 5720924d ----------
I have an error:
it (eclips) says:
Void methods cannot return a value
By this line
{
return mod_spawnerblock.cowspawner.blockID;
}
My Code:
package net.minecraft.src;
import java.util.Random;
public class BlockCowspawner extends Block
{
public BlockCowspawner(int i, int j)
{
super(i, j, Material.ice);
setStepSound(soundGrassFootstep);
}
// here it is:
{
return mod_spawnerblock.cowspawner.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 98206c4d --------
Generated 10/17/11 3:14 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows Vista (x86) version 6.0
Java: 1.6.0_27, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 3200 Graphics version 2.1.7978 Release, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.Entity.moveEntity(Entity.java:484)
at net.minecraft.src.EntityLiving.moveEntityWithHeading(EntityLiving.java:600)
at net.minecraft.src.EntityLiving.onLivingUpdate(EntityLiving.java:753)
at net.minecraft.src.EntityMob.onLivingUpdate(EntityMob.java:33)
at net.minecraft.src.EntitySkeleton.onLivingUpdate(EntitySkeleton.java:68)
at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:255)
at net.minecraft.src.EntityMob.onUpdate(EntityMob.java:38)
at net.minecraft.src.World.updateEntityWithOptionalForce(World.java:1558)
at net.minecraft.src.World.updateEntity(World.java:1534)
at net.minecraft.src.World.updateEntities(World.java:1442)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1157)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 5720924d ----------
i have this too! ;(
its real hard to fix, and i don't know how... sorry :sad.gif:
Try this:
Tell me if it works :smile.gif:
that adds less compatibility, = less downloads = less popular = less comments = less happy = discontinuing mod!
not that much though, its just a little bonus to add that in for people
thanks for helping people up.. do you want your name in the credits? you've helped me a lot!
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Alright, so I did that, and now I get these errors, and no matter what I do I can't get them to go away! What am I doing wrong?
errors:
mod_metals:
and the updated EnumToolMaterialCow:
make a new itemTool, and itemPickaxe and all the other tools
rename them all to it, and call them something like... ItemPickaxe[YOURMODNAME]
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
As I'm quarrying through my world it occurred to me that there should be a better way... I've seen mods that allow you to move structures from one location to another (though I can't think of the name right now)... but I've never seen a mod that would allow me to remove and collect a large number of blocks at a time. What I'm picturing is:
1) You put down 1 block per corner (or 1 at each diagonal and have it assume a rectangle in between)
2) All of the blocks in that section would then auto-mine. (Maybe up to what is possible with TNT, leaving obsidian, lava, water, and bedrock)
3) Ideally, you would then spawn any chests in your inventory that would collect the floaters until full.
4) Anything left over you need to manually collect.
It seems like I am always trying to clear out large sections of the map to create flats to build on or to get materials to build with. A mod like this would be perfect and allow me to stay in survival rather than bouncing between survival and creative.
I've seen mods that:
- will spawn a chest from your inventory. (death chest)
- will auto mine a tree (Timber)
- will move structures from one location to another (don't recall this one)
So it seems possible that you could combine the functionality with what I'm looking for but I don't know how.
Is this crazy to make or just crazy hard?
Thanks.
you just struck my mind in how to do all that...
but yeah, pretty simple, there is a tutorial on how to make a block spawn when right clicking a block on zidMC, change that into spawning a BIG quarry :wink.gif:
if you want, i can make a code for you :wink.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Hey man that would be great. I've started playing around with some other mods combos (Risugami's DeathChest + Pitman 87's Magic Box + TehKrush's Timber!) to select a region and try to spawn chests filled with the local blocks but I'm a good ways away from making something work. If you've got a way to do it that would be great. If it tried to spawn a quarry would the local blocks just get replaced or do they get broken and turned into items automatically?
well, i wouldn't be able to make them drop, but they can break :tongue.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
So if I understand you.... you are talking about spawning a quarry, basically replacing a large section of blocks with air?
yeah, pretty much :tongue.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Could you please update this tutorial, because my WIP mod needs this!
Thank you!
EDIT:
he errors by:
The word: world
He says: Multiple markers at this line
- world cannot be resolved
- world cannot be resolved to a
variable
look:
ModLoader Beta 1.8.1
net.minecraft.src.mod_Alligator 1.8.1
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 98206c4d --------
Generated 10/17/11 3:14 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows Vista (x86) version 6.0
Java: 1.6.0_27, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 3200 Graphics version 2.1.7978 Release, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.Entity.moveEntity(Entity.java:484)
at net.minecraft.src.EntityLiving.moveEntityWithHeading(EntityLiving.java:600)
at net.minecraft.src.EntityLiving.onLivingUpdate(EntityLiving.java:753)
at net.minecraft.src.EntityMob.onLivingUpdate(EntityMob.java:33)
at net.minecraft.src.EntitySkeleton.onLivingUpdate(EntitySkeleton.java:68)
at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:255)
at net.minecraft.src.EntityMob.onUpdate(EntityMob.java:38)
at net.minecraft.src.World.updateEntityWithOptionalForce(World.java:1558)
at net.minecraft.src.World.updateEntity(World.java:1534)
at net.minecraft.src.World.updateEntities(World.java:1442)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1157)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 5720924d ----------
it (eclips) says:
Void methods cannot return a value
By this line
{
return mod_spawnerblock.cowspawner.blockID;
}
My Code:
Your code line has no method name, args or return type lol. Re-check his block tutorial.
i have this too! ;(
its real hard to fix, and i don't know how... sorry :sad.gif:
thats a bit herpy :tongue.gif: ... please do the tutorial again, and follow everything.
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
i'll do! know i'm starting to go modding on my mac so i'll just 'restart'
ok, just remember to read every single bit. :wink.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
ohh, thats really hard, sorry, not sure how to do it ;S
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3