Added a few null pointer checks and performed minor touchups (tried improving a few equals, clone and hashCode methods).

This commit is contained in:
VictorD
2011-03-05 12:27:51 +01:00
parent 86344ad44e
commit cd490d826b
9 changed files with 51 additions and 16 deletions

View File

@@ -7,10 +7,8 @@ import org.bukkit.block.BlockFace;
import org.bukkit.entity.LivingEntity;
import java.util.Iterator;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.lang.IllegalStateException;
import java.lang.Exception;
/**
* This class performs ray tracing and iterates along blocks on a line
@@ -23,7 +21,7 @@ public class BlockIterator implements Iterator<Block> {
private final World world;
private final int maxDistance;
private final int gridSize = 1<<24;
private static final int gridSize = 1<<24;
private boolean end = false;