diff --git a/src/main/java/net/id/paradiselost/mixin/client/render/InGameOverlayRendererMixin.java b/src/main/java/net/id/paradiselost/mixin/client/render/InGameOverlayRendererMixin.java index cf88ce4ab..fd0860c84 100644 --- a/src/main/java/net/id/paradiselost/mixin/client/render/InGameOverlayRendererMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/client/render/InGameOverlayRendererMixin.java @@ -38,18 +38,23 @@ private static void renderCloudOverlay(Sprite sprite, MatrixStack matrices, Call MinecraftClient client = MinecraftClient.getInstance(); BlockState overlayState = getInWallBlockState(client.player); if (overlayState != null && overlayState.getBlock() instanceof ParadiseLostCloudBlock) { + RenderSystem.setShader(GameRenderer::getPositionTexProgram); RenderSystem.setShaderTexture(0, ParadiseLost.locate("textures/block/" + Registries.BLOCK.getId(overlayState.getBlock()).getPath() + ".png")); - RenderSystem.setShader(GameRenderer::getPositionTexColorProgram); - float brightness = client.player.getBrightnessAtEyes(); + BlockPos blockPos = BlockPos.ofFloored(client.player.getX(), client.player.getEyeY(), client.player.getZ()); + float brightness = LightmapTextureManager.getBrightness(client.player.getWorld().getDimension(), client.player.getWorld().getLightLevel(blockPos)); + RenderSystem.enableBlend(); + RenderSystem.setShaderColor(brightness, brightness, brightness, 0.6F); float yaw = client.player.getYaw() / 192.0F; float pitch = client.player.getPitch() / 192.0F; Matrix4f matrix4f = matrices.peek().getPositionMatrix(); - BufferBuilder bufferBuilder = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE_COLOR); - bufferBuilder.vertex(matrix4f, -1.0F, -1.0F, -0.5F).texture(1.0F - yaw, 1.0F + pitch).color(brightness, brightness, brightness, 0.075F); - bufferBuilder.vertex(matrix4f, 1.0F, -1.0F, -0.5F).texture(0.0F - yaw, 1.0F + pitch).color(brightness, brightness, brightness, 0.075F); - bufferBuilder.vertex(matrix4f, 1.0F, 1.0F, -0.5F).texture(0.0F - yaw, 0.0F + pitch).color(brightness, brightness, brightness, 0.075F); - bufferBuilder.vertex(matrix4f, -1.0F, 1.0F, -0.5F).texture(1.0F - yaw, 0.0F + pitch).color(brightness, brightness, brightness, 0.075F); + BufferBuilder bufferBuilder = Tessellator.getInstance().begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_TEXTURE); + bufferBuilder.vertex(matrix4f, -1.0F, -1.0F, -0.5F).texture(1.0F - yaw, 1.0F + pitch); + bufferBuilder.vertex(matrix4f, 1.0F, -1.0F, -0.5F).texture(0.0F - yaw, 1.0F + pitch); + bufferBuilder.vertex(matrix4f, 1.0F, 1.0F, -0.5F).texture(0.0F - yaw, 0.0F + pitch); + bufferBuilder.vertex(matrix4f, -1.0F, 1.0F, -0.5F).texture(1.0F - yaw, 0.0F + pitch); BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.disableBlend(); ci.cancel(); } } diff --git a/src/main/resources/data/paradise_lost/loot_table/blocks/swedroot_spread.json b/src/main/resources/data/paradise_lost/loot_table/blocks/swedroot_spread.json deleted file mode 100644 index 97ff18fd4..000000000 --- a/src/main/resources/data/paradise_lost/loot_table/blocks/swedroot_spread.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "multipart": [ - { - "when": { - "up": "true" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "x": 270, - "uvlock": true - } - }, - { - "when": { - "up": "false", - "north": "false", - "west": "false", - "south": "false", - "east": "false", - "down": "false" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "x": 270, - "uvlock": true - } - }, - { - "when": { - "north": "true" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread" - } - }, - { - "when": { - "up": "false", - "north": "false", - "west": "false", - "south": "false", - "east": "false", - "down": "false" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread" - } - }, - { - "when": { - "west": "true" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "y": 270, - "uvlock": true - } - }, - { - "when": { - "up": "false", - "north": "false", - "west": "false", - "south": "false", - "east": "false", - "down": "false" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "y": 270, - "uvlock": true - } - }, - { - "when": { - "south": "true" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "y": 180, - "uvlock": true - } - }, - { - "when": { - "up": "false", - "north": "false", - "west": "false", - "south": "false", - "east": "false", - "down": "false" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "y": 180, - "uvlock": true - } - }, - { - "when": { - "east": "true" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "y": 90, - "uvlock": true - } - }, - { - "when": { - "up": "false", - "north": "false", - "west": "false", - "south": "false", - "east": "false", - "down": "false" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "y": 90, - "uvlock": true - } - }, - { - "when": { - "down": "true" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "x": 90, - "uvlock": true - } - }, - { - "when": { - "up": "false", - "north": "false", - "west": "false", - "south": "false", - "east": "false", - "down": "false" - }, - "apply": { - "model": "paradise_lost:block/swedroot_spread", - "x": 90, - "uvlock": true - } - } - ] -} \ No newline at end of file