mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
== is faster than .equals() for enums.
This commit is contained in:
@ -130,7 +130,7 @@ public class Herbalism {
|
||||
|
||||
for (int y = 0; y <= 2; y++) {
|
||||
Block relativeBlock = block.getRelative(BlockFace.UP, y);
|
||||
if (relativeBlock.getType().equals(blockType) && !mcMMO.placeStore.isTrue(relativeBlock)) {
|
||||
if (relativeBlock.getType() == blockType && !mcMMO.placeStore.isTrue(relativeBlock)) {
|
||||
dropAmount++;
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public class SuperBreakerEventHandler {
|
||||
private void calculateDurabilityLoss() {
|
||||
this.durabilityLoss = Misc.toolDurabilityLoss;
|
||||
|
||||
if (blockType.equals(Material.OBSIDIAN)) {
|
||||
if (blockType == Material.OBSIDIAN) {
|
||||
durabilityLoss = durabilityLoss * 5;
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public enum ToolType {
|
||||
return ItemChecks.isAxe(is);
|
||||
|
||||
case FISTS:
|
||||
return is.getType().equals(Material.AIR);
|
||||
return is.getType() == Material.AIR;
|
||||
|
||||
case HOE:
|
||||
return ItemChecks.isHoe(is);
|
||||
|
Reference in New Issue
Block a user