IcePathData: Compare Material instead of integers

This commit is contained in:
libraryaddict 2015-04-03 19:37:27 +13:00
parent 290767c58d
commit 23abf92722

View File

@ -5,6 +5,7 @@ import java.util.ArrayList;
import mineplex.core.common.util.UtilMath;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
@ -76,10 +77,10 @@ public class IcePathData
loc.add(dir.clone().multiply(0.2));
if (loc.getBlock().getTypeId() == 79)
if (loc.getBlock().getType() == Material.ICE)
continue;
if (loc.getBlock().getTypeId() == 0 || loc.getBlock().getTypeId() == 78)
if (loc.getBlock().getType() == Material.AIR || loc.getBlock().getType() == Material.SNOW)
{
if (!_blocks.contains(loc.getBlock()))
{