Fix client tests for 25w09b ()

This commit is contained in:
modmuss 2025-02-27 18:30:34 +00:00 committed by GitHub
parent 02ca6796fb
commit d71774a3e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 53 deletions
.github/workflows
fabric-client-gametest-api-v1/src/client
java/net/fabricmc/fabric/mixin/client/gametest/input
resources
gradle.properties

View file

@ -49,7 +49,7 @@ jobs:
mkdir run && echo "eula=true" >> run/eula.txt
- run: ./gradlew runProductionClientGametest --stacktrace --warning-mode=fail
env:
ENABLE_TRACY_NO: true
ENABLE_TRACY: true
- uses: actions/upload-artifact@v4
if: always()
with:

View file

@ -1,49 +0,0 @@
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.fabricmc.fabric.mixin.client.gametest.input;
import org.spongepowered.asm.mixin.Mixin;
import net.minecraft.client.gl.Framebuffer;
@Mixin(Framebuffer.class)
public class FramebufferMixin {
/*
@ModifyVariable(method = {"draw", "drawInternal"}, at = @At("HEAD"), ordinal = 0, argsOnly = true)
private int modifyWidth(int width) {
Window window = MinecraftClient.getInstance().getWindow();
if ((Object) this == MinecraftClient.getInstance().getFramebuffer() && width == window.getFramebufferWidth()) {
return ((WindowHooks) (Object) window).fabric_getRealFramebufferWidth();
}
return width;
}
@ModifyVariable(method = {"draw", "drawInternal"}, at = @At("HEAD"), ordinal = 1, argsOnly = true)
private int modifyHeight(int height) {
Window window = MinecraftClient.getInstance().getWindow();
if ((Object) this == MinecraftClient.getInstance().getFramebuffer() && height == window.getFramebufferHeight()) {
return ((WindowHooks) (Object) window).fabric_getRealFramebufferHeight();
}
return height;
}
*/
}

View file

@ -0,0 +1,43 @@
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.fabricmc.fabric.mixin.client.gametest.input;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.llamalad7.mixinextras.sugar.Local;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import net.minecraft.class_10860;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.texture.DrawableTexture;
import net.fabricmc.fabric.impl.client.gametest.util.WindowHooks;
@Mixin(class_10860.class)
public class GlResourceManagerMixin {
@WrapOperation(method = "method_68357", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_glBlitFrameBuffer(IIIIIIIIII)V"))
private void blitFrameBuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter, Operation<Void> original, @Local(argsOnly = true) DrawableTexture drawableTexture) {
if (drawableTexture == MinecraftClient.getInstance().getFramebuffer().getColorAttachment()) {
WindowHooks window = ((WindowHooks) (Object) MinecraftClient.getInstance().getWindow());
dstX1 = window.fabric_getRealFramebufferWidth();
dstY1 = window.fabric_getRealFramebufferHeight();
}
original.call(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
}
}

View file

@ -8,7 +8,7 @@
"ClientWorldAccessor",
"CyclingButtonWidgetAccessor",
"ScreenAccessor",
"input.FramebufferMixin",
"input.GlResourceManagerMixin",
"input.InputUtilMixin",
"input.KeyBindingAccessor",
"input.KeyboardAccessor",

View file

@ -2,8 +2,8 @@ org.gradle.jvmargs=-Xmx2560M
org.gradle.parallel=true
version=0.118.1
minecraft_version=25w09a
yarn_version=+build.2
minecraft_version=25w09b
yarn_version=+build.1
loader_version=0.16.10
installer_version=1.0.1