Make bendability of packed ice configurable

This commit is contained in:
MistPhizzle 2014-07-26 21:19:38 -04:00
parent 5d6ca3938b
commit 3b5040d0cc
3 changed files with 4 additions and 1 deletions

View file

@ -68,6 +68,7 @@ public class ConfigManager {
config.addDefault("Properties.Water.CanBendWithWeapons", true);
config.addDefault("Properties.Water.NightFactor", 1.5);
config.addDefault("Properties.Water.FullMoonFactor", 3.0);
config.addDefault("Properties.Water.CanBendPackedIce", true);
config.addDefault("Properties.Earth.RevertEarthbending", true);
config.addDefault("Properties.Earth.SafeRevert", true);

View file

@ -586,7 +586,8 @@ public class Methods {
byte full = 0x0;
if (TempBlock.isTempBlock(block)) return false;
if ((block.getType() == Material.WATER || block.getType() == Material.STATIONARY_WATER) && block.getData() == full) return true;
if (block.getType() == Material.ICE || block.getType() == Material.SNOW || block.getType() == Material.PACKED_ICE) return true;
if (block.getType() == Material.ICE || block.getType() == Material.SNOW) return true;
if (block.getType() == Material.PACKED_ICE && plugin.getConfig().getBoolean("Properties.Water.CanBendPackedIce")) return true;
if (canPlantbend(player) && isPlant(block)) return true;
return false;
}

View file

@ -38,6 +38,7 @@ Properties:
CanBendWithWeapons: false
NightFactor: 1.5
FullMoonFactor: 3.0
CanBendPackedIce: true
Earth:
RevertEarthbending: true
SafeRevert: true