Added physics.vine-like-rope-ladders to make ladders work like vines.

This commit is contained in:
sk89q 2012-11-05 11:32:40 -08:00
parent ab274151d4
commit 200d47ab09
2 changed files with 9 additions and 0 deletions

View File

@ -81,6 +81,7 @@ public class WorldConfiguration {
public boolean redstoneSponges;
public boolean noPhysicsGravel;
public boolean noPhysicsSand;
public boolean ropeLadders;
public boolean allowPortalAnywhere;
public Set<Integer> preventWaterDamage;
public boolean blockLighter;
@ -312,6 +313,7 @@ private void loadConfiguration() {
noPhysicsGravel = getBoolean("physics.no-physics-gravel", false);
noPhysicsSand = getBoolean("physics.no-physics-sand", false);
ropeLadders = getBoolean("physics.vine-like-rope-ladders", false);
allowPortalAnywhere = getBoolean("physics.allow-portal-anywhere", false);
preventWaterDamage = new HashSet<Integer>(getIntList("physics.disable-water-damage-blocks", null));

View File

@ -472,6 +472,13 @@ public void onBlockPhysics(BlockPhysicsEvent event) {
event.setCancelled(true);
return;
}
if (id == BlockID.LADDER && wcfg.ropeLadders) {
if (event.getBlock().getRelative(0, 1, 0).getType() == Material.LADDER) {
event.setCancelled(true);
return;
}
}
}
/*