This is a mod for minecraft that adds randomly generated dungeon complexes.
GNU General Public License v3.0
129
stars
53
forks
source link
[BUG] `head.set(editor, cursor)` no check return value, cause `ClassCastException` #205
Closed
CatEricka closed 4 months ago
Mod version:
https://github.com/Greymerk/minecraft-roguelike/releases/tag/v1.8.0
Crash report:
Analysis
From file
greymerk/roguelike/worldgen/blocks/Bed.java
,https://github.com/Greymerk/minecraft-roguelike/blob/2d5120aa950e9b381ba6db76340805f9727a6b7c/src/main/java/greymerk/roguelike/worldgen/blocks/Bed.java#L23-L24
if
head.set(editor, cursor)
return false, for example, the coordinate pointed by cursor isBlocks.MOB_SPAWNER
or somethings else:https://github.com/Greymerk/minecraft-roguelike/blob/2d5120aa950e9b381ba6db76340805f9727a6b7c/src/main/java/greymerk/roguelike/worldgen/WorldEditor.java#L47-L77
then return value of
editor.getTileEntity(cursor)
may not an instance ofTileEntityBed
, it will causeClassCastException
.