From b8bf4e38fb445e04868a2bcb8c2431576d7f6303 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Sun, 28 Apr 2024 12:29:39 -0400 Subject: [PATCH] Add rendering argb changes --- _posts/2024-04-19-1205.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_posts/2024-04-19-1205.md b/_posts/2024-04-19-1205.md index d7148539..c9260d1c 100644 --- a/_posts/2024-04-19-1205.md +++ b/_posts/2024-04-19-1205.md @@ -495,6 +495,9 @@ All `AbstractBlock` public methods to be overridden were made `protected` and no ### Client In GUI, setting the initial focus of a screen is now done by overriding `setInitialFocus`, rather than calling it in `init`. `MatrixStack` was replaced with the actual matrix in several rendering code. +#### Rendering +Some places that previously take `rgb` was updated to take `argb` instead. The new `DyedColorComponent` takes `argb`. Item color providers also take `argb` instead of `rgb`, so make sure to wrap your color with `ColorHelper.Argb.fullAlpha()` or else your item may appear transparent if it is registered to the translucent render layer. Block color providers also `argb` now, but passing `rgb` still works. + ### Other DataFixerUpper was updated. This includes several breaking changes, such as `MapCodec` being used in places defining extra fields. Use `RecordCodecBuilder#mapCodec` instead of `create` in this case. Another significant change: `optionalFieldOf` is now strict by default. This means that a decoding error in the field value is now treated as an error, instead of being silently skipped. The `lenientOptionalFieldOf` method restores old behavior.