Skip to content

Commit

Permalink
refactor(utils): rename canStand(On) methods
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Jun 27, 2022
1 parent 1dcbb60 commit 2d0e6f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -4,7 +4,7 @@

public interface BlockUtils {

static boolean canStandOnSafely(BlockState blockStats) {
static boolean canStandOn(BlockState blockStats) {
return blockStats.getMaterial().blocksMotion();
}

Expand Down
Expand Up @@ -16,12 +16,12 @@ static boolean isInWorldBounds(BlockPos pos, Level level) {
&& pos.getY() >= level.getMinBuildHeight();
}

static boolean canStandSafely(BlockPos pos, Level level) {
return BlockUtils.canStandOnSafely(level.getBlockState(pos.below()));
static boolean canStandOn(BlockPos pos, Level level) {
return BlockUtils.canStandOn(level.getBlockState(pos));
}

static boolean canStandOnSafely(BlockPos pos, Level level) {
return BlockUtils.canStandOnSafely(level.getBlockState(pos));
static boolean canStand(BlockPos pos, Level level) {
return canStandOn(pos.below(), level);
}

static Vec3i random(Vec3i center, int radius, Random random) {
Expand All @@ -43,7 +43,7 @@ static Vec3 random(Vec3 center, double radius, Random random) {
}

static BlockPos random(BlockPos center, int radius, Random random) {
return new BlockPos(random(center, radius, random));
return new BlockPos(random((Vec3i) center, radius, random));
}

}

0 comments on commit 2d0e6f1

Please sign in to comment.