Advertisement
kotoroshinoto

relevant parts of Orientation.java to broken ladders:

Sep 27th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. //near the top
  2. private static final Method _isLadder;
  3.  
  4. //in the middle somewhere
  5.  public static boolean isClimbable(World world, int i, int j, int k) {
  6.       int blockId = world.getBlockId(i, j, k);
  7.       return _isLadder == null?isLadderOrVine(blockId):blockId > 0 && ((Boolean)Reflect.Invoke(_isLadder, Block.blocksList[blockId], new Object[]{world, Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(k)})).booleanValue();
  8.    }
  9.  
  10. //near the bottom
  11. static {
  12. _isLadder = Reflect.GetMethod(Block.class, new Name("isLadder"), false, new Class[]{World.class, Integer.TYPE, Integer.TYPE, Integer.TYPE});
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement