initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
46
java/src/game/item/ItemPickaxe.java
Executable file
46
java/src/game/item/ItemPickaxe.java
Executable file
|
@ -0,0 +1,46 @@
|
|||
package game.item;
|
||||
|
||||
import game.block.Block;
|
||||
import game.init.ToolMaterial;
|
||||
|
||||
public class ItemPickaxe extends ItemTool
|
||||
{
|
||||
// private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(new Block[] {
|
||||
// Blocks.activator_rail, Blocks.coal_ore, Blocks.cobblestone, Blocks.detector_rail, Blocks.diamond_block, Blocks.diamond_ore, Blocks.double_stone_slab,
|
||||
// Blocks.golden_rail, Blocks.gold_block, Blocks.gold_ore, Blocks.ice, Blocks.iron_block, Blocks.iron_ore, Blocks.lapis_block, Blocks.lapis_ore,
|
||||
// Blocks.lit_redstone_ore, Blocks.mossy_cobblestone, Blocks.netherrack, Blocks.packed_ice, Blocks.rail, Blocks.redstone_ore, Blocks.sandstone,
|
||||
// Blocks.red_sandstone, Blocks.stone, Blocks.stone_slab
|
||||
// });
|
||||
|
||||
public ItemPickaxe(ToolMaterial material)
|
||||
{
|
||||
super(2, material);
|
||||
}
|
||||
|
||||
public boolean canHarvestBlock(Block blockIn)
|
||||
{
|
||||
return blockIn.getMiningLevel() >= 0 && this.toolMaterial.getHarvestLevel() >= blockIn.getMiningLevel();
|
||||
// blockIn == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() == 3 :
|
||||
// (blockIn != Blocks.diamond_block && blockIn != Blocks.diamond_ore ?
|
||||
// (blockIn != Blocks.emerald_ore && blockIn != Blocks.emerald_block ?
|
||||
// (blockIn != Blocks.gold_block && blockIn != Blocks.gold_ore ?
|
||||
// (blockIn != Blocks.iron_block && blockIn != Blocks.iron_ore ?
|
||||
// (blockIn != Blocks.lapis_block && blockIn != Blocks.lapis_ore ?
|
||||
// (blockIn != Blocks.redstone_ore && blockIn != Blocks.lit_redstone_ore ?
|
||||
// (blockIn.getMaterial() == Material.rock ? true :
|
||||
// (blockIn.getMaterial() == Material.iron ? true :
|
||||
// blockIn.getMaterial() == Material.anvil)) :
|
||||
// this.toolMaterial.getHarvestLevel() >= 2) :
|
||||
// this.toolMaterial.getHarvestLevel() >= 1) :
|
||||
// this.toolMaterial.getHarvestLevel() >= 1) :
|
||||
// this.toolMaterial.getHarvestLevel() >= 2) :
|
||||
// this.toolMaterial.getHarvestLevel() >= 2) :
|
||||
// this.toolMaterial.getHarvestLevel() >= 2);
|
||||
}
|
||||
|
||||
public boolean canUseOn(ItemStack stack, Block state)
|
||||
{
|
||||
return state.getMiningLevel() >= 0 /* state.getMaterial() != Material.iron && state.getMaterial() != Material.anvil && state.getMaterial() != Material.rock
|
||||
? super.getStrVsBlock(stack, state) */;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue