mojmap part 2 (rename the mixins)
This commit is contained in:
@@ -2,6 +2,6 @@ package me.cortex.voxy.client;
|
||||
|
||||
import net.minecraft.world.level.chunk.LevelChunk;
|
||||
|
||||
public interface ICheekyClientChunkManager {
|
||||
public interface ICheekyClientChunkCache {
|
||||
LevelChunk voxy$cheekyGetChunk(int x, int z);
|
||||
}
|
||||
@@ -3,9 +3,7 @@ package me.cortex.voxy.client.mixin.iris;
|
||||
import com.mojang.blaze3d.buffers.GpuBufferSlice;
|
||||
import com.mojang.blaze3d.resource.GraphicsResourceAllocator;
|
||||
import me.cortex.voxy.client.core.IGetVoxyRenderSystem;
|
||||
import me.cortex.voxy.client.core.VoxyRenderSystem;
|
||||
import me.cortex.voxy.client.core.util.IrisUtil;
|
||||
import me.cortex.voxy.common.Logger;
|
||||
import net.caffeinemc.mods.sodium.client.render.chunk.ChunkRenderMatrices;
|
||||
import net.caffeinemc.mods.sodium.client.util.FogStorage;
|
||||
import net.minecraft.client.Camera;
|
||||
@@ -24,7 +22,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import static org.lwjgl.opengl.GL11C.glViewport;
|
||||
|
||||
@Mixin(LevelRenderer.class)
|
||||
public class MixinWorldRenderer {
|
||||
public class MixinLevelRenderer {
|
||||
@Shadow @Final private Minecraft minecraft;
|
||||
|
||||
@Inject(method = "renderLevel", at = @At("HEAD"), order = 100)
|
||||
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(BlockableEventLoop.class)
|
||||
public abstract class MixinThreadExecutor {
|
||||
public abstract class MixinBlockableEventLoop {
|
||||
|
||||
@Shadow public static boolean isNonRecoverable(Throwable throwable){return false;}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package me.cortex.voxy.client.mixin.minecraft;
|
||||
|
||||
import me.cortex.voxy.client.ICheekyClientChunkManager;
|
||||
import me.cortex.voxy.client.ICheekyClientChunkCache;
|
||||
import me.cortex.voxy.client.config.VoxyConfig;
|
||||
import me.cortex.voxy.common.world.service.VoxelIngestService;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientChunkCache.class)
|
||||
public class MixinClientChunkManager implements ICheekyClientChunkManager {
|
||||
public class MixinClientChunkCache implements ICheekyClientChunkCache {
|
||||
@Unique
|
||||
private static final boolean BOBBY_INSTALLED = FabricLoader.getInstance().isModLoaded("bobby");
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientCommonPacketListenerImpl.class)
|
||||
public class MixinClientCommonNetworkHandler {
|
||||
public class MixinClientCommonPacketListenerImpl {
|
||||
@Inject(method = "onPacketError", at = @At("HEAD"), cancellable = true)
|
||||
private void handleDisconnectAsCrash(Packet<?> packet, Exception exception, CallbackInfo ci) {
|
||||
if (packet instanceof ClientboundLoginPacket) {
|
||||
@@ -1,9 +1,7 @@
|
||||
package me.cortex.voxy.client.mixin.minecraft;
|
||||
|
||||
import me.cortex.voxy.client.config.VoxyConfig;
|
||||
import me.cortex.voxy.client.core.IGetVoxyRenderSystem;
|
||||
import me.cortex.voxy.common.world.service.VoxelIngestService;
|
||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||
import me.cortex.voxy.commonImpl.WorldIdentifier;
|
||||
import net.minecraft.client.multiplayer.ClientChunkCache;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
@@ -26,7 +24,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientLevel.class)
|
||||
public abstract class MixinClientWorld {
|
||||
public abstract class MixinClientLevel {
|
||||
|
||||
@Unique
|
||||
private int bottomSectionY;
|
||||
@@ -1,6 +1,5 @@
|
||||
package me.cortex.voxy.client.mixin.minecraft;
|
||||
|
||||
import me.cortex.voxy.client.VoxyClient;
|
||||
import me.cortex.voxy.client.VoxyClientInstance;
|
||||
import me.cortex.voxy.client.config.VoxyConfig;
|
||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||
@@ -12,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ClientPacketListener.class)
|
||||
public class MixinClientLoginNetworkHandler {
|
||||
public class MixinClientPacketListener {
|
||||
@Inject(method = "handleLogin", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/protocol/game/ClientboundLoginPacket;commonPlayerSpawnInfo()Lnet/minecraft/network/protocol/game/CommonPlayerSpawnInfo;"))
|
||||
private void voxy$init(ClientboundLoginPacket packet, CallbackInfo ci) {
|
||||
if (VoxyCommon.isAvailable() && !VoxyClientInstance.isInGame) {
|
||||
@@ -20,7 +20,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(LevelRenderer.class)
|
||||
public abstract class MixinWorldRenderer implements IGetVoxyRenderSystem {
|
||||
public abstract class MixinLevelRenderer implements IGetVoxyRenderSystem {
|
||||
@Shadow private @Nullable ClientLevel level;
|
||||
@Unique private VoxyRenderSystem renderer;
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(Minecraft.class)
|
||||
public class MixinMinecraftClient {
|
||||
public class MixinMinecraft {
|
||||
@Inject(method = "disconnect", at = @At("TAIL"))
|
||||
private void voxy$injectWorldClose(CallbackInfo ci) {
|
||||
if (VoxyCommon.isAvailable() && VoxyClientInstance.isInGame) {
|
||||
@@ -1,12 +1,11 @@
|
||||
package me.cortex.voxy.client.mixin.sodium;
|
||||
|
||||
import me.cortex.voxy.client.ICheekyClientChunkManager;
|
||||
import me.cortex.voxy.client.ICheekyClientChunkCache;
|
||||
import me.cortex.voxy.client.config.VoxyConfig;
|
||||
import me.cortex.voxy.client.core.IGetVoxyRenderSystem;
|
||||
import me.cortex.voxy.client.core.VoxyRenderSystem;
|
||||
import me.cortex.voxy.common.world.service.VoxelIngestService;
|
||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||
import me.cortex.voxy.commonImpl.WorldIdentifier;
|
||||
import net.caffeinemc.mods.sodium.client.gl.device.CommandList;
|
||||
import net.caffeinemc.mods.sodium.client.render.chunk.RenderSection;
|
||||
import net.caffeinemc.mods.sodium.client.render.chunk.RenderSectionManager;
|
||||
@@ -61,7 +60,7 @@ public class MixinRenderSectionManager {
|
||||
private void injectIngest(int x, int z, CallbackInfo ci) {
|
||||
//TODO: Am not quite sure if this is right
|
||||
if (VoxyConfig.CONFIG.ingestEnabled && !BOBBY_INSTALLED) {
|
||||
var cccm = (ICheekyClientChunkManager)this.level.getChunkSource();
|
||||
var cccm = (ICheekyClientChunkCache)this.level.getChunkSource();
|
||||
if (cccm != null) {
|
||||
var chunk = cccm.voxy$cheekyGetChunk(x, z);
|
||||
if (chunk != null) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"client": [
|
||||
"flashback.MixinFlashbackMeta",
|
||||
"flashback.MixinFlashbackRecorder",
|
||||
"iris.MixinWorldRenderer",
|
||||
"iris.MixinLevelRenderer",
|
||||
"iris.MixinPackRenderTargetDirectives",
|
||||
"iris.CustomUniformsAccessor",
|
||||
"iris.IrisRenderingPipelineAccessor",
|
||||
@@ -16,17 +16,17 @@
|
||||
"iris.MixinProgramSet",
|
||||
"iris.MixinShaderPackSourceNames",
|
||||
"iris.MixinStandardMacros",
|
||||
"minecraft.MixinClientWorld",
|
||||
"minecraft.MixinClientChunkManager",
|
||||
"minecraft.MixinClientCommonNetworkHandler",
|
||||
"minecraft.MixinClientLoginNetworkHandler",
|
||||
"minecraft.MixinClientLevel",
|
||||
"minecraft.MixinClientChunkCache",
|
||||
"minecraft.MixinClientCommonPacketListenerImpl",
|
||||
"minecraft.MixinClientPacketListener",
|
||||
"minecraft.MixinFogRenderer",
|
||||
"minecraft.MixinGlDebug",
|
||||
"minecraft.MixinMinecraftClient",
|
||||
"minecraft.MixinMinecraft",
|
||||
"minecraft.MixinRenderSystem",
|
||||
"minecraft.MixinThreadExecutor",
|
||||
"minecraft.MixinBlockableEventLoop",
|
||||
"minecraft.MixinWindow",
|
||||
"minecraft.MixinWorldRenderer",
|
||||
"minecraft.MixinLevelRenderer",
|
||||
"nvidium.MixinRenderPipeline",
|
||||
"sodium.AccessorChunkTracker",
|
||||
"sodium.AccessorSodiumWorldRenderer",
|
||||
|
||||
Reference in New Issue
Block a user