diff --git a/Minecraft.Client/Common/App_Defines.h b/Minecraft.Client/Common/App_Defines.h index de1d1bdc..bf93f2df 100644 --- a/Minecraft.Client/Common/App_Defines.h +++ b/Minecraft.Client/Common/App_Defines.h @@ -25,7 +25,6 @@ #define GAME_HOST_OPTION_BITMASK_GAMETYPE 0x00000030 #define GAME_HOST_OPTION_BITMASK_LEVELTYPE 0x00000040 #define GAME_HOST_OPTION_BITMASK_STRUCTURES 0x00000080 -#define GAME_HOST_OPTION_BITMASK_BONUSCHEST 0x00000100 #define GAME_HOST_OPTION_BITMASK_BEENINCREATIVE 0x00000200 #define GAME_HOST_OPTION_BITMASK_PVP 0x00000400 #define GAME_HOST_OPTION_BITMASK_TRUSTPLAYERS 0x00000800 diff --git a/Minecraft.Client/Common/App_enums.h b/Minecraft.Client/Common/App_enums.h index 7dd66aec..62738ed9 100644 --- a/Minecraft.Client/Common/App_enums.h +++ b/Minecraft.Client/Common/App_enums.h @@ -604,7 +604,6 @@ enum eGameHostOption eGameHostOption_GameType, eGameHostOption_LevelType, // flat or default eGameHostOption_Structures, - eGameHostOption_BonusChest, eGameHostOption_HasBeenInCreative, eGameHostOption_PvP, eGameHostOption_TrustPlayers, diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 49ecba37..cda7572b 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -7379,18 +7379,6 @@ void CMinecraftApp::SetGameHostOption(unsigned int &uiHostSettings, eGameHostOpt uiHostSettings&=~GAME_HOST_OPTION_BITMASK_STRUCTURES; } - break; - case eGameHostOption_BonusChest: - if(uiVal!=0) - { - uiHostSettings|=GAME_HOST_OPTION_BITMASK_BONUSCHEST; - } - else - { - // off - uiHostSettings&=~GAME_HOST_OPTION_BITMASK_BONUSCHEST; - } - break; case eGameHostOption_HasBeenInCreative: if(uiVal!=0) @@ -7563,9 +7551,6 @@ unsigned int CMinecraftApp::GetGameHostOption(unsigned int uiHostSettings, eGame case eGameHostOption_Structures: return (uiHostSettings&GAME_HOST_OPTION_BITMASK_STRUCTURES); break; - case eGameHostOption_BonusChest: - return (uiHostSettings&GAME_HOST_OPTION_BITMASK_BONUSCHEST); - break; case eGameHostOption_HasBeenInCreative: return (uiHostSettings&GAME_HOST_OPTION_BITMASK_BEENINCREATIVE); break; diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp index fa41909d..24fc2fbf 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp @@ -67,7 +67,6 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay m_MoreOptionsParams.bGenerateOptions=TRUE; m_MoreOptionsParams.bStructures=TRUE; m_MoreOptionsParams.bFlatWorld=FALSE; - m_MoreOptionsParams.bBonusChest=FALSE; m_MoreOptionsParams.bPVP = TRUE; m_MoreOptionsParams.bTrust = TRUE; m_MoreOptionsParams.bFireSpreads = TRUE; @@ -1162,7 +1161,6 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD app.SetGameHostOption(eGameHostOption_GameType,pClass->m_bGameModeSurvival?GameType::SURVIVAL->getId():GameType::CREATIVE->getId() ); app.SetGameHostOption(eGameHostOption_LevelType,pClass->m_MoreOptionsParams.bFlatWorld ); app.SetGameHostOption(eGameHostOption_Structures,pClass->m_MoreOptionsParams.bStructures ); - app.SetGameHostOption(eGameHostOption_BonusChest,pClass->m_MoreOptionsParams.bBonusChest ); app.SetGameHostOption(eGameHostOption_PvP,pClass->m_MoreOptionsParams.bPVP); app.SetGameHostOption(eGameHostOption_TrustPlayers,pClass->m_MoreOptionsParams.bTrust ); diff --git a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp index 6d472b50..dab2db22 100644 --- a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp @@ -297,9 +297,6 @@ void UIScene_LaunchMoreOptionsMenu::handleCheckboxToggled(F64 controlId, bool se case eLaunchCheckbox_FlatWorld: m_params->bFlatWorld = selected; break; - case eLaunchCheckbox_BonusChest: - m_params->bBonusChest = selected; - break; case eLaunchCheckbox_DisableSaving: m_params->bDisableSaving = selected; break; @@ -344,9 +341,6 @@ void UIScene_LaunchMoreOptionsMenu::handleFocusChange(F64 controlId, F64 childId case eLaunchCheckbox_FlatWorld: stringId = IDS_GAMEOPTION_SUPERFLAT; break; - case eLaunchCheckbox_BonusChest: - stringId = IDS_GAMEOPTION_BONUS_CHEST; - break; #ifdef _LARGE_WORLDS case eControl_EditSeed: stringId = IDS_GAMEOPTION_SEED; diff --git a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.h b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.h index 62d75115..11d4e98e 100644 --- a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.h +++ b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.h @@ -19,7 +19,6 @@ private: eLaunchCheckbox_ResetNether, eLaunchCheckbox_Structures, eLaunchCheckbox_FlatWorld, - eLaunchCheckbox_BonusChest, eLaunchCheckbox_DisableSaving, eLaunchCheckboxes_Count, @@ -63,7 +62,6 @@ private: UI_MAP_ELEMENT( m_labelWorldSize, "WorldSize") UI_MAP_ELEMENT( m_sliderWorldSize, "WorldSizeSlider") UI_MAP_ELEMENT( m_checkboxes[eLaunchCheckbox_Structures], "CheckboxStructures") - UI_MAP_ELEMENT( m_checkboxes[eLaunchCheckbox_BonusChest], "CheckboxBonusChest") UI_MAP_ELEMENT( m_checkboxes[eLaunchCheckbox_FlatWorld], "CheckboxFlatWorld") UI_END_MAP_CHILD_ELEMENTS() @@ -84,7 +82,6 @@ private: UI_MAP_ELEMENT( m_labelWorldOptions, "WorldOptions") UI_MAP_ELEMENT( m_checkboxes[eLaunchCheckbox_Structures], "CheckboxStructures") UI_MAP_ELEMENT( m_checkboxes[eLaunchCheckbox_FlatWorld], "CheckboxFlatWorld") - UI_MAP_ELEMENT( m_checkboxes[eLaunchCheckbox_BonusChest], "CheckboxBonusChest") } UI_MAP_ELEMENT( m_labelDescription, "Description") diff --git a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp index 80db57f8..8e252aa4 100644 --- a/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -79,6 +79,10 @@ UIScene_LeaderboardsMenu::UIScene_LeaderboardsMenu(int iPad, void *initData, UIL ReadStats(-1); +#ifdef _WINDOWS64 + m_labelInfo.setLabel(app.GetString(IDS_LEADERBOARD_NORESULTS)); +#endif + #if ( defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ ) addTimer( PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME ); #endif diff --git a/Minecraft.Client/Common/UI/UIStructs.h b/Minecraft.Client/Common/UI/UIStructs.h index 2dd03c8c..86f4289d 100644 --- a/Minecraft.Client/Common/UI/UIStructs.h +++ b/Minecraft.Client/Common/UI/UIStructs.h @@ -243,7 +243,6 @@ typedef struct _LaunchMoreOptionsMenuInitData BOOL bGenerateOptions; BOOL bStructures; BOOL bFlatWorld; - BOOL bBonusChest; BOOL bPVP; BOOL bTrust; diff --git a/Minecraft.Client/Common/XUI/XUI_LoadSettings.cpp b/Minecraft.Client/Common/XUI/XUI_LoadSettings.cpp index 7f32ff89..1dc6dec5 100644 --- a/Minecraft.Client/Common/XUI/XUI_LoadSettings.cpp +++ b/Minecraft.Client/Common/XUI/XUI_LoadSettings.cpp @@ -1461,7 +1461,6 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen) // TU12: Content: Gameplay: New "Mass Effect World" remembers and uses the settings of another - lately created - World. app.SetGameHostOption(eGameHostOption_LevelType,m_MoreOptionsParams.bFlatWorld); app.SetGameHostOption(eGameHostOption_Structures,m_MoreOptionsParams.bStructures); - app.SetGameHostOption(eGameHostOption_BonusChest,m_MoreOptionsParams.bBonusChest); app.SetGameHostOption(eGameHostOption_PvP,m_MoreOptionsParams.bPVP); app.SetGameHostOption(eGameHostOption_TrustPlayers,m_MoreOptionsParams.bTrust ); diff --git a/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp b/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp index b3608b06..d29e4011 100644 --- a/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp +++ b/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp @@ -964,7 +964,6 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw app.SetGameHostOption(eGameHostOption_GameType,pClass->m_bGameModeSurvival?GameType::SURVIVAL->getId():GameType::CREATIVE->getId()); app.SetGameHostOption(eGameHostOption_LevelType,pClass->m_MoreOptionsParams.bFlatWorld ); app.SetGameHostOption(eGameHostOption_Structures,pClass->m_MoreOptionsParams.bStructures ); - app.SetGameHostOption(eGameHostOption_BonusChest,pClass->m_MoreOptionsParams.bBonusChest ); app.SetGameHostOption(eGameHostOption_PvP,pClass->m_MoreOptionsParams.bPVP); app.SetGameHostOption(eGameHostOption_TrustPlayers,pClass->m_MoreOptionsParams.bTrust ); diff --git a/Minecraft.Client/Durango/Durango_App.cpp b/Minecraft.Client/Durango/Durango_App.cpp index 2ec81a29..5345eb96 100644 --- a/Minecraft.Client/Durango/Durango_App.cpp +++ b/Minecraft.Client/Durango/Durango_App.cpp @@ -283,7 +283,6 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart() app.SetGameHostOption(eGameHostOption_GameType,GameType::SURVIVAL->getId() ); app.SetGameHostOption(eGameHostOption_LevelType, 0 ); app.SetGameHostOption(eGameHostOption_Structures, 1 ); - app.SetGameHostOption(eGameHostOption_BonusChest, 0 ); app.SetGameHostOption(eGameHostOption_PvP, 1); app.SetGameHostOption(eGameHostOption_TrustPlayers, 1 ); diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index ceb9554b..ae0277f5 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -392,7 +392,6 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring app.DebugPrintf("Default game type: %d\n" , gameTypeId); LevelSettings *levelSettings = new LevelSettings(levelSeed, gameType, app.GetGameHostOption(eGameHostOption_Structures)>0?true:false, isHardcore(), true, pLevelType, initData->xzSize, initData->hellScale); - if( app.GetGameHostOption(eGameHostOption_BonusChest ) ) levelSettings->enableStartingBonusItems(); // 4J - temp - load existing level shared_ptr storage = nullptr; diff --git a/Minecraft.Client/Orbis/Orbis_App.cpp b/Minecraft.Client/Orbis/Orbis_App.cpp index 9af5ee12..537b9824 100644 --- a/Minecraft.Client/Orbis/Orbis_App.cpp +++ b/Minecraft.Client/Orbis/Orbis_App.cpp @@ -414,7 +414,6 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart() app.SetGameHostOption(eGameHostOption_GameType,GameType::SURVIVAL->getId()); app.SetGameHostOption(eGameHostOption_LevelType, 0 ); app.SetGameHostOption(eGameHostOption_Structures, 1 ); - app.SetGameHostOption(eGameHostOption_BonusChest, 0 ); app.SetGameHostOption(eGameHostOption_PvP, 1); app.SetGameHostOption(eGameHostOption_TrustPlayers, 1 ); diff --git a/Minecraft.Client/PS3/PS3_App.cpp b/Minecraft.Client/PS3/PS3_App.cpp index d2ab7150..20301ee3 100644 --- a/Minecraft.Client/PS3/PS3_App.cpp +++ b/Minecraft.Client/PS3/PS3_App.cpp @@ -531,7 +531,6 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart() app.SetGameHostOption(eGameHostOption_GameType,GameType::CREATIVE->getId()); app.SetGameHostOption(eGameHostOption_LevelType, 0 ); app.SetGameHostOption(eGameHostOption_Structures, 1 ); - app.SetGameHostOption(eGameHostOption_BonusChest, 0 ); app.SetGameHostOption(eGameHostOption_PvP, 1); app.SetGameHostOption(eGameHostOption_TrustPlayers, 1 ); diff --git a/Minecraft.Client/PSVita/PSVita_App.cpp b/Minecraft.Client/PSVita/PSVita_App.cpp index a21699c0..f466ab2f 100644 --- a/Minecraft.Client/PSVita/PSVita_App.cpp +++ b/Minecraft.Client/PSVita/PSVita_App.cpp @@ -323,7 +323,6 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart() app.SetGameHostOption(eGameHostOption_GameType,GameType::CREATIVE->getId()); app.SetGameHostOption(eGameHostOption_LevelType, 0 ); app.SetGameHostOption(eGameHostOption_Structures, 1 ); - app.SetGameHostOption(eGameHostOption_BonusChest, 0 ); app.SetGameHostOption(eGameHostOption_PvP, 1); app.SetGameHostOption(eGameHostOption_TrustPlayers, 1 ); diff --git a/Minecraft.Client/ServerLevel.cpp b/Minecraft.Client/ServerLevel.cpp index 2a43edf3..274605d6 100644 --- a/Minecraft.Client/ServerLevel.cpp +++ b/Minecraft.Client/ServerLevel.cpp @@ -119,13 +119,6 @@ ServerLevel::ServerLevel(MinecraftServer *server, shared_ptrlevelS initializeLevel(levelSettings); levelData->setInitialized(true); } - else if ( (dimension==0) && levelData->getSpawnBonusChest() ) // 4J-JEV, still would like bonus chests to respawn. - { - // 4J - added isFindingSpawn as we want any chunks we are looking in here for suitable locations for the bonus chest to actually create those chunks rather than just get emptychunks if they aren't loaded - isFindingSpawn = true; - generateBonusItemsNearSpawn(); - isFindingSpawn = false; - } // 4J - added initialisers // 4J Stu - Allowing spawn edit for our game, and consider a better solution for the possible griefing @@ -788,58 +781,9 @@ void ServerLevel::setInitialSpawn(LevelSettings *levelSettings) } levelData->setSpawn(xSpawn, ySpawn, zSpawn); - if (levelSettings->hasStartingBonusItems()) - { - generateBonusItemsNearSpawn(); - } isFindingSpawn = false; } -// 4J - brought forward from 1.3.2 -void ServerLevel::generateBonusItemsNearSpawn() -{ - // once we've found the initial spawn, try to find a location for the -// starting bonus chest - // 4J - added - scan the spawn area first to see if there's already a chest near here - - static const int r = 20; - int xs = levelData->getXSpawn(); - int zs = levelData->getZSpawn(); - for( int xx = -r; xx <= r; xx++ ) - for( int zz = -r; zz <= r; zz++ ) - { - int x = xx + xs; - int z = zz + zs; - int y = getTopSolidBlock( x, z ) - 1; - - if( getTile( x, y, z ) == Tile::chest_Id ) - { - shared_ptr chest = dynamic_pointer_cast(getTileEntity(x, y, z)); - if (chest != NULL) - { - if( chest->isBonusChest ) - { - return; - } - } - } - } - - BonusChestFeature *feature = new BonusChestFeature(RANDOM_BONUS_ITEMS, 16); - for (int attempt = 0; attempt < 16; attempt++) - { - int x = levelData->getXSpawn() + random->nextInt(6) - random->nextInt(6); - int z = levelData->getZSpawn() + random->nextInt(6) - random->nextInt(6); - int y = getTopSolidBlock(x, z) + 1; - - if (feature->place(this, random, x, y, z, (attempt == 15) )) - { - break; - } - } - delete feature; -} - Pos *ServerLevel::getDimensionSpecificSpawn() { return dimension->getSpawnPos(); diff --git a/Minecraft.Client/ServerLevel.h b/Minecraft.Client/ServerLevel.h index dff3fb96..cd370960 100644 --- a/Minecraft.Client/ServerLevel.h +++ b/Minecraft.Client/ServerLevel.h @@ -77,7 +77,6 @@ public: protected: virtual void initializeLevel(LevelSettings *settings); virtual void setInitialSpawn(LevelSettings *settings); - void generateBonusItemsNearSpawn(); // 4J - brought forward from 1.3.2 public: Pos *getDimensionSpecificSpawn(); diff --git a/Minecraft.Client/Windows64/Windows64_App.cpp b/Minecraft.Client/Windows64/Windows64_App.cpp index 035d080d..5358ea62 100644 --- a/Minecraft.Client/Windows64/Windows64_App.cpp +++ b/Minecraft.Client/Windows64/Windows64_App.cpp @@ -185,7 +185,6 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart() app.SetGameHostOption(eGameHostOption_GameType,GameType::CREATIVE->getId() ); // LevelSettings::GAMETYPE_SURVIVAL app.SetGameHostOption(eGameHostOption_LevelType, 0 ); app.SetGameHostOption(eGameHostOption_Structures, 1 ); - app.SetGameHostOption(eGameHostOption_BonusChest, 0 ); app.SetGameHostOption(eGameHostOption_PvP, 1); app.SetGameHostOption(eGameHostOption_TrustPlayers, 1 ); diff --git a/Minecraft.World/BonusChestFeature.cpp b/Minecraft.World/BonusChestFeature.cpp deleted file mode 100644 index 2d7690ee..00000000 --- a/Minecraft.World/BonusChestFeature.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include "stdafx.h" -#include "BonusChestFeature.h" -#include "net.minecraft.world.level.h" -#include "net.minecraft.world.level.tile.h" -#include "net.minecraft.world.level.tile.entity.h" -#include "WeighedTreasure.h" -#include "StructurePiece.h" - -BonusChestFeature::BonusChestFeature(WeighedTreasureArray treasureList, int numRolls) : treasureList(treasureList), numRolls(numRolls) -{ -} - -// 4J - original virtual method -bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z) -{ - return place(level, random, x, y, z, false ); -} - -// 4J - added force parameter - trying to keep this as similar as possible to the original algorithm, but would also like it to definitely place a -// chest as it doesn't necessarily find somewhere in the original java. This method is called multple times for different x,y,z round the -// spawn point and force signifies that this is the last time this will be called. In this case, just place the chest exactly where the input -// parameters requested we place it (we know this will be one tile above the top solid block of a randomn column), and then do our best to place -// any surrounding torches where appropriate. - -bool BonusChestFeature::place(Level *level, Random *random, int x, int y, int z, bool force) -{ - if( !force ) - { - int t = 0; - while (((t = level->getTile(x, y, z)) == 0 || t == Tile::leaves_Id) && y > 1) - y--; - - if (y < 1) - { - return false; - } - y++; - } - - for (int i = 0; i < 4; i++) - { - int x2, y2, z2; - - if( force ) - { - x2 = x; - y2 = y - 1; // 4J - the position passed in is actually two above the top solid block, as the calling function adds 1 to getTopSolidBlock, and that actually returns the block above anyway. - // this would explain why there is a while loop above here (not used in force mode) to move the y back down again, shouldn't really be needed if 1 wasn't added to the getTopSolidBlock return value. - z2 = z; - } - else - { - x2 = x + random->nextInt(4) - random->nextInt(4); - y2 = y + random->nextInt(3) - random->nextInt(3); - z2 = z + random->nextInt(4) - random->nextInt(4); - } - - if (force || ( level->isEmptyTile(x2, y2, z2) && level->isTopSolidBlocking(x2, y2 - 1, z2))) - { - level->setTile(x2, y2, z2, Tile::chest_Id); - shared_ptr chest = dynamic_pointer_cast(level->getTileEntity(x2, y2, z2)); - if (chest != NULL) - { - WeighedTreasure::addChestItems(random, treasureList, chest, numRolls); - chest->isBonusChest = true; // 4J added - } - if (level->isEmptyTile(x2 - 1, y2, z2) && level->isTopSolidBlocking(x2 - 1, y2 - 1, z2)) - { - level->setTile(x2 - 1, y2, z2, Tile::torch_Id); - } - if (level->isEmptyTile(x2 + 1, y2, z2) && level->isTopSolidBlocking(x2 - 1, y2 - 1, z2)) - { - level->setTile(x2 + 1, y2, z2, Tile::torch_Id); - } - if (level->isEmptyTile(x2, y2, z2 - 1) && level->isTopSolidBlocking(x2 - 1, y2 - 1, z2)) - { - level->setTile(x2, y2, z2 - 1, Tile::torch_Id); - } - if (level->isEmptyTile(x2, y2, z2 + 1) && level->isTopSolidBlocking(x2 - 1, y2 - 1, z2)) - { - level->setTile(x2, y2, z2 + 1, Tile::torch_Id); - } - return true; - } - } - - return false; -} diff --git a/Minecraft.World/BonusChestFeature.h b/Minecraft.World/BonusChestFeature.h deleted file mode 100644 index cd4aca3e..00000000 --- a/Minecraft.World/BonusChestFeature.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once -#include "Feature.h" - -class Random; -class Level; - -class BonusChestFeature : public Feature -{ - -private: - const WeighedTreasureArray treasureList; - const int numRolls; - -public: - BonusChestFeature(WeighedTreasureArray treasureList, int numRolls); - - virtual bool place(Level *level, Random *random, int x, int y, int z); - bool place(Level *level, Random *random, int x, int y, int z, bool force); // 4J added this method with extra force parameter -}; diff --git a/Minecraft.World/ChestTileEntity.cpp b/Minecraft.World/ChestTileEntity.cpp index 406b81b5..8ac7fbdb 100644 --- a/Minecraft.World/ChestTileEntity.cpp +++ b/Minecraft.World/ChestTileEntity.cpp @@ -13,12 +13,11 @@ using namespace std; -ChestTileEntity::ChestTileEntity(bool isBonusChest/* = false*/) : TileEntity() +ChestTileEntity::ChestTileEntity() : TileEntity() { items = new ItemInstanceArray(9 * 4); hasCheckedNeighbors = false; - this->isBonusChest = isBonusChest; openness = 0.0f; oOpenness = 0.0f; @@ -108,7 +107,6 @@ void ChestTileEntity::load(CompoundTag *base) unsigned int slot = tag->getByte(L"Slot") & 0xff; if (slot >= 0 && slot < items->length) (*items)[slot] = ItemInstance::fromTag(tag); } - isBonusChest = base->getBoolean(L"bonus"); } void ChestTileEntity::save(CompoundTag *base) @@ -127,7 +125,6 @@ void ChestTileEntity::save(CompoundTag *base) } } base->put(L"Items", listTag); - base->putBoolean(L"bonus", isBonusChest); } int ChestTileEntity::getMaxStackSize() diff --git a/Minecraft.World/ChestTileEntity.h b/Minecraft.World/ChestTileEntity.h index 5eeb3c44..b13ac621 100644 --- a/Minecraft.World/ChestTileEntity.h +++ b/Minecraft.World/ChestTileEntity.h @@ -19,14 +19,13 @@ public: using TileEntity::setChanged; public: - ChestTileEntity(bool isBonusChest = false); // 4J added param + ChestTileEntity(); virtual ~ChestTileEntity(); private: ItemInstanceArray *items; public: - bool isBonusChest; // 4J added bool hasCheckedNeighbors; weak_ptr n; weak_ptr e; diff --git a/Minecraft.World/LevelData.cpp b/Minecraft.World/LevelData.cpp index 026dca70..c8770154 100644 --- a/Minecraft.World/LevelData.cpp +++ b/Minecraft.World/LevelData.cpp @@ -42,7 +42,6 @@ LevelData::LevelData(CompoundTag *tag) { generateMapFeatures = true; } - spawnBonusChest = tag->getBoolean(L"spawnBonusChest"); xSpawn = tag->getInt(L"SpawnX"); ySpawn = tag->getInt(L"SpawnY"); @@ -144,7 +143,6 @@ LevelData::LevelData(LevelSettings *levelSettings, const wstring& levelName) this->seed = levelSettings->getSeed(); this->gameType = levelSettings->getGameType(); this->generateMapFeatures = levelSettings->isGenerateMapFeatures(); - this->spawnBonusChest = levelSettings->hasStartingBonusItems(); this->levelName = levelName; this->m_pGenerator = levelSettings->getLevelType(); this->hardcore = levelSettings->isHardcore(); @@ -200,7 +198,6 @@ LevelData::LevelData(LevelData *copy) this->m_pGenerator = copy->m_pGenerator; this->gameType = copy->gameType; this->generateMapFeatures = copy->generateMapFeatures; - this->spawnBonusChest = copy->spawnBonusChest; this->xSpawn = copy->xSpawn; this->ySpawn = copy->ySpawn; this->zSpawn = copy->zSpawn; @@ -256,7 +253,6 @@ void LevelData::setTagData(CompoundTag *tag) tag->putInt(L"generatorVersion", m_pGenerator->getVersion()); tag->putInt(L"GameType", gameType->getId()); tag->putBoolean(L"MapFeatures", generateMapFeatures); - tag->putBoolean(L"spawnBonusChest",spawnBonusChest); tag->putInt(L"SpawnX", xSpawn); tag->putInt(L"SpawnY", ySpawn); tag->putInt(L"SpawnZ", zSpawn); @@ -515,11 +511,6 @@ bool LevelData::isGenerateMapFeatures() return generateMapFeatures; } -bool LevelData::getSpawnBonusChest() -{ - return spawnBonusChest; -} - void LevelData::setGameType(GameType *gameType) { this->gameType = gameType; diff --git a/Minecraft.World/LevelData.h b/Minecraft.World/LevelData.h index 0afe9be2..6bb5fb9c 100644 --- a/Minecraft.World/LevelData.h +++ b/Minecraft.World/LevelData.h @@ -36,7 +36,6 @@ private: bool initialized; bool newSeaLevel; // 4J added bool hasBeenInCreative; // 4J added - bool spawnBonusChest; // 4J added int m_xzSize; // 4J Added int m_hellScale; // 4J Added @@ -116,7 +115,6 @@ public: virtual void setRainTime(int rainTime); virtual GameType *getGameType(); virtual bool isGenerateMapFeatures(); - virtual bool getSpawnBonusChest(); virtual void setGameType(GameType *gameType); virtual bool useNewSeaLevel(); virtual bool getHasBeenInCreative(); // 4J Added diff --git a/Minecraft.World/LevelSettings.cpp b/Minecraft.World/LevelSettings.cpp index 59faa1ca..5b11b7ba 100644 --- a/Minecraft.World/LevelSettings.cpp +++ b/Minecraft.World/LevelSettings.cpp @@ -94,7 +94,6 @@ void LevelSettings::_init(__int64 seed, GameType *gameType, bool generateMapFeat this->newSeaLevel = newSeaLevel; this->levelType = levelType; this->allowCommands = false; - this->startingBonusItems = false; m_xzSize = xzSize; m_hellScale = hellScale; } @@ -105,8 +104,7 @@ LevelSettings::LevelSettings(__int64 seed, GameType *gameType, bool generateMapF hardcore(hardcore), generateMapFeatures(generateMapFeatures), newSeaLevel(newSeaLevel), - levelType(levelType), - startingBonusItems(false) + levelType(levelType) { _init(seed, gameType, generateMapFeatures, hardcore, newSeaLevel, levelType, xzSize, hellScale); } @@ -116,23 +114,12 @@ LevelSettings::LevelSettings(LevelData *levelData) _init(levelData->getSeed(), levelData->getGameType(), levelData->isGenerateMapFeatures(), levelData->isHardcore(), levelData->useNewSeaLevel(), levelData->getGenerator(), levelData->getXZSize(), levelData->getHellScale() ); } -LevelSettings *LevelSettings::enableStartingBonusItems() -{ - startingBonusItems = true; - return this; -} - LevelSettings *LevelSettings::enableSinglePlayerCommands() { allowCommands = true; return this; } -bool LevelSettings::hasStartingBonusItems() -{ - return startingBonusItems; -} - __int64 LevelSettings::getSeed() { return seed; diff --git a/Minecraft.World/LevelSettings.h b/Minecraft.World/LevelSettings.h index c183df8c..0884596b 100644 --- a/Minecraft.World/LevelSettings.h +++ b/Minecraft.World/LevelSettings.h @@ -42,7 +42,6 @@ private: bool newSeaLevel; LevelType *levelType; bool allowCommands; - bool startingBonusItems; // 4J - brought forward from 1.3.2 int m_xzSize; // 4J Added int m_hellScale; @@ -51,9 +50,7 @@ private: public: LevelSettings(__int64 seed, GameType *gameType, bool generateMapFeatures, bool hardcore, bool newSeaLevel, LevelType *levelType, int xzSize, int hellScale); // 4J Added xzSize and hellScale param LevelSettings(LevelData *levelData); - LevelSettings *enableStartingBonusItems(); // 4J - brought forward from 1.3.2 LevelSettings *enableSinglePlayerCommands(); - bool hasStartingBonusItems(); // 4J - brought forward from 1.3.2 __int64 getSeed(); GameType *getGameType(); bool isHardcore(); diff --git a/Minecraft.World/Minecraft.World.vcxproj b/Minecraft.World/Minecraft.World.vcxproj index ee5c8544..ae1b6ef8 100644 --- a/Minecraft.World/Minecraft.World.vcxproj +++ b/Minecraft.World/Minecraft.World.vcxproj @@ -1887,7 +1887,6 @@ - @@ -2808,7 +2807,6 @@ - diff --git a/Minecraft.World/Minecraft.World.vcxproj.filters b/Minecraft.World/Minecraft.World.vcxproj.filters index cee420e7..d7dded33 100644 --- a/Minecraft.World/Minecraft.World.vcxproj.filters +++ b/Minecraft.World/Minecraft.World.vcxproj.filters @@ -1924,9 +1924,6 @@ net\minecraft\world\level\levelgen - - net\minecraft\world\level\levelgen\feature - net\minecraft\world\item @@ -4164,9 +4161,6 @@ net\minecraft\world\level\levelgen - - net\minecraft\world\level\levelgen\feature - net\minecraft\world\item diff --git a/Minecraft.World/net.minecraft.world.level.levelgen.feature.h b/Minecraft.World/net.minecraft.world.level.levelgen.feature.h index 81ac8637..197f47fa 100644 --- a/Minecraft.World/net.minecraft.world.level.levelgen.feature.h +++ b/Minecraft.World/net.minecraft.world.level.levelgen.feature.h @@ -27,7 +27,6 @@ #include "HugeMushroomFeature.h" #include "SandFeature.h" #include "SwampTreeFeature.h" -#include "BonusChestFeature.h" #include "SpikeFeature.h" #include "EndPodiumFeature.h" diff --git a/README.md b/README.md index d704f3fc..20adf898 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,8 @@ Bringing the October 10th 2014 Source Leak back down to TU0 - [ ] World Generation ## Removed Features -- [ ] Adventure Mode - [ ] Creative Mode -- [ ] Bonus Chests +- [x] Bonus Chests - [x] Map Position - [x] Experience - [ ] Enchanting