Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //near the top
- private static final Method _isLadder;
- //in the middle somewhere
- public static boolean isClimbable(World world, int i, int j, int k) {
- int blockId = world.getBlockId(i, j, k);
- 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();
- }
- //near the bottom
- static {
- _isLadder = Reflect.GetMethod(Block.class, new Name("isLadder"), false, new Class[]{World.class, Integer.TYPE, Integer.TYPE, Integer.TYPE});
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement