[Answered] ore mining help
+2
ejmejm
AthosZBrogi
6 posters
MC Modding :: Help :: Help
Page 1 of 1
[Answered] ore mining help
How do i make an ore only be able to get mined by an iron pick.
example: diamond ore can only be mined with a iron pick or higher
help if u can.
example: diamond ore can only be mined with a iron pick or higher
help if u can.
Last edited by AthosZBrogi on Tue Dec 27, 2011 9:08 am; edited 2 times in total
AthosZBrogi- Member
- Posts : 12
Join date : 2011-10-24
Age : 27
Re: [Answered] ore mining help
make the material of the block iron
ejmejm- Member
- Posts : 11
Join date : 2011-10-29
Re: [Answered] ore mining help
it is on Material.iron and i still can mine it with a wooden and stone pick
AthosZBrogi- Member
- Posts : 12
Join date : 2011-10-24
Age : 27
Re: [Answered] ore mining help
Scottols are used for that! But if you want to know how to use it, then you need to seek help somewhere else, because I also need help with that..
filip151- Member
- Posts : 11
Join date : 2011-10-21
Age : 26
Location : Norway, Oslo Poland, Swiecie
Re: [Answered] ore mining help
if you change it to iron you should be able to mine it but you shouldn't get the items
ejmejm- Member
- Posts : 11
Join date : 2011-10-29
Re: [Answered] ore mining help
public BlockNamehere(int i, int j)
{
super(i, j, Material.ground);
}
Material.ground would make it like dirt.
Goto the Material.java and in it, it shows all of the Materials so with this 1 instead of
public BlockNamehere(int i, int j)
{
super(i, j, Material.ground);
}
change it to
public BlockNamehere(int i, int j)
{
super(i, j, Material.iron);
}
{
super(i, j, Material.ground);
}
Material.ground would make it like dirt.
Goto the Material.java and in it, it shows all of the Materials so with this 1 instead of
public BlockNamehere(int i, int j)
{
super(i, j, Material.ground);
}
change it to
public BlockNamehere(int i, int j)
{
super(i, j, Material.iron);
}
Gardentiver- Member
- Posts : 3
Join date : 2011-10-15
Location : Nunya! :)
Re: [Answered] ore mining help
it is on Material.iron i have checked like 16 times now and i still can mine it with a wooden pick
AthosZBrogi- Member
- Posts : 12
Join date : 2011-10-24
Age : 27
Re: [Answered] ore mining help
how do i do that
AthosZBrogi- Member
- Posts : 12
Join date : 2011-10-24
Age : 27
Re: [Answered] ore mining help
you can use this code
youll have to change the 'else' part so that it drops nothing (not sure but probably return -1;)
- Code:
public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l)
{
if(!world.multiplayerWorld && entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == Item.pickaxeDiamond.shiftedIndex)
{
dropBlockAsItem_do(world, i, j, k, new ItemStack(mod_jasper.emeraldcrystal.shiftedIndex, 1, l & 3));
} else
{
super.harvestBlock(world, entityplayer, i, j, k, l);
}
}
youll have to change the 'else' part so that it drops nothing (not sure but probably return -1;)
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands
Similar topics
» [Answered]Reobfuscate
» [answered] What do i do when the coding is done?
» [answered] Help with crashing
» [Answered] Help with generating ores
» [Answered] tree
» [answered] What do i do when the coding is done?
» [answered] Help with crashing
» [Answered] Help with generating ores
» [Answered] tree
MC Modding :: Help :: Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum