Instead of setting the the values via accessor and calling the handler directly. This allows mods like ResolutionControl+ to properly resize its internal framebuffers as well.
21 lines
571 B
Java
21 lines
571 B
Java
package com.replaymod.render.mixin;
|
|
|
|
import net.minecraft.client.util.Window;
|
|
import org.spongepowered.asm.mixin.Mixin;
|
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
|
import org.spongepowered.asm.mixin.gen.Invoker;
|
|
|
|
@Mixin(Window.class)
|
|
public interface MainWindowAccessor {
|
|
@Accessor
|
|
int getFramebufferWidth();
|
|
@Accessor
|
|
void setFramebufferWidth(int value);
|
|
@Accessor
|
|
int getFramebufferHeight();
|
|
@Accessor
|
|
void setFramebufferHeight(int value);
|
|
@Invoker
|
|
void invokeOnFramebufferSizeChanged(long window, int width, int height);
|
|
}
|