Correct a method name in BlockProperties.

Old one is deprecated now.
This commit is contained in:
asofold 2013-02-17 14:07:22 +01:00
parent 3dbe5fcda8
commit 68a807a564
3 changed files with 12 additions and 3 deletions

View File

@ -162,7 +162,7 @@ public class MCAccessBukkit implements MCAccess, BlockPropertiesSetup{
int id = mat.getId();
if (id < 0 || id >= 4096) continue;
if (!mat.isOccluding() || !mat.isSolid() || mat.isTransparent()){
BlockProperties.setBlockFlags(id, BlockProperties.getBLockFlags(id) | BlockProperties.F_IGN_PASSABLE);
BlockProperties.setBlockFlags(id, BlockProperties.getBlockFlags(id) | BlockProperties.F_IGN_PASSABLE);
}
}
}

View File

@ -929,9 +929,18 @@ public class BlockProperties {
return res;
}
/**
* @deprecated Typo in method name.
* @param id
* @return
*/
public static final long getBLockFlags(final int id){
return blockFlags[id];
}
public static final long getBlockFlags(final int id){
return blockFlags[id];
}
public static final void setBlockFlags(final int id, final long flags){
blockFlags[id] = flags;

View File

@ -353,7 +353,7 @@ public class PlayerLocation {
onClimbable = false;
return false;
}
onClimbable = (BlockProperties.getBLockFlags(getTypeId()) & BlockProperties.F_CLIMBABLE) != 0;
onClimbable = (BlockProperties.getBlockFlags(getTypeId()) & BlockProperties.F_CLIMBABLE) != 0;
// TODO: maybe use specialized bounding box.
// final double d = 0.1d;
// onClimbable = BlockProperties.collides(getBlockAccess(), minX - d, minY - d, minZ - d, maxX + d, minY + 1.0, maxZ + d, BlockProperties.F_CLIMBABLE);
@ -403,7 +403,7 @@ public class PlayerLocation {
public boolean isAboveLadder() {
if (blockFlags != null && (blockFlags.longValue() & BlockProperties.F_CLIMBABLE) == 0 ) return false;
// TODO: bounding box ?
return (BlockProperties.getBLockFlags(getTypeIdBelow()) & BlockProperties.F_CLIMBABLE) != 0;
return (BlockProperties.getBlockFlags(getTypeIdBelow()) & BlockProperties.F_CLIMBABLE) != 0;
}
/**