[Bug] FluidPipeScreen crashes with the latest version of Fabric Transfer API
JulianSharren opened this issue ยท 2 comments
TL;DR
FluidPipeScreen.java needs update after the breaking changes in Fabric Transfer API.
Step to Reproduce
- Use Fabric API 0.57.0+1.19, which contains Fabric Transfer API (v1) 2.0.9
- Connect a fluid pipe to anything, i.e. a Cutting Machine
- Open fluid pipe GUI and click the filter slot.
Cause
After the breaking changes in Fabric Transfer API v2,
the function StorageUtil.findStoredResource
no longer accepts null for filter argument.
It must be called without the filter argument (which will fill filter with r -> True
).
Crash Report
*** stacktrace ***
Time: 2022/07/17 16:01
Description: mouseClicked event handler
java.lang.NullPointerException: Filter may not be null
at java.base/java.util.Objects.requireNonNull(Objects.java:233)
at net.fabricmc.fabric.api.transfer.v1.storage.StorageUtil.findStoredResource(StorageUtil.java:171)
at aztech.modern_industrialization.pipes.fluid.FluidPipeScreen.updateNetworkFluid(FluidPipeScreen.java:92)
at aztech.modern_industrialization.pipes.fluid.FluidPipeScreen.lambda$addNetworkFluidButton$0(FluidPipeScreen.java:74)
at net.minecraft.class_4185.method_25306(class_4185.java:40)
at net.minecraft.class_4264.method_25348(class_4264.java:16)
at net.minecraft.class_339.method_25402(class_339.java:120)
at net.minecraft.class_4069.method_25402(class_4069.java:27)
at net.minecraft.class_465.method_25402(class_465.java:311)
at net.minecraft.class_312.method_1611(class_312.java:94)
at net.minecraft.class_437.method_25412(class_437.java:491)
at net.minecraft.class_312.method_1601(class_312.java:94)
at net.minecraft.class_312.method_22686(class_312.java:165)
at net.minecraft.class_1255.execute(class_1255.java:103)
at net.minecraft.class_312.method_22684(class_312.java:165)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3403)
at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:204)
at net.minecraft.class_1041.method_15998(class_1041.java:310)
at net.minecraft.class_310.method_1523(class_310.java:1171)
at net.minecraft.class_310.method_1514(class_310.java:734)
at net.minecraft.client.main.Main.main(Main.java:237)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
*** mods ***
Fabric Mods:
architectury: Architectury 5.8.29
badpackets: Bad Packets 0.1.2
cloth-config: Cloth Config v6 7.0.72
cloth-basic-math: cloth-basic-math 0.6.1
fabric: Fabric API 0.57.0+1.19
fabric-api-base: Fabric API Base 0.4.9+e62f51a3a9
fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.7+9ff28f40a9
fabric-biome-api-v1: Fabric Biome API (v1) 9.0.14+b2a4a624a9
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.18+9ff28f40a9
fabric-command-api-v1: Fabric Command API (v1) 1.2.6+f71b366fa9
fabric-command-api-v2: Fabric Command API (v2) 2.1.2+0d55f585a9
fabric-commands-v0: Fabric Commands (v0) 0.2.23+df3654b3a9
fabric-containers-v0: Fabric Containers (v0) 0.1.27+df3654b3a9
fabric-content-registries-v0: Fabric Content Registries (v0) 3.2.0+07df213ea9
fabric-convention-tags-v1: Fabric Convention Tags 1.0.8+37622d24a9
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.3+bd0a0d4aa9
fabric-data-generation-api-v1: Fabric Data Generation API (v1) 5.1.1+a680b9b4a9
fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.28+a6d2f785a9
fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.16+9ff28f40a9
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.26+9ff28f40a9
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.25+df3654b3a9
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.19+18990361a9
fabric-item-api-v1: Fabric Item API (v1) 1.5.4+767db26ea9
fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.25+9ff28f40a9
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.18+9ff28f40a9
fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.16+df3654b3a9
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.1.0+33fbc738a9
fabric-loot-api-v2: Fabric Loot API (v2) 1.1.0+03a4e568a9
fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.1.3+9e7660c6a9
fabric-message-api-v1: Fabric Message API (v1) 1.0.1+513f4a59a9
fabric-mining-level-api-v1: Fabric Mining Level API (v1) 2.1.10+33fbc738a9
fabric-models-v0: Fabric Models (v0) 0.3.15+9ff28f40a9
fabric-networking-api-v1: Fabric Networking API (v1) 1.0.27+7fe97409a9
fabric-networking-v0: Fabric Networking (v0) 0.3.14+df3654b3a9
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 4.0.7+9ff28f40a9
fabric-particles-v1: Fabric Particles (v1) 1.0.8+dc39553aa9
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.17+23c4cfefa9
fabric-renderer-api-v1: Fabric Renderer API (v1) 1.0.8+9ff28f40a9
fabric-renderer-indigo: Fabric Renderer - Indigo 0.6.9+1f92344ea9
fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.18+df3654b3a9
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.12+9ff28f40a9
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.0.5+9ff28f40a9
fabric-rendering-v0: Fabric Rendering (v0) 1.1.20+df3654b3a9
fabric-rendering-v1: Fabric Rendering (v1) 1.10.14+9ff28f40a9
fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 2.0.9+e62f51a3a9
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.5.5+a6d2f785a9
fabric-screen-api-v1: Fabric Screen API (v1) 1.0.24+f05effafa9
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.2.6+9ff28f40a9
fabric-textures-v0: Fabric Textures (v0) 1.0.18+9ff28f40a9
fabric-transfer-api-v1: Fabric Transfer API (v1) 2.0.9+e62f51a3a9
fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 1.1.1+9e7660c6a9
fabricloader: Fabric Loader 0.14.8
indium: Indium 1.0.6+mc1.19
java: OpenJDK 64-Bit Server VM 17
minecraft: Minecraft 1.19
modern_industrialization: Modern Industrialization 1.3.1
magna: Magna 1.8.0-1.19
omega-config: OmegaConfig 1.0.8
noindium: No Indium? 1.1.0+1.19
patchouli: Patchouli 1.19-70-FABRIC-SNAPSHOT
fiber: fiber 0.23.0-2
playerabilitylib: Pal 1.6.0
team_reborn_energy: Energy 2.2.0
modmenu: Mod Menu 4.0.0
roughlyenoughitems: Roughly Enough Items 9.1.503
simple_utilities: Simple HUD Utilities 2.5.0
autoconfig1u: Auto Config v1 Updated 3.3.1
sodium: Sodium 0.4.2+build.16
org_joml_joml: joml 1.10.4
wthit: wthit 5.5.1
Launched Version: fabric-loader-0.14.8-1.19