fix mixins

This commit is contained in:
mcrcortex
2025-10-30 23:03:54 +10:00
parent e81d442b8b
commit f91f59f1f8
3 changed files with 9 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ public class MixinIrisRenderingPipeline implements IGetVoxyPatchData, IGetIrisVo
} }
} }
@Inject(method = "beginLevelRendering", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/opengl/GlStateManager;_activeTexture(I)V", shift = At.Shift.BEFORE), remap = true) @Inject(method = "beginLevelRendering", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/opengl/GlStateManager;_activeTexture(I)V", shift = At.Shift.BEFORE), remap = false)
private void voxy$injectViewportSetup(CallbackInfo ci) { private void voxy$injectViewportSetup(CallbackInfo ci) {
if (IrisUtil.CAPTURED_VIEWPORT_PARAMETERS != null) { if (IrisUtil.CAPTURED_VIEWPORT_PARAMETERS != null) {
var renderer = ((IGetVoxyRenderSystem) Minecraft.getInstance().levelRenderer).getVoxyRenderSystem(); var renderer = ((IGetVoxyRenderSystem) Minecraft.getInstance().levelRenderer).getVoxyRenderSystem();

View File

@@ -79,25 +79,25 @@ public class WorldIdentifier {
return instance.getNullable(this); return instance.getNullable(this);
} }
public static WorldIdentifier of(Level world) { public static WorldIdentifier of(Level level) {
//Gets or makes an identifier for world //Gets or makes an identifier for world
if (world == null) { if (level == null) {
return null; return null;
} }
return ((IWorldGetIdentifier)world).voxy$getIdentifier(); return ((IWorldGetIdentifier)level).voxy$getIdentifier();
} }
//Common utility function to get or create a world engine //Common utility function to get or create a world engine
public static WorldEngine ofEngine(Level world) { public static WorldEngine ofEngine(Level level) {
var id = of(world); var id = of(level);
if (id == null) { if (id == null) {
return null; return null;
} }
return id.getOrCreateEngine(); return id.getOrCreateEngine();
} }
public static WorldEngine ofEngineNullable(Level world) { public static WorldEngine ofEngineNullable(Level level) {
var id = of(world); var id = of(level);
if (id == null) { if (id == null) {
return null; return null;
} }

View File

@@ -16,7 +16,7 @@ import java.util.concurrent.CompletableFuture;
@Mixin(FabricWorld.class) @Mixin(FabricWorld.class)
public class MixinFabricWorld { public class MixinFabricWorld {
@WrapOperation(method = "getChunkAtAsync", at = @At(value = "INVOKE", target = "Lorg/popcraft/chunky/mixin/ServerChunkCacheMixin;invokeGetChunkFutureMainThread(IILnet/minecraft/world/chunk/ChunkStatus;Z)Ljava/util/concurrent/CompletableFuture;")) @WrapOperation(method = "getChunkAtAsync", at = @At(value = "INVOKE", target = "Lorg/popcraft/chunky/mixin/ServerChunkCacheMixin;invokeGetChunkFutureMainThread(IILnet/minecraft/world/level/chunk/status/ChunkStatus;Z)Ljava/util/concurrent/CompletableFuture;"))
private CompletableFuture<ChunkResult<ChunkAccess>> captureGeneratedChunk(ServerChunkCacheMixin instance, int i, int j, ChunkStatus chunkStatus, boolean b, Operation<CompletableFuture<ChunkResult<ChunkAccess>>> original) { private CompletableFuture<ChunkResult<ChunkAccess>> captureGeneratedChunk(ServerChunkCacheMixin instance, int i, int j, ChunkStatus chunkStatus, boolean b, Operation<CompletableFuture<ChunkResult<ChunkAccess>>> original) {
var future = original.call(instance, i, j, chunkStatus, b); var future = original.call(instance, i, j, chunkStatus, b);
if (false) {//TODO: ADD SERVER CONFIG THING if (false) {//TODO: ADD SERVER CONFIG THING