Use a switch instead
This commit is contained in:
parent
b36692ffec
commit
a8e9290cd8
|
|
@ -283,26 +283,40 @@ public class Visualization
|
||||||
//helper method for above. allows visualization blocks to sit underneath partly transparent blocks like grass and fence
|
//helper method for above. allows visualization blocks to sit underneath partly transparent blocks like grass and fence
|
||||||
private static boolean isTransparent(Block block, boolean waterIsTransparent)
|
private static boolean isTransparent(Block block, boolean waterIsTransparent)
|
||||||
{
|
{
|
||||||
return ( block.getType() != Material.SNOW && (
|
//Blacklist
|
||||||
block.getType() == Material.AIR ||
|
switch (block.getType())
|
||||||
block.getType() == Material.FENCE ||
|
{
|
||||||
block.getType() == Material.ACACIA_FENCE ||
|
case SNOW:
|
||||||
block.getType() == Material.BIRCH_FENCE ||
|
return false;
|
||||||
block.getType() == Material.DARK_OAK_FENCE ||
|
}
|
||||||
block.getType() == Material.JUNGLE_FENCE ||
|
|
||||||
block.getType() == Material.NETHER_FENCE ||
|
//Whitelist TODO: some of this might already be included in isTransparent()
|
||||||
block.getType() == Material.SPRUCE_FENCE ||
|
switch (block.getType())
|
||||||
block.getType() == Material.FENCE_GATE ||
|
{
|
||||||
block.getType() == Material.ACACIA_FENCE_GATE ||
|
case AIR:
|
||||||
block.getType() == Material.BIRCH_FENCE_GATE ||
|
case FENCE:
|
||||||
block.getType() == Material.DARK_OAK_FENCE_GATE ||
|
case ACACIA_FENCE:
|
||||||
block.getType() == Material.SPRUCE_FENCE_GATE ||
|
case BIRCH_FENCE:
|
||||||
block.getType() == Material.JUNGLE_FENCE_GATE ||
|
case DARK_OAK_FENCE:
|
||||||
block.getType() == Material.SIGN ||
|
case JUNGLE_FENCE:
|
||||||
block.getType() == Material.SIGN_POST ||
|
case NETHER_FENCE:
|
||||||
block.getType() == Material.WALL_SIGN ||
|
case SPRUCE_FENCE:
|
||||||
(waterIsTransparent && block.getType() == Material.STATIONARY_WATER) ||
|
case FENCE_GATE:
|
||||||
block.getType().isTransparent()));
|
case ACACIA_FENCE_GATE:
|
||||||
|
case BIRCH_FENCE_GATE:
|
||||||
|
case DARK_OAK_FENCE_GATE:
|
||||||
|
case SPRUCE_FENCE_GATE:
|
||||||
|
case JUNGLE_FENCE_GATE:
|
||||||
|
case SIGN:
|
||||||
|
case SIGN_POST:
|
||||||
|
case WALL_SIGN:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((waterIsTransparent && block.getType() == Material.STATIONARY_WATER) ||
|
||||||
|
block.getType().isTransparent())
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Visualization fromClaims(Iterable<Claim> claims, int height, VisualizationType type, Location locality)
|
public static Visualization fromClaims(Iterable<Claim> claims, int height, VisualizationType type, Location locality)
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,7 @@ public class AccrueClaimBlocksEvent extends Event
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the amount of claim blocks GP will deliver to the player for this 10 minute interval
|
* @return amount of claim blocks GP will deliver to the player for this 10 minute interval
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
public int getBlocksToAccrue()
|
public int getBlocksToAccrue()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user