mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-01-07 16:27:49 +01:00
Updated Safe Location to 1.8.8
This commit is contained in:
parent
d63b232453
commit
30857c8a12
@ -64,7 +64,7 @@ public final class LocationUtil {
|
||||
Location locWorking = loc.clone();
|
||||
for(int i=locWorking.getBlockY(); i>=0; i--){
|
||||
if(!locWorking.getBlock().isEmpty()){
|
||||
if(locWorking.getBlock().getType().equals(Material.WATER) ||
|
||||
if(locWorking.getBlock().getType().equals(CompatibleMaterial.WATER.getMaterial()) ||
|
||||
(NMSUtil.getVersionNumber() > 13 && locWorking.getBlock().getBlockData() instanceof org.bukkit.block.data.Waterlogged)){
|
||||
loc = locWorking;
|
||||
}
|
||||
@ -80,11 +80,11 @@ public final class LocationUtil {
|
||||
!locChecked.getBlock().isLiquid() &&
|
||||
locChecked.getBlock().getType().isSolid() &&
|
||||
locChecked.getBlock().getType().isBlock() &&
|
||||
locChecked.add(0d,1d,0d).getBlock().getType().equals(Material.AIR) &&
|
||||
locChecked.add(0d,2d,0d).getBlock().getType().equals(Material.AIR) &&
|
||||
!(NMSUtil.getVersionNumber() <= 13 || locChecked.getBlock().getBlockData() instanceof org.bukkit.block.data.Waterlogged)){
|
||||
locChecked.add(0d,1d,0d).getBlock().getType().equals(CompatibleMaterial.AIR.getMaterial()) &&
|
||||
locChecked.add(0d,2d,0d).getBlock().getType().equals(CompatibleMaterial.AIR.getMaterial()) &&
|
||||
!(NMSUtil.getVersionNumber() >= 13 && locChecked.getBlock().getBlockData() instanceof org.bukkit.block.data.Waterlogged)){
|
||||
safe = true;
|
||||
switch(locChecked.getBlock().getType()){
|
||||
switch(CompatibleMaterial.getMaterial(locChecked.getBlock())){
|
||||
case ACACIA_DOOR: // <= 1.8.8
|
||||
case ACACIA_FENCE_GATE:
|
||||
case BIRCH_DOOR:
|
||||
@ -99,17 +99,17 @@ public final class LocationUtil {
|
||||
case LADDER:
|
||||
case SPRUCE_DOOR:
|
||||
case SPRUCE_FENCE_GATE:
|
||||
case ACACIA_BUTTON: // TODO check server version
|
||||
case ACACIA_TRAPDOOR: // TODO check server version
|
||||
case BIRCH_TRAPDOOR: // TODO check server version
|
||||
case CAMPFIRE: // TODO check server version
|
||||
case COBWEB: // TODO check server version
|
||||
case DARK_OAK_TRAPDOOR: // TODO check server version
|
||||
case JUNGLE_TRAPDOOR: // TODO check server version
|
||||
case MAGMA_BLOCK: // TODO check server version
|
||||
case NETHER_PORTAL: // TODO check server version
|
||||
case OAK_DOOR: // TODO check server version
|
||||
case OAK_FENCE_GATE: // TODO check server version
|
||||
case ACACIA_BUTTON:
|
||||
case ACACIA_TRAPDOOR:
|
||||
case BIRCH_TRAPDOOR:
|
||||
case CAMPFIRE:
|
||||
case COBWEB:
|
||||
case DARK_OAK_TRAPDOOR:
|
||||
case JUNGLE_TRAPDOOR:
|
||||
case MAGMA_BLOCK:
|
||||
case NETHER_PORTAL:
|
||||
case OAK_DOOR:
|
||||
case OAK_FENCE_GATE:
|
||||
safe = false;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user