Advertisement
Earthcomputer

isClimbing

Jun 3rd, 2020
949
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1.    public boolean isClimbing() {
  2.       if (this.isSpectator()) {
  3.          return false;
  4.       } else {
  5.          BlockPos blockPos = this.getBlockPos();
  6.          BlockState blockState = this.getBlockState();
  7.          Block block = blockState.getBlock();
  8.          if (block.isIn(BlockTags.CLIMBABLE)) {
  9.             this.field_22418 = Optional.of(blockPos);
  10.             return true;
  11.          } else if (block instanceof TrapdoorBlock && this.canEnterTrapdoor(blockPos, blockState)) {
  12.             this.field_22418 = Optional.of(blockPos);
  13.             return true;
  14.          } else {
  15.             return false;
  16.          }
  17.       }
  18.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement