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(); int id = mat.getId();
if (id < 0 || id >= 4096) continue; if (id < 0 || id >= 4096) continue;
if (!mat.isOccluding() || !mat.isSolid() || mat.isTransparent()){ 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; return res;
} }
/**
* @deprecated Typo in method name.
* @param id
* @return
*/
public static final long getBLockFlags(final int id){ public static final long getBLockFlags(final int id){
return blockFlags[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){ public static final void setBlockFlags(final int id, final long flags){
blockFlags[id] = flags; blockFlags[id] = flags;

View File

@ -353,7 +353,7 @@ public class PlayerLocation {
onClimbable = false; onClimbable = false;
return 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. // TODO: maybe use specialized bounding box.
// final double d = 0.1d; // 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); // 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() { public boolean isAboveLadder() {
if (blockFlags != null && (blockFlags.longValue() & BlockProperties.F_CLIMBABLE) == 0 ) return false; if (blockFlags != null && (blockFlags.longValue() & BlockProperties.F_CLIMBABLE) == 0 ) return false;
// TODO: bounding box ? // TODO: bounding box ?
return (BlockProperties.getBLockFlags(getTypeIdBelow()) & BlockProperties.F_CLIMBABLE) != 0; return (BlockProperties.getBlockFlags(getTypeIdBelow()) & BlockProperties.F_CLIMBABLE) != 0;
} }
/** /**