Removed redundant if statement

This commit is contained in:
bm01 2012-02-23 10:34:34 +01:00
parent d1b522b534
commit 94387045e4

View File

@ -70,10 +70,6 @@ public class WoodCutting
if(m.blockBreakSimulate(x, player))
{
if(x.getType() == Material.LOG || x.getType() == Material.LEAVES)
{
durabilityLoss++; //Damage the tool more if the Tree is larger
if(x.getType() == Material.LOG)
{
byte type = x.getData();
@ -107,6 +103,9 @@ public class WoodCutting
x.setData((byte) 0);
x.setType(Material.AIR);
//Damage the tool more if the Tree is larger
durabilityLoss++;
} else if(x.getType() == Material.LEAVES)
{
Material mat = Material.SAPLING;
@ -119,7 +118,9 @@ public class WoodCutting
//Remove the block
x.setData((byte) 0);
x.setType(Material.AIR);
}
//Damage the tool more if the Tree is larger
durabilityLoss++;
}
}
}