mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 06:53:30 +00:00
FIX: Nether reactor (by @bravelycowering)
This commit is contained in:
@@ -755,7 +755,12 @@ void Minecraft::tickInput() {
|
|||||||
if (key == Keyboard::KEY_F3) {
|
if (key == Keyboard::KEY_F3) {
|
||||||
options.toggle(OPTIONS_RENDER_DEBUG);
|
options.toggle(OPTIONS_RENDER_DEBUG);
|
||||||
}
|
}
|
||||||
|
if (key == Keyboard::KEY_F4) {
|
||||||
|
player->inventory->add(new ItemInstance(Tile::goldBlock));
|
||||||
|
player->inventory->add(new ItemInstance(Tile::netherReactor));
|
||||||
|
player->inventory->add(new ItemInstance(Tile::stoneBrick));
|
||||||
|
|
||||||
|
}
|
||||||
if (key == Keyboard::KEY_F5) {
|
if (key == Keyboard::KEY_F5) {
|
||||||
options.toggle(OPTIONS_THIRD_PERSON_VIEW);
|
options.toggle(OPTIONS_THIRD_PERSON_VIEW);
|
||||||
/*
|
/*
|
||||||
@@ -909,8 +914,6 @@ void Minecraft::tickInput() {
|
|||||||
// USPESHNO spizheno
|
// USPESHNO spizheno
|
||||||
static int buildHoldTicks = 0;
|
static int buildHoldTicks = 0;
|
||||||
if (Mouse::isButtonDown(MouseAction::ACTION_RIGHT)) {
|
if (Mouse::isButtonDown(MouseAction::ACTION_RIGHT)) {
|
||||||
BuildActionIntention bai(BuildActionIntention::BAI_BUILD | BuildActionIntention::BAI_INTERACT);
|
|
||||||
handleBuildAction(&bai);
|
|
||||||
if (buildHoldTicks >= 5) buildHoldTicks = 0;
|
if (buildHoldTicks >= 5) buildHoldTicks = 0;
|
||||||
|
|
||||||
if (++buildHoldTicks == 1) {
|
if (++buildHoldTicks == 1) {
|
||||||
@@ -919,6 +922,7 @@ void Minecraft::tickInput() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
buildHoldTicks = 0;
|
buildHoldTicks = 0;
|
||||||
|
gameMode->releaseUsingItem(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -177,14 +177,14 @@ ItemInstance NetherReactorTileEntity::GetLowOddsSpawnItem() {
|
|||||||
Item::painting,
|
Item::painting,
|
||||||
Item::door_wood
|
Item::door_wood
|
||||||
};
|
};
|
||||||
int itemIndex = level->random.nextInt(sizeof(items) / 4);
|
int itemIndex = level->random.nextInt(sizeof(items) / sizeof(Item*));
|
||||||
Item* itemToSpawn = items[itemIndex];
|
Item* itemToSpawn = items[itemIndex];
|
||||||
return ItemInstance(itemToSpawn);
|
return ItemInstance(itemToSpawn);
|
||||||
} else {
|
} else {
|
||||||
static Tile* tiles[] = {
|
static Tile* tiles[] = {
|
||||||
Tile::bookshelf
|
Tile::bookshelf
|
||||||
};
|
};
|
||||||
int tileIndex = level->random.nextInt(sizeof(tiles) / 4);
|
int tileIndex = level->random.nextInt(sizeof(tiles) / sizeof(Tile*));
|
||||||
Tile* tileToSpawn = tiles[tileIndex];
|
Tile* tileToSpawn = tiles[tileIndex];
|
||||||
return ItemInstance(tileToSpawn);
|
return ItemInstance(tileToSpawn);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user