Skip to content

Commit d0e1ce6

Browse files
committed
add README.md
1 parent 76d2bf9 commit d0e1ce6

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
![logo.png](assets/logo.png)
2+
3+
![forge](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/unsupported/forge_vector.svg)
4+
[![modrinth](https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg)](https://modrinth.com/project/better-snow-coverage)
5+
6+
A Fabric mod that shows a snow layer underneath blocks that have a few snow layers touching them.
7+
8+
This mod does not need to be run server-side so that you can enjoy snow everywhere.
9+
10+
![preview.gif](assets/preview.gif)

assets/logo.bbmodel

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

assets/logo.png

111 KB
Loading

assets/preview.gif

849 KB
Loading

src/client/java/tobinio/bettersnowcoverage/BetterSnowChecker.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,13 @@ private static boolean isExcludedBlock(BlockState state) {
7777
private static boolean hasSnowNeighbor(BlockPos pos, ClientWorld world) {
7878
var directions = new Direction[]{Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST};
7979

80-
var noSnowCount = 0;
81-
8280
for (Direction direction : directions) {
83-
if (!hasSnowInDirection(pos, world, direction)) {
84-
noSnowCount++;
85-
}
86-
87-
if (noSnowCount >= 2) {
88-
return false;
81+
if (hasSnowInDirection(pos, world, direction)) {
82+
return true;
8983
}
9084
}
9185

92-
return true;
86+
return false;
9387
}
9488

9589
private static boolean hasSnowInDirection(BlockPos pos, ClientWorld world, Direction direction) {

0 commit comments

Comments
 (0)