Railcraft Reborn

Railcraft Reborn

3M Downloads

Steam Locomotive crashes the game/world if it falls into lava

BlakeAvery opened this issue ยท 5 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Bug

As title states, if you send a steam locomotive down the track and it encounters a pool of lava, the world crashes once the locomotive enters and is destroyed by the lava. Expected item drops are present once you load back into the world, seems to only happen when the game destroys the cart by lava.

Configuration

- Mod version: 1.0.0
- NeoForge/Forge version: 47.1.44
- Minecraft version: 1.20.1
- Are you playing on a server?: This bug occurs regardless of whether you are playing on a server or not.

To Reproduce

Create track layout. Place pool of lava at end of layout such that train will fall in. Place locomotive on tracks and send it towards the lava pool. You may have to nudge the locomotive in, but once it enters the lava pool the world will crash.

Expected behavior

Locomotive is destroyed, with all drops present. World continues to run as expected.

Logs & Environment

Log from server crash:
[08:14:47] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking entity
        at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:897) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:283) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at java.lang.Thread.run(Thread.java:1589) ~[?:?] {}
Caused by: java.lang.IllegalStateException: MinecartExtension missing on SteamLocomotive['Steam Locomotive'/349, l='ServerLevel[world]', x=99.22, y=91.11, z=-33.04, removed=KILLED]
        at mods.railcraft.api.carts.RollingStock.lambda$getOrThrow$0(RollingStock.java:40) ~[railcraft.jar%23101!/:1.20.1-1.0.0] {re:mixin,re:classloading}
        at net.minecraftforge.common.util.LazyOptional.orElseThrow(LazyOptional.java:261) ~[forge-1.20.1-47.1.44-universal.jar%23108!/:?] {re:classloading}
        at mods.railcraft.api.carts.RollingStock.getOrThrow(RollingStock.java:40) ~[railcraft.jar%23101!/:1.20.1-1.0.0] {re:mixin,re:classloading}
        at mods.railcraft.world.entity.vehicle.locomotive.SteamLocomotive.m_8119_(SteamLocomotive.java:90) ~[railcraft.jar%23101!/:1.20.1-1.0.0] {re:classloading}
        at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:693) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.world.level.Level.m_46653_(Level.java:479) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
        at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:343) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading}
        at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:323) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading,pl:accesstransformer:B}
        ... 5 more
[08:14:47] [Server thread/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID 22b544ad-1e77-4102-95e7-93d877d9d069
[08:14:47] [Server thread/ERROR] [minecraft/MinecraftServer]: This crash report has been saved to: /home/yungjesus/ForgeServ/./crash-reports/crash-2023-08-19_08.14.47-server.txt

Screenshots & Video

No response

commented

@Sm0keySa1m0n can you look at how to fix this? I looked but I don't know where to put the check to see if the cart is dead or not?

commented

I add that sometimes it also crashes when a locomotive is going and you break it

commented
// You're mean.

Time: 2023-09-01 18:36:44
Description: Ticking block entity

java.lang.IllegalStateException: RollingStock missing on CreativeLocomotive['Creative Locomotive'/448, l='ServerLevel[New World]', x=8.49, y=-59.94, z=25.50, removed=DISCARDED]
	at mods.railcraft.api.carts.RollingStock.lambda$getOrThrow$0(RollingStock.java:41) ~[%23189!/:?] {re:mixin,re:classloading}
	at net.minecraftforge.common.util.LazyOptional.orElseThrow(LazyOptional.java:281) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23183%23190!/:?] {re:classloading}
	at mods.railcraft.api.carts.RollingStock.getOrThrow(RollingStock.java:41) ~[%23189!/:?] {re:mixin,re:classloading}
	at mods.railcraft.world.level.block.entity.track.LockingTrackBlockEntity.isSameTrainOrCart(LockingTrackBlockEntity.java:210) ~[%23189!/:?] {re:classloading}
	at mods.railcraft.world.level.block.entity.track.LockingTrackBlockEntity.calculateLocked(LockingTrackBlockEntity.java:250) ~[%23189!/:?] {re:classloading}
	at mods.railcraft.world.level.block.entity.track.LockingTrackBlockEntity.serverTick(LockingTrackBlockEntity.java:90) ~[%23189!/:?] {re:classloading}
	at net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.tick(LevelChunk.java:689) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading}
	at net.minecraft.world.level.chunk.LevelChunk$RebindableTickingBlockEntityWrapper.tick(LevelChunk.java:782) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading}
	at net.minecraft.world.level.Level.tickBlockEntities(Level.java:511) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:354) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:936) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:857) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:95) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:679) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:251) ~[forge-1.20.1-47.1.63_mapped_parchment_2023.08.06-1.20.1-recomp.jar%23184!/:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:833) ~[?:?] {}


commented

The problem is still there, because it is destroyed after the check that verifies if the locomotive is still alive

commented

Actually it's another error