Skip to content

Commit

Permalink
Insane Update
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikHeinrich authored and mworzala committed Sep 7, 2024
1 parent ad37c65 commit 7171913
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
metadata.format.version = "1.1"

[versions]
minestom = "6932647e24"
minestom = "b0bad7e180"
zstd = "1.5.5-3"
fastutil = "8.5.12"

Expand Down
11 changes: 5 additions & 6 deletions src/main/java/net/hollowcube/polar/PolarLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@

@SuppressWarnings("UnstableApiUsage")
public class PolarLoader implements IChunkLoader {
static final Logger logger = LoggerFactory.getLogger(PolarLoader.class);
private static final BlockManager BLOCK_MANAGER = MinecraftServer.getBlockManager();
private static final DynamicRegistry<Biome> BIOME_REGISTRY = MinecraftServer.getBiomeRegistry();
private static final ExceptionManager EXCEPTION_HANDLER = MinecraftServer.getExceptionManager();
static final Logger logger = LoggerFactory.getLogger(PolarLoader.class);

private static final int PLAINS_BIOME_ID = BIOME_REGISTRY.getId(Biome.PLAINS);

private final Map<String, Integer> biomeReadCache = new ConcurrentHashMap<>();
Expand Down Expand Up @@ -235,8 +234,8 @@ private void loadSection(@NotNull PolarSection sectionData, @NotNull Section sec
private byte[] getLightArray(@NotNull LightContent content, byte @Nullable [] data) {
return switch (content) {
case MISSING -> null;
case EMPTY -> LightCompute.emptyContent;
case FULL -> LightCompute.contentFullyLit;
case EMPTY -> LightCompute.EMPTY_CONTENT;
case FULL -> LightCompute.CONTENT_FULLY_LIT;
case PRESENT -> data;
};
}
Expand Down Expand Up @@ -402,8 +401,8 @@ private void updateChunkData(@NotNull Short2ObjectMap<String> blockCache, @NotNu

private @NotNull LightContent getLightContent(byte @Nullable [] data) {
if (data == null) return LightContent.MISSING;
if (data.length == 0 || Arrays.equals(data, LightCompute.emptyContent)) return LightContent.EMPTY;
if (Arrays.equals(data, LightCompute.contentFullyLit)) return LightContent.FULL;
if (data.length == 0 || Arrays.equals(data, LightCompute.EMPTY_CONTENT)) return LightContent.EMPTY;
if (Arrays.equals(data, LightCompute.CONTENT_FULLY_LIT)) return LightContent.FULL;
return LightContent.PRESENT;
}

Expand Down

0 comments on commit 7171913

Please sign in to comment.