forked from mirrors/kolyah35-minecraft-pe-0.6.1
FIX: Nether reactor (by @bravelycowering)
This commit is contained in:
parent
03ff7b118e
commit
c03f535c7e
2 changed files with 9 additions and 5 deletions
|
|
@ -177,14 +177,14 @@ ItemInstance NetherReactorTileEntity::GetLowOddsSpawnItem() {
|
|||
Item::painting,
|
||||
Item::door_wood
|
||||
};
|
||||
int itemIndex = level->random.nextInt(sizeof(items) / 4);
|
||||
int itemIndex = level->random.nextInt(sizeof(items) / sizeof(Item*));
|
||||
Item* itemToSpawn = items[itemIndex];
|
||||
return ItemInstance(itemToSpawn);
|
||||
} else {
|
||||
static Tile* tiles[] = {
|
||||
Tile::bookshelf
|
||||
};
|
||||
int tileIndex = level->random.nextInt(sizeof(tiles) / 4);
|
||||
int tileIndex = level->random.nextInt(sizeof(tiles) / sizeof(Tile*));
|
||||
Tile* tileToSpawn = tiles[tileIndex];
|
||||
return ItemInstance(tileToSpawn);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue