forked from IrisShaders/Iris
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.20.1' of https://github.com/IrisShaders/Iris into 1.20
- Loading branch information
Showing
77 changed files
with
989 additions
and
725 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/main/java/net/coderbot/batchedentityrendering/mixin/BufferSourceAccessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package net.coderbot.batchedentityrendering.mixin; | ||
|
||
import com.mojang.blaze3d.vertex.BufferBuilder; | ||
import net.minecraft.client.renderer.MultiBufferSource; | ||
import net.minecraft.client.renderer.RenderType; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
import java.util.Map; | ||
|
||
@Mixin(MultiBufferSource.BufferSource.class) | ||
public interface BufferSourceAccessor { | ||
@Accessor | ||
Map<RenderType, BufferBuilder> getFixedBuffers(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/net/coderbot/iris/gl/framebuffer/ViewportData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package net.coderbot.iris.gl.framebuffer; | ||
|
||
public record ViewportData(float scale, float viewportX, float viewportY) { | ||
private static ViewportData DEFAULT = new ViewportData(1.0f, 0.0f, 0.0f); | ||
|
||
public static ViewportData defaultValue() { | ||
return DEFAULT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package net.coderbot.iris.gui; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraft.client.gui.components.Button; | ||
import net.minecraft.network.chat.CommonComponents; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class OldImageButton extends Button { | ||
protected final ResourceLocation resourceLocation; | ||
protected final int xTexStart; | ||
protected final int yTexStart; | ||
protected final int yDiffTex; | ||
protected final int textureWidth; | ||
protected final int textureHeight; | ||
|
||
public OldImageButton( | ||
int pImageButton0, int pInt1, int pInt2, int pInt3, int pInt4, int pInt5, ResourceLocation pResourceLocation6, Button.OnPress pButton$OnPress7 | ||
) { | ||
this(pImageButton0, pInt1, pInt2, pInt3, pInt4, pInt5, pInt3, pResourceLocation6, 256, 256, pButton$OnPress7); | ||
} | ||
|
||
public OldImageButton( | ||
int pImageButton0, | ||
int pInt1, | ||
int pInt2, | ||
int pInt3, | ||
int pInt4, | ||
int pInt5, | ||
int pInt6, | ||
ResourceLocation pResourceLocation7, | ||
Button.OnPress pButton$OnPress8 | ||
) { | ||
this(pImageButton0, pInt1, pInt2, pInt3, pInt4, pInt5, pInt6, pResourceLocation7, 256, 256, pButton$OnPress8); | ||
} | ||
|
||
public OldImageButton( | ||
int pImageButton0, | ||
int pInt1, | ||
int pInt2, | ||
int pInt3, | ||
int pInt4, | ||
int pInt5, | ||
int pInt6, | ||
ResourceLocation pResourceLocation7, | ||
int pInt8, | ||
int pInt9, | ||
Button.OnPress pButton$OnPress10 | ||
) { | ||
this(pImageButton0, pInt1, pInt2, pInt3, pInt4, pInt5, pInt6, pResourceLocation7, pInt8, pInt9, pButton$OnPress10, CommonComponents.EMPTY); | ||
} | ||
|
||
public OldImageButton( | ||
int pImageButton0, | ||
int pInt1, | ||
int pInt2, | ||
int pInt3, | ||
int pInt4, | ||
int pInt5, | ||
int pInt6, | ||
ResourceLocation pResourceLocation7, | ||
int pInt8, | ||
int pInt9, | ||
Button.OnPress pButton$OnPress10, | ||
Component pComponent11 | ||
) { | ||
super(pImageButton0, pInt1, pInt2, pInt3, pComponent11, pButton$OnPress10, DEFAULT_NARRATION); | ||
this.textureWidth = pInt8; | ||
this.textureHeight = pInt9; | ||
this.xTexStart = pInt4; | ||
this.yTexStart = pInt5; | ||
this.yDiffTex = pInt6; | ||
this.resourceLocation = pResourceLocation7; | ||
} | ||
|
||
@Override | ||
public void renderWidget(GuiGraphics pImageButton0, int pInt1, int pInt2, float pFloat3) { | ||
this.renderTexture( | ||
pImageButton0, | ||
this.resourceLocation, | ||
this.getX(), | ||
this.getY(), | ||
this.xTexStart, | ||
this.yTexStart, | ||
this.yDiffTex, | ||
this.width, | ||
this.height, | ||
this.textureWidth, | ||
this.textureHeight | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.