Fabricators-of-Create / Create

[Fabric Mod] Building Tools and Aesthetic Technology
MIT License
895 stars 200 forks source link

Right clicking assembled train's door sometimes crashes #998

Closed jc776 closed 2 months ago

jc776 commented 1 year ago

Describe the Bug

I have a train with 2 carriages:

The track is one long straight line, same has happened with a station at one end or both ends.

Having stopped on track, not on any station, right clicking a door sometimes crashes with null pointer DoorMovingInteraction.handle(DoorMovingInteraction.java:32) - stack trace below.

Right clicking/filling/emptying the chests works without issues Right clicking/dismounting the seat works without issues Similar case sometimes works to open/close doors. I've had it both crash again on the same action when restarting after a crash, and work straight away in the same case. The doors automatically open/close correctly on reaching a station. The doors automatically close on manually starting to move, including outside a station. The doors work when disassembled.

Reproduction Steps

  1. Build a similar train
  2. Manually pilot it out of the station
  3. Right click the doors while moving or stopped?

Expected Result

Door opens/closes on right click as normal.

Screenshots and Videos

No response

Crash Report or Log

Description: Unexpected error
java.lang.NullPointerException: Cannot read field "field_15596" because "info" is null
    at com.simibubi.create.content.contraptions.behaviour.DoorMovingInteraction.handle(DoorMovingInteraction.java:32)
    at com.simibubi.create.content.contraptions.behaviour.SimpleBlockMovingInteraction.handlePlayerInteraction(SimpleBlockMovingInteraction.java:23)
    at com.simibubi.create.content.contraptions.AbstractContraptionEntity.handlePlayerInteraction(AbstractContraptionEntity.java:290)
    at com.simibubi.create.content.contraptions.ContraptionHandlerClient.rightClickingOnContraptionsGetsHandledLocally(ContraptionHandlerClient.java:110)
    at io.github.fabricators_of_create.porting_lib.event.client.InteractEvents.lambda$static$0(InteractEvents.java:21)
    at net.minecraft.class_310.handler$zgm000$porting_lib_base$port_lib$onStartUseItem(class_310.java:3598)
    at net.minecraft.class_310.method_1583(class_310.java:1721)
    at net.minecraft.class_310.method_1508(class_310.java:2002)
    at net.minecraft.class_310.method_1574(class_310.java:1829)
    at net.minecraft.class_310.method_1523(class_310.java:1135)
    at net.minecraft.class_310.method_1514(class_310.java:768)
    at net.minecraft.client.main.Main.method_44604(Main.java:244)
    at net.minecraft.client.main.Main.main(Main.java:51)
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

Operating System

macOS Venture 13.4.1 (M1)

Mod Version

0.5.1b

Minecraft Version

1.20.1

Other Mods

Amplified_Nether_1.19.3_v1.2.1.jar BetterAdvancements-Fabric-1.19.2-0.2.2.147.jar Botania-1.19.2-440-FABRIC.jar FallingTree-1.19.2-3.10.0.jar MouseTweaks-fabric-mc1.19-2.22.jar NaturesCompass-1.19.2-2.1.0-fabric.jar Nullscape_1.19.3_v1.2.1a.jar Patchouli-1.19.2-77-FABRIC.jar Structory-1.19-v1.3.jar Structory_Towers_1.19_v1.0.1.jar Terralith_1.19.3_v2.3.8.jar YungsApi-1.19.2-Fabric-3.8.9.jar YungsBetterDesertTemples-1.19.2-Fabric-2.2.2.jar YungsBetterDungeons-1.19.2-Fabric-3.2.1.jar YungsBetterNetherFortresses-1.19.2-Fabric-1.0.5.jar YungsBetterOceanMonuments-1.19.2-Fabric-2.1.0.jar YungsBetterWitchHuts-1.19.2-Fabric-2.1.0.jar YungsBridges-1.19.2-Fabric-3.1.0.jar YungsExtras-1.19.2-Fabric-3.1.0.jar appleskin-fabric-mc1.19-2.4.1.jar appliedenergistics2-fabric-12.9.5.jar architectury-6.5.85-fabric.jar brazier-fabric-5.0.1.jar camsbackpacks-2.13.jar cardinal-components-api-5.0.2.jar cloth-config-8.2.88-fabric.jar create-fabric-0.5.1-b-build.1089+mc1.19.2.jar createchunkloading-1.5.1-fabric.jar crockpot-1.13.0+1.19.2.jar ctov-3.2.5.jar darkness-fabric-mc119-2.0.101.jar emi-1.0.6+1.19.2+fabric.jar emi_farmersdelight-1.0.1.jar fabric-api-0.76.0+1.19.2.jar fabric-end-remastered-5.2.0-1.19.2.jar fabric-language-kotlin-1.10.0+kotlin.1.9.0.jar fabric-the-lost-castle-1.0.0-1.19.2.jar farmers-delight-fabric-1.19.X-1.3.9.jar guard-villagers-fabric-1.19.2-1.1.2.jar herdspanic-1.0.6.jar hexcasting-fabric-1.19.2-0.10.3.jar idwtialsimmoedm-0.2.0+1.19.jar indium-1.0.9+mc1.19.2.jar kubejs-fabric-1902.6.0-build.142.jar lambdynamiclights-2.2.0+1.19.2.jar lithium-fabric-mc1.19.2-0.11.1.jar map-atlases-2.3.1+1.19.jar midnightlib-fabric-1.0.0.jar minecells-1.4.3.jar modmenu-4.2.0-beta.2.jar moon-phase-indicator-fabric-1.0.1-1.19.2.jar nethermap-2.0.2-1.19.2.jar owo-lib-0.9.3+1.19.jar paucal-fabric-1.19.2-0.5.0.jar revelationary-1.3.5.jar rhino-fabric-1902.2.2-build.268.jar sodium-fabric-mc1.19.2-0.4.4+build.18.jar spectrum-1.7.0-deeper-down-alpha15.jar starlight-1.1.1+fabric.ae22326.jar trinkets-3.4.2.jar twilightforest-fabric-1.19.2-4.2.357.jar

The only Create-specific addon is "Create Chunkloading", but I haven't used any of those chunkloaders in this world at all.

Additional Context

electricsteve commented 1 year ago

Maybe the door automatically opens while stopping, but that wouldn't make sense, how could info be null?

IThundxr commented 2 months ago

Can't reproduce, if anyone manages to reproduce this on the latest version feel free to open a new issue

souldbminersmwc commented 2 months ago

You are on 0.5.1b. Update.