Fixed dismiss spell screen rendering and fix leavef block items appearing invisible when using shaders

This commit is contained in:
Sollace 2024-10-05 03:16:15 +01:00
parent ee84df1bc1
commit f1b49ea1d0
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
4 changed files with 12 additions and 5 deletions

View file

@ -242,7 +242,7 @@ public interface URenderers {
color = view == null || pos == null ? FoliageColors.getDefaultColor() : BiomeColors.getFoliageColor(view, pos);
if (state.getBlock() instanceof TintedBlock block) {
return block.getTint(state, view, pos, color);
return block.getTint(state, view, pos, color) | 0xFF000000;
}
return color;

View file

@ -85,11 +85,11 @@ public class DismissSpellScreen extends GameGui {
MatrixStack matrices = context.getMatrices();
matrices.push();
matrices.translate(width - mouseX, height - mouseY, 0);
DrawableUtil.drawLine(matrices, 0, 0, relativeMouseX, relativeMouseY, 0xFFFFFF88);
DrawableUtil.drawArc(matrices, 40, 80, 0, DrawableUtil.TAU, 0x00000010);
DrawableUtil.drawArc(matrices, 160, 1600, 0, DrawableUtil.TAU, 0x00000020);
super.render(context, mouseX, mouseY, delta);
DrawableUtil.drawLine(matrices, 0, 0, relativeMouseX, relativeMouseY, 0xFFFFFF88);
DrawableUtil.renderRaceIcon(context, pony.getObservedSpecies(), 0, 0, 16);
matrices.pop();
@ -108,6 +108,12 @@ public class DismissSpellScreen extends GameGui {
}
@Override
protected void renderDarkening(DrawContext context) {
DrawableUtil.drawArc(context.getMatrices(), 40, 80, 0, DrawableUtil.TAU, 0x00000010);
DrawableUtil.drawArc(context.getMatrices(), 160, 1600, 0, DrawableUtil.TAU, 0x00000020);
}
@Override
public boolean shouldPause() {
return false;

View file

@ -98,6 +98,7 @@ public interface DrawableUtil {
if (arcAngle < INCREMENT) {
return;
}
float r = (color >> 24 & 255) / 255F;
float g = (color >> 16 & 255) / 255F;
float b = (color >> 8 & 255) / 255F;

View file

@ -138,7 +138,7 @@ public class SpellEffectsRenderDispatcher implements SynchronousResourceReloader
int left = (int)caster.asEntity().getWidth() * 64;
for (Text line : debugLines) {
client.textRenderer.draw(line, left += 1, top += spacing, Colors.WHITE, false, matrices.peek().getPositionMatrix(), vertices, TextLayerType.NORMAL, j, light);
client.textRenderer.draw(line, left += 1, top += spacing, Colors.WHITE, false, matrices.peek().getPositionMatrix(), vertices, TextLayerType.POLYGON_OFFSET, j, light);
}
matrices.pop();
}