diff --git a/build.gradle b/build.gradle index bff31779..8768e707 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version "1.11-SNAPSHOT" + id 'fabric-loom' version "1.14-SNAPSHOT" id 'maven-publish' } @@ -106,26 +106,26 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" //TODO: this is to eventually not need sodium installed as atm its just used for parsing shaders - modRuntimeOnlyMsk "maven.modrinth:sodium:mc1.21.10-0.7.2-fabric" - modCompileOnly "maven.modrinth:sodium:mc1.21.10-0.7.2-fabric" + modRuntimeOnlyMsk "maven.modrinth:sodium:mc1.21.11-0.8.0-fabric" + modCompileOnly "maven.modrinth:sodium:mc1.21.11-0.8.0-fabric" - modImplementation("maven.modrinth:lithium:mc1.21.10-0.20.0-fabric") + modImplementation("maven.modrinth:lithium:mc1.21.11-0.21.0-fabric") //modRuntimeOnlyMsk "drouarb:nvidium:0.4.1-beta4:1.21.6@jar" modCompileOnly "drouarb:nvidium:0.4.1-beta4:1.21.6@jar" - modCompileOnly("maven.modrinth:modmenu:15.0.0") - //modRuntimeOnlyMsk("maven.modrinth:modmenu:15.0.0") + modCompileOnly("maven.modrinth:modmenu:17.0.0-alpha.1") + modRuntimeOnlyMsk("maven.modrinth:modmenu:17.0.0-alpha.1") - modCompileOnly("maven.modrinth:iris:1.9.6+1.21.10-fabric") - modRuntimeOnlyMsk("maven.modrinth:iris:1.9.6+1.21.10-fabric") + modCompileOnly("maven.modrinth:iris:1.10.0+1.21.11-fabric") + modRuntimeOnlyMsk("maven.modrinth:iris:1.10.0+1.21.11-fabric") //modCompileOnly("maven.modrinth:starlight:1.1.3+1.20.4") //modCompileOnly("maven.modrinth:immersiveportals:v5.1.7-mc1.20.4") - modCompileOnly("maven.modrinth:sodium-extra:mc1.21.10-0.7.1+fabric") - modRuntimeOnlyMsk("maven.modrinth:sodium-extra:mc1.21.10-0.7.1+fabric") + modCompileOnly("maven.modrinth:sodium-extra:mc1.21.11-0.8.0+fabric") + modRuntimeOnlyMsk("maven.modrinth:sodium-extra:mc1.21.11-0.8.0+fabric") modCompileOnly("maven.modrinth:chunky:1.4.40-fabric") //modRuntimeOnlyMsk("maven.modrinth:chunky:1.4.40-fabric") @@ -264,8 +264,9 @@ if (!isInGHA) { } dependencies { - modRuntimeOnly('me.djtheredstoner:DevAuth-fabric:1.1.0') { + /* + modRuntimeOnly('me.djtheredstoner:DevAuth-fabric:1.2.1') { exclude group: 'net.fabricmc', module: 'fabric-loader' - } + }*/ } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 8b98d13e..56610c68 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,12 +7,12 @@ org.gradle.daemon = false # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.21.10 -loader_version=0.17.2 -loom_version=1.11-SNAPSHOT +minecraft_version=1.21.11 +loader_version=0.18.2 +loom_version=1.14-SNAPSHOT # Fabric API -fabric_version=0.134.1+1.21.10 +fabric_version=0.139.4+1.21.11 # Mod Properties diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3c44eb1b..cd4b7aa8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/me/cortex/voxy/client/VoxyClient.java b/src/main/java/me/cortex/voxy/client/VoxyClient.java index 04612c6e..4ea6e8d7 100644 --- a/src/main/java/me/cortex/voxy/client/VoxyClient.java +++ b/src/main/java/me/cortex/voxy/client/VoxyClient.java @@ -9,7 +9,7 @@ import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.gui.components.debug.DebugScreenEntries; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import java.util.HashSet; import java.util.function.Consumer; import java.util.function.Function; @@ -39,7 +39,7 @@ public class VoxyClient implements ClientModInitializer { @Override public void onInitializeClient() { - DebugScreenEntries.register(ResourceLocation.fromNamespaceAndPath("voxy","debug"), new VoxyDebugScreenEntry()); + DebugScreenEntries.register(Identifier.fromNamespaceAndPath("voxy","debug"), new VoxyDebugScreenEntry()); ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> { if (VoxyCommon.isAvailable()) { dispatcher.register(VoxyCommands.register()); diff --git a/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java b/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java index f0d5a511..4bddc125 100644 --- a/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java +++ b/src/main/java/me/cortex/voxy/client/VoxyClientInstance.java @@ -120,6 +120,7 @@ public class VoxyClientInstance extends VoxyInstance { public int version = 1; public SectionStorageConfig sectionStorageConfig; } + private static final Config DEFAULT_STORAGE_CONFIG; static { var config = new Config(); diff --git a/src/main/java/me/cortex/voxy/client/VoxyDebugScreenEntry.java b/src/main/java/me/cortex/voxy/client/VoxyDebugScreenEntry.java index 6e009a92..f452e9eb 100644 --- a/src/main/java/me/cortex/voxy/client/VoxyDebugScreenEntry.java +++ b/src/main/java/me/cortex/voxy/client/VoxyDebugScreenEntry.java @@ -7,7 +7,7 @@ import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.components.debug.DebugScreenDisplayer; import net.minecraft.client.gui.components.debug.DebugScreenEntry; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import net.minecraft.world.level.Level; import net.minecraft.world.level.chunk.LevelChunk; import org.jetbrains.annotations.Nullable; @@ -37,12 +37,12 @@ public class VoxyDebugScreenEntry implements DebugScreenEntry { //lines.addLineToSection(); List instanceLines = new ArrayList<>(); instance.addDebug(instanceLines); - lines.addToGroup(ResourceLocation.fromNamespaceAndPath("voxy", "instance_debug"), instanceLines); + lines.addToGroup(Identifier.fromNamespaceAndPath("voxy", "instance_debug"), instanceLines); if (vrs != null) { List renderLines = new ArrayList<>(); vrs.addDebugInfo(renderLines); - lines.addToGroup(ResourceLocation.fromNamespaceAndPath("voxy", "render_debug"), renderLines); + lines.addToGroup(Identifier.fromNamespaceAndPath("voxy", "render_debug"), renderLines); } } diff --git a/src/main/java/me/cortex/voxy/client/compat/FlashbackCompat.java b/src/main/java/me/cortex/voxy/client/compat/FlashbackCompat.java index 2c72e3d1..beed6a6a 100644 --- a/src/main/java/me/cortex/voxy/client/compat/FlashbackCompat.java +++ b/src/main/java/me/cortex/voxy/client/compat/FlashbackCompat.java @@ -6,7 +6,6 @@ import com.moulberry.flashback.record.FlashbackMeta; import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.config.section.SectionStorageConfig; import net.fabricmc.loader.api.FabricLoader; -import org.apache.commons.logging.Log; import java.nio.file.Path; diff --git a/src/main/java/me/cortex/voxy/client/config/VoxyConfig.java b/src/main/java/me/cortex/voxy/client/config/VoxyConfig.java index c712e915..cde9fc2f 100644 --- a/src/main/java/me/cortex/voxy/client/config/VoxyConfig.java +++ b/src/main/java/me/cortex/voxy/client/config/VoxyConfig.java @@ -6,7 +6,6 @@ import com.google.gson.GsonBuilder; import me.cortex.voxy.common.Logger; import me.cortex.voxy.common.util.cpu.CpuLayout; import me.cortex.voxy.commonImpl.VoxyCommon; -import net.caffeinemc.mods.sodium.client.gui.options.storage.OptionStorage; import net.fabricmc.loader.api.FabricLoader; import java.io.FileReader; @@ -15,7 +14,7 @@ import java.lang.reflect.Modifier; import java.nio.file.Files; import java.nio.file.Path; -public class VoxyConfig implements OptionStorage { +public class VoxyConfig { private static final Gson GSON = new GsonBuilder() .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .setPrettyPrinting() @@ -76,11 +75,6 @@ public class VoxyConfig implements OptionStorage { .resolve("voxy-config.json"); } - @Override - public VoxyConfig getData() { - return this; - } - public boolean isRenderingEnabled() { return VoxyCommon.isAvailable() && this.enabled && this.enableRendering; } diff --git a/src/main/java/me/cortex/voxy/client/core/model/ModelStore.java b/src/main/java/me/cortex/voxy/client/core/model/ModelStore.java index 9db7f23e..d362333d 100644 --- a/src/main/java/me/cortex/voxy/client/core/model/ModelStore.java +++ b/src/main/java/me/cortex/voxy/client/core/model/ModelStore.java @@ -4,7 +4,7 @@ import me.cortex.voxy.client.core.gl.GlBuffer; import me.cortex.voxy.client.core.gl.GlTexture; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlas; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import static org.lwjgl.opengl.GL11.*; import static org.lwjgl.opengl.GL11C.GL_NEAREST; @@ -32,8 +32,8 @@ public class ModelStore { //Limit the mips of the texture to match that of the terrain atlas int mipLvl = ((TextureAtlas) Minecraft.getInstance().getTextureManager() - .getTexture(ResourceLocation.fromNamespaceAndPath("minecraft", "textures/atlas/blocks.png"))) - .mipLevel; + .getTexture(Identifier.fromNamespaceAndPath("minecraft", "textures/atlas/blocks.png"))) + .maxMipLevel; glSamplerParameteri(this.blockSampler, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR); glSamplerParameteri(this.blockSampler, GL_TEXTURE_MAG_FILTER, GL_NEAREST); diff --git a/src/main/java/me/cortex/voxy/client/core/model/bakery/BakedBlockEntityModel.java b/src/main/java/me/cortex/voxy/client/core/model/bakery/BakedBlockEntityModel.java index 3cc52b85..ab439e15 100644 --- a/src/main/java/me/cortex/voxy/client/core/model/bakery/BakedBlockEntityModel.java +++ b/src/main/java/me/cortex/voxy/client/core/model/bakery/BakedBlockEntityModel.java @@ -1,12 +1,12 @@ +/* package me.cortex.voxy.client.core.model.bakery; import me.cortex.voxy.common.Logger; import net.minecraft.client.Minecraft; import net.minecraft.client.model.Model; -import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.SubmitNodeStorage; import net.minecraft.core.BlockPos; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.state.BlockState; import org.jetbrains.annotations.Nullable; @@ -19,6 +19,7 @@ import java.util.List; import java.util.Map; public class BakedBlockEntityModel { + private record LayerConsumer(RenderType layer, ReuseVertexConsumer consumer) {} private final List layers; private BakedBlockEntityModel(List layers) { @@ -29,7 +30,7 @@ public class BakedBlockEntityModel { for (var layer : this.layers) { if (layer.consumer.isEmpty()) continue; if (layer.layer instanceof RenderType.CompositeRenderType mp) { - ResourceLocation textureId = mp.state.textureState.cutoutTexture().orElse(null); + Identifier textureId = mp.state.textureState.cutoutTexture().orElse(null); if (textureId == null) { Logger.error("ERROR: Empty texture id for layer: " + layer); } else { @@ -71,7 +72,6 @@ public class BakedBlockEntityModel { entity.setLevel(Minecraft.getInstance().level); if (renderer != null) { try { - /* var rt = renderer.createRenderState(); renderer.extractRenderState(entity, rt, 0.0f, new Vec3d(0,0,0), null); @@ -81,7 +81,6 @@ public class BakedBlockEntityModel { renderer.submit(rt, new MatrixStack(), queue, cstate); var qq = queue.order(0); qq. - */ //renderer.render(entity, 0.0f, new MatrixStack(), layer->map.computeIfAbsent(layer, rl -> new LayerConsumer(rl, new ReuseVertexConsumer().setDefaultMeta(getMetaFromLayer(rl)))).consumer, 0, 0, new Vec3d(0,0,0)); } catch (Exception e) { Logger.error("Unable to bake block entity: " + entity, e); @@ -103,3 +102,4 @@ public class BakedBlockEntityModel { return new BakedBlockEntityModel(new ArrayList<>(map.values())); } } +*/ \ No newline at end of file diff --git a/src/main/java/me/cortex/voxy/client/core/model/bakery/ModelTextureBakery.java b/src/main/java/me/cortex/voxy/client/core/model/bakery/ModelTextureBakery.java index db7cf386..74df9b9a 100644 --- a/src/main/java/me/cortex/voxy/client/core/model/bakery/ModelTextureBakery.java +++ b/src/main/java/me/cortex/voxy/client/core/model/bakery/ModelTextureBakery.java @@ -5,7 +5,7 @@ import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.chunk.ChunkSectionLayer; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.ColorResolver; import net.minecraft.world.level.LightLayer; @@ -48,16 +48,15 @@ public class ModelTextureBakery { public static int getMetaFromLayer(ChunkSectionLayer layer) { boolean hasDiscard = layer == ChunkSectionLayer.CUTOUT || - layer == ChunkSectionLayer.CUTOUT_MIPPED || + layer == ChunkSectionLayer.TRANSLUCENT|| layer == ChunkSectionLayer.TRIPWIRE; - boolean isMipped = layer == ChunkSectionLayer.CUTOUT_MIPPED || - layer == ChunkSectionLayer.SOLID || + boolean isMipped = layer == ChunkSectionLayer.SOLID || layer == ChunkSectionLayer.TRANSLUCENT || layer == ChunkSectionLayer.TRIPWIRE; int meta = hasDiscard?1:0; - meta |= isMipped?2:0; + meta |= true?2:0; return meta; } @@ -171,7 +170,7 @@ public class ModelTextureBakery { } - public void renderToStream(BlockState state, int streamBuffer, int streamOffset) { + public boolean renderToStream(BlockState state, int streamBuffer, int streamOffset) { this.capture.clear(); boolean isBlock = true; ChunkSectionLayer layer; @@ -187,9 +186,9 @@ public class ModelTextureBakery { } //TODO: support block model entities - BakedBlockEntityModel bbem = null; + //BakedBlockEntityModel bbem = null; if (state.hasBlockEntity()) { - bbem = BakedBlockEntityModel.bake(state); + //bbem = BakedBlockEntityModel.bake(state); } //Setup GL state @@ -217,14 +216,15 @@ public class ModelTextureBakery { //Bind the capture framebuffer glBindFramebuffer(GL_FRAMEBUFFER, this.capture.framebuffer.id); - var tex = Minecraft.getInstance().getTextureManager().getTexture(ResourceLocation.fromNamespaceAndPath("minecraft", "textures/atlas/blocks.png")).getTexture(); + var tex = Minecraft.getInstance().getTextureManager().getTexture(Identifier.fromNamespaceAndPath("minecraft", "textures/atlas/blocks.png")).getTexture(); blockTextureId = ((com.mojang.blaze3d.opengl.GlTexture)tex).glId(); } - //TODO: fastpath for blocks + boolean isAnyShaded = false; if (isBlock) { this.vc.reset(); this.bakeBlockModel(state, layer); + isAnyShaded |= this.vc.anyShaded; if (!this.vc.isEmpty()) {//only render if there... is shit to render //Setup for continual emission @@ -266,6 +266,7 @@ public class ModelTextureBakery { this.vc.reset(); this.bakeFluidState(state, layer, i); if (this.vc.isEmpty()) continue; + isAnyShaded |= this.vc.anyShaded; BudgetBufferRenderer.setup(this.vc.getAddress(), this.vc.quadCount(), blockTextureId); glViewport((i % 3) * this.width, (i / 3) * this.height, this.width, this.height); @@ -283,6 +284,7 @@ public class ModelTextureBakery { } //Render block model entity data if it exists + /* if (bbem != null) { //Rerender everything again ;-; but is ok (is not) @@ -308,7 +310,7 @@ public class ModelTextureBakery { glBindVertexArray(0); bbem.release(); - } + }*/ @@ -328,6 +330,8 @@ public class ModelTextureBakery { //reset the blend func GL14.glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } + + return isAnyShaded; } diff --git a/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinFogRenderer.java b/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinFogRenderer.java index f776a8c8..925a1e0d 100644 --- a/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinFogRenderer.java +++ b/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinFogRenderer.java @@ -21,7 +21,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(value = FogRenderer.class,remap = true) public class MixinFogRenderer { @Inject(method = "setupFog", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;getDevice()Lcom/mojang/blaze3d/systems/GpuDevice;", remap = false)) - private void voxy$modifyFog(Camera camera, int rdInt, boolean fogStuff, DeltaTracker tracker, float pTick, ClientLevel lvl, CallbackInfoReturnable cir, @Local(type=FogData.class) FogData data) { + private void voxy$modifyFog(Camera camera, int rdInt, DeltaTracker tracker, float pTick, ClientLevel lvl, CallbackInfoReturnable cir, @Local(type=FogData.class) FogData data) { if (VoxyConfig.CONFIG.renderVanillaFog) { return; } diff --git a/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinRenderSystem.java b/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinRenderSystem.java index 8618a9a4..4e4e631d 100644 --- a/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinRenderSystem.java +++ b/src/main/java/me/cortex/voxy/client/mixin/minecraft/MixinRenderSystem.java @@ -1,10 +1,11 @@ package me.cortex.voxy.client.mixin.minecraft; +import com.mojang.blaze3d.shaders.ShaderSource; import com.mojang.blaze3d.shaders.ShaderType; import com.mojang.blaze3d.systems.RenderSystem; import me.cortex.voxy.client.VoxyClient; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -17,7 +18,7 @@ import java.util.function.BiFunction; public class MixinRenderSystem { //We need to inject before iris to initalize our systems @Inject(method = "initRenderer", order = 900, remap = false, at = @At("RETURN")) - private static void voxy$injectInit(long windowHandle, int debugVerbosity, boolean sync, BiFunction shaderSourceGetter, boolean renderDebugLabels, CallbackInfo ci) { + private static void voxy$injectInit(long windowHandle, int debugVerbosity, boolean sync, ShaderSource source, boolean renderDebugLabels, CallbackInfo ci) { VoxyClient.initVoxyClient(); } } diff --git a/src/main/java/me/cortex/voxy/common/world/other/Mapper.java b/src/main/java/me/cortex/voxy/common/world/other/Mapper.java index d4886fe4..2106fd53 100644 --- a/src/main/java/me/cortex/voxy/common/world/other/Mapper.java +++ b/src/main/java/me/cortex/voxy/common/world/other/Mapper.java @@ -255,7 +255,7 @@ public class Mapper { } public int getIdForBiome(Holder biome) { - String biomeId = biome.unwrapKey().get().location().toString(); + String biomeId = biome.unwrapKey().get().identifier().toString(); var entry = this.biome2biomeEntry.get(biomeId); if (entry == null) { entry = this.registerNewBiome(biomeId); diff --git a/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java b/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java index 6442d3d1..9a5c5c05 100644 --- a/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java +++ b/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java @@ -3,7 +3,7 @@ package me.cortex.voxy.commonImpl; import me.cortex.voxy.common.world.WorldEngine; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import net.minecraft.world.level.Level; import net.minecraft.world.level.dimension.DimensionType; import org.jetbrains.annotations.NotNull; @@ -14,7 +14,7 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class WorldIdentifier { - private static final ResourceKey NULL_DIM_KEY = ResourceKey.create(Registries.DIMENSION_TYPE, ResourceLocation.parse("voxy:null_dimension_id")); + private static final ResourceKey NULL_DIM_KEY = ResourceKey.create(Registries.DIMENSION_TYPE, Identifier.parse("voxy:null_dimension_id")); public final ResourceKey key; public final long biomeSeed; @@ -53,7 +53,7 @@ public class WorldIdentifier { private static boolean equal(ResourceKey a, ResourceKey b) { if (a == b) return true; if (a == null || b == null) return false; - return a.registry().equals(b.registry()) && a.location().equals(b.location()); + return a.registry().equals(b.registry()) && a.identifier().equals(b.identifier()); } //Quick access utility method to get or create a world object in the current instance @@ -117,7 +117,7 @@ public class WorldIdentifier { private static long registryKeyHashCode(ResourceKey key) { var A = key.registry(); - var B = key.location(); + var B = key.identifier(); int a = A==null?0:A.hashCode(); int b = B==null?0:B.hashCode(); return (Integer.toUnsignedLong(a)<<32)|Integer.toUnsignedLong(b); diff --git a/src/main/java/me/cortex/voxy/commonImpl/importers/DHImporter.java b/src/main/java/me/cortex/voxy/commonImpl/importers/DHImporter.java index 53331cab..9abf608b 100644 --- a/src/main/java/me/cortex/voxy/commonImpl/importers/DHImporter.java +++ b/src/main/java/me/cortex/voxy/commonImpl/importers/DHImporter.java @@ -12,7 +12,7 @@ import me.cortex.voxy.common.world.other.Mapper; import net.minecraft.core.Holder; import net.minecraft.core.Registry; import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.resources.Identifier; import net.minecraft.world.level.Level; import net.minecraft.world.level.biome.Biome; import net.minecraft.world.level.biome.Biomes; @@ -205,7 +205,7 @@ public class DHImporter implements IDataImporter { if (idx == -1) throw new IllegalStateException(); { - var biomeRes = ResourceLocation.parse(encEntry.substring(0, idx)); + var biomeRes = Identifier.parse(encEntry.substring(0, idx)); var biome = this.biomeRegistry.get(biomeRes).orElse(this.defaultBiome); biomeId = this.engine.getMapper().getIdForBiome(biome); } @@ -219,7 +219,7 @@ public class DHImporter implements IDataImporter { if (sIdx != -1) { bStateStr = encEntry.substring(sIdx + STATE_STRING_SEPARATOR.length()); } - var bId = ResourceLocation.parse(encEntry.substring(b, sIdx != -1 ? sIdx : encEntry.length())); + var bId = Identifier.parse(encEntry.substring(b, sIdx != -1 ? sIdx : encEntry.length())); var maybeBlock = this.blockRegistry.get(bId); Block block = Blocks.AIR; if (maybeBlock.isPresent()) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 7a5c4db4..0bedefc7 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -35,10 +35,10 @@ "common.voxy.mixins.json" ], "depends": { - "minecraft": ["1.21.9", "1.21.10"], + "minecraft": ["1.21.11"], "fabricloader": ">=0.14.22", "fabric-api": ">=0.91.1", - "sodium": "=0.7.*" + "sodium": "=0.8.*" }, "accessWidener": "voxy.accesswidener" } diff --git a/src/main/resources/voxy.accesswidener b/src/main/resources/voxy.accesswidener index a4cb8b1a..225da5f8 100644 --- a/src/main/resources/voxy.accesswidener +++ b/src/main/resources/voxy.accesswidener @@ -6,7 +6,7 @@ accessible class com/mojang/blaze3d/opengl/GlDebug$LogEntry accessible field net/minecraft/client/multiplayer/ClientLevel levelRenderer Lnet/minecraft/client/renderer/LevelRenderer; accessible field com/mojang/blaze3d/opengl/GlBuffer handle I accessible field net/minecraft/client/color/block/BlockColors blockColors Lnet/minecraft/core/IdMapper; -accessible field net/minecraft/client/renderer/texture/TextureAtlas mipLevel I +accessible field net/minecraft/client/renderer/texture/TextureAtlas maxMipLevel I accessible field net/minecraft/client/gui/components/BossHealthOverlay events Ljava/util/Map; accessible field net/minecraft/client/multiplayer/MultiPlayerGameMode connection Lnet/minecraft/client/multiplayer/ClientPacketListener; @@ -14,11 +14,6 @@ accessible field net/minecraft/world/level/chunk/PalettedContainer data Lnet/min accessible field net/minecraft/world/level/chunk/PalettedContainer$Data palette Lnet/minecraft/world/level/chunk/Palette; accessible field net/minecraft/world/level/chunk/PalettedContainer$Data storage Lnet/minecraft/util/BitStorage; -accessible field net/minecraft/client/renderer/RenderType$CompositeRenderType state Lnet/minecraft/client/renderer/RenderType$CompositeState; -accessible field net/minecraft/client/renderer/RenderType$CompositeState textureState Lnet/minecraft/client/renderer/RenderStateShard$EmptyTextureStateShard; -accessible method net/minecraft/client/renderer/RenderStateShard$EmptyTextureStateShard cutoutTexture ()Ljava/util/Optional; - -accessible method net/minecraft/client/renderer/texture/MipmapGenerator alphaBlend (IIIIZ)I accessible method net/minecraft/client/renderer/GameRenderer getFov (Lnet/minecraft/client/Camera;FZ)F accessible method net/minecraft/client/multiplayer/ClientChunkCache$Storage getChunk (I)Lnet/minecraft/world/level/chunk/LevelChunk;