Update to BCLib 0.3.0

This commit is contained in:
paulevsGitch 2021-07-20 00:39:58 +03:00
parent 1a52251af0
commit b2431153dc
294 changed files with 7484 additions and 1440 deletions

View file

@ -11,7 +11,6 @@ import com.mojang.blaze3d.vertex.VertexFormat;
import com.mojang.math.Matrix4f;
import com.mojang.math.Quaternion;
import com.mojang.math.Vector3f;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.renderer.DimensionSpecialEffects;
@ -21,7 +20,6 @@ import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.RenderBuffers;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.resources.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@ -101,7 +99,10 @@ public class LevelRendererMixin {
FogRenderer.levelFogColor();
RenderSystem.enableTexture();
RenderSystem.enableBlend();
RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
RenderSystem.blendFunc(
GlStateManager.SourceFactor.SRC_ALPHA,
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA
);
float blindA = 1F - BackgroundInfo.blindness;
blind02 = blindA * 0.2F;
@ -111,26 +112,62 @@ public class LevelRendererMixin {
matrices.pushPose();
matrices.mulPose(new Quaternion(0, time, 0, false));
RenderSystem.setShaderTexture(0, HORIZON);
be_renderBuffer(matrices, matrix4f, horizon, DefaultVertexFormat.POSITION_TEX, 0.77F, 0.31F, 0.73F, 0.7F * blindA);
be_renderBuffer(
matrices,
matrix4f,
horizon,
DefaultVertexFormat.POSITION_TEX,
0.77F,
0.31F,
0.73F,
0.7F * blindA
);
matrices.popPose();
matrices.pushPose();
matrices.mulPose(new Quaternion(0, -time, 0, false));
RenderSystem.setShaderTexture(0, NEBULA_1);
be_renderBuffer(matrices, matrix4f, nebulas1, DefaultVertexFormat.POSITION_TEX, 0.77F, 0.31F, 0.73F, blind02);
be_renderBuffer(
matrices,
matrix4f,
nebulas1,
DefaultVertexFormat.POSITION_TEX,
0.77F,
0.31F,
0.73F,
blind02
);
matrices.popPose();
matrices.pushPose();
matrices.mulPose(new Quaternion(0, time2, 0, false));
RenderSystem.setShaderTexture(0, NEBULA_2);
be_renderBuffer(matrices, matrix4f, nebulas2, DefaultVertexFormat.POSITION_TEX, 0.77F, 0.31F, 0.73F, blind02);
be_renderBuffer(
matrices,
matrix4f,
nebulas2,
DefaultVertexFormat.POSITION_TEX,
0.77F,
0.31F,
0.73F,
blind02
);
matrices.popPose();
RenderSystem.setShaderTexture(0, STARS);
matrices.pushPose();
matrices.mulPose(axis3.rotation(time));
be_renderBuffer(matrices, matrix4f, stars3, DefaultVertexFormat.POSITION_TEX, 0.77F, 0.31F, 0.73F, blind06);
be_renderBuffer(
matrices,
matrix4f,
stars3,
DefaultVertexFormat.POSITION_TEX,
0.77F,
0.31F,
0.73F,
blind06
);
matrices.popPose();
matrices.pushPose();
@ -143,7 +180,16 @@ public class LevelRendererMixin {
if (a > 0) {
if (a > 1) a = 1;
RenderSystem.setShaderTexture(0, FOG);
be_renderBuffer(matrices, matrix4f, fog, DefaultVertexFormat.POSITION_TEX, BackgroundInfo.fogColorRed, BackgroundInfo.fogColorGreen, BackgroundInfo.fogColorBlue, a);
be_renderBuffer(
matrices,
matrix4f,
fog,
DefaultVertexFormat.POSITION_TEX,
BackgroundInfo.fogColorRed,
BackgroundInfo.fogColorGreen,
BackgroundInfo.fogColorBlue,
a
);
}
RenderSystem.disableTexture();