maruohon / justenoughdimensions

A simple Minecraft mod to register custom dimensions to the game
GNU General Public License v3.0
12 stars 7 forks source link

Crash when exiting a custom end dimension #46

Open LemADEC opened 4 years ago

LemADEC commented 4 years ago

As of 1.12.2-1.6.0-dev.20190711.220109 with forge-14.23.5.2838, server crashes when using the end portal in a custom end dimension. Extract from the dimensions.json:

        {
            "dim": 1,
            "override": true,
            "dimensiontype": {
                "id": 0,
                "name": "End as Surface",
                "suffix": "_dim1",
                "keeploaded": false,
                "worldprovider": "WorldProviderSurfaceJED",
                "require_exact_match": true
            },
            "worldinfo_onetime": {},
            "jed": {
                "CanSleepHere": "bed_explodes"
            }
        },
        {
            "dim": 3,
            "dimensiontype": {
                "id": 1,
                "name": "JED End",
                "suffix": "_dim3",
                "keeploaded": false,
                "worldprovider": "WorldProviderEndJED",
                "require_exact_match": true
            },
            "worldinfo_onetime": {}
        },

It's a single player game with no other mods.

java.lang.NullPointerException: Colliding entity with block
    at net.minecraft.world.Teleporter.func_180620_b(Teleporter.java:134)
    at net.minecraft.world.Teleporter.func_180266_a(Teleporter.java:34)
    at net.minecraft.world.Teleporter.placeEntity(Teleporter.java:436)
    at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:721)
    at net.minecraft.server.management.PlayerList.transferPlayerToDimension(PlayerList.java:624)
    at net.minecraft.entity.player.EntityPlayerMP.changeDimension(EntityPlayerMP.java:695)
    at net.minecraft.entity.Entity.func_184204_a(Entity.java:2543)
    at net.minecraft.block.BlockEndPortal.func_180634_a(SourceFile:72)
    at net.minecraft.entity.Entity.func_145775_I(Entity.java:1044)
    at net.minecraft.entity.Entity.func_70091_d(Entity.java:964)
...

Full crash log is here: https://gist.github.com/LemADEC/36ef1a588dcd3ec9ab5ebbdc216bb22c

LemADEC commented 4 years ago

From a quick check, the EntityPlayerMP.changeDimension() call can be 'cancelled' with the EntityTravelToDimensionEvent forge event. Can we try that?