diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-03-30 01:27:50 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-03-30 01:28:08 +0800 |
| commit | 5b0c5838978fc74f783c6dcff2983af4fb97d912 (patch) | |
| tree | 3203f3c7acb3ecd28e6fbb7738d092713c891f96 | |
| parent | 643c63d07667d745ae6b005079f882c38f03f528 (diff) | |
| download | RoughlyEnoughItems-5b0c5838978fc74f783c6dcff2983af4fb97d912.tar.gz RoughlyEnoughItems-5b0c5838978fc74f783c6dcff2983af4fb97d912.tar.bz2 RoughlyEnoughItems-5b0c5838978fc74f783c6dcff2983af4fb97d912.zip | |
Fix crash with rendering fluid with no sprite
Signed-off-by: shedaniel <daniel@shedaniel.me>
| -rw-r--r-- | forge/src/main/resources/META-INF/mods.toml | 2 | ||||
| -rw-r--r-- | gradle.properties | 2 | ||||
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/plugin/client/entry/FluidEntryDefinition.java | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 02685e595..31f53d582 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -15,6 +15,6 @@ To allow players to view items and recipes. [[dependencies.roughlyenoughitems]] modId = "architectury" mandatory = true -versionRange = "[1.9.136,)" +versionRange = "[1.10.139,)" ordering = "NONE" side = "BOTH" diff --git a/gradle.properties b/gradle.properties index 01ce31c61..4e9ed76c7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ fabricloader_version=0.11.1 cloth_config_version=4.11.18 modmenu_version=1.16.7 fabric_api=0.30.0+1.16 -architectury_version=1.9.136 +architectury_version=1.10.139 api_exculde= #api_include=me.shedaniel.cloth:cloth-events,me.shedaniel.cloth:config-2,me.sargunvohra.mcmods:autoconfig1u,org.jetbrains:annotations,net.fabricmc.fabric-api:fabric-
\ No newline at end of file diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/client/entry/FluidEntryDefinition.java b/runtime/src/main/java/me/shedaniel/rei/plugin/client/entry/FluidEntryDefinition.java index aebfa33f9..f41b70858 100644 --- a/runtime/src/main/java/me/shedaniel/rei/plugin/client/entry/FluidEntryDefinition.java +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/client/entry/FluidEntryDefinition.java @@ -174,7 +174,9 @@ public class FluidEntryDefinition implements EntryDefinition<FluidStack>, EntryS @Override public void render(EntryStack<FluidStack> entry, PoseStack matrices, Rectangle bounds, int mouseX, int mouseY, float delta) { FluidStack stack = entry.getValue(); + if (stack.isEmpty()) return; TextureAtlasSprite sprite = FluidStackHooks.getStillTexture(stack); + if (sprite == null) return; int color = FluidStackHooks.getColor(stack); int a = 255; int r = (color >> 16 & 255); |
