Skip to content

Commit

Permalink
Bump javadoc version
Browse files Browse the repository at this point in the history
  • Loading branch information
1foxy2 committed Dec 23, 2024
1 parent c88c1fa commit 0aba23f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface MoreBlockCulling {
* This is not used if blocks are opaque.
* Allows you to pass the side to check against
*
* @since 0.25.0
* @since 1.0.3
*/
default boolean moreculling$shouldAttemptToCull(BlockState state, @Nullable Direction side, BlockGetter level, BlockPos pos) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface MoreStateCulling {
* By default, it returns true if the states model does not have translucency.
* Allows you to pass the side to check against
*
* @since 0.25.0
* @since 1.0.3
*/
boolean moreculling$shouldAttemptToCull(Direction side, BlockGetter getter, BlockPos pos);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class Block_drawSideMixin implements MoreBlockCulling {
@Override
public boolean moreculling$shouldAttemptToCull(BlockState state, Direction side, BlockGetter level, BlockPos pos) {
BakedModel model = blockRenderManager.getBlockModel(state);
Services.PLATFORM.getQuads(model, state, side, CullingUtils.random, level, pos);
Services.PLATFORM.getQuads(model, state, side, CullingUtils.RANDOM, level, pos);
return !((BakedOpacity) model).moreculling$hasTextureTranslucency(state, side);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public class CullingUtils {

public static final RandomSource random = RandomSource.createNewThreadLocalInstance();
public static final RandomSource RANDOM = RandomSource.createNewThreadLocalInstance();

/**
* Replaces the default vanilla culling with a custom implementation
Expand Down Expand Up @@ -148,7 +148,7 @@ public static Optional<Boolean> shouldDrawFaceRandom(BlockGetter view, BlockStat
BlockPos sidePos, Direction side) {
if (sideState.getBlock() instanceof LeavesBlock ||
(sideState.canOcclude() && sideState.isFaceSturdy(view, sidePos, side.getOpposite()))) {
if (random.nextIntBetweenInclusive(1, MoreCulling.CONFIG.leavesCullingAmount + 1) == 1) {
if (RANDOM.nextIntBetweenInclusive(1, MoreCulling.CONFIG.leavesCullingAmount + 1) == 1) {
return Optional.of(false);
}
}
Expand Down

0 comments on commit 0aba23f

Please sign in to comment.