Skip to content

Commit

Permalink
fix 1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
PTOM76 committed Jul 3, 2022
1 parent 8b39e25 commit cf9f24e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.18.2+build.2
loader_version=0.13.3

# Mod Properties
mod_version = v1.11
mod_version = v1.11.1
maven_group = net.guavy
archives_base_name = gravestones

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/guavy/gravestones/Gravestones.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public static void placeGrave(World world, Vec3d pos, PlayerEntity player) {

BlockPos blockPos = new BlockPos(pos.x, pos.y - 1, pos.z);

if(blockPos.getY() <= world.getDimension().minY()) {
blockPos = new BlockPos(blockPos.getX(), world.getDimension().minY(), blockPos.getZ());
if(blockPos.getY() <= world.getDimension().getMinimumY()) {
blockPos = new BlockPos(blockPos.getX(), world.getDimension().getMinimumY(), blockPos.getZ());
}

BlockState blockState = world.getBlockState(blockPos);
Expand Down Expand Up @@ -144,7 +144,7 @@ private static boolean canPlaceGravestone(World world, Block block, BlockPos blo
if(blackListedBlocks.contains(block)) return false;
*/

return !(blockPos.getY() < world.getDimension().minY() || blockPos.getY() > world.getDimension().height() - world.getDimension().minY());
return !(blockPos.getY() < world.getDimension().getMinimumY() || blockPos.getY() > world.getDimension().getHeight() - world.getDimension().getMinimumY());
}
}

0 comments on commit cf9f24e

Please sign in to comment.