mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-19 14:45:12 +00:00
Switch to Mojang mappings
ForgeGradle (probably sensibly) yells at me about doing this. However: - There's a reasonable number of mods doing this, which establishes some optimistic precedent. - The licence update in Aug 2020 now allows you to use them for "development purposes". I guess source code counts?? - I'm fairly sure this is also compatible with the CCPL - there's an exception for Minecraft code. The main motivation for this is to make the Fabric port a little easier. Hopefully folks (maybe me in the future, we'll see) will no longer have to deal with mapping hell when merging - only mod loader hell.
This commit is contained in:
@@ -146,18 +146,18 @@ public final class PrintoutRenderer
|
||||
|
||||
private static void drawTexture( Matrix4f matrix, IVertexBuilder buffer, float x, float y, float z, float u, float v, float width, float height )
|
||||
{
|
||||
buffer.pos( matrix, x, y + height, z ).tex( u / BG_SIZE, (v + height) / BG_SIZE ).endVertex();
|
||||
buffer.pos( matrix, x + width, y + height, z ).tex( (u + width) / BG_SIZE, (v + height) / BG_SIZE ).endVertex();
|
||||
buffer.pos( matrix, x + width, y, z ).tex( (u + width) / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
buffer.pos( matrix, x, y, z ).tex( u / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x, y + height, z ).uv( u / BG_SIZE, (v + height) / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x + width, y + height, z ).uv( (u + width) / BG_SIZE, (v + height) / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x + width, y, z ).uv( (u + width) / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x, y, z ).uv( u / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
}
|
||||
|
||||
private static void drawTexture( Matrix4f matrix, IVertexBuilder buffer, float x, float y, float z, float width, float height, float u, float v, float tWidth, float tHeight )
|
||||
{
|
||||
buffer.pos( matrix, x, y + height, z ).tex( u / BG_SIZE, (v + tHeight) / BG_SIZE ).endVertex();
|
||||
buffer.pos( matrix, x + width, y + height, z ).tex( (u + tWidth) / BG_SIZE, (v + tHeight) / BG_SIZE ).endVertex();
|
||||
buffer.pos( matrix, x + width, y, z ).tex( (u + tWidth) / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
buffer.pos( matrix, x, y, z ).tex( u / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x, y + height, z ).uv( u / BG_SIZE, (v + tHeight) / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x + width, y + height, z ).uv( (u + tWidth) / BG_SIZE, (v + tHeight) / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x + width, y, z ).uv( (u + tWidth) / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
buffer.vertex( matrix, x, y, z ).uv( u / BG_SIZE, v / BG_SIZE ).endVertex();
|
||||
}
|
||||
|
||||
public static float offsetAt( int page )
|
||||
@@ -167,14 +167,14 @@ public final class PrintoutRenderer
|
||||
|
||||
private static final class Type extends RenderState
|
||||
{
|
||||
static final RenderType TYPE = RenderType.makeType(
|
||||
static final RenderType TYPE = RenderType.create(
|
||||
"printout_background", DefaultVertexFormats.POSITION_TEX, GL11.GL_QUADS, 1024,
|
||||
false, false, // useDelegate, needsSorting
|
||||
RenderType.State.getBuilder()
|
||||
.texture( new RenderState.TextureState( BG, false, false ) ) // blur, minimap
|
||||
.alpha( DEFAULT_ALPHA )
|
||||
.lightmap( LIGHTMAP_DISABLED )
|
||||
.build( false )
|
||||
RenderType.State.builder()
|
||||
.setTextureState( new RenderState.TextureState( BG, false, false ) ) // blur, minimap
|
||||
.setAlphaState( DEFAULT_ALPHA )
|
||||
.setLightmapState( NO_LIGHTMAP )
|
||||
.createCompositeState( false )
|
||||
);
|
||||
|
||||
private Type( String name, Runnable setup, Runnable destroy )
|
||||
|
||||
Reference in New Issue
Block a user