Skip to content

Commit

Permalink
Micro optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed May 2, 2020
1 parent 5bb346e commit 9a4c8e7
Showing 1 changed file with 1 addition and 12 deletions.
Expand Up @@ -10,7 +10,6 @@
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.command.CommandSender;
import org.bukkit.conversations.Conversation;
import org.bukkit.entity.Player;
Expand All @@ -22,7 +21,6 @@
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.util.Vector;

import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

Expand Down Expand Up @@ -571,14 +569,6 @@ public boolean equals(Object obj) {
return true;
}

public String getFromKey() {
return Joiner.on('/').join(from.getBlockX(), from.getBlockY(), from.getBlockZ());
}

public String getToKey() {
return Joiner.on('/').join(to.getBlockX(), to.getBlockY(), to.getBlockZ());
}

@Override
public int hashCode() {
final int prime = 31;
Expand All @@ -589,8 +579,7 @@ public int hashCode() {
public boolean verify(World world, Iterable<Vector> cached) {
for (Vector vector : cached) {
if (!MinecraftBlockExaminer
.canStandOn(world.getBlockAt(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ())
.getRelative(BlockFace.DOWN))) {
.validPosition(world.getBlockAt(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ()))) {
return false;
}
}
Expand Down

0 comments on commit 9a4c8e7

Please sign in to comment.