Minor tool cleanups
This commit is contained in:
parent
d08c6da830
commit
a29b637a0a
4 changed files with 22 additions and 19 deletions
|
@ -17,12 +17,11 @@ public class ItemMekanismAxe extends ItemMekanismTool
|
|||
@Override
|
||||
public float getStrVsBlock(ItemStack itemstack, Block block)
|
||||
{
|
||||
if (block != null && block.blockMaterial == Material.wood)
|
||||
if(block != null && block.blockMaterial == Material.wood)
|
||||
{
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
return super.getStrVsBlock(itemstack, block);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,13 +31,13 @@ public class ItemMekanismHoe extends ItemMekanism
|
|||
@Override
|
||||
public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int x, int y, int z, int side, float entityX, float entityY, float entityZ)
|
||||
{
|
||||
if (!entityplayer.canPlayerEdit(x, y, z, side, itemstack))
|
||||
if(!entityplayer.canPlayerEdit(x, y, z, side, itemstack))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
UseHoeEvent event = new UseHoeEvent(entityplayer, itemstack, world, x, y, z);
|
||||
|
||||
if(MinecraftForge.EVENT_BUS.post(event))
|
||||
{
|
||||
return false;
|
||||
|
@ -60,7 +60,7 @@ public class ItemMekanismHoe extends ItemMekanism
|
|||
Block block = Block.tilledField;
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, block.stepSound.getStepSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
|
||||
if (world.isRemote)
|
||||
if(world.isRemote)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -21,37 +21,41 @@ public class ItemMekanismPaxel extends ItemMekanismTool
|
|||
@Override
|
||||
public boolean canHarvestBlock(Block block)
|
||||
{
|
||||
if (block == Block.obsidian)
|
||||
if(block == Block.obsidian)
|
||||
{
|
||||
return toolMaterial.getHarvestLevel() == 3;
|
||||
}
|
||||
if (block == Block.blockDiamond || block == Block.oreDiamond)
|
||||
|
||||
if(block == Block.blockDiamond || block == Block.oreDiamond)
|
||||
{
|
||||
return toolMaterial.getHarvestLevel() >= 2;
|
||||
}
|
||||
if (block == Block.blockGold || block == Block.oreGold)
|
||||
|
||||
if(block == Block.blockGold || block == Block.oreGold)
|
||||
{
|
||||
return toolMaterial.getHarvestLevel() >= 2;
|
||||
}
|
||||
if (block == Block.blockIron || block == Block.oreIron)
|
||||
|
||||
if(block == Block.blockIron || block == Block.oreIron)
|
||||
{
|
||||
return toolMaterial.getHarvestLevel() >= 1;
|
||||
}
|
||||
if (block == Block.blockLapis || block == Block.oreLapis)
|
||||
|
||||
if(block == Block.blockLapis || block == Block.oreLapis)
|
||||
{
|
||||
return toolMaterial.getHarvestLevel() >= 1;
|
||||
}
|
||||
if (block == Block.oreRedstone || block == Block.oreRedstoneGlowing)
|
||||
|
||||
if(block == Block.oreRedstone || block == Block.oreRedstoneGlowing)
|
||||
{
|
||||
return toolMaterial.getHarvestLevel() >= 2;
|
||||
}
|
||||
if (block.blockMaterial == Material.rock)
|
||||
|
||||
if(block.blockMaterial == Material.rock)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return block.blockMaterial == Material.iron;
|
||||
}
|
||||
|
||||
return block.blockMaterial == Material.iron;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class ItemMekanismShovel extends ItemMekanismTool
|
|||
@Override
|
||||
public boolean canHarvestBlock(Block block)
|
||||
{
|
||||
if (block == Block.snow)
|
||||
if(block == Block.snow)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue