MightyPirates / BedrockOres

A minecraft mod that adds ore clusters embedded in bedrock, and a machine to extract them automatically.
https://www.curseforge.com/minecraft/mc-mods/bedrockores
Other
12 stars 11 forks source link

Draconic Evolution CTD #36

Closed Thiana closed 7 years ago

Thiana commented 7 years ago

Attempting to harvest a bedrock draconium nether ore results in a CTD.

To replicate:

Result Log: https://paste.ee/p/xbi5I

Versions:

Thiana commented 7 years ago

You probably want the config.

Tellme says the blockstates are: draconicevolution:draconium_ore: PropertyEnum{name=type, clazz=class com.brandon3055.draconicevolution.blocks.DraconiumOre$EnumType, values=[NORMAL, NETHER, END]}

Config used is:

{
    "enabled": true,
    "state": {
        "name": "draconicevolution:draconium_ore",
        "properties": {
            "type": "NETHER"
        }
    },
    "dimension": "nether",
    "weight": 3,
    "widthMin": 2,
    "widthMax": 4,
    "heightMin": 2,
    "heightMax": 4,
    "countMin": 2,
    "countMax": 10,
    "yieldMin": 10,
    "yieldMax": 25,
    "group": "draconium"
}
fnuecke commented 7 years ago

Hmm, from what I can tell this happens because the getPickBlock implementation in DraconiumOre does a world.getBlockState instead of using the passed in state parameter -- in this crash the state arg would be the actual draconium ore block state, while the world.getBlockState returns the wrapping bedrock ore.

@brandon3055 is there a reason for this lookup instead of using the argument? If not, would you be willing to change it? Alternatively, a world.getBlockState(pos).getActualState(world, pos) should also fix it. Would really appreciate not having to add special cases there :)

fnuecke commented 7 years ago

95bcf41e82a14dd794cbdedfd89a3f055a80fc67 b76f528bc665f26b5b84b1b56bdded64bc823786

I've added a check to avoid crashing, and try harder to get the ore now, but that still won't work for nether draconium ore. Will add a note in the issue on the DE repo.

Thiana commented 7 years ago

Thank you :)