Returns the position at this x, z coordinate in the chunk with y set to the value from the height map.
(BlockPos pos)
| 677 | * Returns the position at this x, z coordinate in the chunk with y set to the value from the height map. |
| 678 | */ |
| 679 | public BlockPos getHeight(BlockPos pos) |
| 680 | { |
| 681 | int i; |
| 682 | |
| 683 | if (pos.getX() >= -30000000 && pos.getZ() >= -30000000 && pos.getX() < 30000000 && pos.getZ() < 30000000) |
| 684 | { |
| 685 | if (this.isChunkLoaded(pos.getX() >> 4, pos.getZ() >> 4, true)) |
| 686 | { |
| 687 | i = this.getChunkFromChunkCoords(pos.getX() >> 4, pos.getZ() >> 4).getHeightValue(pos.getX() & 15, pos.getZ() & 15); |
| 688 | } |
| 689 | else |
| 690 | { |
| 691 | i = 0; |
| 692 | } |
| 693 | } |
| 694 | else |
| 695 | { |
| 696 | i = this.func_181545_F() + 1; |
| 697 | } |
| 698 | |
| 699 | return new BlockPos(pos.getX(), i, pos.getZ()); |
| 700 | } |
| 701 | |
| 702 | /** |
| 703 | * Gets the lowest height of the chunk where sunlight directly reaches |
no test coverage detected