Merge branch 'pr-3' into TU43

This commit is contained in:
Fireblade 2026-05-24 22:29:54 -04:00
commit 8676650294
389 changed files with 7389 additions and 4207 deletions

View file

@ -234,9 +234,11 @@ if(TARGET Minecraft.Server)
add_dependencies(Minecraft.Server GenerateStringIdLookup)
endif()
# item.h takes priority as some tile.h blocks are not meant to be accessed
# for example: the wheat 'block' (stage 1 wheat crop) is NOT supposed to override the normal wheat item
set(_item_map_inputs
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.World/Item.h"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.World/Tile.h"
"${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.World/Item.h"
)
if(CMAKE_CROSSCOMPILING AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

View file

@ -223,7 +223,7 @@ wstring AbstractTexturePack::getAnimationString(const wstring &textureName, cons
BufferedImage *AbstractTexturePack::getImageResource(const wstring& File, bool filenameHasExtension /*= false*/, bool bTitleUpdateTexture /*=false*/, const wstring &drive /*=L""*/)
{
const char *pchTexture=wstringtofilename(File);
app.DebugPrintf("AbstractTexturePack::getImageResource - %s, drive is %s\n",pchTexture, wstringtofilename(drive));
// app.DebugPrintf("AbstractTexturePack::getImageResource - %s, drive is %s\n",pchTexture, wstringtofilename(drive));
return new BufferedImage(TexturePack::getResource(L"/" + File),filenameHasExtension,bTitleUpdateTexture,drive);
}

View file

@ -88,7 +88,7 @@ void BeaconRenderer::render(shared_ptr<TileEntity> _beacon, double x, double y,
segments.push_back({curR, curG, curB, 1});
}
else if (tileID == 0 || tileID == Tile::glass_Id || tileID == Tile::thinGlass_Id) {
else if (tileID == 0 || tileID == Tile::glass_Id || tileID == Tile::glass_pane_Id) {
if (segments.empty()) {
segments.push_back({1.0f, 1.0f, 1.0f, 1});
} else {

View file

@ -163,7 +163,7 @@ BufferedImage::BufferedImage(const wstring& File, bool filenameHasExtension /*=f
const char *pchTextureName=wstringtofilename(name);
#ifndef _CONTENT_PACKAGE
app.DebugPrintf("\n--- Loading TEXTURE - %s\n\n",pchTextureName);
// app.DebugPrintf("\n--- Loading TEXTURE - %s\n\n",pchTextureName);
#endif
D3DXIMAGE_INFO ImageInfo;

View file

@ -111,7 +111,9 @@ int Camera::getBlockAt(Level *level, shared_ptr<LivingEntity> player, float alph
Vec3 *p = Camera::getCameraPos(player, alpha);
TilePos tp = TilePos(p);
int t = level->getTile(tp.x, tp.y, tp.z);
if (t != 0 && Tile::tiles[t]->material->isLiquid())
Tile *tile = Tile::tiles[t];
if (tile == nullptr) return 0; // tu31 tutorial world fix
if (t != 0 && tile->material->isLiquid())
{
float hh = LiquidTile::getHeight(level->getData(tp.x, tp.y, tp.z)) - 1 / 9.0f;
float h = tp.y + 1 - hh;

View file

@ -181,6 +181,7 @@ void Chunk::makeCopyForRebuild(Chunk *source)
void Chunk::rebuild()
{
if (this == nullptr) return;
PIXBeginNamedEvent(0,"Rebuilding chunk %d, %d, %d", x, y, z);
#if defined __PS3__ && !defined DISABLE_SPU_CODE
rebuild_SPU();
@ -281,15 +282,15 @@ void Chunk::rebuild()
// Establish whether this tile and its neighbours are all made of rock, dirt, unbreakable tiles, or have already
// been determined to meet this criteria themselves and have a tile of 255 set.
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue;
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::bedrock_Id ) || ( tileId == 255) ) ) continue;
tileId = tileIds[ offset + ( ( ( xx - 1 ) << 11 ) | ( ( zz + 0 ) << 7 ) | ( indexY + 0 )) ];
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue;
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::bedrock_Id ) || ( tileId == 255) ) ) continue;
tileId = tileIds[ offset + ( ( ( xx + 1 ) << 11 ) | ( ( zz + 0 ) << 7 ) | ( indexY + 0 )) ];
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue;
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::bedrock_Id ) || ( tileId == 255) ) ) continue;
tileId = tileIds[ offset + ( ( ( xx + 0 ) << 11 ) | ( ( zz - 1 ) << 7 ) | ( indexY + 0 )) ];
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue;
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::bedrock_Id ) || ( tileId == 255) ) ) continue;
tileId = tileIds[ offset + ( ( ( xx + 0 ) << 11 ) | ( ( zz + 1 ) << 7 ) | ( indexY + 0 )) ];
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue;
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::bedrock_Id ) || ( tileId == 255) ) ) continue;
// Treat the bottom of the world differently - we shouldn't ever be able to look up at this, so consider tiles as invisible
// if they are surrounded on sides other than the bottom
if( yy > 0 )
@ -302,7 +303,7 @@ void Chunk::rebuild()
yMinusOneOffset = Level::COMPRESSED_CHUNK_SECTION_TILES;
}
tileId = tileIds[ yMinusOneOffset + ( ( ( xx + 0 ) << 11 ) | ( ( zz + 0 ) << 7 ) | indexYMinusOne ) ];
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue;
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::bedrock_Id ) || ( tileId == 255) ) ) continue;
}
int indexYPlusOne = yy + 1;
int yPlusOneOffset = 0;
@ -312,7 +313,7 @@ void Chunk::rebuild()
yPlusOneOffset = Level::COMPRESSED_CHUNK_SECTION_TILES;
}
tileId = tileIds[ yPlusOneOffset + ( ( ( xx + 0 ) << 11 ) | ( ( zz + 0 ) << 7 ) | indexYPlusOne ) ];
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::unbreakable_Id ) || ( tileId == 255) ) ) continue;
if( !( ( tileId == Tile::stone_Id ) || ( tileId == Tile::dirt_Id ) || ( tileId == Tile::bedrock_Id ) || ( tileId == 255) ) ) continue;
// This tile is surrounded. Flag it as not requiring to be rendered by setting its id to 255.
tileIds[ offset + ( ( ( xx + 0 ) << 11 ) | ( ( zz + 0 ) << 7 ) | ( indexY + 0 ) ) ] = 0xff;
@ -404,6 +405,10 @@ void Chunk::rebuild()
}
Tile *tile = Tile::tiles[tileId];
if (tile == nullptr)
{
continue;
}
if (currentLayer == 0 && tile->isEntityTile())
{
shared_ptr<TileEntity> et = region->getTileEntity(x, y, z);

View file

@ -561,7 +561,20 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet)
int iz = (int) z;
app.DebugPrintf("ClientConnection ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz);
}
e = std::make_shared<ItemFrame>(level, (int)x, (int)y, (int)z, packet->data);
{
int dir = packet->data & 0xFF;
bool placedByPlayer = (packet->data & 0x100) != 0;
e = std::make_shared<ItemFrame>(level, (int)x, (int)y, (int)z, dir);
shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e);
if (frame != nullptr)
{
frame->placedByPlayer = placedByPlayer;
if (placedByPlayer)
{
frame->setDir(dir);
}
}
}
packet->data = 0;
setRot = false;
break;
@ -693,7 +706,7 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet)
if (packet->type == AddEntityPacket::ENDER_CRYSTAL) e = shared_ptr<Entity>( new EnderCrystal(level, x, y, z) );
if (packet->type == AddEntityPacket::FALLING_SAND) e = shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::sand->id) );
if (packet->type == AddEntityPacket::FALLING_GRAVEL) e = shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::gravel->id) );
if (packet->type == AddEntityPacket::FALLING_EGG) e = shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::dragonEgg_Id) );
if (packet->type == AddEntityPacket::FALLING_EGG) e = shared_ptr<Entity>( new FallingTile(level, x, y, z, Tile::dragon_egg_Id) );
*/
@ -815,6 +828,11 @@ void ClientConnection::handleAddGlobalEntity(shared_ptr<AddGlobalEntityPacket> p
void ClientConnection::handleAddPainting(shared_ptr<AddPaintingPacket> packet)
{
shared_ptr<Painting> painting = std::make_shared<Painting>(level, packet->x, packet->y, packet->z, packet->dir, packet->motive);
painting->placedByPlayer = packet->placedByPlayer;
if (packet->placedByPlayer)
{
painting->setDir(packet->dir);
}
level->putEntity(packet->id, painting);
m_trackedEntityIds.insert(packet->id);
}
@ -1324,11 +1342,11 @@ void ClientConnection::handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket>
// Don't bother setting this to dirty if it isn't going to visually change - we get a lot of
// water changing from static to dynamic for instance
if(!( ( ( prevTile == Tile::water_Id ) && ( tile == Tile::calmWater_Id ) ) ||
( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) ||
( ( prevTile == Tile::lava_Id ) && ( tile == Tile::calmLava_Id ) ) ||
( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::calmLava_Id ) ) ||
( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::lava_Id ) ) ) )
if(!( ( ( prevTile == Tile::flowing_water_Id ) && ( tile == Tile::water_Id ) ) ||
( ( prevTile == Tile::water_Id ) && ( tile == Tile::flowing_water_Id ) ) ||
( ( prevTile == Tile::flowing_lava_Id ) && ( tile == Tile::lava_Id ) ) ||
( ( prevTile == Tile::lava_Id ) && ( tile == Tile::lava_Id ) ) ||
( ( prevTile == Tile::lava_Id ) && ( tile == Tile::flowing_lava_Id ) ) ) )
{
dimensionLevel->setTilesDirty(x + xo, y, z + zo, x + xo, y, z + zo);
}
@ -3142,10 +3160,10 @@ void ClientConnection::handleContainerOpen(shared_ptr<ContainerOpenPacket> packe
break;
case ContainerOpenPacket::BREWING_STAND:
{
shared_ptr<BrewingStandTileEntity> brewingStand = std::make_shared<BrewingStandTileEntity>();
if (packet->customName) brewingStand->setCustomName(packet->title);
shared_ptr<BrewingStandTileEntity> brewing_stand = std::make_shared<BrewingStandTileEntity>();
if (packet->customName) brewing_stand->setCustomName(packet->title);
if( player->openBrewingStand(brewingStand))
if( player->openBrewingStand(brewing_stand))
{
player->containerMenu->containerId = packet->containerId;
}

View file

@ -946,7 +946,9 @@ void CMinecraftApp::InitGameSettings()
memset(pProfileSettings,0,sizeof(C_4JProfile::PROFILESETTINGS));
SetDefaultOptions(pProfileSettings,i);
Win64_LoadSettings(GameSettingsA[i]);
#ifndef MINECRAFT_SERVER_BUILD
ApplyGameSettingsChanged(i);
#endif
#elif defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__
C4JStorage::PROFILESETTINGS *pProfileSettings=StorageManager.GetDashboardProfileSettings(i);
// 4J-PB - don't cause an options write to happen here

View file

@ -50,9 +50,9 @@ bool AddEnchantmentRuleDefinition::enchantItem(shared_ptr<ItemInstance> item)
{
// 4J-JEV: Ripped code from enchantmenthelpers
// Maybe we want to add an addEnchantment method to EnchantmentHelpers
if (item->id == Item::enchantedBook_Id)
if (item->id == Item::enchanted_book_Id)
{
Item::enchantedBook->addEnchantment( item, new EnchantmentInstance(m_enchantmentId, m_enchantmentLevel) );
Item::enchanted_book->addEnchantment( item, new EnchantmentInstance(m_enchantmentId, m_enchantmentLevel) );
}
else if (item->isEnchantable())
{

View file

@ -7,7 +7,7 @@
XboxStructureActionPlaceSpawner::XboxStructureActionPlaceSpawner()
{
m_tile = Tile::mobSpawner_Id;
m_tile = Tile::mob_spawner_Id;
m_entityId = L"Pig";
}

View file

@ -40,6 +40,9 @@ bool ChoiceTask::isCompleted()
return false;
int xboxPad = pMinecraft->player->GetXboxPad();
int tutorialPad = tutorial->getPad();
bool hasValidPad = (tutorialPad >= 0 && tutorialPad < XUSER_MAX_COUNT);
bool menuDisplayed = hasValidPad && ui.GetMenuDisplayed(tutorialPad);
if( m_bConfirmMappingComplete || m_bCancelMappingComplete )
{
@ -48,15 +51,10 @@ bool ChoiceTask::isCompleted()
return true;
}
if(ui.GetMenuDisplayed(tutorial->getPad()))
{
// If a menu is displayed, then we use the handleUIInput to complete the task
return false;
}
else
if(!menuDisplayed)
{
// If the player is under water then allow all keypresses so they can jump out
if (pMinecraft->localplayers[tutorial->getPad()]->isUnderLiquid(Material::water)) return false;
if (hasValidPad && pMinecraft->localplayers[tutorialPad] != nullptr && pMinecraft->localplayers[tutorialPad]->isUnderLiquid(Material::water)) return false;
#ifdef _WINDOWS64
if (!m_bConfirmMappingComplete &&
(InputManager.GetValue(xboxPad, m_iConfirmMapping) > 0
@ -86,10 +84,9 @@ bool ChoiceTask::isCompleted()
sendTelemetry();
enableConstraints(false, true);
}
return m_bConfirmMappingComplete || m_bCancelMappingComplete;
}
return false;
return m_bConfirmMappingComplete || m_bCancelMappingComplete;
}
eTutorial_CompletionAction ChoiceTask::getCompletionAction()

View file

@ -75,7 +75,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
int mineMappings[] = {MINECRAFT_ACTION_ACTION};
addTask(e_Tutorial_State_Gameplay, new ControllerTask( this, IDS_TUTORIAL_TASK_MINE, false, true, mineMappings, 1) );
addTask(e_Tutorial_State_Gameplay, new PickupTask( Tile::treeTrunk_Id, 4, -1, this, IDS_TUTORIAL_TASK_CHOP_WOOD ) );
addTask(e_Tutorial_State_Gameplay, new PickupTask( Tile::log_Id, 4, -1, this, IDS_TUTORIAL_TASK_CHOP_WOOD ) );
int scrollMappings[] = {MINECRAFT_ACTION_LEFT_SCROLL,MINECRAFT_ACTION_RIGHT_SCROLL};
//int scrollMappings[] = {ACTION_MENU_LEFT_SCROLL,ACTION_MENU_RIGHT_SCROLL};
@ -92,9 +92,9 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
addTask(e_Tutorial_State_Gameplay, new InfoTask(this, IDS_TUTORIAL_TASK_FOOD_BAR_FEED, IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A) );
// While they should only eat the item we give them, includ the ability to complete this task with different items
int foodItems[] = {Item::mushroomStew_Id, Item::apple_Id, Item::bread_Id, Item::porkChop_raw_Id, Item::porkChop_cooked_Id,
Item::apple_gold_Id, Item::fish_raw_Id, Item::fish_cooked_Id, Item::cookie_Id, Item::beef_cooked_Id,
Item::beef_raw_Id, Item::chicken_cooked_Id, Item::chicken_raw_Id, Item::melon_Id, Item::rotten_flesh_Id};
int foodItems[] = {Item::mushroom_stew_Id, Item::apple_Id, Item::bread_Id, Item::porkchop_Id, Item::cooked_porkchop_Id,
Item::golden_apple_Id, Item::fish_Id, Item::cooked_fish_Id, Item::cookie_Id, Item::cooked_beef_Id,
Item::beef_Id, Item::cooked_chicken_Id, Item::chicken_Id, Item::melon_block_Id, Item::rotten_flesh_Id};
addTask(e_Tutorial_State_Gameplay, new CompleteUsingItemTask(this, IDS_TUTORIAL_TASK_FOOD_BAR_EAT_STEAK, foodItems, 15, true) );
int crftMappings[] = {MINECRAFT_ACTION_CRAFTING};
@ -103,13 +103,13 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
addTask(e_Tutorial_State_Gameplay, new ProgressFlagTask( &m_progressFlags, FULL_TUTORIAL_PROGRESS_2_X_2_Crafting, ProgressFlagTask::e_Progress_Set_Flag, this ) );
addTask(e_Tutorial_State_Gameplay, new StateChangeTask( e_Tutorial_State_2x2Crafting_Menu, this) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Tile::wood_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_PLANKS) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Tile::workBench_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_CRAFTING_TABLE) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Tile::planks_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_PLANKS) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Tile::crafting_table_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_CRAFTING_TABLE) );
//int useMappings[] = {MINECRAFT_ACTION_USE};
//addTask(e_Tutorial_State_Gameplay, new ControllerTask( this, IDS_TUTORIAL_TASK_USE, false, false, useMappings, 1) );
addTask(e_Tutorial_State_Gameplay, new InfoTask(this, IDS_TUTORIAL_TASK_USE, IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A) );
addTask(e_Tutorial_State_Gameplay, new UseItemTask( Tile::workBench_Id, this, IDS_TUTORIAL_TASK_PLACE_WORKBENCH, true ) );
addTask(e_Tutorial_State_Gameplay, new UseItemTask( Tile::crafting_table_Id, this, IDS_TUTORIAL_TASK_PLACE_WORKBENCH, true ) );
addTask(e_Tutorial_State_Gameplay, new InfoTask(this, IDS_TUTORIAL_TASK_NIGHT_DANGER, IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A) );
addTask(e_Tutorial_State_Gameplay, new InfoTask(this, IDS_TUTORIAL_TASK_NEARBY_SHELTER, IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A) );
@ -121,22 +121,22 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
// START OF FULL TUTORIAL
addTask(e_Tutorial_State_Gameplay, new UseTileTask( Tile::workBench_Id, this, IDS_TUTORIAL_TASK_OPEN_WORKBENCH, false ) );
addTask(e_Tutorial_State_Gameplay, new UseTileTask( Tile::crafting_table_Id, this, IDS_TUTORIAL_TASK_OPEN_WORKBENCH, false ) );
addTask(e_Tutorial_State_Gameplay, new ProgressFlagTask( &m_progressFlags, FULL_TUTORIAL_PROGRESS_3_X_3_Crafting, ProgressFlagTask::e_Progress_Set_Flag, this ) );
addTask(e_Tutorial_State_Gameplay, new StateChangeTask( e_Tutorial_State_3x3Crafting_Menu, this) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Item::stick->id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_STICKS) );
int shovelItems[] = {Item::shovel_wood->id, Item::shovel_stone->id, Item::shovel_iron->id, Item::shovel_gold->id, Item::shovel_diamond->id};
int shovelItems[] = {Item::wooden_shovel->id, Item::stone_shovel->id, Item::iron_shovel->id, Item::golden_shovel->id, Item::diamond_shovel->id};
int shovelAuxVals[] = {-1,-1,-1,-1,-1};
addTask(e_Tutorial_State_Gameplay, new CraftTask( shovelItems, shovelAuxVals, 5, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_SHOVEL) );
int hatchetItems[] = {Item::hatchet_wood->id, Item::hatchet_stone->id, Item::hatchet_iron->id, Item::hatchet_gold->id, Item::hatchet_diamond->id};
int hatchetItems[] = {Item::wooden_axe->id, Item::stone_axe->id, Item::iron_axe->id, Item::golden_axe->id, Item::diamond_axe->id};
int hatchetAuxVals[] = {-1,-1,-1,-1,-1};
addTask(e_Tutorial_State_Gameplay, new CraftTask( hatchetItems, hatchetAuxVals, 5, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_HATCHET) );
int pickaxeItems[] = {Item::pickAxe_wood->id, Item::pickAxe_stone->id, Item::pickAxe_iron->id, Item::pickAxe_gold->id, Item::pickAxe_diamond->id};
int pickaxeItems[] = {Item::wooden_pickaxe->id, Item::stone_pickaxe->id, Item::iron_pickaxe->id, Item::golden_pickaxe->id, Item::diamond_pickaxe->id};
int pickaxeAuxVals[] = {-1,-1,-1,-1,-1};
addTask(e_Tutorial_State_Gameplay, new CraftTask( pickaxeItems, pickaxeAuxVals, 5, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_PICKAXE) );
@ -150,8 +150,8 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
addTask(e_Tutorial_State_Gameplay, new StateChangeTask( e_Tutorial_State_Furnace_Menu, this) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Item::coal->id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_CHARCOAL) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Tile::glass_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_GLASS) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Item::door_wood->id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_DOOR) );
addTask(e_Tutorial_State_Gameplay, new UseItemTask(Item::door_wood->id, this, IDS_TUTORIAL_TASK_PLACE_DOOR) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Item::wooden_door->id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_DOOR) );
addTask(e_Tutorial_State_Gameplay, new UseItemTask(Item::wooden_door->id, this, IDS_TUTORIAL_TASK_PLACE_DOOR) );
addTask(e_Tutorial_State_Gameplay, new CraftTask( Tile::torch_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_TORCH) );
if(app.getGameRuleDefinitions() != nullptr)
@ -201,12 +201,12 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
addTask(e_Tutorial_State_2x2Crafting_Menu, new FullTutorialActiveTask( this, e_Tutorial_Completion_Complete_State) );
addTask(e_Tutorial_State_2x2Crafting_Menu, new CraftTask( Tile::wood_Id, -1, 1, this, IDS_TUTORIAL_TASK_CRAFT_CREATE_PLANKS) );
addTask(e_Tutorial_State_2x2Crafting_Menu, new CraftTask( Tile::planks_Id, -1, 1, this, IDS_TUTORIAL_TASK_CRAFT_CREATE_PLANKS) );
ProcedureCompoundTask *workbenchCompound = new ProcedureCompoundTask( this );
workbenchCompound->AddTask( new XuiCraftingTask( this, IDS_TUTORIAL_TASK_CRAFT_SELECT_STRUCTURES, Recipy::eGroupType_Structure) );
workbenchCompound->AddTask( new XuiCraftingTask( this, IDS_TUTORIAL_TASK_CRAFT_SELECT_CRAFTING_TABLE, Tile::workBench_Id) );
workbenchCompound->AddTask( new CraftTask( Tile::workBench_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_CRAFTING_TABLE) );
workbenchCompound->AddTask( new XuiCraftingTask( this, IDS_TUTORIAL_TASK_CRAFT_SELECT_CRAFTING_TABLE, Tile::crafting_table_Id) );
workbenchCompound->AddTask( new CraftTask( Tile::crafting_table_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_CRAFTING_TABLE) );
addTask(e_Tutorial_State_2x2Crafting_Menu, workbenchCompound );
addTask(e_Tutorial_State_2x2Crafting_Menu, new InfoTask(this, IDS_TUTORIAL_TASK_CRAFT_EXIT_AND_PLACE_TABLE, -1, false, ACTION_MENU_B) );
@ -219,7 +219,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
ProcedureCompoundTask *shovelCompound = new ProcedureCompoundTask( this );
shovelCompound->AddTask( new XuiCraftingTask( this, IDS_TUTORIAL_TASK_CRAFT_SELECT_TOOLS, Recipy::eGroupType_Tool) );
shovelCompound->AddTask( new XuiCraftingTask( this, IDS_TUTORIAL_TASK_CRAFT_SELECT_WOODEN_SHOVEL, Item::shovel_wood->id) );
shovelCompound->AddTask( new XuiCraftingTask( this, IDS_TUTORIAL_TASK_CRAFT_SELECT_WOODEN_SHOVEL, Item::wooden_shovel->id) );
shovelCompound->AddTask( new CraftTask( shovelItems, shovelAuxVals, 5, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_SHOVEL) );
addTask(e_Tutorial_State_3x3Crafting_Menu, shovelCompound );
addTask(e_Tutorial_State_3x3Crafting_Menu, new CraftTask( hatchetItems, hatchetAuxVals, 5, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_HATCHET) );
@ -234,7 +234,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
addTask(e_Tutorial_State_3x3Crafting_Menu, new InfoTask(this, IDS_TUTORIAL_TASK_CRAFT_EXIT_AND_PLACE_FURNACE, -1, false, ACTION_MENU_B) );
// No need to block here, as it's fine if the player wants to do this out of order
addTask(e_Tutorial_State_3x3Crafting_Menu, new CraftTask( Item::door_wood->id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_DOOR) );
addTask(e_Tutorial_State_3x3Crafting_Menu, new CraftTask( Item::wooden_door->id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_WOODEN_DOOR) );
addTask(e_Tutorial_State_3x3Crafting_Menu, new CraftTask( Tile::torch_Id, -1, 1, this, IDS_TUTORIAL_TASK_CREATE_TORCH) );
/*
@ -445,7 +445,7 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/)
addTask(e_Tutorial_State_Brewing, new ChoiceTask(this, IDS_TUTORIAL_TASK_BREWING_OVERVIEW, IDS_TUTORIAL_PROMPT_BREWING_OVERVIEW, true, ACTION_MENU_A, ACTION_MENU_B, e_Tutorial_Completion_Complete_State_Gameplay_Constraints, eTelemetryTutorial_Brewing) );
ProcedureCompoundTask *fillWaterBottleTask = new ProcedureCompoundTask( this );
fillWaterBottleTask->AddTask( new PickupTask( Item::glassBottle_Id, 1, -1, this, IDS_TUTORIAL_TASK_BREWING_GET_GLASS_BOTTLE ) );
fillWaterBottleTask->AddTask( new PickupTask( Item::glass_bottle_Id, 1, -1, this, IDS_TUTORIAL_TASK_BREWING_GET_GLASS_BOTTLE ) );
fillWaterBottleTask->AddTask( new PickupTask( Item::potion_Id, 1, 0, this, IDS_TUTORIAL_TASK_BREWING_FILL_GLASS_BOTTLE ) );
addTask(e_Tutorial_State_Brewing, fillWaterBottleTask);

View file

@ -40,11 +40,13 @@ bool InfoTask::isCompleted()
bool bAllComplete = true;
Minecraft *pMinecraft = Minecraft::GetInstance();
int tutorialPad = tutorial->getPad();
bool hasValidPad = (tutorialPad >= 0 && tutorialPad < XUSER_MAX_COUNT);
// If the player is under water then allow all keypresses so they can jump out
if( pMinecraft->localplayers[tutorial->getPad()]->isUnderLiquid(Material::water) ) return false;
if( hasValidPad && pMinecraft->localplayers[tutorialPad] != nullptr && pMinecraft->localplayers[tutorialPad]->isUnderLiquid(Material::water) ) return false;
if(ui.GetMenuDisplayed(tutorial->getPad()))
if(hasValidPad && ui.GetMenuDisplayed(tutorialPad))
{
// If a menu is displayed, then we use the handleUIInput to complete the task
bAllComplete = true;

View file

@ -405,19 +405,19 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int stoneItems[] = {Tile::cobblestone_Id};
if(!isHintCompleted(e_Tutorial_Hint_Stone)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Stone, this, stoneItems, 1 ) );
int plankItems[] = {Tile::wood_Id};
int plankItems[] = {Tile::planks_Id};
if(!isHintCompleted(e_Tutorial_Hint_Planks)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Planks, this, plankItems, 1 ) );
int saplingItems[] = {Tile::sapling_Id};
if(!isHintCompleted(e_Tutorial_Hint_Sapling)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Sapling, this, saplingItems, 1 ) );
int unbreakableItems[] = {Tile::unbreakable_Id};
int unbreakableItems[] = {Tile::bedrock_Id};
if(!isHintCompleted(e_Tutorial_Hint_Unbreakable)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Unbreakable, this, unbreakableItems, 1 ) );
int waterItems[] = {Tile::water_Id, Tile::calmWater_Id};
int waterItems[] = {Tile::flowing_water_Id, Tile::water_Id};
if(!isHintCompleted(e_Tutorial_Hint_Water)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Water, this, waterItems, 2 ) );
int lavaItems[] = {Tile::lava_Id, Tile::calmLava_Id};
int lavaItems[] = {Tile::flowing_lava_Id, Tile::lava_Id};
if(!isHintCompleted(e_Tutorial_Hint_Lava)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Lava, this, lavaItems, 2 ) );
int sandItems[] = {Tile::sand_Id};
@ -426,16 +426,16 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int gravelItems[] = {Tile::gravel_Id};
if(!isHintCompleted(e_Tutorial_Hint_Gravel)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Gravel, this, gravelItems, 1 ) );
int goldOreItems[] = {Tile::goldOre_Id};
int goldOreItems[] = {Tile::gold_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_Gold_Ore)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Gold_Ore, this, goldOreItems, 1 ) );
int ironOreItems[] = {Tile::ironOre_Id};
int ironOreItems[] = {Tile::iron_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_Iron_Ore)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Iron_Ore, this, ironOreItems, 1 ) );
int coalOreItems[] = {Tile::coalOre_Id};
int coalOreItems[] = {Tile::coal_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_Coal_Ore)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Coal_Ore, this, coalOreItems, 1 ) );
int treeTrunkItems[] = {Tile::treeTrunk_Id};
int treeTrunkItems[] = {Tile::log_Id};
if(!isHintCompleted(e_Tutorial_Hint_Tree_Trunk)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Tree_Trunk, this, treeTrunkItems, 1 ) );
int leavesItems[] = {Tile::leaves_Id};
@ -444,16 +444,16 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int glassItems[] = {Tile::glass_Id};
if(!isHintCompleted(e_Tutorial_Hint_Glass)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Glass, this, glassItems, 1 ) );
int lapisOreItems[] = {Tile::lapisOre_Id};
int lapisOreItems[] = {Tile::lapis_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_Lapis_Ore)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Lapis_Ore, this, lapisOreItems, 1 ) );
int lapisBlockItems[] = {Tile::lapisBlock_Id};
int lapisBlockItems[] = {Tile::lapis_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_Lapis_Block)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Lapis_Block, this, lapisBlockItems, 1 ) );
int dispenserItems[] = {Tile::dispenser_Id};
if(!isHintCompleted(e_Tutorial_Hint_Dispenser)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Dispenser, this, dispenserItems, 1 ) );
int sandstoneItems[] = {Tile::sandStone_Id};
int sandstoneItems[] = {Tile::sandstone_Id};
if(!isHintCompleted(e_Tutorial_Hint_Sandstone))
{
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Sandstone, this, sandstoneItems, 1, -1, SandStoneTile::TYPE_DEFAULT ) );
@ -464,10 +464,10 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int noteBlockItems[] = {Tile::noteblock_Id};
if(!isHintCompleted(e_Tutorial_Hint_Note_Block)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Note_Block, this, noteBlockItems, 1 ) );
int poweredRailItems[] = {Tile::goldenRail_Id};
int poweredRailItems[] = {Tile::golden_rail_Id};
if(!isHintCompleted(e_Tutorial_Hint_Powered_Rail)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Powered_Rail, this, poweredRailItems, 1 ) );
int detectorRailItems[] = {Tile::detectorRail_Id};
int detectorRailItems[] = {Tile::detector_rail_Id};
if(!isHintCompleted(e_Tutorial_Hint_Detector_Rail)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Detector_Rail, this, detectorRailItems, 1 ) );
int tallGrassItems[] = {Tile::tallgrass_Id};
@ -481,19 +481,19 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int woolItems[] = {Tile::wool_Id};
if(!isHintCompleted(e_Tutorial_Hint_Wool)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Wool, this, woolItems, 1 ) );
int flowerItems[] = {Tile::flower_Id, Tile::rose_Id};
int flowerItems[] = {Tile::yellow_flower_Id, Tile::red_flower_Id};
if(!isHintCompleted(e_Tutorial_Hint_Flower)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Flower, this, flowerItems, 2 ) );
int mushroomItems[] = {Tile::mushroom_brown_Id, Tile::mushroom_red_Id};
if(!isHintCompleted(e_Tutorial_Hint_Mushroom)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Mushroom, this, mushroomItems, 2 ) );
int goldBlockItems[] = {Tile::goldBlock_Id};
int goldBlockItems[] = {Tile::gold_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_Gold_Block)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Gold_Block, this, goldBlockItems, 1 ) );
int ironBlockItems[] = {Tile::ironBlock_Id};
int ironBlockItems[] = {Tile::iron_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_Iron_Block)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Iron_Block, this, ironBlockItems, 1 ) );
int stoneSlabItems[] = {Tile::stoneSlabHalf_Id, Tile::stoneSlab_Id};
int stoneSlabItems[] = {Tile::stone_slab_Id, Tile::double_stone_slab_Id};
if(!isHintCompleted(e_Tutorial_Hint_Stone_Slab))
{
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Stone_Slab, this, stoneSlabItems, 2, -1, StoneSlabTile::STONE_SLAB ) );
@ -506,14 +506,14 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Stone_Slab, this, stoneSlabItems, 2, -1, StoneSlabTile::QUARTZ_SLAB ) );
}
int woodSlabItems[] = {Tile::woodSlabHalf_Id, Tile::woodSlab_Id};
int woodSlabItems[] = {Tile::wooden_slab_Id, Tile::double_wooden_slab_Id};
if(!isHintCompleted(e_Tutorial_Hint_Stone_Slab))
{
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Stone_Slab, this, woodSlabItems, 2, -1, TreeTile::BIRCH_TRUNK ) );
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Stone_Slab, this, woodSlabItems, 2, -1, TreeTile::DARK_TRUNK ) );
}
int redBrickItems[] = {Tile::redBrick_Id};
int redBrickItems[] = {Tile::brick_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_Red_Brick)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Red_Brick, this, redBrickItems, 1 ) );
int tntItems[] = {Tile::tnt_Id};
@ -522,7 +522,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int bookshelfItems[] = {Tile::bookshelf_Id};
if(!isHintCompleted(e_Tutorial_Hint_Bookshelf)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Bookshelf, this, bookshelfItems, 1 ) );
int mossStoneItems[] = {Tile::mossyCobblestone_Id};
int mossStoneItems[] = {Tile::mossy_cobblestone_Id};
if(!isHintCompleted(e_Tutorial_Hint_Moss_Stone)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Moss_Stone, this, mossStoneItems, 1 ) );
int obsidianItems[] = {Tile::obsidian_Id};
@ -531,22 +531,22 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int torchItems[] = {Tile::torch_Id};
if(!isHintCompleted(e_Tutorial_Hint_Torch)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Torch, this, torchItems, 1 ) );
int mobSpawnerItems[] = {Tile::mobSpawner_Id};
int mobSpawnerItems[] = {Tile::mob_spawner_Id};
if(!isHintCompleted(e_Tutorial_Hint_MobSpawner)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_MobSpawner, this, mobSpawnerItems, 1 ) );
int chestItems[] = {Tile::chest_Id};
if(!isHintCompleted(e_Tutorial_Hint_Chest)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Chest, this, chestItems, 1 ) );
int redstoneItems[] = {Tile::redStoneDust_Id};
if(!isHintCompleted(e_Tutorial_Hint_Redstone)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Redstone, this, redstoneItems, 1, Item::redStone_Id ) );
int redstoneItems[] = {Tile::redstone_wire_Id};
if(!isHintCompleted(e_Tutorial_Hint_Redstone)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Redstone, this, redstoneItems, 1, Item::redstone_Id ) );
int diamondOreItems[] = {Tile::diamondOre_Id};
int diamondOreItems[] = {Tile::diamond_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_Diamond_Ore)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Diamond_Ore, this, diamondOreItems, 1 ) );
int diamondBlockItems[] = {Tile::diamondBlock_Id};
int diamondBlockItems[] = {Tile::diamond_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_Diamond_Block)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Diamond_Block, this, diamondBlockItems, 1 ) );
int craftingTableItems[] = {Tile::workBench_Id};
int craftingTableItems[] = {Tile::crafting_table_Id};
if(!isHintCompleted(e_Tutorial_Hint_Crafting_Table)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Crafting_Table, this, craftingTableItems, 1 ) );
int cropsItems[] = {Tile::wheat_Id};
@ -555,19 +555,19 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int farmlandItems[] = {Tile::farmland_Id};
if(!isHintCompleted(e_Tutorial_Hint_Farmland)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Farmland, this, farmlandItems, 1 ) );
int furnaceItems[] = {Tile::furnace_Id, Tile::furnace_lit_Id};
int furnaceItems[] = {Tile::furnace_Id, Tile::lit_furnace_Id};
if(!isHintCompleted(e_Tutorial_Hint_Furnace)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Furnace, this, furnaceItems, 2 ) );
int signItems[] = {Tile::sign_Id, Tile::wallSign_Id};
if(!isHintCompleted(e_Tutorial_Hint_Sign)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Sign, this, signItems, 2, Item::sign_Id ) );
int signItems[] = {Tile::standing_sign_Id, Tile::wall_standing_sign_Id};
if(!isHintCompleted(e_Tutorial_Hint_Sign)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Sign, this, signItems, 2, Item::standing_sign_Id ) );
int doorWoodItems[] = {Tile::door_wood_Id};
if(!isHintCompleted(e_Tutorial_Hint_Door_Wood)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Door_Wood, this, doorWoodItems, 1, Item::door_wood->id ) );
int doorWoodItems[] = {Tile::wooden_door_Id};
if(!isHintCompleted(e_Tutorial_Hint_Door_Wood)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Door_Wood, this, doorWoodItems, 1, Item::wooden_door->id ) );
int ladderItems[] = {Tile::ladder_Id};
if(!isHintCompleted(e_Tutorial_Hint_Ladder)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Ladder, this, ladderItems, 1 ) );
int stairsStoneItems[] = {Tile::stairs_stone_Id,Tile::stairs_bricks_Id,Tile::stairs_stoneBrick_Id,Tile::stairs_wood_Id,Tile::stairs_sprucewood_Id,Tile::stairs_birchwood_Id,Tile::stairs_netherBricks_Id,Tile::stairs_sandstone_Id,Tile::stairs_quartz_Id};
int stairsStoneItems[] = {Tile::stone_stairs_Id,Tile::brick_stairs_Id,Tile::stone_brick_stairs_Id,Tile::oak_stairs_Id,Tile::spruce_stairs_Id,Tile::birch_stairs_Id,Tile::nether_brick_stairs_Id,Tile::sandstone_stairs_Id,Tile::quartz_stairs_Id};
if(!isHintCompleted(e_Tutorial_Hint_Stairs_Stone)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Stairs_Stone, this, stairsStoneItems, 9 ) );
int railItems[] = {Tile::rail_Id};
@ -576,19 +576,19 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int leverItems[] = {Tile::lever_Id};
if(!isHintCompleted(e_Tutorial_Hint_Lever)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Lever, this, leverItems, 1 ) );
int pressurePlateItems[] = {Tile::pressurePlate_stone_Id, Tile::pressurePlate_wood_Id};
int pressurePlateItems[] = {Tile::stone_pressure_plate_Id, Tile::wooden_pressure_plate_Id};
if(!isHintCompleted(e_Tutorial_Hint_PressurePlate)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_PressurePlate, this, pressurePlateItems, 2 ) );
int doorIronItems[] = {Tile::door_iron_Id};
if(!isHintCompleted(e_Tutorial_Hint_Door_Iron)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Door_Iron, this, doorIronItems, 1, Item::door_iron->id ) );
int doorIronItems[] = {Tile::iron_door_Id};
if(!isHintCompleted(e_Tutorial_Hint_Door_Iron)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Door_Iron, this, doorIronItems, 1, Item::iron_door->id ) );
int redstoneOreItems[] = {Tile::redStoneOre_Id, Tile::redStoneOre_lit_Id};
int redstoneOreItems[] = {Tile::redstone_ore_Id, Tile::lit_redstone_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_Redstone_Ore)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Redstone_Ore, this, redstoneOreItems, 2 ) );
int redstoneTorchItems[] = {Tile::redstoneTorch_off_Id, Tile::redstoneTorch_on_Id};
int redstoneTorchItems[] = {Tile::unlit_redstone_torch_Id, Tile::redstone_torch_Id};
if(!isHintCompleted(e_Tutorial_Hint_Redstone_Torch)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Redstone_Torch, this, redstoneTorchItems, 2 ) );
int buttonItems[] = {Tile::button_stone_Id, Tile::button_wood_Id};
int buttonItems[] = {Tile::stone_button_Id, Tile::wooden_button_Id};
if(!isHintCompleted(e_Tutorial_Hint_Button)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Button, this, buttonItems, 2 ) );
int snowItems[] = {Tile::snow_Id};
@ -612,134 +612,134 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int pumpkinItems[] = {Tile::pumpkin_Id};
if(!isHintCompleted(e_Tutorial_Hint_Pumpkin)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Pumpkin, this, pumpkinItems, 1, -1, -1, 0 ) );
int hellRockItems[] = {Tile::netherRack_Id};
int hellRockItems[] = {Tile::netherrack_Id};
if(!isHintCompleted(e_Tutorial_Hint_Hell_Rock)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Hell_Rock, this, hellRockItems, 1 ) );
int hellSandItems[] = {Tile::soulsand_Id};
int hellSandItems[] = {Tile::soul_sand_Id};
if(!isHintCompleted(e_Tutorial_Hint_Hell_Sand)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Hell_Sand, this, hellSandItems, 1 ) );
int glowstoneItems[] = {Tile::glowstone_Id};
if(!isHintCompleted(e_Tutorial_Hint_Glowstone)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Glowstone, this, glowstoneItems, 1 ) );
int portalItems[] = {Tile::portalTile_Id};
int portalItems[] = {Tile::portal_Id};
if(!isHintCompleted(e_Tutorial_Hint_Portal)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Portal, this, portalItems, 1 ) );
int pumpkinLitItems[] = {Tile::litPumpkin_Id};
int pumpkinLitItems[] = {Tile::lit_pumpkin_Id};
if(!isHintCompleted(e_Tutorial_Hint_Pumpkin_Lit)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Pumpkin_Lit, this, pumpkinLitItems, 1, -1, -1, 0 ) );
int cakeItems[] = {Tile::cake_Id};
if(!isHintCompleted(e_Tutorial_Hint_Cake)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Cake, this, cakeItems, 1 ) );
int redstoneRepeaterItems[] = {Tile::diode_on_Id, Tile::diode_off_Id};
int redstoneRepeaterItems[] = {Tile::powered_repeater_Id, Tile::unpowered_repeater_Id};
if(!isHintCompleted(e_Tutorial_Hint_Redstone_Repeater)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Redstone_Repeater, this, redstoneRepeaterItems, 2, Item::repeater_Id ) );
int trapdoorItems[] = {Tile::trapdoor_Id};
if(!isHintCompleted(e_Tutorial_Hint_Trapdoor)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Trapdoor, this, trapdoorItems, 1 ) );
int pistonItems[] = {Tile::pistonBase_Id};
int pistonItems[] = {Tile::piston_Id};
if(!isHintCompleted(e_Tutorial_Hint_Piston)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Piston, this, pistonItems, 1 ) );
int stickyPistonItems[] = {Tile::pistonStickyBase_Id};
int stickyPistonItems[] = {Tile::sticky_piston_Id};
if(!isHintCompleted(e_Tutorial_Hint_Sticky_Piston)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Sticky_Piston, this, stickyPistonItems, 1 ) );
int monsterStoneEggItems[] = {Tile::monsterStoneEgg_Id};
if(!isHintCompleted(e_Tutorial_Hint_Monster_Stone_Egg)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Monster_Stone_Egg, this, monsterStoneEggItems, 1 ) );
int monster_eggItems[] = {Tile::monster_egg_Id};
if(!isHintCompleted(e_Tutorial_Hint_Monster_Stone_Egg)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Monster_Stone_Egg, this, monster_eggItems, 1 ) );
int stoneBrickSmoothItems[] = {Tile::stoneBrick_Id};
int stoneBrickSmoothItems[] = {Tile::stonebrick_Id};
if(!isHintCompleted(e_Tutorial_Hint_Stone_Brick_Smooth)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Stone_Brick_Smooth, this, stoneBrickSmoothItems, 1 ) );
int hugeMushroomItems[] = {Tile::hugeMushroom_brown_Id,Tile::hugeMushroom_red_Id};
int hugeMushroomItems[] = {Tile::brown_mushroom_block_Id,Tile::red_mushroom_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_Huge_Mushroom)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Huge_Mushroom, this, hugeMushroomItems, 2 ) );
int ironFenceItems[] = {Tile::ironFence_Id};
if(!isHintCompleted(e_Tutorial_Hint_Iron_Fence)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Iron_Fence, this, ironFenceItems, 1 ) );
int iron_barsItems[] = {Tile::iron_bars_Id};
if(!isHintCompleted(e_Tutorial_Hint_Iron_Fence)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Iron_Fence, this, iron_barsItems, 1 ) );
int thisGlassItems[] = {Tile::thinGlass_Id};
int thisGlassItems[] = {Tile::glass_pane_Id};
if(!isHintCompleted(e_Tutorial_Hint_Thin_Glass)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Thin_Glass, this, thisGlassItems, 1 ) );
int melonItems[] = {Tile::melon_Id};
int melonItems[] = {Tile::melon_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_Melon)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Melon, this, melonItems, 1 ) );
int vineItems[] = {Tile::vine_Id};
if(!isHintCompleted(e_Tutorial_Hint_Vine)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Vine, this, vineItems, 1 ) );
int fenceGateItems[] = {Tile::fenceGate_Id};
int fenceGateItems[] = {Tile::fence_gate_Id};
if(!isHintCompleted(e_Tutorial_Hint_Fence_Gate)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Fence_Gate, this, fenceGateItems, 1 ) );
int mycelItems[] = {Tile::mycel_Id};
int mycelItems[] = {Tile::mycelium_Id};
if(!isHintCompleted(e_Tutorial_Hint_Mycel)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Mycel, this, mycelItems, 1 ) );
int waterLilyItems[] = {Tile::waterLily_Id};
int waterLilyItems[] = {Tile::waterlily_Id};
if(!isHintCompleted(e_Tutorial_Hint_Water_Lily)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Water_Lily, this, waterLilyItems, 1 ) );
int netherBrickItems[] = {Tile::netherBrick_Id};
int netherBrickItems[] = {Tile::nether_brick_Id};
if(!isHintCompleted(e_Tutorial_Hint_Nether_Brick)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Nether_Brick, this, netherBrickItems, 1 ) );
int netherFenceItems[] = {Tile::netherFence_Id};
int netherFenceItems[] = {Tile::nether_brick_fence_Id};
if(!isHintCompleted(e_Tutorial_Hint_Nether_Fence)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Nether_Fence, this, netherFenceItems, 1 ) );
int netherStalkItems[] = {Tile::netherStalk_Id};
int netherStalkItems[] = {Tile::nether_wart_Id};
if(!isHintCompleted(e_Tutorial_Hint_Nether_Stalk)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Nether_Stalk, this, netherStalkItems, 1 ) );
int enchantTableItems[] = {Tile::enchantTable_Id};
int enchantTableItems[] = {Tile::enchanting_table_Id};
if(!isHintCompleted(e_Tutorial_Hint_Enchant_Table)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Enchant_Table, this, enchantTableItems, 1 ) );
int brewingStandItems[] = {Tile::brewingStand_Id};
if(!isHintCompleted(e_Tutorial_Hint_Brewing_Stand)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Brewing_Stand, this, brewingStandItems, 1, Item::brewingStand_Id ) );
int brewingStandItems[] = {Tile::brewing_stand_Id};
if(!isHintCompleted(e_Tutorial_Hint_Brewing_Stand)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Brewing_Stand, this, brewingStandItems, 1, Item::brewing_stand_Id ) );
int cauldronItems[] = {Tile::cauldron_Id};
if(!isHintCompleted(e_Tutorial_Hint_Cauldron)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Cauldron, this, cauldronItems, 1, Item::cauldron_Id ) );
int endPortalItems[] = {Tile::endPortalTile_Id};
int endPortalItems[] = {Tile::end_portal_Id};
if(!isHintCompleted(e_Tutorial_Hint_End_Portal)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_End_Portal, this, endPortalItems, 1, -2 ) );
int endPortalFrameItems[] = {Tile::endPortalFrameTile_Id};
int endPortalFrameItems[] = {Tile::end_portal_frame_Id};
if(!isHintCompleted(e_Tutorial_Hint_End_Portal_Frame)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_End_Portal_Frame, this, endPortalFrameItems, 1 ) );
int whiteStoneItems[] = {Tile::endStone_Id};
int whiteStoneItems[] = {Tile::end_stone_Id};
if(!isHintCompleted(e_Tutorial_Hint_White_Stone)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_White_Stone, this, whiteStoneItems, 1 ) );
int dragonEggItems[] = {Tile::dragonEgg_Id};
int dragonEggItems[] = {Tile::dragon_egg_Id};
if(!isHintCompleted(e_Tutorial_Hint_Dragon_Egg)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Dragon_Egg, this, dragonEggItems, 1 ) );
int redstoneLampItems[] = {Tile::redstoneLight_Id, Tile::redstoneLight_lit_Id};
int redstoneLampItems[] = {Tile::redstone_lamp_Id, Tile::lit_redstone_lamp_Id};
if(!isHintCompleted(e_Tutorial_Hint_RedstoneLamp)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_RedstoneLamp, this, redstoneLampItems, 2 ) );
int cocoaItems[] = {Tile::cocoa_Id};
if(!isHintCompleted(e_Tutorial_Hint_Cocoa)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Cocoa, this, cocoaItems, 1, Item::dye_powder_Id, -1, DyePowderItem::BROWN) );
if(!isHintCompleted(e_Tutorial_Hint_Cocoa)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Cocoa, this, cocoaItems, 1, Item::dye_Id, -1, DyePowderItem::BROWN) );
int emeraldOreItems[] = {Tile::emeraldOre_Id};
int emeraldOreItems[] = {Tile::emerald_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_EmeraldOre)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_EmeraldOre, this, emeraldOreItems, 1 ) );
int emeraldBlockItems[] = {Tile::emeraldBlock_Id};
int emeraldBlockItems[] = {Tile::emerald_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_EmeraldBlock)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_EmeraldBlock, this, emeraldBlockItems, 1 ) );
int enderChestItems[] = {Tile::enderChest_Id};
int enderChestItems[] = {Tile::ender_chest_Id};
if(!isHintCompleted(e_Tutorial_Hint_EnderChest)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_EnderChest, this, enderChestItems, 1 ) );
int tripwireSourceItems[] = {Tile::tripWireSource_Id};
int tripwireSourceItems[] = {Tile::tripwire_hook_Id};
if(!isHintCompleted(e_Tutorial_Hint_TripwireSource)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_TripwireSource, this, tripwireSourceItems, 1 ) );
int tripwireItems[] = {Tile::tripWire_Id};
int tripwireItems[] = {Tile::tripwire_Id};
if(!isHintCompleted(e_Tutorial_Hint_Tripwire)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Tripwire, this, tripwireItems, 1, Item::string_Id ) );
int cobblestoneWallItems[] = {Tile::cobbleWall_Id};
int cobblestoneWallItems[] = {Tile::cobblestone_wall_Id};
if(!isHintCompleted(e_Tutorial_Hint_CobblestoneWall))
{
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_CobblestoneWall, this, cobblestoneWallItems, 1, -1, WallTile::TYPE_NORMAL ) );
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_CobblestoneWall, this, cobblestoneWallItems, 1, -1, WallTile::TYPE_MOSSY ) );
}
int flowerpotItems[] = {Tile::flowerPot_Id};
if(!isHintCompleted(e_Tutorial_Hint_Flowerpot)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Flowerpot, this, flowerpotItems, 1, Item::flowerPot_Id ) );
int flowerpotItems[] = {Tile::flower_pot_Id};
if(!isHintCompleted(e_Tutorial_Hint_Flowerpot)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Flowerpot, this, flowerpotItems, 1, Item::flower_pot_Id ) );
int anvilItems[] = {Tile::anvil_Id};
if(!isHintCompleted(e_Tutorial_Hint_Anvil)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Anvil, this, anvilItems, 1 ) );
int quartzOreItems[] = {Tile::netherQuartz_Id};
int quartzOreItems[] = {Tile::quartz_ore_Id};
if(!isHintCompleted(e_Tutorial_Hint_QuartzOre)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_QuartzOre, this, quartzOreItems, 1 ) );
int quartzBlockItems[] = {Tile::quartzBlock_Id};
int quartzBlockItems[] = {Tile::quartz_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_QuartzBlock))
{
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_QuartzBlock, this, quartzBlockItems, 1, -1, QuartzBlockTile::TYPE_DEFAULT ) );
@ -749,7 +749,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_QuartzBlock, this, quartzBlockItems, 1, -1, QuartzBlockTile::TYPE_LINES_Z ) );
}
int carpetItems[] = {Tile::woolCarpet_Id};
int carpetItems[] = {Tile::carpet_Id};
if(!isHintCompleted(e_Tutorial_Hint_WoolCarpet)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_WoolCarpet, this, carpetItems, 1 ) );
int potatoItems[] = {Tile::potatoes_Id};
@ -758,19 +758,19 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int carrotItems[] = {Tile::carrots_Id};
if(!isHintCompleted(e_Tutorial_Hint_Carrot)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Carrot, this, carrotItems, 1, -1, -1, 7 ) );
int commandBlockItems[] = {Tile::commandBlock_Id};
int commandBlockItems[] = {Tile::command_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_CommandBlock)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_CommandBlock, this, commandBlockItems, 1 ) );
int beaconItems[] = {Tile::beacon_Id};
if(!isHintCompleted(e_Tutorial_Hint_Beacon)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Beacon, this, beaconItems, 1 ) );
int activatorRailItems[] = {Tile::activatorRail_Id};
int activatorRailItems[] = {Tile::activator_rail_Id};
if(!isHintCompleted(e_Tutorial_Hint_Activator_Rail)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Activator_Rail, this, activatorRailItems, 1 ) );
int redstoneBlockItems[] = {Tile::redstoneBlock_Id};
int redstoneBlockItems[] = {Tile::redstone_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_RedstoneBlock)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_RedstoneBlock, this, redstoneBlockItems, 1 ) );
int daylightDetectorItems[] = {Tile::daylightDetector_Id};
int daylightDetectorItems[] = {Tile::daylight_detector_Id};
if(!isHintCompleted(e_Tutorial_Hint_DaylightDetector)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_DaylightDetector, this, daylightDetectorItems, 1 ) );
int dropperItems[] = {Tile::dropper_Id};
@ -779,22 +779,22 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int hopperItems[] = {Tile::hopper_Id};
if(!isHintCompleted(e_Tutorial_Hint_Hopper)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Hopper, this, hopperItems, 1 ) );
int comparatorItems[] = {Tile::comparator_off_Id, Tile::comparator_on_Id};
int comparatorItems[] = {Tile::unpowered_comparator_Id, Tile::powered_comparator_Id};
if(!isHintCompleted(e_Tutorial_Hint_Comparator)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Comparator, this, comparatorItems, 2, Item::comparator_Id ) );
int trappedChestItems[] = {Tile::chest_trap_Id};
if(!isHintCompleted(e_Tutorial_Hint_ChestTrap)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_ChestTrap, this, trappedChestItems, 1 ) );
int hayBlockItems[] = {Tile::hayBlock_Id};
int hayBlockItems[] = {Tile::hay_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_HayBlock)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_HayBlock, this, hayBlockItems, 1 ) );
int clayHardenedItems[] = {Tile::clayHardened_Id};
int clayHardenedItems[] = {Tile::hardened_clay_Id};
if(!isHintCompleted(e_Tutorial_Hint_ClayHardened)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_ClayHardened, this, clayHardenedItems, 1 ) );
int clayHardenedColoredItems[] = {Tile::clayHardened_colored_Id};
int clayHardenedColoredItems[] = {Tile::stained_hardened_clay_Id};
if(!isHintCompleted(e_Tutorial_Hint_ClayHardenedColored)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_ClayHardenedColored, this, clayHardenedColoredItems, 1 ) );
int coalBlockItems[] = {Tile::coalBlock_Id};
int coalBlockItems[] = {Tile::coal_block_Id};
if(!isHintCompleted(e_Tutorial_Hint_CoalBlock)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_CoalBlock, this, coalBlockItems, 1 ) );
/*
@ -833,13 +833,13 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
/*
* ITEM HINTS
*/
int shovelItems[] = {Item::shovel_wood->id, Item::shovel_stone->id, Item::shovel_iron->id, Item::shovel_gold->id, Item::shovel_diamond->id};
int shovelItems[] = {Item::wooden_shovel->id, Item::stone_shovel->id, Item::iron_shovel->id, Item::golden_shovel->id, Item::diamond_shovel->id};
if(!isHintCompleted(e_Tutorial_Hint_Item_Shovel)) addHint(e_Tutorial_State_Gameplay, new DiggerItemHint(e_Tutorial_Hint_Item_Shovel, this, IDS_TUTORIAL_HINT_DIGGER_ITEM_SHOVEL, shovelItems, 5) );
int hatchetItems[] = {Item::hatchet_wood->id, Item::hatchet_stone->id, Item::hatchet_iron->id, Item::hatchet_gold->id, Item::hatchet_diamond->id};
int hatchetItems[] = {Item::wooden_axe->id, Item::stone_axe->id, Item::iron_axe->id, Item::golden_axe->id, Item::diamond_axe->id};
if(!isHintCompleted(e_Tutorial_Hint_Item_Hatchet)) addHint(e_Tutorial_State_Gameplay, new DiggerItemHint(e_Tutorial_Hint_Item_Hatchet, this, IDS_TUTORIAL_HINT_DIGGER_ITEM_HATCHET, hatchetItems, 5 ) );
int pickaxeItems[] = {Item::pickAxe_wood->id, Item::pickAxe_stone->id, Item::pickAxe_iron->id, Item::pickAxe_gold->id, Item::pickAxe_diamond->id};
int pickaxeItems[] = {Item::wooden_pickaxe->id, Item::stone_pickaxe->id, Item::iron_pickaxe->id, Item::golden_pickaxe->id, Item::diamond_pickaxe->id};
if(!isHintCompleted(e_Tutorial_Hint_Item_Pickaxe)) addHint(e_Tutorial_State_Gameplay, new DiggerItemHint(e_Tutorial_Hint_Item_Pickaxe, this, IDS_TUTORIAL_HINT_DIGGER_ITEM_PICKAXE, pickaxeItems, 5 ) );
/*
@ -1993,7 +1993,7 @@ void Tutorial::onSelectedItemChanged(shared_ptr<ItemInstance> item)
{
switch(item->id)
{
case Item::fishingRod_Id:
case Item::fishing_rod_Id:
changeTutorialState(e_Tutorial_State_Fishing);
break;
default:

View file

@ -118,10 +118,12 @@ bool TutorialHint::onLookAtEntity(eINSTANCEOF type)
int TutorialHint::tick()
{
int returnVal = -1;
int tutorialPad = m_tutorial->getPad();
bool hasValidPad = (tutorialPad >= 0 && tutorialPad < XUSER_MAX_COUNT);
switch(m_type)
{
case e_Hint_SwimUp:
if( Minecraft::GetInstance()->localplayers[m_tutorial->getPad()]->isUnderLiquid(Material::water) ) returnVal = m_descriptionId;
if( hasValidPad && Minecraft::GetInstance()->localplayers[tutorialPad] != nullptr && Minecraft::GetInstance()->localplayers[tutorialPad]->isUnderLiquid(Material::water) ) returnVal = m_descriptionId;
break;
}
return returnVal;

View file

@ -1242,37 +1242,37 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
switch(iId)
{
case Item::bow_Id:
case Item::sword_wood_Id:
case Item::sword_stone_Id:
case Item::sword_iron_Id:
case Item::sword_diamond_Id:
case Item::wooden_sword_Id:
case Item::stone_sword_Id:
case Item::iron_sword_Id:
case Item::diamond_sword_Id:
buttonY=eToolTipQuickMoveWeapon;
break;
case Item::helmet_leather_Id:
case Item::chestplate_leather_Id:
case Item::leggings_leather_Id:
case Item::boots_leather_Id:
case Item::leather_helmet_Id:
case Item::leather_chestplate_Id:
case Item::leather_leggings_Id:
case Item::leather_boots_Id:
case Item::helmet_chain_Id:
case Item::chestplate_chain_Id:
case Item::leggings_chain_Id:
case Item::boots_chain_Id:
case Item::chainmail_helmet_Id:
case Item::chainmail_chestplate_Id:
case Item::chainmail_leggings_Id:
case Item::chainmail_boots_Id:
case Item::helmet_iron_Id:
case Item::chestplate_iron_Id:
case Item::leggings_iron_Id:
case Item::boots_iron_Id:
case Item::iron_helmet_Id:
case Item::iron_chestplate_Id:
case Item::iron_leggings_Id:
case Item::iron_boots_Id:
case Item::helmet_diamond_Id:
case Item::chestplate_diamond_Id:
case Item::leggings_diamond_Id:
case Item::boots_diamond_Id:
case Item::diamond_helmet_Id:
case Item::diamond_chestplate_Id:
case Item::diamond_leggings_Id:
case Item::diamond_boots_Id:
case Item::helmet_gold_Id:
case Item::chestplate_gold_Id:
case Item::leggings_gold_Id:
case Item::boots_gold_Id:
case Item::golden_helmet_Id:
case Item::golden_chestplate_Id:
case Item::golden_leggings_Id:
case Item::golden_boots_Id:
case Item::elytra_Id:

View file

@ -269,7 +269,7 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
//pMinecraft->soundEngine->playUI( L"random.pop", 1.0f, 1.0f);
ui.PlayUISFX(eSFX_Craft);
if(pTempItemInst->id != Item::fireworksCharge_Id && pTempItemInst->id != Item::fireworks_Id)
if(pTempItemInst->id != Item::firework_charge_Id && pTempItemInst->id != Item::fireworks_Id)
{
// and remove those resources from your inventory
for(int i=0;i<pRecipeIngredientsRequired[iRecipe].iIngC;i++)
@ -312,16 +312,16 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
//4J Gordon: Achievements
switch(pTempItemInst->id )
{
case Tile::workBench_Id: m_pPlayer->awardStat(GenericStats::buildWorkbench(), GenericStats::param_buildWorkbench()); break;
case Item::pickAxe_wood_Id: m_pPlayer->awardStat(GenericStats::buildPickaxe(), GenericStats::param_buildPickaxe()); break;
case Tile::crafting_table_Id: m_pPlayer->awardStat(GenericStats::buildWorkbench(), GenericStats::param_buildWorkbench()); break;
case Item::wooden_pickaxe_Id: m_pPlayer->awardStat(GenericStats::buildPickaxe(), GenericStats::param_buildPickaxe()); break;
case Tile::furnace_Id: m_pPlayer->awardStat(GenericStats::buildFurnace(), GenericStats::param_buildFurnace()); break;
//case Item::hoe_wood_Id: m_pPlayer->awardStat(GenericStats::buildHoe(), GenericStats::param_buildHoe()); break;
//case Item::wooden_hoe_Id: m_pPlayer->awardStat(GenericStats::buildHoe(), GenericStats::param_buildHoe()); break;
case Item::bread_Id: m_pPlayer->awardStat(GenericStats::makeBread(), GenericStats::param_makeBread()); break;
case Item::cake_Id: m_pPlayer->awardStat(GenericStats::bakeCake(), GenericStats::param_bakeCake()); break;
case Item::pickAxe_stone_Id: m_pPlayer->awardStat(GenericStats::buildBetterPickaxe(), GenericStats::param_buildBetterPickaxe()); break;
//case Item::sword_wood_Id: m_pPlayer->awardStat(GenericStats::buildSword(), GenericStats::param_buildSword()); break;
case Item::stone_pickaxe_Id: m_pPlayer->awardStat(GenericStats::buildBetterPickaxe(), GenericStats::param_buildBetterPickaxe()); break;
//case Item::wooden_sword_Id: m_pPlayer->awardStat(GenericStats::buildSword(), GenericStats::param_buildSword()); break;
case Tile::dispenser_Id: m_pPlayer->awardStat(GenericStats::dispenseWithThis(), GenericStats::param_dispenseWithThis()); break;
case Tile::enchantTable_Id: m_pPlayer->awardStat(GenericStats::enchantments(), GenericStats::param_enchantments()); break;
case Tile::enchanting_table_Id: m_pPlayer->awardStat(GenericStats::enchantments(), GenericStats::param_enchantments()); break;
case Tile::bookshelf_Id: m_pPlayer->awardStat(GenericStats::bookcase(), GenericStats::param_bookcase()); break;
}
switch (pTempItemInst->getItem()->getBaseItemType()) {
@ -1088,7 +1088,7 @@ void IUIScene_CraftingMenu::DisplayIngredients()
{
idescID=IDS_ANY_WOOL;
}
else if((pTempItemInst->id==Item::fireworksCharge_Id) && (id==Item::dye_powder_Id))
else if((pTempItemInst->id==Item::firework_charge_Id) && (id==Item::dye_Id))
{
idescID=IDS_ITEM_DYE_POWDER;
iAuxVal = 1;
@ -1158,7 +1158,7 @@ void IUIScene_CraftingMenu::DisplayIngredients()
{
iAuxVal = 0xFF;
}
else if( pTempItemInst->id==Item::fireworksCharge_Id && id == Item::dye_powder_Id)
else if( pTempItemInst->id==Item::firework_charge_Id && id == Item::dye_Id)
{
iAuxVal = 1;
}

View file

@ -34,9 +34,9 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Tile::dirt_Id, 0)
ITEM(Tile::cobblestone_Id)
ITEM(Tile::sand_Id)
ITEM(Tile::sandStone_Id)
ITEM_AUX(Tile::sandStone_Id, SandStoneTile::TYPE_SMOOTHSIDE)
ITEM_AUX(Tile::sandStone_Id, SandStoneTile::TYPE_HEIROGLYPHS)
ITEM(Tile::sandstone_Id)
ITEM_AUX(Tile::sandstone_Id, SandStoneTile::TYPE_SMOOTHSIDE)
ITEM_AUX(Tile::sandstone_Id, SandStoneTile::TYPE_HEIROGLYPHS)
ITEM_AUX(Tile::sand_Id, SandTile::RED_SAND)
ITEM(Tile::red_sandstone_Id)
ITEM_AUX(Tile::red_sandstone_Id, RedSandStoneTile::TYPE_SMOOTHSIDE)
@ -47,46 +47,46 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Tile::stone_Id, StoneTile::POLISHED_ANDESITE)
ITEM_AUX(Tile::stone_Id, StoneTile::DIORITE)
ITEM_AUX(Tile::stone_Id, StoneTile::POLISHED_DIORITE)
ITEM(Tile::coalBlock_Id)
ITEM(Tile::goldBlock_Id)
ITEM(Tile::ironBlock_Id)
ITEM(Tile::lapisBlock_Id)
ITEM(Tile::diamondBlock_Id)
ITEM(Tile::emeraldBlock_Id)
ITEM_AUX(Tile::quartzBlock_Id,QuartzBlockTile::TYPE_DEFAULT)
ITEM(Tile::coalOre_Id)
ITEM(Tile::lapisOre_Id)
ITEM(Tile::diamondOre_Id)
ITEM(Tile::redStoneOre_Id)
ITEM(Tile::ironOre_Id)
ITEM(Tile::goldOre_Id)
ITEM(Tile::emeraldOre_Id)
ITEM(Tile::netherQuartz_Id)
ITEM(Tile::unbreakable_Id)
ITEM_AUX(Tile::wood_Id,0)
ITEM_AUX(Tile::wood_Id,TreeTile::SPRUCE_TRUNK)
ITEM_AUX(Tile::wood_Id,TreeTile::BIRCH_TRUNK)
ITEM_AUX(Tile::wood_Id,TreeTile::JUNGLE_TRUNK)
ITEM_AUX(Tile::wood_Id, TreeTile::ACACIA_TRUNK)
ITEM_AUX(Tile::wood_Id, TreeTile::DARK_TRUNK)
ITEM_AUX(Tile::treeTrunk_Id, 0)
ITEM_AUX(Tile::treeTrunk_Id, TreeTile::SPRUCE_TRUNK)
ITEM_AUX(Tile::treeTrunk_Id, TreeTile::BIRCH_TRUNK)
ITEM_AUX(Tile::treeTrunk_Id, TreeTile::JUNGLE_TRUNK)
ITEM_AUX(Tile::tree2Trunk_Id, TreeTile2::ACACIA_TRUNK)
ITEM_AUX(Tile::tree2Trunk_Id, TreeTile2::DARK_TRUNK)
ITEM(Tile::coal_block_Id)
ITEM(Tile::gold_block_Id)
ITEM(Tile::iron_block_Id)
ITEM(Tile::lapis_block_Id)
ITEM(Tile::diamond_block_Id)
ITEM(Tile::emerald_block_Id)
ITEM_AUX(Tile::quartz_block_Id,QuartzBlockTile::TYPE_DEFAULT)
ITEM(Tile::coal_ore_Id)
ITEM(Tile::lapis_ore_Id)
ITEM(Tile::diamond_ore_Id)
ITEM(Tile::redstone_ore_Id)
ITEM(Tile::iron_ore_Id)
ITEM(Tile::gold_ore_Id)
ITEM(Tile::emerald_ore_Id)
ITEM(Tile::quartz_ore_Id)
ITEM(Tile::bedrock_Id)
ITEM_AUX(Tile::planks_Id,0)
ITEM_AUX(Tile::planks_Id,TreeTile::SPRUCE_TRUNK)
ITEM_AUX(Tile::planks_Id,TreeTile::BIRCH_TRUNK)
ITEM_AUX(Tile::planks_Id,TreeTile::JUNGLE_TRUNK)
ITEM_AUX(Tile::planks_Id, TreeTile::ACACIA_TRUNK)
ITEM_AUX(Tile::planks_Id, TreeTile::DARK_TRUNK)
ITEM_AUX(Tile::log_Id, 0)
ITEM_AUX(Tile::log_Id, TreeTile::SPRUCE_TRUNK)
ITEM_AUX(Tile::log_Id, TreeTile::BIRCH_TRUNK)
ITEM_AUX(Tile::log_Id, TreeTile::JUNGLE_TRUNK)
ITEM_AUX(Tile::log2_Id, TreeTile2::ACACIA_TRUNK)
ITEM_AUX(Tile::log2_Id, TreeTile2::DARK_TRUNK)
ITEM(Tile::gravel_Id)
ITEM(Tile::redBrick_Id)
ITEM(Tile::mossyCobblestone_Id)
ITEM(Tile::brick_block_Id)
ITEM(Tile::mossy_cobblestone_Id)
ITEM(Tile::obsidian_Id)
ITEM(Tile::clay)
ITEM(Tile::ice_Id)
ITEM(Tile::packedIce_Id)
ITEM(Tile::packed_ice_Id)
ITEM(Tile::snow_Id)
ITEM(Tile::netherRack_Id)
ITEM(Tile::soulsand_Id)
ITEM(Tile::netherrack_Id)
ITEM(Tile::soul_sand_Id)
ITEM(Tile::glowstone_Id)
ITEM(Tile::seaLantern_Id)
ITEM(Tile::sea_lantern_Id)
ITEM_AUX(Tile::prismarine_Id, PrismarineTile::TYPE_DEFAULT)
ITEM_AUX(Tile::prismarine_Id, PrismarineTile::TYPE_BRICKS)
ITEM_AUX(Tile::prismarine_Id, PrismarineTile::TYPE_DARK)
@ -94,104 +94,104 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Tile::fence_Id)
// TU25
ITEM(Tile::spruceFence_Id)
ITEM(Tile::birchFence_Id)
ITEM(Tile::jungleFence_Id)
ITEM(Tile::acaciaFence_Id)
ITEM(Tile::darkFence_Id)
ITEM(Tile::spruce_fence_Id)
ITEM(Tile::birch_fence_Id)
ITEM(Tile::jungle_fence_Id)
ITEM(Tile::acacia_fence_Id)
ITEM(Tile::dark_oak_fence_Id)
ITEM(Tile::netherFence_Id)
ITEM(Tile::ironFence_Id)
ITEM_AUX(Tile::cobbleWall_Id, WallTile::TYPE_NORMAL)
ITEM_AUX(Tile::cobbleWall_Id, WallTile::TYPE_MOSSY)
ITEM_AUX(Tile::stoneBrick_Id,SmoothStoneBrickTile::TYPE_DEFAULT)
ITEM_AUX(Tile::stoneBrick_Id,SmoothStoneBrickTile::TYPE_MOSSY)
ITEM_AUX(Tile::stoneBrick_Id,SmoothStoneBrickTile::TYPE_CRACKED)
ITEM_AUX(Tile::stoneBrick_Id,SmoothStoneBrickTile::TYPE_DETAIL)
ITEM_AUX(Tile::monsterStoneEgg_Id,StoneMonsterTile::HOST_ROCK)
ITEM_AUX(Tile::monsterStoneEgg_Id,StoneMonsterTile::HOST_COBBLE)
ITEM_AUX(Tile::monsterStoneEgg_Id,StoneMonsterTile::HOST_STONEBRICK)
ITEM(Tile::mycel_Id)
ITEM(Tile::nether_brick_fence_Id)
ITEM(Tile::iron_bars_Id)
ITEM_AUX(Tile::cobblestone_wall_Id, WallTile::TYPE_NORMAL)
ITEM_AUX(Tile::cobblestone_wall_Id, WallTile::TYPE_MOSSY)
ITEM_AUX(Tile::stonebrick_Id,SmoothStoneBrickTile::TYPE_DEFAULT)
ITEM_AUX(Tile::stonebrick_Id,SmoothStoneBrickTile::TYPE_MOSSY)
ITEM_AUX(Tile::stonebrick_Id,SmoothStoneBrickTile::TYPE_CRACKED)
ITEM_AUX(Tile::stonebrick_Id,SmoothStoneBrickTile::TYPE_DETAIL)
ITEM_AUX(Tile::monster_egg_Id,StoneMonsterTile::HOST_ROCK)
ITEM_AUX(Tile::monster_egg_Id,StoneMonsterTile::HOST_COBBLE)
ITEM_AUX(Tile::monster_egg_Id,StoneMonsterTile::HOST_STONEBRICK)
ITEM(Tile::mycelium_Id)
ITEM_AUX(Tile::dirt_Id, DirtTile::COARSE_DIRT)
ITEM_AUX(Tile::dirt_Id, DirtTile::PODZOL)
ITEM(Tile::netherBrick_Id)
ITEM(Tile::endStone_Id)
ITEM_AUX(Tile::quartzBlock_Id,QuartzBlockTile::TYPE_CHISELED)
ITEM_AUX(Tile::quartzBlock_Id,QuartzBlockTile::TYPE_LINES_Y)
ITEM(Tile::nether_brick_Id)
ITEM(Tile::end_stone_Id)
ITEM_AUX(Tile::quartz_block_Id,QuartzBlockTile::TYPE_CHISELED)
ITEM_AUX(Tile::quartz_block_Id,QuartzBlockTile::TYPE_LINES_Y)
ITEM(Tile::trapdoor_Id)
ITEM(Tile::iron_trapdoor_Id)
ITEM(Tile::fenceGate_Id)
ITEM(Tile::fence_gate_Id)
// TU25
ITEM(Tile::spruceGate_Id)
ITEM(Tile::birchGate_Id)
ITEM(Tile::jungleGate_Id)
ITEM(Tile::acaciaGate_Id)
ITEM(Tile::darkGate_Id)
ITEM(Tile::spruce_fence_gate_Id)
ITEM(Tile::birch_fence_gate_Id)
ITEM(Tile::jungle_fence_gate_Id)
ITEM(Tile::acacia_fence_gate_Id)
ITEM(Tile::dark_oak_fence_gate_Id)
ITEM(Item::door_wood_Id)
ITEM(Item::door_iron_Id)
ITEM(Item::wooden_door_Id)
ITEM(Item::iron_door_Id)
// TU25
ITEM(Item::door_spruce_Id)
ITEM(Item::door_birch_Id)
ITEM(Item::door_jungle_Id)
ITEM(Item::door_acacia_Id)
ITEM(Item::door_dark_Id)
ITEM(Item::spruce_door_Id)
ITEM(Item::birch_door_Id)
ITEM(Item::jungle_door_Id)
ITEM(Item::acacia_door_Id)
ITEM(Item::dark_oak_door_Id)
ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::STONE_SLAB)
ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::SAND_SLAB)
ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::STONE_SLAB)
ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::SAND_SLAB)
// AP - changed oak slab to be wood because it wouldn't burn
// ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::WOOD_SLAB)
ITEM_AUX(Tile::woodSlabHalf_Id,0)
ITEM_AUX(Tile::woodSlabHalf_Id, TreeTile::SPRUCE_TRUNK)
ITEM_AUX(Tile::woodSlabHalf_Id,TreeTile::BIRCH_TRUNK)
ITEM_AUX(Tile::woodSlabHalf_Id,TreeTile::JUNGLE_TRUNK)
// ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::WOOD_SLAB)
ITEM_AUX(Tile::wooden_slab_Id,0)
ITEM_AUX(Tile::wooden_slab_Id, TreeTile::SPRUCE_TRUNK)
ITEM_AUX(Tile::wooden_slab_Id,TreeTile::BIRCH_TRUNK)
ITEM_AUX(Tile::wooden_slab_Id,TreeTile::JUNGLE_TRUNK)
// TU25 -- added acacia and dark oak
ITEM_AUX(Tile::woodSlabHalf_Id, TreeTile::ACACIA_TRUNK)
ITEM_AUX(Tile::woodSlabHalf_Id, TreeTile::DARK_TRUNK)
ITEM_AUX(Tile::wooden_slab_Id, TreeTile::ACACIA_TRUNK)
ITEM_AUX(Tile::wooden_slab_Id, TreeTile::DARK_TRUNK)
ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::COBBLESTONE_SLAB)
ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::BRICK_SLAB)
ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::SMOOTHBRICK_SLAB)
ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::NETHERBRICK_SLAB)
ITEM_AUX(Tile::stoneSlabHalf_Id,StoneSlabTile::QUARTZ_SLAB)
ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::COBBLESTONE_SLAB)
ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::BRICK_SLAB)
ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::SMOOTHBRICK_SLAB)
ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::NETHERBRICK_SLAB)
ITEM_AUX(Tile::stone_slab_Id,StoneSlabTile::QUARTZ_SLAB)
ITEM_AUX(Tile::stone_slab2_Id ,StoneSlabTile2::RED_SANDSTONE_SLAB)
ITEM(Tile::stairs_wood_Id)
ITEM(Tile::stairs_birchwood_Id)
ITEM(Tile::stairs_sprucewood_Id)
ITEM(Tile::stairs_junglewood_Id)
ITEM(Tile::stairs_acaciawood_Id)
ITEM(Tile::stairs_darkwood_Id)
ITEM(Tile::stairs_stone_Id)
ITEM(Tile::stairs_bricks_Id)
ITEM(Tile::stairs_stoneBrick_Id)
ITEM(Tile::stairs_netherBricks_Id)
ITEM(Tile::stairs_sandstone_Id)
ITEM(Tile::oak_stairs_Id)
ITEM(Tile::birch_stairs_Id)
ITEM(Tile::spruce_stairs_Id)
ITEM(Tile::jungle_stairs_Id)
ITEM(Tile::acacia_stairs_Id)
ITEM(Tile::dark_oak_stairs_Id)
ITEM(Tile::stone_stairs_Id)
ITEM(Tile::brick_stairs_Id)
ITEM(Tile::stone_brick_stairs_Id)
ITEM(Tile::nether_brick_stairs_Id)
ITEM(Tile::sandstone_stairs_Id)
ITEM(Tile::stairs_red_sandstone)
ITEM(Tile::stairs_quartz_Id)
ITEM(Tile::quartz_stairs_Id)
ITEM(Tile::clayHardened_Id)
ITEM_AUX(Tile::clayHardened_colored_Id,14) // Red
ITEM_AUX(Tile::clayHardened_colored_Id,1) // Orange
ITEM_AUX(Tile::clayHardened_colored_Id,4) // Yellow
ITEM_AUX(Tile::clayHardened_colored_Id,5) // Lime
ITEM_AUX(Tile::clayHardened_colored_Id,3) // Light Blue
ITEM_AUX(Tile::clayHardened_colored_Id,9) // Cyan
ITEM_AUX(Tile::clayHardened_colored_Id,11) // Blue
ITEM_AUX(Tile::clayHardened_colored_Id,10) // Purple
ITEM_AUX(Tile::clayHardened_colored_Id,2) // Magenta
ITEM_AUX(Tile::clayHardened_colored_Id,6) // Pink
ITEM_AUX(Tile::clayHardened_colored_Id,0) // White
ITEM_AUX(Tile::clayHardened_colored_Id,8) // Light Gray
ITEM_AUX(Tile::clayHardened_colored_Id,7) // Gray
ITEM_AUX(Tile::clayHardened_colored_Id,15) // Black
ITEM_AUX(Tile::clayHardened_colored_Id,13) // Green
ITEM_AUX(Tile::clayHardened_colored_Id,12) // Brown
ITEM(Tile::hardened_clay_Id)
ITEM_AUX(Tile::stained_hardened_clay_Id,14) // Red
ITEM_AUX(Tile::stained_hardened_clay_Id,1) // Orange
ITEM_AUX(Tile::stained_hardened_clay_Id,4) // Yellow
ITEM_AUX(Tile::stained_hardened_clay_Id,5) // Lime
ITEM_AUX(Tile::stained_hardened_clay_Id,3) // Light Blue
ITEM_AUX(Tile::stained_hardened_clay_Id,9) // Cyan
ITEM_AUX(Tile::stained_hardened_clay_Id,11) // Blue
ITEM_AUX(Tile::stained_hardened_clay_Id,10) // Purple
ITEM_AUX(Tile::stained_hardened_clay_Id,2) // Magenta
ITEM_AUX(Tile::stained_hardened_clay_Id,6) // Pink
ITEM_AUX(Tile::stained_hardened_clay_Id,0) // White
ITEM_AUX(Tile::stained_hardened_clay_Id,8) // Light Gray
ITEM_AUX(Tile::stained_hardened_clay_Id,7) // Gray
ITEM_AUX(Tile::stained_hardened_clay_Id,15) // Black
ITEM_AUX(Tile::stained_hardened_clay_Id,13) // Green
ITEM_AUX(Tile::stained_hardened_clay_Id,12) // Brown
// Decoration
DEF(eCreativeInventory_Decoration)
@ -202,9 +202,9 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Item::skull_Id,SkullTileEntity::TYPE_CREEPER)
ITEM_AUX(Tile::sponge_Id, 0) // dry sponge
ITEM_AUX(Tile::sponge_Id, 1) // wet sponge
ITEM(Tile::melon_Id)
ITEM(Tile::melon_block_Id)
ITEM(Tile::pumpkin_Id)
ITEM(Tile::litPumpkin_Id)
ITEM(Tile::lit_pumpkin_Id)
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_DEFAULT)
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_EVERGREEN)
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_BIRCH)
@ -218,42 +218,42 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Tile::leaves2_Id, LeafTile2::ACACIA_LEAF)
ITEM_AUX(Tile::leaves2_Id, LeafTile2::DARK_OAK_LEAF)
ITEM(Tile::vine)
ITEM(Tile::waterLily_Id)
ITEM(Tile::waterlily_Id)
ITEM(Tile::torch_Id)
ITEM_AUX(Tile::tallgrass_Id, TallGrass::DEAD_SHRUB)
ITEM_AUX(Tile::tallgrass_Id, TallGrass::TALL_GRASS)
ITEM_AUX(Tile::tallgrass_Id, TallGrass::FERN)
ITEM(Tile::deadBush_Id)
ITEM(Tile::flower_Id)
ITEM(Tile::rose_Id)
ITEM_AUX(Tile::rose_Id, Rose::BLUE_ORCHID)
ITEM_AUX(Tile::rose_Id, Rose::ALLIUM)
ITEM_AUX(Tile::rose_Id, Rose::AZURE_BLUET)
ITEM_AUX(Tile::rose_Id, Rose::RED_TULIP)
ITEM_AUX(Tile::rose_Id, Rose::ORANGE_TULIP)
ITEM_AUX(Tile::rose_Id, Rose::WHITE_TULIP)
ITEM_AUX(Tile::rose_Id, Rose::PINK_TULIP)
ITEM_AUX(Tile::rose_Id, Rose::OXEYE_DAISY)
ITEM(Tile::deadbush_Id)
ITEM(Tile::yellow_flower_Id)
ITEM(Tile::red_flower_Id)
ITEM_AUX(Tile::red_flower_Id, Rose::BLUE_ORCHID)
ITEM_AUX(Tile::red_flower_Id, Rose::ALLIUM)
ITEM_AUX(Tile::red_flower_Id, Rose::AZURE_BLUET)
ITEM_AUX(Tile::red_flower_Id, Rose::RED_TULIP)
ITEM_AUX(Tile::red_flower_Id, Rose::ORANGE_TULIP)
ITEM_AUX(Tile::red_flower_Id, Rose::WHITE_TULIP)
ITEM_AUX(Tile::red_flower_Id, Rose::PINK_TULIP)
ITEM_AUX(Tile::red_flower_Id, Rose::OXEYE_DAISY)
ITEM(Tile::tallgrass2_Id)
ITEM_AUX(Tile::tallgrass2_Id, TallGrass2::LILAC)
ITEM_AUX(Tile::tallgrass2_Id, TallGrass2::TALL_GRASS)
ITEM_AUX(Tile::tallgrass2_Id, TallGrass2::LARGE_FERN)
ITEM_AUX(Tile::tallgrass2_Id, TallGrass2::ROSE_BUSH)
ITEM_AUX(Tile::tallgrass2_Id, TallGrass2::PEONY)
ITEM_AUX(Tile::double_plant_Id, TallGrass2::LILAC)
ITEM_AUX(Tile::double_plant_Id, TallGrass2::TALL_GRASS)
ITEM_AUX(Tile::double_plant_Id, TallGrass2::LARGE_FERN)
ITEM_AUX(Tile::double_plant_Id, TallGrass2::ROSE_BUSH)
ITEM_AUX(Tile::double_plant_Id, TallGrass2::PEONY)
ITEM(Tile::mushroom_brown_Id)
ITEM(Tile::mushroom_red_Id)
ITEM(Tile::cactus_Id)
ITEM(Tile::topSnow_Id)
ITEM(Tile::snow_layer_Id)
// 4J-PB - Already got sugar cane in Materials ITEM_11(Tile::reeds_Id)
ITEM(Tile::web_Id)
ITEM(Tile::thinGlass_Id)
ITEM(Tile::glass_pane_Id)
ITEM(Tile::glass_Id)
ITEM(Item::painting_Id)
ITEM(Item::itemFrame_Id)
ITEM(Item::sign_Id)
ITEM(Item::item_frame_Id)
ITEM(Item::standing_sign_Id)
ITEM(Tile::bookshelf_Id)
ITEM(Item::flowerPot_Id)
ITEM(Tile::hayBlock_Id)
ITEM(Item::flower_pot_Id)
ITEM(Tile::hay_block_Id)
ITEM_AUX(Tile::wool_Id,14) // Red
ITEM_AUX(Tile::wool_Id,1) // Orange
ITEM_AUX(Tile::wool_Id,4) // Yellow
@ -271,22 +271,22 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Tile::wool_Id,13) // Green
ITEM_AUX(Tile::wool_Id,12) // Brown
ITEM_AUX(Tile::woolCarpet_Id,14) // Red
ITEM_AUX(Tile::woolCarpet_Id,1) // Orange
ITEM_AUX(Tile::woolCarpet_Id,4) // Yellow
ITEM_AUX(Tile::woolCarpet_Id,5) // Lime
ITEM_AUX(Tile::woolCarpet_Id,3) // Light Blue
ITEM_AUX(Tile::woolCarpet_Id,9) // Cyan
ITEM_AUX(Tile::woolCarpet_Id,11) // Blue
ITEM_AUX(Tile::woolCarpet_Id,10) // Purple
ITEM_AUX(Tile::woolCarpet_Id,2) // Magenta
ITEM_AUX(Tile::woolCarpet_Id,6) // Pink
ITEM_AUX(Tile::woolCarpet_Id,0) // White
ITEM_AUX(Tile::woolCarpet_Id,8) // Light Gray
ITEM_AUX(Tile::woolCarpet_Id,7) // Gray
ITEM_AUX(Tile::woolCarpet_Id,15) // Black
ITEM_AUX(Tile::woolCarpet_Id,13) // Green
ITEM_AUX(Tile::woolCarpet_Id,12) // Brown
ITEM_AUX(Tile::carpet_Id,14) // Red
ITEM_AUX(Tile::carpet_Id,1) // Orange
ITEM_AUX(Tile::carpet_Id,4) // Yellow
ITEM_AUX(Tile::carpet_Id,5) // Lime
ITEM_AUX(Tile::carpet_Id,3) // Light Blue
ITEM_AUX(Tile::carpet_Id,9) // Cyan
ITEM_AUX(Tile::carpet_Id,11) // Blue
ITEM_AUX(Tile::carpet_Id,10) // Purple
ITEM_AUX(Tile::carpet_Id,2) // Magenta
ITEM_AUX(Tile::carpet_Id,6) // Pink
ITEM_AUX(Tile::carpet_Id,0) // White
ITEM_AUX(Tile::carpet_Id,8) // Light Gray
ITEM_AUX(Tile::carpet_Id,7) // Gray
ITEM_AUX(Tile::carpet_Id,15) // Black
ITEM_AUX(Tile::carpet_Id,13) // Green
ITEM_AUX(Tile::carpet_Id,12) // Brown
ITEM_AUX(Tile::stained_glass_Id,14) // Red
ITEM_AUX(Tile::stained_glass_Id,1) // Orange
@ -348,40 +348,40 @@ void IUIScene_CreativeMenu::staticCtor()
DEF(eCreativeInventory_Redstone)
ITEM(Tile::dispenser_Id)
ITEM(Tile::noteblock_Id)
ITEM(Tile::pistonBase_Id)
ITEM(Tile::pistonStickyBase_Id)
ITEM(Tile::piston_Id)
ITEM(Tile::sticky_piston_Id)
ITEM(Tile::tnt_Id)
ITEM(Tile::lever_Id)
ITEM(Tile::button_stone_Id)
ITEM(Tile::button_wood_Id)
ITEM(Tile::pressurePlate_stone_Id)
ITEM(Tile::pressurePlate_wood_Id)
ITEM(Item::redStone_Id)
ITEM(Tile::redstoneBlock_Id)
ITEM(Tile::redstoneTorch_on_Id)
ITEM(Tile::stone_button_Id)
ITEM(Tile::wooden_button_Id)
ITEM(Tile::stone_pressure_plate_Id)
ITEM(Tile::wooden_pressure_plate_Id)
ITEM(Item::redstone_Id)
ITEM(Tile::redstone_block_Id)
ITEM(Tile::redstone_torch_Id)
ITEM(Item::repeater_Id)
ITEM(Tile::redstoneLight_Id)
ITEM(Tile::tripWireSource_Id)
ITEM(Tile::daylightDetector_Id)
ITEM(Tile::redstone_lamp_Id)
ITEM(Tile::tripwire_hook_Id)
ITEM(Tile::daylight_detector_Id)
ITEM(Tile::dropper_Id)
ITEM(Tile::hopper_Id)
ITEM(Item::comparator_Id)
ITEM(Tile::chest_trap_Id)
ITEM(Tile::weightedPlate_heavy_Id)
ITEM(Tile::weightedPlate_light_Id)
ITEM(Tile::heavy_weighted_pressure_plate_Id)
ITEM(Tile::light_weighted_pressure_plate_Id)
// Transport
DEF(eCreativeInventory_Transport)
ITEM(Tile::rail_Id)
ITEM(Tile::goldenRail_Id)
ITEM(Tile::detectorRail_Id)
ITEM(Tile::activatorRail_Id)
ITEM(Tile::golden_rail_Id)
ITEM(Tile::detector_rail_Id)
ITEM(Tile::activator_rail_Id)
ITEM(Tile::ladder_Id)
ITEM(Item::minecart_Id)
ITEM(Item::minecart_chest_Id)
ITEM(Item::minecart_furnace_Id)
ITEM(Item::minecart_hopper_Id)
ITEM(Item::minecart_tnt_Id)
ITEM(Item::chest_minecart_Id)
ITEM(Item::furnace_minecart_Id)
ITEM(Item::hopper_minecart_Id)
ITEM(Item::tnt_minecart_Id)
ITEM(Item::saddle_Id)
ITEM(Item::boat_Id)
ITEM(Item::elytra_Id)
@ -389,76 +389,76 @@ void IUIScene_CreativeMenu::staticCtor()
// Miscellaneous
DEF(eCreativeInventory_Misc)
ITEM(Tile::chest_Id)
ITEM(Tile::enderChest_Id)
ITEM(Tile::workBench_Id)
ITEM(Tile::ender_chest_Id)
ITEM(Tile::crafting_table_Id)
ITEM(Tile::furnace_Id)
ITEM(Item::brewingStand_Id)
ITEM(Tile::enchantTable_Id)
ITEM(Item::brewing_stand_Id)
ITEM(Tile::enchanting_table_Id)
ITEM(Tile::beacon_Id)
ITEM(Tile::endPortalFrameTile_Id)
ITEM(Tile::end_portal_frame_Id)
ITEM(Tile::jukebox_Id)
ITEM(Tile::anvil_Id);
ITEM(Item::bed_Id)
ITEM(Item::bucket_empty_Id)
ITEM(Item::bucket_lava_Id)
ITEM(Item::bucket_water_Id)
ITEM(Item::bucket_milk_Id)
ITEM(Item::bucket_Id)
ITEM(Item::lava_bucket_Id)
ITEM(Item::water_bucket_Id)
ITEM(Item::milk_bucket_Id)
ITEM(Item::cauldron_Id)
ITEM(Item::snowBall_Id)
ITEM(Item::snowball_Id)
ITEM(Item::paper_Id)
ITEM(Item::book_Id)
//TU25
ITEM(Item::writingBook_Id)
ITEM(Item::writable_book_Id)
ITEM(Item::enderPearl_Id)
ITEM(Item::eyeOfEnder_Id)
ITEM(Item::nameTag_Id)
ITEM(Item::netherStar_Id)
ITEM_AUX(Item::spawnEgg_Id, 50); // Creeper
ITEM_AUX(Item::spawnEgg_Id, 51); // Skeleton
ITEM_AUX(Item::spawnEgg_Id, 52); // Spider
ITEM_AUX(Item::spawnEgg_Id, 54); // Zombie
ITEM_AUX(Item::spawnEgg_Id, 55); // Slime
ITEM_AUX(Item::spawnEgg_Id, 56); // Ghast
ITEM_AUX(Item::spawnEgg_Id, 57); // Zombie Pigman
ITEM_AUX(Item::spawnEgg_Id, 58); // Enderman
ITEM_AUX(Item::spawnEgg_Id, 59); // Cave Spider
ITEM_AUX(Item::spawnEgg_Id, 60); // Silverfish
ITEM_AUX(Item::spawnEgg_Id, 61); // Blaze
ITEM_AUX(Item::spawnEgg_Id, 62); // Magma Cube
ITEM_AUX(Item::spawnEgg_Id, 65); // Bat
ITEM_AUX(Item::spawnEgg_Id, 66); // Witch
ITEM(Item::ender_pearl_Id)
ITEM(Item::eye_of_ender_Id)
ITEM(Item::name_tag_Id)
ITEM(Item::nether_star_Id)
ITEM_AUX(Item::spawn_egg_Id, 50); // Creeper
ITEM_AUX(Item::spawn_egg_Id, 51); // Skeleton
ITEM_AUX(Item::spawn_egg_Id, 52); // Spider
ITEM_AUX(Item::spawn_egg_Id, 54); // Zombie
ITEM_AUX(Item::spawn_egg_Id, 55); // Slime
ITEM_AUX(Item::spawn_egg_Id, 56); // Ghast
ITEM_AUX(Item::spawn_egg_Id, 57); // Zombie Pigman
ITEM_AUX(Item::spawn_egg_Id, 58); // Enderman
ITEM_AUX(Item::spawn_egg_Id, 59); // Cave Spider
ITEM_AUX(Item::spawn_egg_Id, 60); // Silverfish
ITEM_AUX(Item::spawn_egg_Id, 61); // Blaze
ITEM_AUX(Item::spawn_egg_Id, 62); // Magma Cube
ITEM_AUX(Item::spawn_egg_Id, 65); // Bat
ITEM_AUX(Item::spawn_egg_Id, 66); // Witch
ITEM_AUX(Item::spawnEgg_Id, 67); // Endermite
ITEM_AUX(Item::spawnEgg_Id, 68); // Guardian
ITEM_AUX(Item::spawnEgg_Id, 4); // Elder Guardian
ITEM_AUX(Item::spawnEgg_Id, 90); // Pig
ITEM_AUX(Item::spawnEgg_Id, 91); // Sheep
ITEM_AUX(Item::spawnEgg_Id, 92); // Cow
ITEM_AUX(Item::spawnEgg_Id, 93); // Chicken
ITEM_AUX(Item::spawnEgg_Id, 94); // Squid
ITEM_AUX(Item::spawnEgg_Id, 95); // Wolf
ITEM_AUX(Item::spawnEgg_Id, 96); // Mooshroom
ITEM_AUX(Item::spawnEgg_Id, 98); // Ozelot
ITEM_AUX(Item::spawnEgg_Id, 100); // Horse
ITEM_AUX(Item::spawn_egg_Id, 67); // Endermite
ITEM_AUX(Item::spawn_egg_Id, 68); // Guardian
ITEM_AUX(Item::spawn_egg_Id, 4); // Elder Guardian
ITEM_AUX(Item::spawn_egg_Id, 90); // Pig
ITEM_AUX(Item::spawn_egg_Id, 91); // Sheep
ITEM_AUX(Item::spawn_egg_Id, 92); // Cow
ITEM_AUX(Item::spawn_egg_Id, 93); // Chicken
ITEM_AUX(Item::spawn_egg_Id, 94); // Squid
ITEM_AUX(Item::spawn_egg_Id, 95); // Wolf
ITEM_AUX(Item::spawn_egg_Id, 96); // Mooshroom
ITEM_AUX(Item::spawn_egg_Id, 98); // Ozelot
ITEM_AUX(Item::spawn_egg_Id, 100); // Horse
ITEM_AUX(Item::spawnEgg_Id, 100 | ((EntityHorse::TYPE_DONKEY + 1) << 12) ); // Donkey
ITEM_AUX(Item::spawnEgg_Id, 100 | ((EntityHorse::TYPE_MULE + 1) << 12)); // Mule
ITEM_AUX(Item::spawnEgg_Id, 120); // Villager
ITEM_AUX(Item::spawnEgg_Id, 101); // Rabbit Brown
ITEM(Item::record_01_Id)
ITEM(Item::record_02_Id)
ITEM(Item::record_03_Id)
ITEM(Item::record_04_Id)
ITEM(Item::record_05_Id)
ITEM(Item::record_06_Id)
ITEM(Item::record_07_Id)
ITEM(Item::record_08_Id)
ITEM(Item::record_09_Id)
ITEM(Item::record_10_Id)
ITEM_AUX(Item::spawn_egg_Id, 100 | ((EntityHorse::TYPE_DONKEY + 1) << 12) ); // Donkey
ITEM_AUX(Item::spawn_egg_Id, 100 | ((EntityHorse::TYPE_MULE + 1) << 12)); // Mule
ITEM_AUX(Item::spawn_egg_Id, 120); // Villager
ITEM_AUX(Item::spawn_egg_Id, 101); // Rabbit Brown
ITEM(Item::record_13_Id)
ITEM(Item::record_cat_Id)
ITEM(Item::record_blocks_Id)
ITEM(Item::record_chirp_Id)
ITEM(Item::record_far_Id)
ITEM(Item::record_mall_Id)
ITEM(Item::record_mellohi_Id)
ITEM(Item::record_stal_Id)
ITEM(Item::record_strad_Id)
ITEM(Item::record_ward_Id)
ITEM(Item::record_11_Id)
ITEM(Item::record_12_Id)
ITEM(Item::record_wait_Id)
BuildFirework(list, FireworksItem::TYPE_SMALL, DyePowderItem::LIGHT_BLUE, 1, true, false);
BuildFirework(list, FireworksItem::TYPE_CREEPER, DyePowderItem::GREEN, 2, false, false);
@ -470,119 +470,119 @@ void IUIScene_CreativeMenu::staticCtor()
DEF(eCreativeInventory_ArtToolsMisc)
if(app.DebugSettingsOn())
{
ITEM_AUX(Item::spawnEgg_Id, 100 | ((EntityHorse::TYPE_SKELETON + 1) << 12)); // Skeleton
ITEM_AUX(Item::spawnEgg_Id, 100 | ((EntityHorse::TYPE_UNDEAD + 1) << 12)); // Zombie
ITEM_AUX(Item::spawnEgg_Id, 98 | ((Ocelot::TYPE_BLACK + 1) << 12));
ITEM_AUX(Item::spawnEgg_Id, 98 | ((Ocelot::TYPE_RED + 1) << 12));
ITEM_AUX(Item::spawnEgg_Id, 98 | ((Ocelot::TYPE_SIAMESE + 1) << 12));
ITEM_AUX(Item::spawnEgg_Id, 52 | (2 << 12)); // Spider-Jockey
ITEM_AUX(Item::spawnEgg_Id, 63); // Enderdragon
ITEM_AUX(Item::spawn_egg_Id, 100 | ((EntityHorse::TYPE_SKELETON + 1) << 12)); // Skeleton
ITEM_AUX(Item::spawn_egg_Id, 100 | ((EntityHorse::TYPE_UNDEAD + 1) << 12)); // Zombie
ITEM_AUX(Item::spawn_egg_Id, 98 | ((Ocelot::TYPE_BLACK + 1) << 12));
ITEM_AUX(Item::spawn_egg_Id, 98 | ((Ocelot::TYPE_RED + 1) << 12));
ITEM_AUX(Item::spawn_egg_Id, 98 | ((Ocelot::TYPE_SIAMESE + 1) << 12));
ITEM_AUX(Item::spawn_egg_Id, 52 | (2 << 12)); // Spider-Jockey
ITEM_AUX(Item::spawn_egg_Id, 63); // Enderdragon
}
// Food
DEF(eCreativeInventory_Food)
ITEM(Item::apple_Id)
ITEM(Item::apple_gold_Id)
ITEM_AUX(Item::apple_gold_Id,1) // Enchanted
ITEM(Item::melon_Id)
ITEM(Item::mushroomStew_Id)
ITEM(Item::rabbitStew_Id)
ITEM(Item::golden_apple_Id)
ITEM_AUX(Item::golden_apple_Id,1) // Enchanted
ITEM(Item::melon_block_Id)
ITEM(Item::mushroom_stew_Id)
ITEM(Item::rabbit_stew_Id)
ITEM(Item::bread_Id)
ITEM(Item::cake_Id)
ITEM(Item::cookie_Id)
ITEM(Item::fish_cooked_Id)
ITEM(Item::fish_raw_Id)
ITEM(Item::cooked_fish_Id)
ITEM(Item::fish_Id)
ITEM_AUX(Item::fish_cooked_Id, 1)
ITEM_AUX(Item::fish_raw_Id, 1)
ITEM_AUX(Item::fish_raw_Id, 2)
ITEM_AUX(Item::fish_raw_Id, 3)
ITEM_AUX(Item::cooked_fish_Id, 1)
ITEM_AUX(Item::fish_Id, 1)
ITEM_AUX(Item::fish_Id, 2)
ITEM_AUX(Item::fish_Id, 3)
ITEM(Item::porkChop_cooked_Id)
ITEM(Item::porkChop_raw_Id)
ITEM(Item::beef_cooked_Id)
ITEM(Item::beef_raw_Id)
ITEM(Item::chicken_raw_Id)
ITEM(Item::chicken_cooked_Id)
ITEM(Item::mutton_raw_Id)
ITEM(Item::mutton_cooked_Id)
ITEM(Item::rabbit_raw_Id)
ITEM(Item::rabbit_cooked_Id)
ITEM(Item::cooked_porkchop_Id)
ITEM(Item::porkchop_Id)
ITEM(Item::cooked_beef_Id)
ITEM(Item::beef_Id)
ITEM(Item::chicken_Id)
ITEM(Item::cooked_chicken_Id)
ITEM(Item::mutton_Id)
ITEM(Item::cooked_mutton_Id)
ITEM(Item::rabbit_Id)
ITEM(Item::cooked_rabbit_Id)
ITEM(Item::rotten_flesh_Id)
ITEM(Item::spiderEye_Id)
ITEM(Item::spider_eye_Id)
ITEM(Item::potato_Id)
ITEM(Item::potatoBaked_Id)
ITEM(Item::potatoPoisonous_Id)
ITEM(Item::carrots_Id)
ITEM(Item::carrotGolden_Id)
ITEM(Item::pumpkinPie_Id)
ITEM(Item::baked_potato_Id)
ITEM(Item::poisonous_potato_Id)
ITEM(Item::carrot_Id)
ITEM(Item::golden_carrot_Id)
ITEM(Item::pumpkin_pie_Id)
// Tools, Armour and Weapons (Complete)
DEF(eCreativeInventory_ToolsArmourWeapons)
ITEM(Item::compass_Id)
ITEM(Item::helmet_leather_Id)
ITEM(Item::chestplate_leather_Id)
ITEM(Item::leggings_leather_Id)
ITEM(Item::boots_leather_Id)
ITEM(Item::sword_wood_Id)
ITEM(Item::shovel_wood_Id)
ITEM(Item::pickAxe_wood_Id)
ITEM(Item::hatchet_wood_Id)
ITEM(Item::hoe_wood_Id)
ITEM(Item::leather_helmet_Id)
ITEM(Item::leather_chestplate_Id)
ITEM(Item::leather_leggings_Id)
ITEM(Item::leather_boots_Id)
ITEM(Item::wooden_sword_Id)
ITEM(Item::wooden_shovel_Id)
ITEM(Item::wooden_pickaxe_Id)
ITEM(Item::wooden_axe_Id)
ITEM(Item::wooden_hoe_Id)
ITEM(Item::emptyMap_Id)
ITEM(Item::helmet_chain_Id)
ITEM(Item::chestplate_chain_Id)
ITEM(Item::leggings_chain_Id)
ITEM(Item::boots_chain_Id)
ITEM(Item::sword_stone_Id)
ITEM(Item::shovel_stone_Id)
ITEM(Item::pickAxe_stone_Id)
ITEM(Item::hatchet_stone_Id)
ITEM(Item::hoe_stone_Id)
ITEM(Item::map_Id)
ITEM(Item::chainmail_helmet_Id)
ITEM(Item::chainmail_chestplate_Id)
ITEM(Item::chainmail_leggings_Id)
ITEM(Item::chainmail_boots_Id)
ITEM(Item::stone_sword_Id)
ITEM(Item::stone_shovel_Id)
ITEM(Item::stone_pickaxe_Id)
ITEM(Item::stone_axe_Id)
ITEM(Item::stone_hoe_Id)
ITEM(Item::bow_Id)
ITEM(Item::helmet_iron_Id)
ITEM(Item::chestplate_iron_Id)
ITEM(Item::leggings_iron_Id)
ITEM(Item::boots_iron_Id)
ITEM(Item::sword_iron_Id)
ITEM(Item::shovel_iron_Id)
ITEM(Item::pickAxe_iron_Id)
ITEM(Item::hatchet_iron_Id)
ITEM(Item::hoe_iron_Id)
ITEM(Item::iron_helmet_Id)
ITEM(Item::iron_chestplate_Id)
ITEM(Item::iron_leggings_Id)
ITEM(Item::iron_boots_Id)
ITEM(Item::iron_sword_Id)
ITEM(Item::iron_shovel_Id)
ITEM(Item::iron_pickaxe_Id)
ITEM(Item::iron_axe_Id)
ITEM(Item::iron_hoe_Id)
ITEM(Item::arrow_Id)
ITEM(Item::helmet_gold_Id)
ITEM(Item::chestplate_gold_Id)
ITEM(Item::leggings_gold_Id)
ITEM(Item::boots_gold_Id)
ITEM(Item::sword_gold_Id)
ITEM(Item::shovel_gold_Id)
ITEM(Item::pickAxe_gold_Id)
ITEM(Item::hatchet_gold_Id)
ITEM(Item::hoe_gold_Id)
ITEM(Item::golden_helmet_Id)
ITEM(Item::golden_chestplate_Id)
ITEM(Item::golden_leggings_Id)
ITEM(Item::golden_boots_Id)
ITEM(Item::golden_sword_Id)
ITEM(Item::golden_shovel_Id)
ITEM(Item::golden_pickaxe_Id)
ITEM(Item::golden_axe_Id)
ITEM(Item::golden_hoe_Id)
ITEM(Item::flintAndSteel_Id)
ITEM(Item::helmet_diamond_Id)
ITEM(Item::chestplate_diamond_Id)
ITEM(Item::leggings_diamond_Id)
ITEM(Item::boots_diamond_Id)
ITEM(Item::sword_diamond_Id)
ITEM(Item::shovel_diamond_Id)
ITEM(Item::pickAxe_diamond_Id)
ITEM(Item::hatchet_diamond_Id)
ITEM(Item::hoe_diamond_Id)
ITEM(Item::flint_and_steel_Id)
ITEM(Item::diamond_helmet_Id)
ITEM(Item::diamond_chestplate_Id)
ITEM(Item::diamond_leggings_Id)
ITEM(Item::diamond_boots_Id)
ITEM(Item::diamond_sword_Id)
ITEM(Item::diamond_shovel_Id)
ITEM(Item::diamond_pickaxe_Id)
ITEM(Item::diamond_axe_Id)
ITEM(Item::diamond_hoe_Id)
ITEM(Item::fireball_Id)
ITEM(Item::fire_charge_Id)
ITEM(Item::clock_Id)
ITEM(Item::shears_Id)
ITEM(Item::fishingRod_Id)
ITEM(Item::carrotOnAStick_Id)
ITEM(Item::fishing_rod_Id)
ITEM(Item::carrot_on_a_stick_Id)
ITEM(Item::lead_Id)
ITEM(Item::horseArmorDiamond_Id)
ITEM(Item::horseArmorGold_Id)
ITEM(Item::horseArmorMetal_Id)
ITEM(Item::diamond_horse_armor_Id)
ITEM(Item::golden_horse_armor_Id)
ITEM(Item::iron_horse_armor_Id)
ITEM(Item::armor_stand_Id)
@ -592,13 +592,13 @@ void IUIScene_CreativeMenu::staticCtor()
{
Enchantment *enchantment = Enchantment::enchantments[i];
if (enchantment == nullptr || enchantment->category == nullptr) continue;
list->push_back(Item::enchantedBook->createForEnchantment(new EnchantmentInstance(enchantment, enchantment->getMaxLevel())));
list->push_back(Item::enchanted_book->createForEnchantment(new EnchantmentInstance(enchantment, enchantment->getMaxLevel())));
}
#ifndef _CONTENT_PACKAGE
if(app.DebugSettingsOn())
{
shared_ptr<ItemInstance> debugSword = std::make_shared<ItemInstance>(Item::sword_diamond_Id, 1, 0);
shared_ptr<ItemInstance> debugSword = std::make_shared<ItemInstance>(Item::diamond_sword_Id, 1, 0);
debugSword->enchant( Enchantment::damageBonus, 50 );
debugSword->setHoverName(L"Sword of Debug");
list->push_back(debugSword);
@ -611,11 +611,11 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Item::coal_Id,1)
ITEM(Item::diamond_Id)
ITEM(Item::emerald_Id)
ITEM(Item::ironIngot_Id)
ITEM(Item::goldIngot_Id)
ITEM(Item::netherQuartz_Id)
ITEM(Item::iron_ingot_Id)
ITEM(Item::gold_ingot_Id)
ITEM(Item::quartz_Id)
ITEM(Item::brick_Id)
ITEM(Item::netherbrick_Id)
ITEM(Item::nether_brick_Id)
ITEM(Item::stick_Id)
ITEM(Item::bowl_Id)
ITEM(Item::bone_Id)
@ -626,49 +626,49 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Item::rabbit_hide_Id)
ITEM(Item::gunpowder_Id)
ITEM(Item::clay_Id)
ITEM(Item::yellowDust_Id)
ITEM(Item::prismarine_cystal_Id)
ITEM(Item::glowstone_dust_Id)
ITEM(Item::prismarine_crystals_Id)
ITEM(Item::prismarine_shard_Id)
ITEM(Item::seeds_wheat_Id)
ITEM(Item::seeds_melon_Id)
ITEM(Item::seeds_pumpkin_Id)
ITEM(Item::wheat_seeds_Id)
ITEM(Item::melon_seeds_Id)
ITEM(Item::pumpkin_seeds_Id)
ITEM(Item::wheat_Id)
ITEM(Item::reeds_Id)
ITEM(Item::egg_Id)
ITEM(Item::sugar_Id)
ITEM(Item::slimeBall_Id)
ITEM(Item::blazeRod_Id)
ITEM(Item::goldNugget_Id)
ITEM(Item::slime_ball_Id)
ITEM(Item::blaze_rod_Id)
ITEM(Item::gold_nugget_Id)
ITEM(Item::netherwart_seeds_Id)
ITEM_AUX(Item::dye_powder_Id,1) // Red
ITEM_AUX(Item::dye_powder_Id,14) // Orange
ITEM_AUX(Item::dye_powder_Id,11) // Yellow
ITEM_AUX(Item::dye_powder_Id,10) // Lime
ITEM_AUX(Item::dye_powder_Id,12) // Light Blue
ITEM_AUX(Item::dye_powder_Id,6) // Cyan
ITEM_AUX(Item::dye_powder_Id,4) // Blue
ITEM_AUX(Item::dye_powder_Id,5) // Purple
ITEM_AUX(Item::dye_powder_Id,13) // Magenta
ITEM_AUX(Item::dye_powder_Id,9) // Pink
ITEM_AUX(Item::dye_powder_Id,15) // Bone Meal
ITEM_AUX(Item::dye_powder_Id,7) // Light gray
ITEM_AUX(Item::dye_powder_Id,8) // Gray
ITEM_AUX(Item::dye_powder_Id,0) // black (ink sac)
ITEM_AUX(Item::dye_powder_Id,2) // Green
ITEM_AUX(Item::dye_powder_Id,3) // Brown
ITEM_AUX(Item::dye_Id,1) // Red
ITEM_AUX(Item::dye_Id,14) // Orange
ITEM_AUX(Item::dye_Id,11) // Yellow
ITEM_AUX(Item::dye_Id,10) // Lime
ITEM_AUX(Item::dye_Id,12) // Light Blue
ITEM_AUX(Item::dye_Id,6) // Cyan
ITEM_AUX(Item::dye_Id,4) // Blue
ITEM_AUX(Item::dye_Id,5) // Purple
ITEM_AUX(Item::dye_Id,13) // Magenta
ITEM_AUX(Item::dye_Id,9) // Pink
ITEM_AUX(Item::dye_Id,15) // Bone Meal
ITEM_AUX(Item::dye_Id,7) // Light gray
ITEM_AUX(Item::dye_Id,8) // Gray
ITEM_AUX(Item::dye_Id,0) // black (ink sac)
ITEM_AUX(Item::dye_Id,2) // Green
ITEM_AUX(Item::dye_Id,3) // Brown
// Brewing (TODO)
DEF(eCreativeInventory_Brewing)
ITEM(Item::expBottle_Id)
ITEM(Item::experience_bottle_Id)
// 4J Stu - Anything else added here also needs to be added to the key handler below
ITEM(Item::ghastTear_Id)
ITEM(Item::fermentedSpiderEye_Id)
ITEM(Item::blazePowder_Id)
ITEM(Item::magmaCream_Id)
ITEM(Item::speckledMelon_Id)
ITEM(Item::rabbits_foot_Id)
ITEM(Item::glassBottle_Id)
ITEM(Item::ghast_tear_Id)
ITEM(Item::fermented_spider_eye_Id)
ITEM(Item::blaze_powder_Id)
ITEM(Item::magma_cream_Id)
ITEM(Item::speckled_melon_block_Id)
ITEM(Item::rabbit_foot_Id)
ITEM(Item::glass_bottle_Id)
ITEM_AUX(Item::potion_Id,0) // Water bottle
//ITEM_AUX(Item::potion_Id,MACRO_MAKEPOTION_AUXVAL(0, 0, MASK_TYPE_AWKWARD)) // Awkward Potion

View file

@ -76,10 +76,11 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
// Do we have the ingredients?
shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem();
shared_ptr<ItemInstance> buyBItem = activeRecipe->getBuyBItem();
shared_ptr<ItemInstance> sellItem = activeRecipe->getSellItem();
shared_ptr<MultiplayerLocalPlayer> player = Minecraft::GetInstance()->localplayers[getPad()];
int buyAMatches = player->inventory->countMatches(buyAItem);
int buyBMatches = player->inventory->countMatches(buyBItem);
if( (buyAItem != nullptr && buyAMatches >= buyAItem->count) && (buyBItem == nullptr || buyBMatches >= buyBItem->count) )
if( sellItem != nullptr && (buyAItem != nullptr && buyAMatches >= buyAItem->count) && (buyBItem == nullptr || buyBMatches >= buyBItem->count) )
{
// 4J-JEV: Fix for PS4 #7111: [PATCH 1.12] Trading Librarian villagers for multiple <20>Enchanted Books<6B> will cause the title to crash.
int actualShopItem = m_activeOffers.at(selectedShopItem).second;
@ -91,7 +92,7 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat)
player->inventory->removeResources(buyBItem);
// Add the item we have purchased
shared_ptr<ItemInstance> result = activeRecipe->getSellItem()->copy();
shared_ptr<ItemInstance> result = sellItem->copy();
if(!player->inventory->add( result ) )
{
player->drop(result);
@ -238,6 +239,7 @@ void IUIScene_TradingMenu::updateDisplay()
if( selectedShopItem < m_activeOffers.size() )
{
MerchantRecipe *activeRecipe = m_activeOffers.at(selectedShopItem).first;
shared_ptr<ItemInstance> sellItem = activeRecipe ? activeRecipe->getSellItem() : nullptr;
wstring wsTemp;
@ -245,11 +247,11 @@ void IUIScene_TradingMenu::updateDisplay()
wsTemp = app.GetString(IDS_VILLAGER_OFFERS_ITEM);
wsTemp = replaceAll(wsTemp,L"{*VILLAGER_TYPE*}",m_merchant->getDisplayName());
size_t iPos=wsTemp.find(L"%s");
wsTemp.replace(iPos,2,activeRecipe->getSellItem()->getHoverName());
wsTemp.replace(iPos,2,sellItem != nullptr ? sellItem->getHoverName() : L"");
setTitle(wsTemp.c_str());
vector<HtmlString> *offerDescription = GetItemDescription(activeRecipe->getSellItem());
vector<HtmlString> *offerDescription = GetItemDescription(sellItem);
setOfferDescription(offerDescription);
shared_ptr<ItemInstance> buyAItem = activeRecipe->getBuyAItem();
@ -270,8 +272,8 @@ void IUIScene_TradingMenu::updateDisplay()
int buyAMatches = player->inventory->countMatches(buyAItem);
if(buyAMatches > 0)
{
setRequest1RedBox(buyAMatches < buyAItem->count);
canMake = buyAMatches > buyAItem->count;
setRequest1RedBox(buyAItem == nullptr || buyAMatches < buyAItem->count);
canMake = buyAItem != nullptr && buyAMatches > buyAItem->count;
}
else
{
@ -282,8 +284,8 @@ void IUIScene_TradingMenu::updateDisplay()
int buyBMatches = player->inventory->countMatches(buyBItem);
if(buyBMatches > 0)
{
setRequest2RedBox(buyBMatches < buyBItem->count);
canMake = canMake && buyBMatches > buyBItem->count;
setRequest2RedBox(buyBItem == nullptr || buyBMatches < buyBItem->count);
canMake = canMake && buyBItem != nullptr && buyBMatches > buyBItem->count;
}
else
{
@ -369,6 +371,11 @@ void IUIScene_TradingMenu::setTradeItem(int index, shared_ptr<ItemInstance> item
vector<HtmlString> *IUIScene_TradingMenu::GetItemDescription(shared_ptr<ItemInstance> item)
{
if (item == nullptr)
{
return new vector<HtmlString>();
}
bool advanced = false;
if (const Minecraft* pMinecraft = Minecraft::GetInstance())
{

View file

@ -251,7 +251,7 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
// remove any icon text
else if(temp.find(L"{*CraftingTableIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Tile::workBench_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Tile::crafting_table_Id, 1, 0);
}
else if(temp.find(L"{*SticksIcon*}")!=wstring::npos)
{
@ -259,19 +259,19 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
}
else if(temp.find(L"{*PlanksIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Tile::wood_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Tile::planks_Id, 1, 0);
}
else if(temp.find(L"{*WoodenShovelIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Item::shovel_wood_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Item::wooden_shovel_Id, 1, 0);
}
else if(temp.find(L"{*WoodenHatchetIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Item::hatchet_wood_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Item::wooden_axe_Id, 1, 0);
}
else if(temp.find(L"{*WoodenPickaxeIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Item::pickAxe_wood_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Item::wooden_pickaxe_Id, 1, 0);
}
else if(temp.find(L"{*FurnaceIcon*}")!=wstring::npos)
{
@ -279,7 +279,7 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
}
else if(temp.find(L"{*WoodenDoorIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Item::door_wood, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Item::wooden_door, 1, 0);
}
else if(temp.find(L"{*TorchIcon*}")!=wstring::npos)
{
@ -291,11 +291,11 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
}
else if(temp.find(L"{*FishingRodIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Item::fishingRod_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Item::fishing_rod_Id, 1, 0);
}
else if(temp.find(L"{*FishIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Item::fish_raw_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Item::fish_Id, 1, 0);
}
else if(temp.find(L"{*MinecartIcon*}")!=wstring::npos)
{
@ -307,7 +307,7 @@ wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
}
else if(temp.find(L"{*PoweredRailIcon*}")!=wstring::npos)
{
m_iconItem = std::make_shared<ItemInstance>(Tile::goldenRail_Id, 1, 0);
m_iconItem = std::make_shared<ItemInstance>(Tile::golden_rail_Id, 1, 0);
}
else if(temp.find(L"{*StructuresIcon*}")!=wstring::npos)
{

View file

@ -342,10 +342,10 @@ void UIScene_BeaconMenu::customDraw(IggyCustomDrawCallbackRegion *region)
item = std::make_shared<ItemInstance>(Item::diamond);
break;
case 2:
item = std::make_shared<ItemInstance>(Item::goldIngot);
item = std::make_shared<ItemInstance>(Item::gold_ingot);
break;
case 3:
item = std::make_shared<ItemInstance>(Item::ironIngot);
item = std::make_shared<ItemInstance>(Item::iron_ingot);
break;
default:
assert(false);

View file

@ -13,7 +13,7 @@ const int UIScene_LeaderboardsMenu::TitleIcons[UIScene_LeaderboardsMenu::NUM_LEA
{
{UIControl_LeaderboardList::e_ICON_TYPE_WALKED, UIControl_LeaderboardList::e_ICON_TYPE_FALLEN, Item::minecart_Id, Item::boat_Id, -1},
{Tile::dirt_Id, Tile::cobblestone_Id, Tile::sand_Id, Tile::stone_Id, Tile::gravel_Id, Tile::clay_Id, Tile::obsidian_Id},
{Item::egg_Id, Item::wheat_Id, Tile::mushroom_brown_Id, Tile::reeds_Id, Item::bucket_milk_Id, Tile::pumpkin_Id, -1},
{Item::egg_Id, Item::wheat_Id, Tile::mushroom_brown_Id, Tile::reeds_Id, Item::milk_bucket_Id, Tile::pumpkin_Id, -1},
{UIControl_LeaderboardList::e_ICON_TYPE_ZOMBIE, UIControl_LeaderboardList::e_ICON_TYPE_SKELETON, UIControl_LeaderboardList::e_ICON_TYPE_CREEPER, UIControl_LeaderboardList::e_ICON_TYPE_SPIDER, UIControl_LeaderboardList::e_ICON_TYPE_SPIDERJOKEY, UIControl_LeaderboardList::e_ICON_TYPE_ZOMBIEPIGMAN, UIControl_LeaderboardList::e_ICON_TYPE_SLIME},
};
const UIScene_LeaderboardsMenu::LeaderboardDescriptor UIScene_LeaderboardsMenu::LEADERBOARD_DESCRIPTORS[UIScene_LeaderboardsMenu::NUM_LEADERBOARDS][4] = {

View file

@ -34,7 +34,7 @@ LPCWSTR CScene_Leaderboards::m_TextColumnNameA[7]=
const int CScene_Leaderboards::TitleIcons[CScene_Leaderboards::NUM_LEADERBOARDS][7] =
{
{ XZP_ICON_WALKED, XZP_ICON_FALLEN, Item::minecart_Id, Item::boat_Id, nullptr },
{ Tile::dirt_Id, Tile::stoneBrick_Id, Tile::sand_Id, Tile::rock_Id, Tile::gravel_Id, Tile::clay_Id, Tile::obsidian_Id },
{ Tile::dirt_Id, Tile::stonebrick_Id, Tile::sand_Id, Tile::rock_Id, Tile::gravel_Id, Tile::clay_Id, Tile::obsidian_Id },
{ Item::egg_Id, Item::wheat_Id, Tile::mushroom1_Id, Tile::reeds_Id, Item::milk_Id, Tile::pumpkin_Id, nullptr },
{ XZP_ICON_ZOMBIE, XZP_ICON_SKELETON, XZP_ICON_CREEPER, XZP_ICON_SPIDER, XZP_ICON_SPIDERJOCKEY, XZP_ICON_ZOMBIEPIGMAN, XZP_ICON_SLIME },
};

View file

@ -390,7 +390,7 @@ wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWS
}
else if(temp.find(L"{*PoweredRailIcon*}")!=wstring::npos)
{
m_pCraftingPic->SetIcon(m_iPad, Tile::goldenRail_Id,0,1,10,31,false);
m_pCraftingPic->SetIcon(m_iPad, Tile::golden_rail_Id,0,1,10,31,false);
}
else if(temp.find(L"{*StructuresIcon*}")!=wstring::npos)
{

View file

@ -11,19 +11,19 @@ public:
{
DispenserTile::REGISTRY.add(Item::arrow, new ArrowDispenseBehavior());
DispenserTile::REGISTRY.add(Item::egg, new EggDispenseBehavior());
DispenserTile::REGISTRY.add(Item::snowBall, new SnowballDispenseBehavior());
DispenserTile::REGISTRY.add(Item::expBottle, new ExpBottleDispenseBehavior());
DispenserTile::REGISTRY.add(Item::snowball, new SnowballDispenseBehavior());
DispenserTile::REGISTRY.add(Item::experience_bottle, new ExpBottleDispenseBehavior());
DispenserTile::REGISTRY.add(Item::potion, new PotionDispenseBehavior());
DispenserTile::REGISTRY.add(Item::spawnEgg, new SpawnEggDispenseBehavior());
DispenserTile::REGISTRY.add(Item::spawn_egg, new SpawnEggDispenseBehavior());
DispenserTile::REGISTRY.add(Item::fireworks, new FireworksDispenseBehavior());
DispenserTile::REGISTRY.add(Item::fireball, new FireballDispenseBehavior());
DispenserTile::REGISTRY.add(Item::boat, new BoatDispenseBehavior());
DispenserTile::REGISTRY.add(Item::bucket_lava, new FilledBucketDispenseBehavior());
DispenserTile::REGISTRY.add(Item::bucket_water, new FilledBucketDispenseBehavior());
DispenserTile::REGISTRY.add(Item::bucket_empty, new EmptyBucketDispenseBehavior());
DispenserTile::REGISTRY.add(Item::flintAndSteel, new FlintAndSteelDispenseBehavior());
DispenserTile::REGISTRY.add(Item::dye_powder, new DyeDispenseBehavior());
DispenserTile::REGISTRY.add(Item::lava_bucket, new FilledBucketDispenseBehavior());
DispenserTile::REGISTRY.add(Item::water_bucket, new FilledBucketDispenseBehavior());
DispenserTile::REGISTRY.add(Item::bucket, new EmptyBucketDispenseBehavior());
DispenserTile::REGISTRY.add(Item::flint_and_steel, new FlintAndSteelDispenseBehavior());
DispenserTile::REGISTRY.add(Item::dye, new DyeDispenseBehavior());
DispenserTile::REGISTRY.add(Item::items[Tile::tnt_Id], new TntDispenseBehavior());
}
};

View file

@ -135,14 +135,14 @@ DurangoStatsDebugger *DurangoStatsDebugger::Initialize()
sp->addArgs(DsItemEvent::eAcquisitionMethod_Pickedup, Tile::dirt_Id); // works
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::milk_Id); // works.
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Tile::dirt_Id); // works.
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::porkChop_cooked_Id); // BROKEN! (ach 'Pork Chop' configured incorrectly)
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::cooked_porkchop_Id); // BROKEN! (ach 'Pork Chop' configured incorrectly)
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::cake_Id); // works. (ach 'The Lie' configured incorrectly)
sp->addArgs(DsItemEvent::eAcquisitionMethod_Bought, Item::emerald_Id); // fixed (+ach)
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::ironIngot_Id); // works. (+ach 'Acquired Hardware')
sp->addArgs(DsItemEvent::eAcquisitionMethod_Pickedup, Item::fish_raw_Id); // works. (+ach 'Delicious Fish')
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::fish_cooked_Id); // works. (+ach 'Delicious Fish')
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::sign_Id);
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::flowerPot_Id); // FIXING!
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::iron_ingot_Id); // works. (+ach 'Acquired Hardware')
sp->addArgs(DsItemEvent::eAcquisitionMethod_Pickedup, Item::fish_Id); // works. (+ach 'Delicious Fish')
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::cooked_fish_Id); // works. (+ach 'Delicious Fish')
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::standing_sign_Id);
sp->addArgs(DsItemEvent::eAcquisitionMethod_Crafted, Item::flower_pot_Id); // FIXING!
out->m_stats.push_back(sp);
sp = new StatParam(L"McItemAcquired.DifficultyLevelId.*.AcquisitionMethodId.*.ItemId.*");
@ -153,21 +153,21 @@ DurangoStatsDebugger *DurangoStatsDebugger::Initialize()
sp = new StatParam(L"McItemUsed.ItemId.*.ItemAux.*");
//sp->addArgs(Item::apple_Id, 0);
//sp->addArgs(Item::cake_Id, 0);
sp->addArgs(Item::beef_raw_Id, 0); // works
sp->addArgs(Item::porkChop_cooked_Id, 0); // works
sp->addArgs(Item::beef_Id, 0); // works
sp->addArgs(Item::cooked_porkchop_Id, 0); // works
out->m_stats.push_back(sp);
sp = new StatParam(L"MinHungerWhenEaten.ItemId.*");
//sp->addArgs(Item::apple_Id);
//sp->addArgs(Item::cake_Id);
sp->addArgs(Item::beef_raw_Id); // works
sp->addArgs(Item::beef_Id); // works
sp->addArgs(Item::rotten_flesh_Id); // works (+ach IronBelly)
out->m_stats.push_back(sp);
sp = new StatParam(L"BlockBroken.BlockId.*");
sp->addArgs( Tile::dirt_Id );
sp->addArgs( Tile::rock_Id );
sp->addArgs( Tile::emeraldOre_Id );
sp->addArgs( Tile::emerald_ore_Id );
out->m_stats.push_back(sp);
sp = new StatParam(L"BlockBroken.BlockId.*.BlockAux.*");
@ -188,21 +188,21 @@ DurangoStatsDebugger *DurangoStatsDebugger::Initialize()
sp = new StatParam(L"BlockPlaced.BlockId.*");
sp->addArgs( Tile::dirt_Id );
sp->addArgs( Tile::stoneBrick_Id );
sp->addArgs( Tile::stonebrick_Id );
sp->addArgs( Tile::sand_Id ); // works
sp->addArgs( Tile::sign_Id ); // fixed
sp->addArgs( Tile::wallSign_Id ); // fixed
sp->addArgs( Tile::standing_sign_Id ); // fixed
sp->addArgs( Tile::wall_standing_sign_Id ); // fixed
out->m_stats.push_back(sp);
sp = new StatParam(L"MobKilled.KillTypeId.*.EnemyRoleId.*.PlayerWeaponId.*"); // BROKEN!
sp->addArgs( /*MELEE*/ 0, ioid_Cow, 0 );
sp->addArgs( /*MELEE*/ 0, ioid_Cow, Item::sword_stone_Id );
sp->addArgs( /*MELEE*/ 0, ioid_Pig, Item::sword_stone_Id );
sp->addArgs( /*MELEE*/ 0, ioid_Cow, Item::stone_sword_Id );
sp->addArgs( /*MELEE*/ 0, ioid_Pig, Item::stone_sword_Id );
out->m_stats.push_back(sp);
sp = new StatParam(L"MaxKillDistance.KillTypeId.*.EnemyRoleId.*.PlayerWeaponId.*"); // BROKEN!
sp->addArgs( /*MELEE*/ 0, ioid_Cow, Item::sword_stone_Id );
sp->addArgs( /*MELEE*/ 0, ioid_Pig, Item::sword_stone_Id );
sp->addArgs( /*MELEE*/ 0, ioid_Cow, Item::stone_sword_Id );
sp->addArgs( /*MELEE*/ 0, ioid_Pig, Item::stone_sword_Id );
sp->addArgs( /*RANGE*/ 1, ioid_Creeper, ioid_Arrow ); // FIXING!
out->m_stats.push_back(sp);

View file

@ -149,12 +149,12 @@ EntityRenderDispatcher::EntityRenderDispatcher()
renderers[eTYPE_ITEM_FRAME] = new ItemFrameRenderer();
renderers[eTYPE_LEASHFENCEKNOT] = new LeashKnotRenderer();
renderers[eTYPE_ARROW] = new ArrowRenderer();
renderers[eTYPE_SNOWBALL] = new ItemSpriteRenderer(Item::snowBall);
renderers[eTYPE_THROWNENDERPEARL] = new ItemSpriteRenderer(Item::enderPearl);
renderers[eTYPE_EYEOFENDERSIGNAL] = new ItemSpriteRenderer(Item::eyeOfEnder);
renderers[eTYPE_SNOWBALL] = new ItemSpriteRenderer(Item::snowball);
renderers[eTYPE_THROWNENDERPEARL] = new ItemSpriteRenderer(Item::ender_pearl);
renderers[eTYPE_EYEOFENDERSIGNAL] = new ItemSpriteRenderer(Item::eye_of_ender);
renderers[eTYPE_THROWNEGG] = new ItemSpriteRenderer(Item::egg);
renderers[eTYPE_THROWNPOTION] = new ItemSpriteRenderer(Item::potion, PotionBrewing::THROWABLE_MASK);
renderers[eTYPE_THROWNEXPBOTTLE] = new ItemSpriteRenderer(Item::expBottle);
renderers[eTYPE_THROWNEXPBOTTLE] = new ItemSpriteRenderer(Item::experience_bottle);
renderers[eTYPE_FIREWORKS_ROCKET] = new ItemSpriteRenderer(Item::fireworks);
renderers[eTYPE_LARGE_FIREBALL] = new FireballRenderer(2.0f);
renderers[eTYPE_SMALL_FIREBALL] = new FireballRenderer(0.5f);

View file

@ -213,9 +213,11 @@ void EntityRenderer::renderShadow(shared_ptr<Entity> e, double x, double y, doub
for (int zt = z0; zt <= z1; zt++)
{
int t = level->getTile(xt, yt - 1, zt);
Tile *tile = Tile::tiles[t];
if (tile == nullptr) continue; // tu31 tutorial world fix
if (t > 0 && level->getRawBrightness(xt, yt, zt) > 3)
{
renderTileShadow(Tile::tiles[t], x, y + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, z, xt, yt , zt, pow, r, xo, yo + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, zo);
renderTileShadow(tile, x, y + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, z, xt, yt , zt, pow, r, xo, yo + e->getShadowHeightOffs() + fYLocalPlayerShadowOffset, zo);
}
}
tt->end();

View file

@ -15,7 +15,7 @@ EntityTileRenderer::EntityTileRenderer()
void EntityTileRenderer::render(Tile *tile, int data, float brightness, float alpha, bool setColor, bool useCompiled)
{
if (tile->id == Tile::enderChest_Id)
if (tile->id == Tile::ender_chest_Id)
{
TileEntityRenderDispatcher::instance->render(enderChest, 0, 0, 0, 0, setColor, alpha, useCompiled);
}

View file

@ -67,7 +67,7 @@ void FishingHookRenderer::render(shared_ptr<Entity> _hook, double x, double y, d
if (ownerPlayer != nullptr)
{
shared_ptr<ItemInstance> selected = ownerPlayer->inventory->getSelected();
if (selected == nullptr || selected->id != Item::fishingRod_Id)
if (selected == nullptr || selected->id != Item::fishing_rod_Id)
{
handDir = -handDir;
}

View file

@ -147,6 +147,7 @@ GameRenderer::GameRenderer(Minecraft *mc)
this->mc = mc;
itemInHandRenderer = nullptr;
#ifndef MINECRAFT_SERVER_BUILD
// 4J-PB - set up the local players iteminhand renderers here - needs to be done with lighting enabled so that the render geometry gets compiled correctly
glEnable(GL_LIGHTING);
mc->localitemInHandRenderers[0] = new ItemInHandRenderer(mc);//itemInHandRenderer;
@ -162,6 +163,8 @@ GameRenderer::GameRenderer(Minecraft *mc)
lightTexture[i] = mc->textures->getTexture(img); // 4J - changed to one light texture per level to support split screen
}
delete img;
#endif
#ifndef MINECRAFT_SERVER_BUILD
#ifdef __PS3__
// we're using the RSX now to upload textures to vram, so we need the main ram textures allocated from io space
for(int i=0;i<NUM_LIGHT_TEXTURES;i++)
@ -170,7 +173,9 @@ GameRenderer::GameRenderer(Minecraft *mc)
for(int i=0;i<NUM_LIGHT_TEXTURES;i++)
lightPixels[i] = intArray(16*16);
#endif
#endif
#ifndef MINECRAFT_SERVER_BUILD
#ifdef MULTITHREAD_ENABLE
m_updateEvents = new C4JThread::EventArray(eUpdateEventCount, C4JThread::EventArray::e_modeAutoClear);
m_updateEvents->Set(eUpdateEventIsFinished);
@ -183,6 +188,7 @@ GameRenderer::GameRenderer(Minecraft *mc)
m_updateThread->SetProcessor(CPU_CORE_CHUNK_UPDATE);
m_updateThread->Run();
#endif
#endif
}
// 4J Stu Added to go with 1.8.2 change

View file

@ -28,7 +28,14 @@
#include "../Minecraft.World/net.minecraft.world.h"
#include "../Minecraft.World/LevelChunk.h"
#include "../Minecraft.World/Biome.h"
#include "../Minecraft.World/HitResult.h"
#include <Common/UI/UI.h>
#include "../Minecraft.World/Tile.h"
#include "../Minecraft.World/BlockStateDecoderRegistry.h"
#include "../Minecraft.World/BlockStateDecoder.h"
#include <map>
#include <set>
#include <cwctype>
ResourceLocation Gui::PUMPKIN_BLUR_LOCATION = ResourceLocation(TN__BLUR__MISC_PUMPKINBLUR);
@ -1157,6 +1164,111 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
lines.push_back(L"Facing: " + std::wstring(cardinals[direction]) + L" (" + angleString + L")");
// We have to limit y to 256 as we don't get any information past that
// target block state
if (minecraft->hitResult != nullptr && minecraft->hitResult->type == HitResult::TILE)
{
int hx = minecraft->hitResult->x;
int hy = minecraft->hitResult->y;
int hz = minecraft->hitResult->z;
if (minecraft->level != NULL && minecraft->level->hasChunkAt(hx, hy, hz))
{
int tid = minecraft->level->getTile(hx, hy, hz);
if (tid >= 0 && tid < Tile::TILE_NUM_COUNT)
{
Tile *t = Tile::tiles[tid];
if (t != nullptr)
{
Tile::BlockState st = t->getBlockState(minecraft->level, hx, hy, hz);
// check registry so we dont end up with random integers
std::wstring decoded = BlockStateDecoderRegistry::decode(tid, st.value);
if (decoded.empty()) {
if (tid == Tile::wooden_door_Id || tid == Tile::iron_door_Id || tid == Tile::spruce_door_Id || tid == Tile::birch_door_Id || tid == Tile::jungle_door_Id || tid == Tile::acacia_door_Id || tid == Tile::dark_oak_door_Id) {
decoded = BlockStateDecoder::doorPropsToString(BlockStateDecoder::decodeDoor(st.value));
}
}
if (!decoded.empty())
{
std::map<std::wstring, std::wstring> props;
std::set<std::wstring> shownProps;
auto appendProp = [&](const std::wstring &key) {
auto it = props.find(key);
if (it != props.end()) {
lines.push_back(key + L": " + it->second);
shownProps.insert(key);
}
};
size_t start = 0;
while (start < decoded.size()) {
size_t pos = decoded.find(L'\n', start);
std::wstring line = (pos == std::wstring::npos) ? decoded.substr(start) : decoded.substr(start, pos - start);
size_t colon = line.find(L':');
if (colon != std::wstring::npos) {
std::wstring key = line.substr(0, colon);
std::wstring val = line.substr(colon + 1);
auto trim = [](std::wstring &s) {
size_t i = 0;
while (i < s.size() && iswspace(s[i])) ++i;
if (i) s.erase(0, i);
// right
if (!s.empty()) {
size_t j = s.size() - 1;
while (j != (size_t)-1 && iswspace(s[j])) --j;
s.erase(j + 1);
}
};
trim(key);
trim(val);
props[key] = val;
}
if (pos == std::wstring::npos) break;
start = pos + 1;
}
lines.push_back(L"State:");
appendProp(L"age");
appendProp(L"moisture");
appendProp(L"facing");
appendProp(L"part");
appendProp(L"occupied");
appendProp(L"north");
appendProp(L"south");
appendProp(L"east");
appendProp(L"west");
appendProp(L"type");
appendProp(L"variant");
appendProp(L"axis");
appendProp(L"hinge");
appendProp(L"half");
appendProp(L"shape");
appendProp(L"up");
appendProp(L"extended");
appendProp(L"open");
appendProp(L"in_wall");
appendProp(L"attached");
appendProp(L"powered");
appendProp(L"power");
appendProp(L"triggered");
appendProp(L"explode");
appendProp(L"bites");
appendProp(L"mode");
appendProp(L"delay");
appendProp(L"enabled");
appendProp(L"eye");
appendProp(L"bottle_0");
appendProp(L"bottle_1");
appendProp(L"bottle_2");
appendProp(L"has_record");
for (const auto &entry : props) {
if (shownProps.find(entry.first) == shownProps.end()) {
lines.push_back(entry.first + L": " + entry.second);
}
}
}
}
}
}
}
if (minecraft->level != NULL && minecraft->level->hasChunkAt(xBlockPos, fmod(yBlockPos, 256), zBlockPos))
{
LevelChunk *chunkAt = minecraft->level->getChunkAt(xBlockPos, zBlockPos);

View file

@ -18,6 +18,7 @@
#include "../Minecraft.World/net.minecraft.h"
#include "CompassTexture.h"
#include "Minimap.h"
#include "../Minecraft.World/Level.h"
ResourceLocation ItemFrameRenderer::MAP_BACKGROUND_LOCATION = ResourceLocation(TN_MISC_MAPBG);
@ -41,7 +42,22 @@ void ItemFrameRenderer::render(shared_ptr<Entity> _itemframe, double x, double
int yt = itemFrame->yTile;
int zt = itemFrame->zTile + Direction::STEP_Z[itemFrame->dir];
glTranslatef(static_cast<float>(xt) - xOffs, static_cast<float>(yt) - yOffs, static_cast<float>(zt) - zOffs);
float back = 0.0f;
// set offset to 1 if the item frame is not placed by the player
if (itemFrame->level->isClientSide && !itemFrame->placedByPlayer)
{
back = 1.0f;
}
int dx = Direction::STEP_X[itemFrame->dir];
int dz = Direction::STEP_Z[itemFrame->dir];
glTranslatef(
static_cast<float>(xt) - xOffs - dx * back,
static_cast<float>(yt) - yOffs,
static_cast<float>(zt) - zOffs - dz * back
);
drawFrame(itemFrame);
drawItem(itemFrame);
@ -123,20 +139,20 @@ void ItemFrameRenderer::drawItem(shared_ptr<ItemFrame> entity)
glTranslatef((-7.25f / 16.0f) * Direction::STEP_X[entity->dir], -0.18f, (-7.25f / 16.0f) * Direction::STEP_Z[entity->dir]);
glRotatef(180 + entity->yRot, 0, 1, 0);
glRotatef(-90 * entity->getRotation(), 0, 0, 1);
glRotatef(-45.0f * entity->getRotation(), 0, 0, 1);
switch (entity->getRotation())
{
case 1:
glTranslatef(-0.16f, -0.16f, 0);
break;
case 2:
glTranslatef(0, -0.32f, 0);
break;
case 3:
glTranslatef(0.16f, -0.16f, 0);
break;
}
static const float offsets[8][2] = {
{ 0.0f, 0.0f },
{ -0.08f, -0.08f },
{ -0.16f, -0.16f },
{ -0.08f, -0.24f },
{ 0.0f, -0.32f },
{ 0.08f, -0.24f },
{ 0.16f, -0.16f },
{ 0.08f, -0.08f }
};
int rotIndex = entity->getRotation() & 0x7;
glTranslatef(offsets[rotIndex][0], offsets[rotIndex][1], 0.0f);
if (itemEntity->getItem()->getItem() == Item::map)
{

View file

@ -2821,9 +2821,9 @@ else if (name== L"footstep") mc->particleEngine->add(shared_ptr<FootstepParticle
else if (name== L"splash") mc->particleEngine->add(shared_ptr<SplashParticle>( new SplashParticle(level[playerIndex], x, y, z, xa, ya, za) ) );
else if (name== L"largesmoke") mc->particleEngine->add(shared_ptr<SmokeParticle>( new SmokeParticle(level[playerIndex], x, y, z, xa, ya, za, 2.5f) ) );
else if (name== L"reddust") mc->particleEngine->add(shared_ptr<RedDustParticle>( new RedDustParticle(level[playerIndex], x, y, z, (float) xa, (float) ya, (float) za) ) );
else if (name== L"snowballpoof") mc->particleEngine->add(shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::snowBall) ) );
else if (name== L"snowballpoof") mc->particleEngine->add(shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::snowball) ) );
else if (name== L"snowshovel") mc->particleEngine->add(shared_ptr<SnowShovelParticle>( new SnowShovelParticle(level[playerIndex], x, y, z, xa, ya, za) ) );
else if (name== L"slime") mc->particleEngine->add(shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::slimeBall)) ) ;
else if (name== L"slime") mc->particleEngine->add(shared_ptr<BreakingItemParticle>( new BreakingItemParticle(level[playerIndex], x, y, z, Item::slime_ball)) ) ;
else if (name== L"heart") mc->particleEngine->add(shared_ptr<HeartParticle>( new HeartParticle(level[playerIndex], x, y, z, xa, ya, za) ) );
}
*/
@ -3048,7 +3048,7 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle
particle = std::make_shared<RedDustParticle>(lev, x, y, z, static_cast<float>(xa), static_cast<float>(ya), static_cast<float>(za));
break;
case eParticleType_snowballpoof:
particle = std::make_shared<BreakingItemParticle>(lev, x, y, z, Item::snowBall, textures);
particle = std::make_shared<BreakingItemParticle>(lev, x, y, z, Item::snowball, textures);
break;
case eParticleType_dripWater:
particle = std::make_shared<DripParticle>(lev, x, y, z, Material::water);
@ -3060,7 +3060,7 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle
particle = std::make_shared<SnowShovelParticle>(lev, x, y, z, xa, ya, za);
break;
case eParticleType_slime:
particle = std::make_shared<BreakingItemParticle>(lev, x, y, z, Item::slimeBall, textures);
particle = std::make_shared<BreakingItemParticle>(lev, x, y, z, Item::slime_ball, textures);
break;
case eParticleType_heart:
particle = std::make_shared<HeartParticle>(lev, x, y, z, xa, ya, za);
@ -3341,7 +3341,7 @@ void LevelRenderer::levelEvent(shared_ptr<Player> source, int type, int x, int y
double yp = y;
double zp = z + 0.5;
ePARTICLE_TYPE particle = PARTICLE_ICONCRACK(Item::eyeOfEnder->id,0);
ePARTICLE_TYPE particle = PARTICLE_ICONCRACK(Item::eye_of_ender->id,0);
for (int i = 0; i < 8; i++)
{
addParticle(particle, xp, yp, zp, random->nextGaussian() * 0.15, random->nextDouble() * 0.2, random->nextGaussian() * .15);
@ -4018,7 +4018,7 @@ int LevelRenderer::checkAllPresentChunks(bool *faultFound)
for( int cz = 4; cz <= 12; cz++ )
{
int t0 = levelChunk->getTile(cx, 0, cz);
if( ( t0 != Tile::unbreakable_Id ) && (t0 != Tile::dirt_Id) )
if( ( t0 != Tile::bedrock_Id ) && (t0 != Tile::dirt_Id) )
{
*faultFound = true;
}

View file

@ -752,11 +752,11 @@ bool LocalPlayer::openFurnace(shared_ptr<FurnaceTileEntity> furnace)
return success;
}
bool LocalPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand)
bool LocalPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewing_stand)
{
bool success = app.LoadBrewingStandMenu(GetXboxPad(),inventory, brewingStand);
bool success = app.LoadBrewingStandMenu(GetXboxPad(),inventory, brewing_stand);
if( success ) ui.PlayUISFX(eSFX_Press);
//minecraft.setScreen(new BrewingStandScreen(inventory, brewingStand));
//minecraft.setScreen(new BrewingStandScreen(inventory, brewing_stand));
return success;
}
@ -978,26 +978,26 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
// MOAR TOOLS
{
Stat *toolStats[4][5];
toolStats[0][0] = GenericStats::itemsCrafted(Item::shovel_wood->id);
toolStats[0][1] = GenericStats::itemsCrafted(Item::shovel_stone->id);
toolStats[0][2] = GenericStats::itemsCrafted(Item::shovel_iron->id);
toolStats[0][3] = GenericStats::itemsCrafted(Item::shovel_diamond->id);
toolStats[0][4] = GenericStats::itemsCrafted(Item::shovel_gold->id);
toolStats[1][0] = GenericStats::itemsCrafted(Item::pickAxe_wood->id);
toolStats[1][1] = GenericStats::itemsCrafted(Item::pickAxe_stone->id);
toolStats[1][2] = GenericStats::itemsCrafted(Item::pickAxe_iron->id);
toolStats[1][3] = GenericStats::itemsCrafted(Item::pickAxe_diamond->id);
toolStats[1][4] = GenericStats::itemsCrafted(Item::pickAxe_gold->id);
toolStats[2][0] = GenericStats::itemsCrafted(Item::hatchet_wood->id);
toolStats[2][1] = GenericStats::itemsCrafted(Item::hatchet_stone->id);
toolStats[2][2] = GenericStats::itemsCrafted(Item::hatchet_iron->id);
toolStats[2][3] = GenericStats::itemsCrafted(Item::hatchet_diamond->id);
toolStats[2][4] = GenericStats::itemsCrafted(Item::hatchet_gold->id);
toolStats[3][0] = GenericStats::itemsCrafted(Item::hoe_wood->id);
toolStats[3][1] = GenericStats::itemsCrafted(Item::hoe_stone->id);
toolStats[3][2] = GenericStats::itemsCrafted(Item::hoe_iron->id);
toolStats[3][3] = GenericStats::itemsCrafted(Item::hoe_diamond->id);
toolStats[3][4] = GenericStats::itemsCrafted(Item::hoe_gold->id);
toolStats[0][0] = GenericStats::itemsCrafted(Item::wooden_shovel->id);
toolStats[0][1] = GenericStats::itemsCrafted(Item::stone_shovel->id);
toolStats[0][2] = GenericStats::itemsCrafted(Item::iron_shovel->id);
toolStats[0][3] = GenericStats::itemsCrafted(Item::diamond_shovel->id);
toolStats[0][4] = GenericStats::itemsCrafted(Item::golden_shovel->id);
toolStats[1][0] = GenericStats::itemsCrafted(Item::wooden_pickaxe->id);
toolStats[1][1] = GenericStats::itemsCrafted(Item::stone_pickaxe->id);
toolStats[1][2] = GenericStats::itemsCrafted(Item::iron_pickaxe->id);
toolStats[1][3] = GenericStats::itemsCrafted(Item::diamond_pickaxe->id);
toolStats[1][4] = GenericStats::itemsCrafted(Item::golden_pickaxe->id);
toolStats[2][0] = GenericStats::itemsCrafted(Item::wooden_axe->id);
toolStats[2][1] = GenericStats::itemsCrafted(Item::stone_axe->id);
toolStats[2][2] = GenericStats::itemsCrafted(Item::iron_axe->id);
toolStats[2][3] = GenericStats::itemsCrafted(Item::diamond_axe->id);
toolStats[2][4] = GenericStats::itemsCrafted(Item::golden_axe->id);
toolStats[3][0] = GenericStats::itemsCrafted(Item::wooden_hoe->id);
toolStats[3][1] = GenericStats::itemsCrafted(Item::stone_hoe->id);
toolStats[3][2] = GenericStats::itemsCrafted(Item::iron_hoe->id);
toolStats[3][3] = GenericStats::itemsCrafted(Item::diamond_hoe->id);
toolStats[3][4] = GenericStats::itemsCrafted(Item::golden_hoe->id);
bool justCraftedTool = false;
for (int i=0; i<4; i++)
@ -1063,8 +1063,8 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
// AWARD : Porkchop, cook and eat a porkchop.
{
Stat *cookPorkchop, *eatPorkchop;
cookPorkchop = GenericStats::itemsSmelted(Item::porkChop_cooked_Id);
eatPorkchop = GenericStats::itemsUsed(Item::porkChop_cooked_Id);
cookPorkchop = GenericStats::itemsSmelted(Item::cooked_porkchop_Id);
eatPorkchop = GenericStats::itemsUsed(Item::cooked_porkchop_Id);
if ( stat == cookPorkchop || stat == eatPorkchop )
{
@ -1111,7 +1111,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
// AWARD : The Haggler, Acquire 30 emeralds.
{
Stat *emeraldMined, *emeraldBought;
emeraldMined = GenericStats::blocksMined(Tile::emeraldOre_Id);
emeraldMined = GenericStats::blocksMined(Tile::emerald_ore_Id);
emeraldBought = GenericStats::itemsBought(Item::emerald_Id);
if ( stat == emeraldMined || stat == emeraldBought )
@ -1134,8 +1134,8 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
// AWARD : Pot Planter, craft and place a flowerpot.
{
Stat *craftFlowerpot, *placeFlowerpot;
craftFlowerpot = GenericStats::itemsCrafted(Item::flowerPot_Id);
placeFlowerpot = GenericStats::blocksPlaced(Tile::flowerPot_Id);
craftFlowerpot = GenericStats::itemsCrafted(Item::flower_pot_Id);
placeFlowerpot = GenericStats::blocksPlaced(Tile::flower_pot_Id);
if ( stat == craftFlowerpot || stat == placeFlowerpot )
{
@ -1149,9 +1149,9 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
// AWARD : It's a Sign, craft and place a sign.
{
Stat *craftSign, *placeWallsign, *placeSignpost;
craftSign = GenericStats::itemsCrafted(Item::sign_Id);
placeWallsign = GenericStats::blocksPlaced(Tile::wallSign_Id);
placeSignpost = GenericStats::blocksPlaced(Tile::sign_Id);
craftSign = GenericStats::itemsCrafted(Item::standing_sign_Id);
placeWallsign = GenericStats::blocksPlaced(Tile::wall_standing_sign_Id);
placeSignpost = GenericStats::blocksPlaced(Tile::standing_sign_Id);
if ( stat == craftSign || stat == placeWallsign || stat == placeSignpost )
{
@ -1642,7 +1642,7 @@ bool LocalPlayer::handleMouseClick(int button)
{
// If I have an empty bucket in my hand, it's going to be filled with milk, so turn off mayUse
shared_ptr<ItemInstance> item = inventory->getSelected();
if(item && (item->id==Item::bucket_empty_Id))
if(item && (item->id==Item::bucket_Id))
{
mayUse=false;
}
@ -1720,7 +1720,7 @@ void LocalPlayer::updateRichPresence()
if((m_iPad!=-1)/* && !ui.GetMenuDisplayed(m_iPad)*/ )
{
shared_ptr<ItemInstance> selectedItem = inventory->getSelected();
if(selectedItem != nullptr && selectedItem->id == Item::fishingRod_Id)
if(selectedItem != nullptr && selectedItem->id == Item::fishing_rod_Id)
{
app.SetRichPresenceContext(m_iPad,CONTEXT_GAME_STATE_FISHING);
}

View file

@ -120,7 +120,7 @@ public:
virtual bool startEnchanting(int x, int y, int z, const wstring &name); // 4J added bool return
virtual bool startRepairing(int x, int y, int z);
virtual bool openFurnace(shared_ptr<FurnaceTileEntity> furnace); // 4J added bool return
virtual bool openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand); // 4J added bool return
virtual bool openBrewingStand(shared_ptr<BrewingStandTileEntity> brewing_stand); // 4J added bool return
virtual bool openBeacon(shared_ptr<BeaconTileEntity> beacon); // 4J added bool return
virtual bool openTrap(shared_ptr<DispenserTileEntity> trap); // 4J added bool return
virtual bool openTrading(shared_ptr<Merchant> traderTarget, const wstring &name);

View file

@ -2572,28 +2572,28 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
switch (itemInstance->getItem()->id)
{
// food
case Item::potatoBaked_Id:
case Item::baked_potato_Id:
case Item::potato_Id:
case Item::pumpkinPie_Id:
case Item::potatoPoisonous_Id:
case Item::carrotGolden_Id:
case Item::carrots_Id:
case Item::mushroomStew_Id:
case Item::pumpkin_pie_Id:
case Item::poisonous_potato_Id:
case Item::golden_carrot_Id:
case Item::carrot_Id:
case Item::mushroom_stew_Id:
case Item::apple_Id:
case Item::bread_Id:
case Item::porkChop_raw_Id:
case Item::porkChop_cooked_Id:
case Item::apple_gold_Id:
case Item::fish_raw_Id:
case Item::fish_cooked_Id:
case Item::porkchop_Id:
case Item::cooked_porkchop_Id:
case Item::golden_apple_Id:
case Item::fish_Id:
case Item::cooked_fish_Id:
case Item::cookie_Id:
case Item::beef_cooked_Id:
case Item::beef_raw_Id:
case Item::chicken_cooked_Id:
case Item::chicken_raw_Id:
case Item::melon_Id:
case Item::cooked_beef_Id:
case Item::beef_Id:
case Item::cooked_chicken_Id:
case Item::chicken_Id:
case Item::melon_block_Id:
case Item::rotten_flesh_Id:
case Item::spiderEye_Id:
case Item::spider_eye_Id:
// Check that we are actually hungry so will eat this item
{
FoodItem *food = static_cast<FoodItem *>(itemInstance->getItem());
@ -2604,17 +2604,17 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
}
break;
case Item::bucket_milk_Id:
case Item::milk_bucket_Id:
*piUse=IDS_TOOLTIPS_DRINK;
break;
case Item::fishingRod_Id: // use
case Item::emptyMap_Id:
case Item::fishing_rod_Id: // use
case Item::map_Id:
*piUse=IDS_TOOLTIPS_USE;
break;
case Item::egg_Id: // throw
case Item::snowBall_Id:
case Item::snowball_Id:
*piUse=IDS_TOOLTIPS_THROW;
break;
@ -2626,26 +2626,26 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
}
break;
case Item::sword_wood_Id:
case Item::sword_stone_Id:
case Item::sword_iron_Id:
case Item::sword_diamond_Id:
case Item::sword_gold_Id:
case Item::wooden_sword_Id:
case Item::stone_sword_Id:
case Item::iron_sword_Id:
case Item::diamond_sword_Id:
case Item::golden_sword_Id:
*piUse=IDS_TOOLTIPS_BLOCK;
break;
case Item::bucket_empty_Id:
case Item::glassBottle_Id:
case Item::bucket_Id:
case Item::glass_bottle_Id:
if (bUseItem) *piUse=IDS_TOOLTIPS_COLLECT;
break;
case Item::bucket_lava_Id:
case Item::bucket_water_Id:
case Item::lava_bucket_Id:
case Item::water_bucket_Id:
*piUse=IDS_TOOLTIPS_EMPTY;
break;
case Item::boat_Id:
case Tile::waterLily_Id:
case Tile::waterlily_Id:
if (bUseItem) *piUse=IDS_TOOLTIPS_PLACE;
break;
@ -2657,11 +2657,11 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
}
break;
case Item::enderPearl_Id:
case Item::ender_pearl_Id:
if (bUseItem) *piUse=IDS_TOOLTIPS_THROW;
break;
case Item::eyeOfEnder_Id:
case Item::eye_of_ender_Id:
// This will only work if there is a stronghold in this dimension
if ( bUseItem && (level->dimension->id==0) && level->getLevelData()->getHasStronghold() )
{
@ -2669,35 +2669,35 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
}
break;
case Item::expBottle_Id:
case Item::experience_bottle_Id:
if (bUseItem) *piUse=IDS_TOOLTIPS_THROW;
break;
case Item::writingBook_Id:
case Item::writable_book_Id:
*piUse = IDS_TOOLTIPS_OPEN;
break;
case Item::writtenBook_Id:
case Item::written_book_Id:
*piUse = IDS_TOOLTIPS_READ;
break;
case Item::helmet_leather_Id:
case Item::helmet_chain_Id:
case Item::helmet_iron_Id:
case Item::helmet_gold_Id:
case Item::helmet_diamond_Id:
case Item::chestplate_leather_Id:
case Item::chestplate_chain_Id:
case Item::chestplate_iron_Id:
case Item::chestplate_gold_Id:
case Item::chestplate_diamond_Id:
case Item::leggings_leather_Id:
case Item::leggings_chain_Id:
case Item::leggings_iron_Id:
case Item::leggings_gold_Id:
case Item::leggings_diamond_Id:
case Item::boots_leather_Id:
case Item::boots_chain_Id:
case Item::boots_iron_Id:
case Item::boots_gold_Id:
case Item::boots_diamond_Id:
case Item::leather_helmet_Id:
case Item::chainmail_helmet_Id:
case Item::iron_helmet_Id:
case Item::golden_helmet_Id:
case Item::diamond_helmet_Id:
case Item::leather_chestplate_Id:
case Item::chainmail_chestplate_Id:
case Item::iron_chestplate_Id:
case Item::golden_chestplate_Id:
case Item::diamond_chestplate_Id:
case Item::leather_leggings_Id:
case Item::chainmail_leggings_Id:
case Item::iron_leggings_Id:
case Item::golden_leggings_Id:
case Item::diamond_leggings_Id:
case Item::leather_boots_Id:
case Item::chainmail_boots_Id:
case Item::iron_boots_Id:
case Item::golden_boots_Id:
case Item::diamond_boots_Id:
*piUse = IDS_TOOLTIPS_EQUIP;
break;
}
@ -2742,26 +2742,26 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
case Tile::cactus_Id:
case Tile::sapling_Id:
case Tile::reeds_Id:
case Tile::flower_Id:
case Tile::rose_Id:
case Tile::yellow_flower_Id:
case Tile::red_flower_Id:
*piUse=IDS_TOOLTIPS_PLANT;
break;
// Things to USE
case Item::hoe_wood_Id:
case Item::hoe_stone_Id:
case Item::hoe_iron_Id:
case Item::hoe_diamond_Id:
case Item::hoe_gold_Id:
case Item::wooden_hoe_Id:
case Item::stone_hoe_Id:
case Item::iron_hoe_Id:
case Item::diamond_hoe_Id:
case Item::golden_hoe_Id:
*piUse=IDS_TOOLTIPS_TILL;
break;
case Item::seeds_wheat_Id:
case Item::wheat_seeds_Id:
case Item::netherwart_seeds_Id:
*piUse=IDS_TOOLTIPS_PLANT;
break;
case Item::dye_powder_Id:
case Item::dye_Id:
// bonemeal grows various plants
if (itemInstance->getAuxValue() == DyePowderItem::WHITE)
{
@ -2772,8 +2772,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
case Tile::grass_Id:
case Tile::mushroom_brown_Id:
case Tile::mushroom_red_Id:
case Tile::melonStem_Id:
case Tile::pumpkinStem_Id:
case Tile::melon_stem_Id:
case Tile::pumpkin_stem_Id:
case Tile::carrots_Id:
case Tile::potatoes_Id:
*piUse=IDS_TOOLTIPS_GROW;
@ -2786,8 +2786,8 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
*piUse=IDS_TOOLTIPS_HANG;
break;
case Item::flintAndSteel_Id:
case Item::fireball_Id:
case Item::flint_and_steel_Id:
case Item::fire_charge_Id:
*piUse=IDS_TOOLTIPS_IGNITE;
break;
@ -2808,18 +2808,18 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
switch(iTileID)
{
case Tile::anvil_Id:
case Tile::enchantTable_Id:
case Tile::brewingStand_Id:
case Tile::workBench_Id:
case Tile::enchanting_table_Id:
case Tile::brewing_stand_Id:
case Tile::crafting_table_Id:
case Tile::furnace_Id:
case Tile::furnace_lit_Id:
case Tile::door_wood_Id:
case Tile::lit_furnace_Id:
case Tile::wooden_door_Id:
case Tile::dispenser_Id:
case Tile::lever_Id:
case Tile::button_stone_Id:
case Tile::button_wood_Id:
case Tile::stone_button_Id:
case Tile::wooden_button_Id:
case Tile::trapdoor_Id:
case Tile::fenceGate_Id:
case Tile::fence_gate_Id:
case Tile::beacon_Id:
*piAction=IDS_TOOLTIPS_MINE;
*piUse=IDS_TOOLTIPS_USE;
@ -2830,7 +2830,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
*piUse = (Tile::chest->getContainer(level,x,y,z) != nullptr) ? IDS_TOOLTIPS_OPEN : -1;
break;
case Tile::enderChest_Id:
case Tile::ender_chest_Id:
case Tile::chest_trap_Id:
case Tile::dropper_Id:
case Tile::hopper_Id:
@ -2838,9 +2838,9 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
*piAction=IDS_TOOLTIPS_MINE;
break;
case Tile::activatorRail_Id:
case Tile::goldenRail_Id:
case Tile::detectorRail_Id:
case Tile::activator_rail_Id:
case Tile::golden_rail_Id:
case Tile::detector_rail_Id:
case Tile::rail_Id:
if (bUseItemOn) *piUse=IDS_TOOLTIPS_PLACE;
*piAction=IDS_TOOLTIPS_MINE;
@ -2858,7 +2858,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
*piUse=IDS_TOOLTIPS_CHANGEPITCH;
break;
case Tile::sign_Id:
case Tile::standing_sign_Id:
*piAction=IDS_TOOLTIPS_MINE;
break;
@ -2868,7 +2868,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
{
int iID=itemInstance->getItem()->id;
int currentData = level->getData(x, y, z);
if ((iID==Item::glassBottle_Id) && (currentData > 0))
if ((iID==Item::glass_bottle_Id) && (currentData > 0))
{
*piUse=IDS_TOOLTIPS_COLLECT;
}
@ -2899,7 +2899,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
if (!bUseItemOn && itemInstance!=nullptr)
{
int iID=itemInstance->getItem()->id;
if ( (iID>=Item::record_01_Id) && (iID<=Item::record_12_Id) )
if ( (iID>=Item::record_13_Id) && (iID<=Item::record_wait_Id) )
{
*piUse=IDS_TOOLTIPS_PLAY;
}
@ -2915,7 +2915,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
}
break;
case Tile::flowerPot_Id:
case Tile::flower_pot_Id:
if ( !bUseItemOn && (itemInstance != nullptr) && (iData == 0) )
{
int iID = itemInstance->getItem()->id;
@ -2923,13 +2923,13 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
{
switch(iID)
{
case Tile::flower_Id:
case Tile::rose_Id:
case Tile::yellow_flower_Id:
case Tile::red_flower_Id:
case Tile::sapling_Id:
case Tile::mushroom_brown_Id:
case Tile::mushroom_red_Id:
case Tile::cactus_Id:
case Tile::deadBush_Id:
case Tile::deadbush_Id:
*piUse=IDS_TOOLTIPS_PLANT;
break;
@ -2942,24 +2942,24 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
*piAction=IDS_TOOLTIPS_MINE;
break;
case Tile::comparator_off_Id:
case Tile::comparator_on_Id:
case Tile::unpowered_comparator_Id:
case Tile::powered_comparator_Id:
*piUse=IDS_TOOLTIPS_USE;
*piAction=IDS_TOOLTIPS_MINE;
break;
case Tile::diode_off_Id:
case Tile::diode_on_Id:
case Tile::unpowered_repeater_Id:
case Tile::powered_repeater_Id:
*piUse=IDS_TOOLTIPS_USE;
*piAction=IDS_TOOLTIPS_MINE;
break;
case Tile::redStoneOre_Id:
case Tile::redstone_ore_Id:
if (bUseItemOn) *piUse=IDS_TOOLTIPS_USE;
*piAction=IDS_TOOLTIPS_MINE;
break;
case Tile::door_iron_Id:
case Tile::iron_door_Id:
if(*piUse==IDS_TOOLTIPS_PLACE)
{
*piUse = -1;
@ -3006,7 +3006,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
switch(heldItemId)
{
case Item::nameTag_Id:
case Item::name_tag_Id:
*piUse=IDS_TOOLTIPS_NAME;
break;
@ -3043,13 +3043,13 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
switch (heldItemId)
{
// Things to USE
case Item::nameTag_Id:
case Item::name_tag_Id:
*piUse=IDS_TOOLTIPS_NAME;
break;
case Item::lead_Id:
if (!animal->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH;
break;
case Item::bucket_empty_Id:
case Item::bucket_Id:
*piUse=IDS_TOOLTIPS_MILK;
break;
default:
@ -3082,7 +3082,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
switch(heldItemId)
{
// Things to USE
case Item::nameTag_Id:
case Item::name_tag_Id:
*piUse=IDS_TOOLTIPS_NAME;
break;
@ -3091,7 +3091,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
break;
case Item::bowl_Id:
case Item::bucket_empty_Id: // You can milk a mooshroom with either a bowl (mushroom soup) or a bucket (milk)!
case Item::bucket_Id: // You can milk a mooshroom with either a bowl (mushroom soup) or a bucket (milk)!
*piUse=IDS_TOOLTIPS_MILK;
break;
case Item::shears_Id:
@ -3157,7 +3157,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
switch(heldItemId)
{
case Item::nameTag_Id:
case Item::name_tag_Id:
*piUse=IDS_TOOLTIPS_NAME;
break;
@ -3165,7 +3165,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
if (!sheep->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH;
break;
case Item::dye_powder_Id:
case Item::dye_Id:
{
// convert to tile-based color value (0 is white instead of black)
int newColor = ColoredTile::getTileDataForItemAuxValue(heldItem->getAuxValue());
@ -3217,7 +3217,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
{
if (!pig->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH;
}
else if (heldItemId == Item::nameTag_Id)
else if (heldItemId == Item::name_tag_Id)
{
*piUse = IDS_TOOLTIPS_NAME;
}*/
@ -3264,7 +3264,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
switch(heldItemId)
{
case Item::nameTag_Id:
case Item::name_tag_Id:
*piUse=IDS_TOOLTIPS_NAME;
break;
@ -3290,10 +3290,10 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
}
break;
case Item::enderPearl_Id:
case Item::ender_pearl_Id:
// Use is throw, so don't change the tips for the wolf
break;
case Item::dye_powder_Id:
case Item::dye_Id:
if (wolf->isTame())
{
if (ColoredTile::getTileDataForItemAuxValue(heldItem->getAuxValue()) != wolf->getCollarColor())
@ -3360,7 +3360,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
{
if (!ocelot->isLeashed()) *piUse = IDS_TOOLTIPS_LEASH;
}
else if (heldItemId == Item::nameTag_Id)
else if (heldItemId == Item::name_tag_Id)
{
*piUse = IDS_TOOLTIPS_NAME;
}
@ -3455,10 +3455,10 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
case eTYPE_ZOMBIE:
{
shared_ptr<Zombie> zomb = dynamic_pointer_cast<Zombie>(hitResult->entity);
static GoldenAppleItem *goldapple = static_cast<GoldenAppleItem *>(Item::apple_gold);
static GoldenAppleItem *goldapple = static_cast<GoldenAppleItem *>(Item::golden_apple);
//zomb->hasEffect(MobEffect::weakness) - not present on client.
if ( zomb->isVillager() && zomb->isWeakened() && (heldItemId == Item::apple_gold_Id) && !goldapple->isFoil(heldItem) )
if ( zomb->isVillager() && zomb->isWeakened() && (heldItemId == Item::golden_apple_Id) && !goldapple->isFoil(heldItem) )
{
*piUse=IDS_TOOLTIPS_CURE;
}
@ -3477,18 +3477,18 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
case Item::wheat_Id:
case Item::sugar_Id:
case Item::bread_Id:
case Tile::hayBlock_Id:
case Tile::hay_block_Id:
case Item::apple_Id:
heldItemIsFood = true;
break;
case Item::carrotGolden_Id:
case Item::apple_gold_Id:
case Item::golden_carrot_Id:
case Item::golden_apple_Id:
heldItemIsLove = true;
heldItemIsFood = true;
break;
case Item::horseArmorDiamond_Id:
case Item::horseArmorGold_Id:
case Item::horseArmorMetal_Id:
case Item::diamond_horse_armor_Id:
case Item::golden_horse_armor_Id:
case Item::iron_horse_armor_Id:
heldItemIsArmour = true;
break;
}
@ -3501,7 +3501,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
{
if (!horse->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH;
}
else if (heldItemId == Item::nameTag_Id)
else if (heldItemId == Item::name_tag_Id)
{
*piUse = IDS_TOOLTIPS_NAME;
}
@ -3591,7 +3591,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
{
if (!mob->isLeashed()) *piUse=IDS_TOOLTIPS_LEASH;
}
else if (heldItemId == Item::nameTag_Id)
else if (heldItemId == Item::name_tag_Id)
{
*piUse=IDS_TOOLTIPS_NAME;
}
@ -3916,7 +3916,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
app.LoadCreativeMenu(iPad,player);
}
// 4J-PB - Microsoft request that we use the 3x3 crafting if someone presses X while at the workbench
else if ((hitResult!=nullptr) && (hitResult->type == HitResult::TILE) && (level->getTile(hitResult->x, hitResult->y, hitResult->z) == Tile::workBench_Id))
else if ((hitResult!=nullptr) && (hitResult->type == HitResult::TILE) && (level->getTile(hitResult->x, hitResult->y, hitResult->z) == Tile::crafting_table_Id))
{
//ui.PlayUISFX(eSFX_Press);
//app.LoadXuiCrafting3x3Menu(iPad,player,hitResult->x, hitResult->y, hitResult->z);

View file

@ -2017,7 +2017,11 @@ void MinecraftServer::run(int64_t seed, void *lpParameter)
QueryPerformanceCounter(&asAfterRules);
#endif
#ifdef MINECRAFT_SERVER_BUILD
levels[0]->saveToDisc(nullptr, true);
#else
levels[0]->saveToDisc(Minecraft::GetInstance()->progressRenderer, true);
#endif
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
QueryPerformanceCounter(&asAfterFlush);

View file

@ -47,7 +47,7 @@ MultiPlayerChunkCache::MultiPlayerChunkCache(Level *level)
{
unsigned char tileId = 0;
if( y <= ( level->getSeaLevel() - 10 ) ) tileId = Tile::stone_Id;
else if( y < level->getSeaLevel() ) tileId = Tile::calmWater_Id;
else if( y < level->getSeaLevel() ) tileId = Tile::water_Id;
bytes[x << 11 | z << 7 | y] = tileId;
}

View file

@ -589,11 +589,11 @@ bool MultiPlayerLevel::doSetTileAndData(int x, int y, int z, int tile, int data)
// water changing from static to dynamic for instance. Note that this is only called from a client connection,
// and so the thing being notified of any update through tileUpdated is the renderer
int prevTile = getTile(x, y, z);
bool visuallyImportant = (!( ( ( prevTile == Tile::water_Id ) && ( tile == Tile::calmWater_Id ) ) ||
( ( prevTile == Tile::calmWater_Id ) && ( tile == Tile::water_Id ) ) ||
( ( prevTile == Tile::lava_Id ) && ( tile == Tile::calmLava_Id ) ) ||
( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::calmLava_Id ) ) ||
( ( prevTile == Tile::calmLava_Id ) && ( tile == Tile::lava_Id ) ) ) );
bool visuallyImportant = (!( ( ( prevTile == Tile::flowing_water_Id ) && ( tile == Tile::water_Id ) ) ||
( ( prevTile == Tile::water_Id ) && ( tile == Tile::flowing_water_Id ) ) ||
( ( prevTile == Tile::flowing_lava_Id ) && ( tile == Tile::lava_Id ) ) ||
( ( prevTile == Tile::lava_Id ) && ( tile == Tile::lava_Id ) ) ||
( ( prevTile == Tile::lava_Id ) && ( tile == Tile::flowing_lava_Id ) ) ) );
// If we're the host, need to tell the renderer for updates even if they don't change things as the host
// might have been sharing data and so set it already, but the renderer won't know to update
if( (Level::setTileAndData(x, y, z, tile, data, Tile::UPDATE_ALL) || g_NetworkManager.IsHost() ) )
@ -721,13 +721,15 @@ void MultiPlayerLevel::animateTickDoWork()
int y = cy + random->nextInt(8);
int z = cz + random->nextInt(8);
int t = getTile(x, y, z);
Tile *tile = Tile::tiles[t];
if (tile == nullptr) return; // tu31 tutorial world fix
if (random->nextInt(8) > y && t == 0 && dimension->hasBedrockFog()) // 4J - test for bedrock fog brought forward from 1.2.3
{
addParticle(eParticleType_depthsuspend, x + random->nextFloat(), y + random->nextFloat(), z + random->nextFloat(), 0, 0, 0);
}
else if (t > 0)
{
Tile::tiles[t]->animateTick(this, x, y, z, animateRandom);
tile->animateTick(this, x, y, z, animateRandom);
}
}
}

View file

@ -11,7 +11,7 @@ public:
virtual Icon_SPU *getTexture(int face, int data)
{
if (face == Facing::UP || face == Facing::DOWN)
return TileRef_SPU(wood_Id)->getTexture(face);
return TileRef_SPU(planks_Id)->getTexture(face);
return Tile_SPU::getTexture(face, data);
}
};

View file

@ -10,8 +10,8 @@ public:
Icon_SPU *getTexture(int face, int data)
{
if(id == Tile_SPU::button_wood_Id)
return TileRef_SPU(wood_Id)->getTexture(Facing::UP);
if(id == Tile_SPU::wooden_button_Id)
return TileRef_SPU(planks_Id)->getTexture(Facing::UP);
else
return TileRef_SPU(rock_Id)->getTexture(Facing::UP);
}

View file

@ -89,30 +89,30 @@ void ChunkRebuildData::disableUnseenTiles()
// Establish whether this tile and its neighbours are all made of rock, dirt, unbreakable tiles, or have already
// been determined to meet this criteria themselves and have a tile of 255 set.
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::unbreakable_Id ) || ( flags & e_flag_NoRender) ) ) continue;
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::bedrock_Id ) || ( flags & e_flag_NoRender) ) ) continue;
tileID = getTile(iX-1, iY, iZ);
flags = getFlags(iX-1, iY, iZ);
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::unbreakable_Id ) || ( flags & e_flag_NoRender) ) ) continue;
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::bedrock_Id ) || ( flags & e_flag_NoRender) ) ) continue;
tileID = getTile(iX+1, iY, iZ);
flags = getFlags(iX+1, iY, iZ);
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::unbreakable_Id ) || ( flags & e_flag_NoRender) ) ) continue;
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::bedrock_Id ) || ( flags & e_flag_NoRender) ) ) continue;
tileID = getTile(iX, iY, iZ-1);
flags = getFlags(iX, iY, iZ-1);
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::unbreakable_Id ) || ( flags & e_flag_NoRender) ) ) continue;
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::bedrock_Id ) || ( flags & e_flag_NoRender) ) ) continue;
tileID = getTile(iX, iY, iZ+1);
flags = getFlags(iX, iY, iZ+1);
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::unbreakable_Id ) || ( flags & e_flag_NoRender) ) ) continue;
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::bedrock_Id ) || ( flags & e_flag_NoRender) ) ) continue;
// Treat the bottom of the world differently - we shouldn't ever be able to look up at this, so consider tiles as invisible
// if they are surrounded on sides other than the bottom
if( iY > 0 )
{
tileID = getTile(iX, iY-1, iZ);
flags = getFlags(iX, iY-1, iZ);
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::unbreakable_Id ) || ( flags & e_flag_NoRender) ) ) continue;
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::bedrock_Id ) || ( flags & e_flag_NoRender) ) ) continue;
}
tileID = getTile(iX, iY+1, iZ);
flags = getFlags(iX, iY+1, iZ);
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::unbreakable_Id ) || ( flags & e_flag_NoRender) ) ) continue;
if( !( ( tileID == Tile_SPU::rock_Id ) || ( tileID == Tile_SPU::dirt_Id ) || ( tileID == Tile_SPU::bedrock_Id ) || ( flags & e_flag_NoRender) ) ) continue;
// This tile is surrounded. Flag it as not requiring to be rendered by setting its id to 255.
setFlag(iX, iY, iZ, e_flag_NoRender);
@ -148,11 +148,11 @@ void ChunkRebuildData::buildMaterials()
buildMaterial(Material_SPU::air_Id, Material::air);
buildMaterial(Material_SPU::grass_Id, Material::grass);
buildMaterial(Material_SPU::dirt_Id, Material::dirt);
buildMaterial(Material_SPU::wood_Id, Material::wood);
buildMaterial(Material_SPU::planks_Id, Material::wood);
buildMaterial(Material_SPU::stone_Id, Material::stone);
buildMaterial(Material_SPU::metal_Id, Material::metal);
buildMaterial(Material_SPU::water_Id, Material::water);
buildMaterial(Material_SPU::lava_Id, Material::lava);
buildMaterial(Material_SPU::flowing_water_Id, Material::water);
buildMaterial(Material_SPU::flowing_lava_Id, Material::lava);
buildMaterial(Material_SPU::leaves_Id, Material::leaves);
buildMaterial(Material_SPU::plant_Id, Material::plant);
buildMaterial(Material_SPU::replaceable_plant_Id, Material::replaceable_plant);
@ -166,7 +166,7 @@ void ChunkRebuildData::buildMaterials()
buildMaterial(Material_SPU::explosive_Id, Material::explosive);
buildMaterial(Material_SPU::coral_Id, Material::coral);
buildMaterial(Material_SPU::ice_Id, Material::ice);
buildMaterial(Material_SPU::topSnow_Id, Material::topSnow);
buildMaterial(Material_SPU::snow_layer_Id, Material::topSnow);
buildMaterial(Material_SPU::snow_Id, Material::snow);
buildMaterial(Material_SPU::cactus_Id, Material::cactus);
buildMaterial(Material_SPU::clay_Id, Material::clay);
@ -186,11 +186,11 @@ int ChunkRebuildData::getMaterialID(Tile* pTile)
if(m == Material::air) return Material_SPU::air_Id;
if(m == Material::grass) return Material_SPU::grass_Id;
if(m == Material::dirt) return Material_SPU::dirt_Id;
if(m == Material::wood) return Material_SPU::wood_Id;
if(m == Material::wood) return Material_SPU::planks_Id;
if(m == Material::stone) return Material_SPU::stone_Id;
if(m == Material::metal) return Material_SPU::metal_Id;
if(m == Material::water) return Material_SPU::water_Id;
if(m == Material::lava) return Material_SPU::lava_Id;
if(m == Material::water) return Material_SPU::flowing_water_Id;
if(m == Material::lava) return Material_SPU::flowing_lava_Id;
if(m == Material::leaves) return Material_SPU::leaves_Id;
if(m == Material::plant) return Material_SPU::plant_Id;
if(m == Material::replaceable_plant)return Material_SPU::replaceable_plant_Id;
@ -204,7 +204,7 @@ int ChunkRebuildData::getMaterialID(Tile* pTile)
if(m == Material::explosive) return Material_SPU::explosive_Id;
if(m == Material::coral) return Material_SPU::coral_Id;
if(m == Material::ice) return Material_SPU::ice_Id;
if(m == Material::topSnow) return Material_SPU::topSnow_Id;
if(m == Material::topSnow) return Material_SPU::snow_layer_Id;
if(m == Material::snow) return Material_SPU::snow_Id;
if(m == Material::cactus) return Material_SPU::cactus_Id;
if(m == Material::clay) return Material_SPU::clay_Id;
@ -269,8 +269,8 @@ void ChunkRebuildData::createTileData()
setIconSPUFromIcon(&m_tileData.grass_iconSideOverlay, Tile::grass->iconSideOverlay);
// ThinFence
setIconSPUFromIcon(&m_tileData.ironFence_EdgeTexture, static_cast<ThinFenceTile *>(Tile::ironFence)->getEdgeTexture());
setIconSPUFromIcon(&m_tileData.thinGlass_EdgeTexture, static_cast<ThinFenceTile *>(Tile::thinGlass)->getEdgeTexture());
setIconSPUFromIcon(&m_tileData.iron_bars_EdgeTexture, static_cast<ThinFenceTile *>(Tile::iron_bars)->getEdgeTexture());
setIconSPUFromIcon(&m_tileData.glass_pane_EdgeTexture, static_cast<ThinFenceTile *>(Tile::glass_pane)->getEdgeTexture());
//FarmTile
setIconSPUFromIcon(&m_tileData.farmTile_Dry, static_cast<FarmTile *>(Tile::farmland)->iconDry);
@ -279,7 +279,7 @@ void ChunkRebuildData::createTileData()
// DoorTile
for(int i=0;i<8; i++)
{
setIconSPUFromIcon(&m_tileData.doorTile_Icons[i], static_cast<DoorTile *>(Tile::door_wood)->icons[i]);
setIconSPUFromIcon(&m_tileData.doorTile_Icons[i], static_cast<DoorTile *>(Tile::wooden_door)->icons[i]);
// we're not supporting flipped icons, so manually flip here
if(i>=4)
m_tileData.doorTile_Icons[i].flipHorizontal();
@ -830,11 +830,11 @@ int ChunkRebuildData::getRawBrightness(int x, int y, int z, bool propagate)
int id = getTile(x, y, z);
switch(id)
{
case Tile_SPU::stoneSlabHalf_Id:
case Tile_SPU::woodSlabHalf_Id:
case Tile_SPU::stone_slab_Id:
case Tile_SPU::wooden_slab_Id:
case Tile_SPU::farmland_Id:
case Tile_SPU::stairs_stone_Id:
case Tile_SPU::stairs_wood_Id:
case Tile_SPU::stone_stairs_Id:
case Tile_SPU::oak_stairs_Id:
{
int br = getRawBrightness(x, y + 1, z, false);
int br1 = getRawBrightness(x + 1, y, z, false);

View file

@ -19,7 +19,7 @@ public:
// down is used by the torch tesselator
if (face == Facing::DOWN)
{
if (id==diode_on_Id)
if (id==powered_repeater_Id)
{
return TileRef_SPU(notGate_on_Id)->getTexture(face);
}
@ -30,7 +30,7 @@ public:
return icon();
}
// edge of stone half-step
return TileRef_SPU(stoneSlab_Id)->getTexture(Facing::UP);
return TileRef_SPU(double_stone_slab_Id)->getTexture(Facing::UP);
}
virtual bool shouldRenderFace(LevelSource *level, int x, int y, int z, int face)
{

View file

@ -9,7 +9,7 @@ private:
public:
FenceGateTile_SPU(int id) : Tile_SPU(id) {}
Icon_SPU *getTexture(int face, int data) { return TileRef_SPU(wood_Id)->getTexture(face); }
Icon_SPU *getTexture(int face, int data) { return TileRef_SPU(planks_Id)->getTexture(face); }
static int getDirection(int data) { return (data & DIRECTION_MASK); }
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param // Brought forward from 1.2.3

View file

@ -54,7 +54,7 @@ int FenceTile_SPU::getRenderShape()
bool FenceTile_SPU::connectsTo(ChunkRebuildData *level, int x, int y, int z)
{
int tile = level->getTile(x, y, z);
if (tile == id || tile == Tile_SPU::fenceGate_Id)
if (tile == id || tile == Tile_SPU::fence_gate_Id)
{
return true;
}

View file

@ -20,15 +20,15 @@ public:
int id = level->getTile(x, y, z);
switch (id)
{
case Tile_SPU::wood_Id:
case Tile_SPU::woodSlab_Id:
case Tile_SPU::woodSlabHalf_Id:
case Tile_SPU::planks_Id:
case Tile_SPU::double_wooden_slab_Id:
case Tile_SPU::wooden_slab_Id:
case Tile_SPU::fence_Id:
case Tile_SPU::stairs_wood_Id:
case Tile_SPU::stairs_birchwood_Id:
case Tile_SPU::stairs_sprucewood_Id:
case Tile_SPU::stairs_junglewood_Id:
case Tile_SPU::treeTrunk_Id:
case Tile_SPU::oak_stairs_Id:
case Tile_SPU::birch_stairs_Id:
case Tile_SPU::spruce_stairs_Id:
case Tile_SPU::jungle_stairs_Id:
case Tile_SPU::log_Id:
case Tile_SPU::leaves_Id:
case Tile_SPU::bookshelf_Id:
case Tile_SPU::tnt_Id:

View file

@ -14,7 +14,7 @@ public:
if (face != data) return icon();
if(id == furnace_Id)
return &ms_pTileData->furnaceTile_iconFront;
else //furnace_lit_Id
else //lit_furnace_Id
return &ms_pTileData->furnaceTile_iconFront_lit;
}
};

View file

@ -21,7 +21,7 @@ Icon_SPU *GrassTile_SPU::getTexture(ChunkRebuildData *level, int x, int y, int z
if (face == Facing::UP) return &ms_pTileData->grass_iconTop;
if (face == Facing::DOWN) return TileRef_SPU(dirt_Id)->getTexture(face);
Material_SPU *above = level->getMaterial(x, y + 1, z);
if (above->getID() == Material_SPU::topSnow_Id || above->getID() == Material_SPU::snow_Id)
if (above->getID() == Material_SPU::snow_layer_Id || above->getID() == Material_SPU::snow_Id)
return &ms_pTileData->grass_iconSnowSide;
else
return icon();

View file

@ -71,7 +71,7 @@ bool HalfSlabTile_SPU::shouldRenderFace(ChunkRebuildData *level, int x, int y, i
bool HalfSlabTile_SPU::isHalfSlab(int tileId)
{
return tileId == Tile_SPU::stoneSlabHalf_Id || tileId == Tile_SPU::woodSlabHalf_Id;
return tileId == Tile_SPU::stone_slab_Id || tileId == Tile_SPU::wooden_slab_Id;
}

View file

@ -24,7 +24,7 @@ int LiquidTile_SPU::getColor(ChunkRebuildData *level, int x, int y, int z)
int LiquidTile_SPU::getColor(ChunkRebuildData *level, int x, int y, int z, int d)
{
// MGH - TODO
if (getMaterial()->getID() == Material_SPU::water_Id)
if (getMaterial()->getID() == Material_SPU::flowing_water_Id)
{
// Biome b = level.getBiomeSource().getBiome(x, z);
// return b.waterColor;
@ -62,16 +62,16 @@ Icon_SPU *LiquidTile_SPU::getTexture(int face, int data)
{
if (face == Facing::DOWN || face == Facing::UP)
{
if(id == water_Id || id == calmWater_Id)
if(id == flowing_water_Id || id == water_Id)
return &ms_pTileData->liquidTile_iconWaterStill;
else //(id == lava_Id || id == calmLava_Id)
else //(id == flowing_lava_Id || id == lava_Id)
return &ms_pTileData->liquidTile_iconLavaStill;
}
else
{
if(id == water_Id || id == calmWater_Id)
if(id == flowing_water_Id || id == water_Id)
return &ms_pTileData->liquidTile_iconWaterFlow;
else //(id == lava_Id || id == calmLava_Id)
else //(id == flowing_lava_Id || id == lava_Id)
return &ms_pTileData->liquidTile_iconLavaFlow;
}
}
@ -201,21 +201,21 @@ float LiquidTile_SPU::getBrightness(ChunkRebuildData *level, int x, int y, int z
int LiquidTile_SPU::getRenderLayer()
{
return getMaterial()->getID() == Material_SPU::water_Id ? 1 : 0;
return getMaterial()->getID() == Material_SPU::flowing_water_Id ? 1 : 0;
}
double LiquidTile_SPU::getSlopeAngle(ChunkRebuildData *level, int x, int y, int z, Material_SPU *m)
{
Vec3_SPU flow = Vec3_SPU(0,0,0);
if (m->getID() == Material_SPU::water_Id)
if (m->getID() == Material_SPU::flowing_water_Id)
{
TileRef_SPU tRef(Tile_SPU::water_Id);
TileRef_SPU tRef(Tile_SPU::flowing_water_Id);
flow = static_cast<LiquidTile_SPU *>(tRef.getPtr())->getFlow(level, x, y, z);
}
if (m->getID() == Material_SPU::lava_Id)
if (m->getID() == Material_SPU::flowing_lava_Id)
{
TileRef_SPU tRef(Tile_SPU::lava_Id);
TileRef_SPU tRef(Tile_SPU::flowing_lava_Id);
flow = static_cast<LiquidTile_SPU *>(tRef.getPtr())->getFlow(level, x, y, z);
}
if (flow.x == 0 && flow.z == 0) return -1000;

View file

@ -10,11 +10,11 @@ public:
static const int air_Id = 0;
static const int grass_Id = 1;
static const int dirt_Id = 2;
static const int wood_Id = 3;
static const int planks_Id = 3;
static const int stone_Id = 4;
static const int metal_Id = 5;
static const int water_Id = 6;
static const int lava_Id = 7;
static const int flowing_water_Id = 6;
static const int flowing_lava_Id = 7;
static const int leaves_Id = 8;
static const int plant_Id = 9;
static const int replaceable_plant_Id = 10;
@ -27,7 +27,7 @@ public:
static const int explosive_Id = 17;
static const int coral_Id = 18;
static const int ice_Id = 19;
static const int topSnow_Id = 20;
static const int snow_layer_Id = 20;
static const int snow_Id = 21;
static const int cactus_Id = 22;
static const int clay_Id = 23;

View file

@ -17,7 +17,7 @@ public:
if (face == Facing::UP) return &ms_pTileData->mycelTile_iconTop;
if (face == Facing::DOWN) return TileRef_SPU(dirt_Id)->getTexture(face);
Material_SPU *above = level->getMaterial(x, y + 1, z);
if (above->getID() == Material_SPU::topSnow_Id || above->getID() == Material_SPU::snow_Id)
if (above->getID() == Material_SPU::snow_layer_Id || above->getID() == Material_SPU::snow_Id)
return &ms_pTileData->mycelTile_iconSnowSide;
else return icon();

View file

@ -17,7 +17,7 @@ public:
if (face == Facing::DOWN) return &ms_pTileData->pumpkinTile_iconTop;
Icon_SPU* iconFace = &ms_pTileData->pumpkinTile_iconFace;
if(id == litPumpkin_Id)
if(id == lit_pumpkin_Id)
iconFace = &ms_pTileData->pumpkinTile_iconFaceLit;
if (data == DIR_NORTH && face == Facing::NORTH) return iconFace;

View file

@ -25,7 +25,7 @@ public:
{
bool usesDataBit = false;
Icon_SPU* iconTurn = &ms_pTileData->railTile_iconTurn;
if(id == goldenRail_Id)
if(id == golden_rail_Id)
{
usesDataBit = true;
iconTurn = &ms_pTileData->railTile_iconTurnGolden;
@ -33,7 +33,7 @@ public:
if (usesDataBit)
{
// if (id == Tile::goldenRail_Id)
// if (id == Tile::golden_rail_Id)
// {
if ((data & RAIL_DATA_BIT) == 0)
{
@ -51,7 +51,7 @@ public:
virtual int getRenderShape() { return Tile_SPU::SHAPE_RAIL; }
bool isUsesDataBit()
{
if(id == goldenRail_Id || id == detectorRail_Id)
if(id == golden_rail_Id || id == detector_rail_Id)
return true;
return false;
}

View file

@ -32,9 +32,9 @@ public:
static bool shouldConnectTo(ChunkRebuildData *level, int x, int y, int z, int direction)
{
int t = level->getTile(x, y, z);
if (t == Tile_SPU::redStoneDust_Id) return true;
if (t == Tile_SPU::redstone_wire_Id) return true;
if (t == 0) return false;
if (t == Tile_SPU::diode_off_Id || t == Tile_SPU::diode_on_Id)
if (t == Tile_SPU::unpowered_repeater_Id || t == Tile_SPU::powered_repeater_Id)
{
int data = level->getData(x, y, z);
return direction == (data & DiodeTile_SPU::DIRECTION_MASK) || direction == Direction::DIRECTION_OPPOSITE[data & DiodeTile_SPU::DIRECTION_MASK];

View file

@ -9,13 +9,13 @@ public:
SignTile_SPU(int id) : EntityTile_SPU(id) {}
bool onGround()
{
if(id == wallSign_Id)
if(id == wall_standing_sign_Id)
return false;
// sign_Id
// standing_sign_Id
return true;
}
Icon_SPU *getTexture(int face, int data){ return TileRef_SPU(wood_Id)->getTexture(face); }
Icon_SPU *getTexture(int face, int data){ return TileRef_SPU(planks_Id)->getTexture(face); }
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
{
if (onGround()) return;

View file

@ -36,14 +36,14 @@ bool StairTile_SPU::isStairs(int id)
{
switch(id)
{
case Tile_SPU::stairs_wood_Id:
case Tile_SPU::stairs_stone_Id:
case Tile_SPU::stairs_bricks_Id:
case Tile_SPU::stairs_stoneBrickSmooth_Id:
case Tile_SPU::stairs_netherBricks_Id:
case Tile_SPU::stairs_sandstone_Id:
case Tile_SPU::stairs_sprucewood_Id:
case Tile_SPU::stairs_birchwood_Id:
case Tile_SPU::oak_stairs_Id:
case Tile_SPU::stone_stairs_Id:
case Tile_SPU::brick_stairs_Id:
case Tile_SPU::stone_brick_stairsSmooth_Id:
case Tile_SPU::nether_brick_stairs_Id:
case Tile_SPU::sandstone_stairs_Id:
case Tile_SPU::spruce_stairs_Id:
case Tile_SPU::birch_stairs_Id:
return true;
default:
return false;

View file

@ -45,8 +45,8 @@ public:
int getConnectDir(ChunkRebuildData *level, int x, int y, int z)
{
int fruitID = pumpkin_Id;
if(id == melonStem_Id)
fruitID = melon_Id;
if(id == melon_stem_Id)
fruitID = melon_block_Id;
int d = level->getData(x, y, z);
if (d < 7) return -1;

View file

@ -21,7 +21,7 @@ public:
{
if (data == HOST_COBBLE)
{
return TileRef_SPU(stoneBrick_Id)->getTexture(face);
return TileRef_SPU(stonebrick_Id)->getTexture(face);
}
if (data == HOST_STONEBRICK)
{

View file

@ -37,19 +37,19 @@ public:
return &ms_pTileData->stoneSlab_iconSide;
break;
case SAND_SLAB:
return TileRef_SPU(sandStone_Id)->getTexture(face); //Tile::sandStone->getTexture(face);
return TileRef_SPU(sandstone_Id)->getTexture(face); //Tile::sandStone->getTexture(face);
case WOOD_SLAB:
return TileRef_SPU(wood_Id)->getTexture(face); //Tile::wood->getTexture(face);
return TileRef_SPU(planks_Id)->getTexture(face); //Tile::wood->getTexture(face);
case COBBLESTONE_SLAB:
return TileRef_SPU(stoneBrick_Id)->getTexture(face); //Tile::stoneBrick->getTexture(face);
return TileRef_SPU(stonebrick_Id)->getTexture(face); //Tile::stoneBrick->getTexture(face);
case BRICK_SLAB:
return TileRef_SPU(redBrick_Id)->getTexture(face); //Tile::redBrick->getTexture(face);
return TileRef_SPU(brick_block_Id)->getTexture(face); //Tile::redBrick->getTexture(face);
case SMOOTHBRICK_SLAB:
return TileRef_SPU(stoneBrickSmooth_Id)->getTexture(face); //Tile::stoneBrickSmooth->getTexture(face, SmoothStoneBrickTile::TYPE_DEFAULT);
case NETHERBRICK_SLAB:
return TileRef_SPU(netherBrick_Id)->getTexture(Facing::UP); //Tile::netherBrick->getTexture(Facing::UP);
return TileRef_SPU(nether_brick_Id)->getTexture(Facing::UP); //Tile::netherBrick->getTexture(Facing::UP);
case QUARTZ_SLAB:
return TileRef_SPU(quartzBlock_Id)->getTexture(face); //Tile::quartzBlock->getTexture(face);
return TileRef_SPU(quartz_block_Id)->getTexture(face); //Tile::quartzBlock->getTexture(face);
}

View file

@ -67,10 +67,10 @@ void ThinFenceTile_SPU::updateShape(ChunkRebuildData *level, int x, int y, int z
Icon_SPU *ThinFenceTile_SPU::getEdgeTexture()
{
if(id == Tile_SPU::ironFence_Id)
return &ms_pTileData->ironFence_EdgeTexture;
if(id == Tile_SPU::thinGlass_Id)
return &ms_pTileData->thinGlass_EdgeTexture;
if(id == Tile_SPU::iron_bars_Id)
return &ms_pTileData->iron_bars_EdgeTexture;
if(id == Tile_SPU::glass_pane_Id)
return &ms_pTileData->glass_pane_EdgeTexture;
#ifndef SN_TARGET_PS3_SPU
assert(0);
#endif

View file

@ -799,7 +799,7 @@ skipUseItemOn:
// beside a piston and then performing an action on the side of it facing a piston, the following line of code will send a TileUpdatePacket containing the change to pistonMovingPiece_Id
// to the client, and this packet is received before the piston retract action happens - when the piston retract then occurs, it doesn't work properly because the piston tile
// isn't what it is expecting.
if( level->getTile(x,y,z) != Tile::pistonMovingPiece_Id )
if( level->getTile(x,y,z) != Tile::piston_extension_Id )
{
player->connection->send(std::make_shared<TileUpdatePacket>(x, y, z, level));
}
@ -2391,7 +2391,7 @@ void PlayerConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
// make sure the sent item is the currently carried item
shared_ptr<ItemInstance> carried = player->inventory->getSelected();
if (sentItem != nullptr && sentItem->id == Item::writingBook_Id && sentItem->id == carried->id)
if (sentItem != nullptr && sentItem->id == Item::writable_book_Id && sentItem->id == carried->id)
{
player->inventory->setItem(player->inventory->selected, sentItem);
}
@ -2410,7 +2410,7 @@ void PlayerConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
// make sure the sent item is the currently carried item
shared_ptr<ItemInstance> carried = player->inventory->getSelected();
if (sentItem != nullptr && sentItem->id == Item::writingBook_Id && sentItem->id == carried->id)
if (sentItem != nullptr && sentItem->id == Item::writable_book_Id && sentItem->id == carried->id)
{
sentItem->setHoverName(sentItem->tag->getString(L"title"));
sentItem->id = 387;
@ -2586,7 +2586,7 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet)
player->drop(pTempItemInst);
}
}
else if (pTempItemInst->id == Item::fireworksCharge_Id || pTempItemInst->id == Item::fireworks_Id)
else if (pTempItemInst->id == Item::firework_charge_Id || pTempItemInst->id == Item::fireworks_Id)
{
CraftingMenu *menu = static_cast<CraftingMenu *>(player->containerMenu);
player->openFireworks(menu->getX(), menu->getY(), menu->getZ() );
@ -2676,16 +2676,16 @@ void PlayerConnection::handleCraftItem(shared_ptr<CraftItemPacket> packet)
// handle achievements
switch(pTempItemInst->id)
{
case Tile::workBench_Id: player->awardStat(GenericStats::buildWorkbench(), GenericStats::param_buildWorkbench()); break;
case Item::pickAxe_wood_Id: player->awardStat(GenericStats::buildPickaxe(), GenericStats::param_buildPickaxe()); break;
case Tile::crafting_table_Id: player->awardStat(GenericStats::buildWorkbench(), GenericStats::param_buildWorkbench()); break;
case Item::wooden_pickaxe_Id: player->awardStat(GenericStats::buildPickaxe(), GenericStats::param_buildPickaxe()); break;
case Tile::furnace_Id: player->awardStat(GenericStats::buildFurnace(), GenericStats::param_buildFurnace()); break;
//case Item::hoe_wood_Id: player->awardStat(GenericStats::buildHoe(), GenericStats::param_buildHoe()); break;
//case Item::wooden_hoe_Id: player->awardStat(GenericStats::buildHoe(), GenericStats::param_buildHoe()); break;
case Item::bread_Id: player->awardStat(GenericStats::makeBread(), GenericStats::param_makeBread()); break;
case Item::cake_Id: player->awardStat(GenericStats::bakeCake(), GenericStats::param_bakeCake()); break;
case Item::pickAxe_stone_Id: player->awardStat(GenericStats::buildBetterPickaxe(), GenericStats::param_buildBetterPickaxe()); break;
//case Item::sword_wood_Id: player->awardStat(GenericStats::buildSword(), GenericStats::param_buildSword()); break;
case Item::stone_pickaxe_Id: player->awardStat(GenericStats::buildBetterPickaxe(), GenericStats::param_buildBetterPickaxe()); break;
//case Item::wooden_sword_Id: player->awardStat(GenericStats::buildSword(), GenericStats::param_buildSword()); break;
case Tile::dispenser_Id: player->awardStat(GenericStats::dispenseWithThis(), GenericStats::param_dispenseWithThis()); break;
case Tile::enchantTable_Id: player->awardStat(GenericStats::enchantments(), GenericStats::param_enchantments()); break;
case Tile::enchanting_table_Id: player->awardStat(GenericStats::enchantments(), GenericStats::param_enchantments()); break;
case Tile::bookshelf_Id: player->awardStat(GenericStats::bookcase(), GenericStats::param_bookcase()); break;
}
switch (pTempItemInst->getItem()->getBaseItemType()) {

View file

@ -215,7 +215,7 @@ bool PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
int centreZC = 0;
#endif
// 4J Added - Give every player a map the first time they join a server
player->inventory->setItem( 9, std::make_shared<ItemInstance>(Item::emptyMap_Id, 1, level->getAuxValueForMap(player->getXuid(), 0, centreXC, centreZC, mapScale)));
player->inventory->setItem( 9, std::make_shared<ItemInstance>(Item::map_Id, 1, level->getAuxValueForMap(player->getXuid(), 0, centreXC, centreZC, mapScale)));
Random* r = new Random();
player->enchantmentSeed = r->nextInt(1000000); //Randomise enchantment seed upon joining server
if(app.getGameRuleDefinitions() != nullptr)

View file

@ -249,7 +249,7 @@ void PreStitchedTextureMap::makeTextureAnimated(TexturePack *texturePack, Stitch
StitchedTexture *PreStitchedTextureMap::getTexture(const wstring &name)
{
#ifndef _CONTENT_PACKAGE
app.DebugPrintf("Not implemented!\n");
app.DebugPrintf("Not implemented: getTexture('%ls')\n", name.c_str());
DEBUG_BREAK();
#endif
return nullptr;
@ -345,7 +345,7 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(0, 2, L"helmetIron")
ADD_ICON(0, 3, L"helmetDiamond")
ADD_ICON(0, 4, L"helmetGold")
ADD_ICON(0, 5, L"flintAndSteel")
ADD_ICON(0, 5, L"flint_and_steel")
ADD_ICON(0, 6, L"flint")
ADD_ICON(0, 7, L"coal")
ADD_ICON(0, 8, L"string")
@ -413,11 +413,11 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(4, 2, L"swordIron")
ADD_ICON(4, 3, L"swordDiamond")
ADD_ICON(4, 4, L"swordGold")
ADD_ICON(4, 5, L"fishingRod_uncast")
ADD_ICON(4, 5, L"fishing_rod_uncast")
ADD_ICON(4, 6, L"clock")
ADD_ICON(4, 7, L"bowl")
ADD_ICON(4, 8, L"mushroomStew")
ADD_ICON(4, 9, L"yellowDust")
ADD_ICON(4, 8, L"mushroom_stew")
ADD_ICON(4, 9, L"glowstone_dust")
ADD_ICON(4, 10, L"bucket")
ADD_ICON(4, 11, L"bucketWater")
ADD_ICON(4, 12, L"bucketLava")
@ -430,7 +430,7 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(5, 2, L"shovelIron")
ADD_ICON(5, 3, L"shovelDiamond")
ADD_ICON(5, 4, L"shovelGold")
ADD_ICON(5, 5, L"fishingRod_cast")
ADD_ICON(5, 5, L"fishing_rod_cast")
ADD_ICON(5, 6, L"diode")
ADD_ICON(5, 7, L"porkchopRaw")
ADD_ICON(5, 8, L"porkchopCooked")
@ -448,13 +448,13 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(6, 3, L"pickaxeDiamond")
ADD_ICON(6, 4, L"pickaxeGold")
ADD_ICON(6, 5, L"bow_pull_0")
ADD_ICON(6, 6, L"carrotOnAStick")
ADD_ICON(6, 6, L"carrot_on_a_stick")
ADD_ICON(6, 7, L"leather")
ADD_ICON(6, 8, L"saddle")
ADD_ICON(6, 9, L"beefRaw")
ADD_ICON(6, 10, L"beefCooked")
ADD_ICON(6, 11, L"enderPearl")
ADD_ICON(6, 12, L"blazeRod")
ADD_ICON(6, 11, L"ender_pearl")
ADD_ICON(6, 12, L"blaze_rod")
ADD_ICON(6, 13, L"melon")
ADD_ICON(6, 14, L"dyePowder_green")
ADD_ICON(6, 15, L"dyePowder_lime")
@ -465,13 +465,13 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(7, 3, L"hatchetDiamond")
ADD_ICON(7, 4, L"hatchetGold")
ADD_ICON(7, 5, L"bow_pull_1")
ADD_ICON(7, 6, L"potatoBaked")
ADD_ICON(7, 6, L"baked_potato")
ADD_ICON(7, 7, L"potato")
ADD_ICON(7, 8, L"carrots")
ADD_ICON(7, 9, L"chickenRaw")
ADD_ICON(7, 10, L"chickenCooked")
ADD_ICON(7, 11, L"ghastTear")
ADD_ICON(7, 12, L"goldNugget")
ADD_ICON(7, 11, L"ghast_tear")
ADD_ICON(7, 12, L"gold_nugget")
ADD_ICON(7, 13, L"netherStalkSeeds")
ADD_ICON(7, 14, L"dyePowder_brown")
ADD_ICON(7, 15, L"dyePowder_yellow")
@ -482,12 +482,12 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(8, 3, L"hoeDiamond")
ADD_ICON(8, 4, L"hoeGold")
ADD_ICON(8, 5, L"bow_pull_2")
ADD_ICON(8, 6, L"potatoPoisonous")
ADD_ICON(8, 6, L"poisonous_potato")
ADD_ICON(8, 7, L"minecart")
ADD_ICON(8, 8, L"boat")
ADD_ICON(8, 9, L"speckledMelon")
ADD_ICON(8, 10, L"fermentedSpiderEye")
ADD_ICON(8, 11, L"spiderEye")
ADD_ICON(8, 9, L"speckled_melon")
ADD_ICON(8, 10, L"fermented_spider_eye")
ADD_ICON(8, 11, L"spider_eye")
ADD_ICON(8, 12, L"potion")
ADD_ICON(8, 12, L"glassBottle") // Same as potion
ADD_ICON(8, 13, L"potion_contents")
@ -498,16 +498,16 @@ void PreStitchedTextureMap::loadUVs()
//ADD_ICON(9, 1, L"unused")
ADD_ICON(9, 2, L"iron_horse_armor")
ADD_ICON(9, 3, L"diamond_horse_armor")
ADD_ICON(9, 4, L"gold_horse_armor")
ADD_ICON(9, 4, L"golden_horse_armor")
ADD_ICON(9, 5, L"comparator")
ADD_ICON(9, 6, L"carrotGolden")
ADD_ICON(9, 7, L"minecart_chest")
ADD_ICON(9, 8, L"pumpkinPie")
ADD_ICON(9, 6, L"golden_carrot")
ADD_ICON(9, 7, L"chest_minecart")
ADD_ICON(9, 8, L"pumpkin_pie")
ADD_ICON(9, 9, L"monsterPlacer")
ADD_ICON(9, 10, L"potion_splash")
ADD_ICON(9, 11, L"eyeOfEnder")
ADD_ICON(9, 11, L"eye_of_ender")
ADD_ICON(9, 12, L"cauldron")
ADD_ICON(9, 13, L"blazePowder")
ADD_ICON(9, 13, L"blaze_powder")
ADD_ICON(9, 14, L"dyePowder_purple")
ADD_ICON(9, 15, L"dyePowder_magenta")
@ -518,13 +518,13 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(10, 4, L"lead")
ADD_ICON(10, 5, L"netherbrick")
ADD_ICON(10, 6, L"clownfish")
ADD_ICON(10, 7, L"minecart_furnace")
ADD_ICON(10, 7, L"furnace_minecart")
ADD_ICON(10, 8, L"charcoal")
ADD_ICON(10, 9, L"monsterPlacer_overlay")
ADD_ICON(10, 10, L"ruby")
ADD_ICON(10, 11, L"expBottle")
ADD_ICON(10, 12, L"brewingStand")
ADD_ICON(10, 13, L"magmaCream")
ADD_ICON(10, 11, L"experience_bottle")
ADD_ICON(10, 12, L"brewing_stand")
ADD_ICON(10, 13, L"magma_cream")
ADD_ICON(10, 14, L"dyePowder_cyan")
ADD_ICON(10, 15, L"dyePowder_orange")
@ -532,13 +532,13 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(11, 4, L"muttonRaw")
ADD_ICON(11, 5, L"rabbitRaw")
ADD_ICON(11, 6, L"pufferfish")
ADD_ICON(11, 7, L"minecart_hopper")
ADD_ICON(11, 7, L"hopper_minecart")
ADD_ICON(11, 8, L"hopper")
ADD_ICON(11, 9, L"nether_star")
ADD_ICON(11, 10, L"emerald")
ADD_ICON(11, 11, L"writingBook")
ADD_ICON(11, 12, L"writtenBook")
ADD_ICON(11, 13, L"flowerPot")
ADD_ICON(11, 11, L"writable_book")
ADD_ICON(11, 12, L"written_book")
ADD_ICON(11, 13, L"flower_pot")
ADD_ICON(11, 14, L"dyePowder_silver")
ADD_ICON(11, 15, L"dyePowder_white")
@ -549,7 +549,7 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(12, 4, L"muttonCooked")
ADD_ICON(12, 5, L"rabbitCooked")
ADD_ICON(12, 6, L"salmonRaw")
ADD_ICON(12, 7, L"minecart_tnt")
ADD_ICON(12, 7, L"tnt_minecart")
ADD_ICON(12, 8, L"armorStand")
ADD_ICON(12, 9, L"fireworks")
ADD_ICON(12, 10, L"fireworks_charge")
@ -557,14 +557,14 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(12, 12, L"netherquartz")
ADD_ICON(12, 13, L"map_empty")
ADD_ICON(12, 14, L"frame")
ADD_ICON(12, 15, L"enchantedBook")
ADD_ICON(12, 15, L"enchanted_book")
ADD_ICON(13, 0, L"doorAcacia")
ADD_ICON(13, 1, L"doorBirch")
ADD_ICON(13, 2, L"doorDark")
ADD_ICON(13, 3, L"doorJungle")
ADD_ICON(13, 4, L"doorSpruce")
ADD_ICON(13, 5, L"rabbitStew")
ADD_ICON(13, 5, L"rabbit_stew")
ADD_ICON(13, 6, L"salmonCooked")
@ -757,8 +757,8 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(4, 15, L"sapling_birch");
ADD_ICON(5, 0, L"torch_on");
ADD_ICON(5, 1, L"door_wood_upper");
ADD_ICON(5, 2, L"door_iron_upper");
ADD_ICON(5, 1, L"wooden_door_upper");
ADD_ICON(5, 2, L"iron_door_upper");
ADD_ICON(5, 3, L"ladder");
ADD_ICON(5, 4, L"trapdoor");
ADD_ICON(5, 5, L"iron_bars");
@ -774,8 +774,8 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(5, 15, L"crops_7");
ADD_ICON(6, 0, L"lever");
ADD_ICON(6, 1, L"door_wood_lower");
ADD_ICON(6, 2, L"door_iron_lower");
ADD_ICON(6, 1, L"wooden_door_lower");
ADD_ICON(6, 2, L"iron_door_lower");
ADD_ICON(6, 3, L"redstone_torch_on");
ADD_ICON(6, 4, L"stonebrick_mossy");
ADD_ICON(6, 5, L"stonebrick_cracked");
@ -1047,11 +1047,11 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(22, 15, L"red_sandstone_smooth");
ADD_ICON(23, 0, L"door_acacia_upper");
ADD_ICON(23, 1, L"door_birch_upper");
ADD_ICON(23, 2, L"door_dark_upper");
ADD_ICON(23, 3, L"door_jungle_upper");
ADD_ICON(23, 4, L"door_spruce_upper");
ADD_ICON(23, 0, L"acacia_door_upper");
ADD_ICON(23, 1, L"birch_door_upper");
ADD_ICON(23, 2, L"dark_oak_door_upper");
ADD_ICON(23, 3, L"jungle_door_upper");
ADD_ICON(23, 4, L"spruce_door_upper");
ADD_ICON(23, 13, L"sea_lantern");
ADD_ICON(22, 13, L"prismarine");
ADD_ICON(21, 13, L"prismarine_dark");
@ -1062,11 +1062,11 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(23, 14, L"inverted_daylight_detector");
ADD_ICON(23, 15, L"iron_trapdoor");
ADD_ICON(24, 0, L"door_acacia_lower");
ADD_ICON(24, 1, L"door_birch_lower");
ADD_ICON(24, 2, L"door_dark_lower");
ADD_ICON(24, 3, L"door_jungle_lower");
ADD_ICON(24, 4, L"door_spruce_lower");
ADD_ICON(24, 0, L"acacia_door_lower");
ADD_ICON(24, 1, L"birch_door_lower");
ADD_ICON(24, 2, L"dark_oak_door_lower");
ADD_ICON(24, 3, L"jungle_door_lower");
ADD_ICON(24, 4, L"spruce_door_lower");
ADD_ICON(21, 1, L"tallgrass2_tall_grass_lower");
ADD_ICON(20, 1, L"tallgrass2_tall_grass_upper");

View file

@ -325,7 +325,7 @@ void ServerChunkCache::updateOverwriteHellChunk(LevelChunk* origChunk, LevelChun
for(int y=0;y<256;y++)
{
int playerTile = playerChunk->getTile(x,y,z);
if(playerTile == Tile::unbreakable_Id) // if the tile is still unbreakable, the player hasn't changed it, so we can replace with the source
if(playerTile == Tile::bedrock_Id) // if the tile is still unbreakable, the player hasn't changed it, so we can replace with the source
playerChunk->setTileAndData(x, y, z, origChunk->getTile(x,y,z), origChunk->getData(x,y,z));
}
}

View file

@ -77,12 +77,12 @@ void ServerLevel::staticCtor()
RANDOM_BONUS_ITEMS = WeighedTreasureArray(20);
RANDOM_BONUS_ITEMS[0] = new WeighedTreasure(Item::stick_Id, 0, 1, 3, 10);
RANDOM_BONUS_ITEMS[1] = new WeighedTreasure(Tile::wood_Id, 0, 1, 3, 10);
RANDOM_BONUS_ITEMS[2] = new WeighedTreasure(Tile::treeTrunk_Id, 0, 1, 3, 10);
RANDOM_BONUS_ITEMS[3] = new WeighedTreasure(Item::hatchet_stone_Id, 0, 1, 1, 3);
RANDOM_BONUS_ITEMS[4] = new WeighedTreasure(Item::hatchet_wood_Id, 0, 1, 1, 5);
RANDOM_BONUS_ITEMS[5] = new WeighedTreasure(Item::pickAxe_stone_Id, 0, 1, 1, 3);
RANDOM_BONUS_ITEMS[6] = new WeighedTreasure(Item::pickAxe_wood_Id, 0, 1, 1, 5);
RANDOM_BONUS_ITEMS[1] = new WeighedTreasure(Tile::planks_Id, 0, 1, 3, 10);
RANDOM_BONUS_ITEMS[2] = new WeighedTreasure(Tile::log_Id, 0, 1, 3, 10);
RANDOM_BONUS_ITEMS[3] = new WeighedTreasure(Item::stone_axe_Id, 0, 1, 1, 3);
RANDOM_BONUS_ITEMS[4] = new WeighedTreasure(Item::wooden_axe_Id, 0, 1, 1, 5);
RANDOM_BONUS_ITEMS[5] = new WeighedTreasure(Item::stone_pickaxe_Id, 0, 1, 1, 3);
RANDOM_BONUS_ITEMS[6] = new WeighedTreasure(Item::wooden_pickaxe_Id, 0, 1, 1, 5);
RANDOM_BONUS_ITEMS[7] = new WeighedTreasure(Item::apple_Id, 0, 2, 3, 5);
RANDOM_BONUS_ITEMS[8] = new WeighedTreasure(Item::bread_Id, 0, 2, 3, 3);
// 4J-PB - new items
@ -90,12 +90,12 @@ void ServerLevel::staticCtor()
RANDOM_BONUS_ITEMS[10] = new WeighedTreasure(Tile::sapling_Id, 1, 4, 4, 2);
RANDOM_BONUS_ITEMS[11] = new WeighedTreasure(Tile::sapling_Id, 2, 4, 4, 2);
RANDOM_BONUS_ITEMS[12] = new WeighedTreasure(Tile::sapling_Id, 3, 4, 4, 4);
RANDOM_BONUS_ITEMS[13] = new WeighedTreasure(Item::seeds_melon_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[14] = new WeighedTreasure(Item::seeds_pumpkin_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[13] = new WeighedTreasure(Item::melon_seeds_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[14] = new WeighedTreasure(Item::pumpkin_seeds_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[15] = new WeighedTreasure(Tile::cactus_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[16] = new WeighedTreasure(Item::dye_powder_Id, DyePowderItem::BROWN, 1, 2, 2);
RANDOM_BONUS_ITEMS[16] = new WeighedTreasure(Item::dye_Id, DyePowderItem::BROWN, 1, 2, 2);
RANDOM_BONUS_ITEMS[17] = new WeighedTreasure(Item::potato_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[18] = new WeighedTreasure(Item::carrots_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[18] = new WeighedTreasure(Item::carrot_Id, 0, 1, 2, 3);
RANDOM_BONUS_ITEMS[19] = new WeighedTreasure(Tile::mushroom_brown_Id, 0, 1, 2, 2);
};
@ -590,9 +590,9 @@ void ServerLevel::tickTiles()
if (isRaining() && shouldSnow(x + xo, yy, z + zo))
{
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
if (!FourKitBridge::FireBlockForm(dimension->id, x + xo, yy, z + zo, Tile::topSnow_Id, 0))
if (!FourKitBridge::FireBlockForm(dimension->id, x + xo, yy, z + zo, Tile::snow_layer_Id, 0))
#endif
setTileAndUpdate(x + xo, yy, z + zo, Tile::topSnow_Id);
setTileAndUpdate(x + xo, yy, z + zo, Tile::snow_layer_Id);
}
if (isRaining())
{
@ -892,7 +892,7 @@ bool ServerLevel::mayInteract(shared_ptr<Player> player, int xt, int yt, int zt,
// We'll need to do this in a future update
// 4J-PB - Let's allow water near the spawn point, but not lava
if(content!=Tile::lava_Id)
if(content!=Tile::flowing_lava_Id)
{
// allow this to be used
return true;
@ -1646,13 +1646,13 @@ int ServerLevel::runUpdate(void* lpParam)
if( m_updateTileCount[iLev] >= MAX_UPDATES ) break;
// 4J Stu - Grass and Lava ticks currently take up the majority of all tile updates, so I am limiting them
if( (id == Tile::grass_Id && grassTicks >= MAX_GRASS_TICKS) || (id == Tile::calmLava_Id && lavaTicks >= MAX_LAVA_TICKS) ) continue;
if( (id == Tile::grass_Id && grassTicks >= MAX_GRASS_TICKS) || (id == Tile::lava_Id && lavaTicks >= MAX_LAVA_TICKS) ) continue;
// 4J Stu - Added shouldTileTick as some tiles won't even do anything if they are set to tick and use up one of our updates
if (Tile::tiles[id] != nullptr && Tile::tiles[id]->isTicking() && Tile::tiles[id]->shouldTileTick(m_level[iLev],x + (cx * 16), y, z + (cz * 16) ) )
{
if(id == Tile::grass_Id) ++grassTicks;
else if(id == Tile::calmLava_Id) ++lavaTicks;
else if(id == Tile::lava_Id) ++lavaTicks;
m_updateTileX[iLev][m_updateTileCount[iLev]] = x + (cx * 16);
m_updateTileY[iLev][m_updateTileCount[iLev]] = y;
m_updateTileZ[iLev][m_updateTileCount[iLev]] = z + (cz * 16);

View file

@ -245,8 +245,8 @@ ServerPlayer::ServerPlayer(MinecraftServer *server, Level *level, const wstring&
waterDepth = 0;
int yw = yy2;
while( ( yw < 128 ) &&
(( level->getTile(xx2,yw,zz2) == Tile::water_Id ) ||
( level->getTile(xx2,yw,zz2) == Tile::calmWater_Id )) )
(( level->getTile(xx2,yw,zz2) == Tile::flowing_water_Id ) ||
( level->getTile(xx2,yw,zz2) == Tile::water_Id )) )
{
yw++;
waterDepth++;
@ -1463,22 +1463,22 @@ bool ServerPlayer::openTrap(shared_ptr<DispenserTileEntity> trap)
return true;
}
bool ServerPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand)
bool ServerPlayer::openBrewingStand(shared_ptr<BrewingStandTileEntity> brewing_stand)
{
if(containerMenu == inventoryMenu)
{
nextContainerCounter();
containerMenu = new BrewingStandMenu(inventory, brewingStand);
containerMenu = new BrewingStandMenu(inventory, brewing_stand);
containerMenu->containerId = containerCounter;
containerMenu->addSlotListener(this);
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
if (FourKitBridge::FireInventoryOpen(entityId, ContainerOpenPacket::BREWING_STAND, brewingStand->getCustomName(), brewingStand->getContainerSize()))
if (FourKitBridge::FireInventoryOpen(entityId, ContainerOpenPacket::BREWING_STAND, brewing_stand->getCustomName(), brewing_stand->getContainerSize()))
{
doCloseContainer();
return true;
}
#endif
connection->send(std::make_shared<ContainerOpenPacket>(containerCounter, ContainerOpenPacket::BREWING_STAND, brewingStand->getCustomName(), brewingStand->getContainerSize(), brewingStand->hasCustomName()));
connection->send(std::make_shared<ContainerOpenPacket>(containerCounter, ContainerOpenPacket::BREWING_STAND, brewing_stand->getCustomName(), brewing_stand->getContainerSize(), brewing_stand->hasCustomName()));
refreshContainer(containerMenu);
}
else

View file

@ -107,7 +107,7 @@ public:
virtual bool openHopper(shared_ptr<MinecartHopper> container);
virtual bool openFurnace(shared_ptr<FurnaceTileEntity> furnace); // 4J added bool return
virtual bool openTrap(shared_ptr<DispenserTileEntity> trap); // 4J added bool return
virtual bool openBrewingStand(shared_ptr<BrewingStandTileEntity> brewingStand); // 4J added bool return
virtual bool openBrewingStand(shared_ptr<BrewingStandTileEntity> brewing_stand); // 4J added bool return
virtual bool openBeacon(shared_ptr<BeaconTileEntity> beacon);
virtual bool openTrading(shared_ptr<Merchant> traderTarget, const wstring &name); // 4J added bool return
virtual bool openHorseInventory(shared_ptr<EntityHorse> horse, shared_ptr<Container> container);

View file

@ -265,19 +265,19 @@ bool ServerPlayerGameMode::destroyBlock(int x, int y, int z)
if (!EnchantmentHelper::hasSilkTouch(player))
{
// (SYLV)todo: shouldnt we get these values from the actual blocks?
if (t == Tile::coalOre_Id)
if (t == Tile::coal_ore_Id)
eventExp = Mth::nextInt(level->random, 0, 2);
else if (t == Tile::diamondOre_Id)
else if (t == Tile::diamond_ore_Id)
eventExp = Mth::nextInt(level->random, 3, 7);
else if (t == Tile::emeraldOre_Id)
else if (t == Tile::emerald_ore_Id)
eventExp = Mth::nextInt(level->random, 3, 7);
else if (t == Tile::lapisOre_Id)
else if (t == Tile::lapis_ore_Id)
eventExp = Mth::nextInt(level->random, 2, 5);
else if (t == Tile::netherQuartz_Id)
else if (t == Tile::quartz_ore_Id)
eventExp = Mth::nextInt(level->random, 2, 5);
else if (t == Tile::redStoneOre_Id || t == Tile::redStoneOre_lit_Id)
else if (t == Tile::redstone_ore_Id || t == Tile::lit_redstone_ore_Id)
eventExp = 1 + level->random->nextInt(5);
else if (t == Tile::mobSpawner_Id)
else if (t == Tile::mob_spawner_Id)
eventExp = 15 + level->random->nextInt(15) + level->random->nextInt(15);
}
}

View file

@ -174,10 +174,10 @@ void SurvivalMode::initLevel(Level *level)
shared_ptr<Player> SurvivalMode::createPlayer(Level *level)
{
shared_ptr<Player> player = GameMode::createPlayer(level);
// player.inventory.add(new ItemInstance(Item.pickAxe_diamond));
// player.inventory.add(new ItemInstance(Item.hatchet_diamond));
// player.inventory.add(new ItemInstance(Item.diamond_pickaxe));
// player.inventory.add(new ItemInstance(Item.diamond_axe));
// player.inventory.add(new ItemInstance(Tile.torch, 64));
// player.inventory.add(new ItemInstance(Item.porkChop_cooked, 4));
// player.inventory.add(new ItemInstance(Item.cooked_porkchop, 4));
// player.inventory.add(new ItemInstance(Item.bow, 1));
// player.inventory.add(new ItemInstance(Item.arrow, 64));
return player;

View file

@ -8,6 +8,7 @@
TerrainParticle::TerrainParticle(Level *level, double x, double y, double z, double xa, double ya, double za, Tile *tile, int face, int data, Textures *textures) : Particle(level, x, y, z, xa, ya, za)
{
this->tile = tile;
if (tile == nullptr) return; // tu31 tutorial world fix
this->setTex(textures, tile->getTexture(0, data)); // 4J - change brought forward from 1.8.2 to fix purple particles on door damage
this->gravity = tile->gravity;
rCol = gCol = bCol = 0.6f;
@ -16,6 +17,7 @@ TerrainParticle::TerrainParticle(Level *level, double x, double y, double z, dou
shared_ptr<TerrainParticle> TerrainParticle::init(int x, int y, int z, int data) // 4J - added data parameter
{
if (tile == nullptr) return nullptr; // tu31 tutorial world fix
if (tile == Tile::grass) return dynamic_pointer_cast<TerrainParticle>( shared_from_this() );
int col = tile->getColor(level, x, y, z, data); // 4J - added data parameter
rCol *= ((col >> 16) & 0xff) / 255.0f;
@ -26,6 +28,7 @@ shared_ptr<TerrainParticle> TerrainParticle::init(int x, int y, int z, int data)
shared_ptr<TerrainParticle> TerrainParticle::init(int data)
{
if (tile == nullptr) return nullptr; // tu31 tutorial world fix
if (tile == Tile::grass) return dynamic_pointer_cast<TerrainParticle>( shared_from_this() );
int col = tile->getColor(data);
rCol *= ((col >> 16) & 0xff) / 255.0f;

View file

@ -120,7 +120,7 @@ int TileRenderer::getLightColor( Tile *tt, LevelSource *level, int x, int y, int
{
// Don't use the cache for liquid tiles, as they are the only type that seem to have their own implementation of getLightColor that actually is important.
// Without this we get patches of dark water where their lighting value is 0, it needs to pull in light from the tile above to work
if( ( tt->id >= Tile::water_Id ) && ( tt->id <= Tile::calmLava_Id ) ) return tt->getLightColor(level, x, y, z);
if( ( tt->id >= Tile::flowing_water_Id ) && ( tt->id <= Tile::lava_Id ) ) return tt->getLightColor(level, x, y, z);
if( cache[id] & cache_getLightColor_valid ) return cache[id] & cache_getLightColor_mask;
@ -309,8 +309,8 @@ bool TileRenderer::tesselateInWorld( Tile* tt, int x, int y, int z, int forceDat
// these block types can take advantage of a faster version of shouldRenderFace
// there are others but this is an easy check which covers the majority
// Note: This now covers rock, grass, dirt, stoneBrice, wood, sapling, unbreakable, sand, gravel, goldOre, ironOre, coalOre, treeTrunk
if( ( tt->id <= Tile::unbreakable_Id ) ||
( ( tt->id >= Tile::sand_Id ) && ( tt->id <= Tile::treeTrunk_Id ) ) )
if( ( tt->id <= Tile::bedrock_Id ) ||
( ( tt->id >= Tile::sand_Id ) && ( tt->id <= Tile::log_Id ) ) )
{
faceFlags = tt->getFaceFlags( level, x, y, z );
}
@ -2908,7 +2908,7 @@ bool TileRenderer::tesselateDustInWorld( Tile* tt, int x, int y, int z )
{
const float yStretch = .35f / 16.0f;
if ( level->isSolidBlockingTile( x - 1, y, z ) && level->getTile( x - 1, y + 1, z ) == Tile::redStoneDust_Id )
if ( level->isSolidBlockingTile( x - 1, y, z ) && level->getTile( x - 1, y + 1, z ) == Tile::redstone_wire_Id )
{
t->color( br * red, br * green, br * blue );
t->vertexUV( ( float )( x + dustOffset ), ( float )( y + 1 + yStretch ), static_cast<float>(z + 1), lineTexture->getU1(true), lineTexture->getV0(true) );
@ -2922,7 +2922,7 @@ bool TileRenderer::tesselateDustInWorld( Tile* tt, int x, int y, int z )
t->vertexUV( ( float )( x + overlayOffset ), static_cast<float>(y + 0), static_cast<float>(z + 0), lineTextureOverlay->getU0(true), lineTextureOverlay->getV1(true) );
t->vertexUV( ( float )( x + overlayOffset ), ( float )( y + 1 + yStretch ), static_cast<float>(z + 0), lineTextureOverlay->getU1(true), lineTextureOverlay->getV1(true) );
}
if ( level->isSolidBlockingTile( x + 1, y, z ) && level->getTile( x + 1, y + 1, z ) == Tile::redStoneDust_Id )
if ( level->isSolidBlockingTile( x + 1, y, z ) && level->getTile( x + 1, y + 1, z ) == Tile::redstone_wire_Id )
{
t->color( br * red, br * green, br * blue );
t->vertexUV( ( float )( x + 1 - dustOffset ), static_cast<float>(y + 0), static_cast<float>(z + 1), lineTexture->getU0(true), lineTexture->getV1(true) );
@ -2936,7 +2936,7 @@ bool TileRenderer::tesselateDustInWorld( Tile* tt, int x, int y, int z )
t->vertexUV( ( float )( x + 1 - overlayOffset ), ( float )( y + 1 + yStretch ), static_cast<float>(z + 0), lineTextureOverlay->getU1(true), lineTextureOverlay->getV0(true) );
t->vertexUV( ( float )( x + 1 - overlayOffset ), static_cast<float>(y + 0), static_cast<float>(z + 0), lineTextureOverlay->getU0(true), lineTextureOverlay->getV0(true) );
}
if ( level->isSolidBlockingTile( x, y, z - 1 ) && level->getTile( x, y + 1, z - 1 ) == Tile::redStoneDust_Id )
if ( level->isSolidBlockingTile( x, y, z - 1 ) && level->getTile( x, y + 1, z - 1 ) == Tile::redstone_wire_Id )
{
t->color( br * red, br * green, br * blue );
t->vertexUV( static_cast<float>(x + 1), static_cast<float>(y + 0), ( float )( z + dustOffset ), lineTexture->getU0(true), lineTexture->getV1(true) );
@ -2950,7 +2950,7 @@ bool TileRenderer::tesselateDustInWorld( Tile* tt, int x, int y, int z )
t->vertexUV( static_cast<float>(x + 0), ( float )( y + 1 + yStretch ), ( float )( z + overlayOffset ), lineTextureOverlay->getU1(true), lineTextureOverlay->getV0(true) );
t->vertexUV( static_cast<float>(x + 0), static_cast<float>(y + 0), ( float )( z + overlayOffset ), lineTextureOverlay->getU0(true), lineTextureOverlay->getV0(true) );
}
if ( level->isSolidBlockingTile( x, y, z + 1 ) && level->getTile( x, y + 1, z + 1 ) == Tile::redStoneDust_Id )
if ( level->isSolidBlockingTile( x, y, z + 1 ) && level->getTile( x, y + 1, z + 1 ) == Tile::redstone_wire_Id )
{
t->color( br * red, br * green, br * blue );
t->vertexUV( static_cast<float>(x + 1), ( float )( y + 1 + yStretch ), ( float )( z + 1 - dustOffset ), lineTexture->getU1(true), lineTexture->getV0(true) );
@ -6753,8 +6753,8 @@ bool TileRenderer::tesselateFenceGateInWorld(FenceGateTile *tt, int x, int y, in
float h20 = 5 / 16.0f;
float h21 = 16 / 16.0f;
if (((direction == Direction::NORTH || direction == Direction::SOUTH) && level->getTile(x - 1, y, z) == Tile::cobbleWall_Id && level->getTile(x + 1, y, z) == Tile::cobbleWall_Id)
|| ((direction == Direction::EAST || direction == Direction::WEST) && level->getTile(x, y, z - 1) == Tile::cobbleWall_Id && level->getTile(x, y, z + 1) == Tile::cobbleWall_Id))
if (((direction == Direction::NORTH || direction == Direction::SOUTH) && level->getTile(x - 1, y, z) == Tile::cobblestone_wall_Id && level->getTile(x + 1, y, z) == Tile::cobblestone_wall_Id)
|| ((direction == Direction::EAST || direction == Direction::WEST) && level->getTile(x, y, z - 1) == Tile::cobblestone_wall_Id && level->getTile(x, y, z + 1) == Tile::cobblestone_wall_Id))
{
h00 -= 3.0f / 16.0f;
h01 -= 3.0f / 16.0f;

View file

@ -805,7 +805,12 @@ shared_ptr<Packet> TrackedEntity::getAddEntityPacket()
app.DebugPrintf("eTYPE_ITEM_FRAME xyz %d,%d,%d\n",ix,iy,iz);
}
shared_ptr<AddEntityPacket> packet = std::make_shared<AddEntityPacket>(e, AddEntityPacket::ITEM_FRAME, frame->dir, yRotp, xRotp, xp, yp, zp);
int data = frame->dir & 0xFF;
if (frame->placedByPlayer)
{
data |= 0x100;
}
shared_ptr<AddEntityPacket> packet = std::make_shared<AddEntityPacket>(e, AddEntityPacket::ITEM_FRAME, data, yRotp, xRotp, xp, yp, zp);
packet->x = Mth::floor(frame->xTile * 32.0f);
packet->y = Mth::floor(frame->yTile * 32.0f);
packet->z = Mth::floor(frame->zTile * 32.0f);

View file

@ -15,11 +15,11 @@ public:
return tile == 0
|| tile == Tile::leaves_Id
|| tile == Tile::leaves2_Id
|| tile == Tile::treeTrunk_Id
|| tile == Tile::tree2Trunk_Id
|| tile == Tile::log_Id
|| tile == Tile::log2_Id
|| tile == Tile::vine_Id
|| tile == Tile::tallgrass_Id
|| tile == Tile::flower_Id;
|| tile == Tile::yellow_flower_Id;
}
void setDirtAt(Level* level, int x, int y, int z)

View file

@ -38,7 +38,7 @@ Achievement *Achievements::snipeSkeleton = nullptr;
Achievement *Achievements::diamonds = nullptr;
//Achievement *Achievements::portal = nullptr;
Achievement *Achievements::ghast = nullptr;
Achievement *Achievements::blazeRod = nullptr;
Achievement *Achievements::blaze_rod = nullptr;
Achievement *Achievements::potion = nullptr;
Achievement *Achievements::theEnd = nullptr;
Achievement *Achievements::winGame = nullptr;
@ -92,16 +92,16 @@ void Achievements::staticCtor()
Achievements::openInventory = (new Achievement(eAward_TakingInventory, L"openInventory", 0, 0, Item::book, nullptr, "001", IDS_ACHIEVE_NAME_TAKING_INVENTORY, IDS_ACHIEVE_DESC_TAKING_INVENTORY))->setAwardLocallyOnly()->postConstruct();
Achievements::mineWood = (new Achievement(eAward_GettingWood, L"mineWood", 2, 1, Tile::treeTrunk, (Achievement *) openInventory, "002", IDS_ACHIEVE_NAME_GETTING_WOOD, IDS_ACHIEVE_DESC_GETTING_WOOD))->postConstruct();
Achievements::buildWorkbench = (new Achievement(eAward_Benchmarking, L"buildWorkBench", 4, -1, Tile::workBench, (Achievement *) mineWood, "003", IDS_ACHIEVE_NAME_BENCHMARKING, IDS_ACHIEVE_DESC_BENCHMARKING))->postConstruct();
Achievements::buildPickaxe = (new Achievement(eAward_TimeToMine, L"buildPickaxe", 4, 2, Item::pickAxe_wood, (Achievement *) buildWorkbench, "004", IDS_ACHIEVE_NAME_TIME_TO_MINE, IDS_ACHIEVE_DESC_TIME_TO_MINE))->postConstruct();
Achievements::buildPickaxe = (new Achievement(eAward_TimeToMine, L"buildPickaxe", 4, 2, Item::wooden_pickaxe, (Achievement *) buildWorkbench, "004", IDS_ACHIEVE_NAME_TIME_TO_MINE, IDS_ACHIEVE_DESC_TIME_TO_MINE))->postConstruct();
Achievements::buildFurnace = (new Achievement(eAward_HotTopic, L"buildFurnace", 3, 4, Tile::furnace_lit, (Achievement *) buildPickaxe, "005", IDS_ACHIEVE_NAME_HOT_TOPIC, IDS_ACHIEVE_DESC_HOT_TOPIC))->postConstruct();
Achievements::acquireIron = (new Achievement(eAward_AquireHardware, L"acquireIron", 1, 4, Item::ironIngot, (Achievement *) buildFurnace, "006", IDS_ACHIEVE_NAME_ACQUIRE_HARDWARE, IDS_ACHIEVE_DESC_ACQUIRE_HARDWARE))->postConstruct();
Achievements::buildHoe = (new Achievement(eAward_TimeToFarm, L"buildHoe", 2, -3, Item::hoe_wood, (Achievement *) buildWorkbench, "007", IDS_ACHIEVE_NAME_TIME_TO_FARM, IDS_ACHIEVE_DESC_TIME_TO_FARM))->postConstruct();
Achievements::acquireIron = (new Achievement(eAward_AquireHardware, L"acquireIron", 1, 4, Item::iron_ingot, (Achievement *) buildFurnace, "006", IDS_ACHIEVE_NAME_ACQUIRE_HARDWARE, IDS_ACHIEVE_DESC_ACQUIRE_HARDWARE))->postConstruct();
Achievements::buildHoe = (new Achievement(eAward_TimeToFarm, L"buildHoe", 2, -3, Item::wooden_hoe, (Achievement *) buildWorkbench, "007", IDS_ACHIEVE_NAME_TIME_TO_FARM, IDS_ACHIEVE_DESC_TIME_TO_FARM))->postConstruct();
Achievements::makeBread = (new Achievement(eAward_BakeBread, L"makeBread", -1, -3, Item::bread, (Achievement *) buildHoe, "008", IDS_ACHIEVE_NAME_BAKE_BREAD, IDS_ACHIEVE_DESC_BAKE_BREAD))->postConstruct();
Achievements::bakeCake = (new Achievement(eAward_TheLie, L"bakeCake", 0, -5, Item::cake, (Achievement *) buildHoe, "009", IDS_ACHIEVE_NAME_THE_LIE, IDS_ACHIEVE_DESC_THE_LIE))->postConstruct();
Achievements::buildBetterPickaxe = (new Achievement(eAward_GettingAnUpgrade, L"buildBetterPickaxe", 6, 2, Item::pickAxe_stone, (Achievement *) buildPickaxe, "010", IDS_ACHIEVE_NAME_GETTING_AN_UPGRADE, IDS_ACHIEVE_DESC_GETTING_AN_UPGRADE))->postConstruct();
Achievements::cookFish = (new Achievement(eAward_DeliciousFish, L"cookFish", 2, 6, Item::fish_cooked, (Achievement *) buildFurnace, "011", IDS_ACHIEVE_NAME_DELICIOUS_FISH, IDS_ACHIEVE_DESC_DELICIOUS_FISH))->postConstruct();
Achievements::buildBetterPickaxe = (new Achievement(eAward_GettingAnUpgrade, L"buildBetterPickaxe", 6, 2, Item::stone_pickaxe, (Achievement *) buildPickaxe, "010", IDS_ACHIEVE_NAME_GETTING_AN_UPGRADE, IDS_ACHIEVE_DESC_GETTING_AN_UPGRADE))->postConstruct();
Achievements::cookFish = (new Achievement(eAward_DeliciousFish, L"cookFish", 2, 6, Item::cooked_fish, (Achievement *) buildFurnace, "011", IDS_ACHIEVE_NAME_DELICIOUS_FISH, IDS_ACHIEVE_DESC_DELICIOUS_FISH))->postConstruct();
Achievements::onARail = (new Achievement(eAward_OnARail, L"onARail", 2, 3, Tile::rail, (Achievement *) acquireIron, "012", IDS_ACHIEVE_NAME_ON_A_RAIL, IDS_ACHIEVE_DESC_ON_A_RAIL))->setGolden()->postConstruct();
Achievements::buildSword = (new Achievement(eAward_TimeToStrike, L"buildSword", 6, -1, Item::sword_wood, (Achievement *) buildWorkbench, "013", IDS_ACHIEVE_NAME_TIME_TO_STRIKE, IDS_ACHIEVE_DESC_TIME_TO_STRIKE))->postConstruct();
Achievements::buildSword = (new Achievement(eAward_TimeToStrike, L"buildSword", 6, -1, Item::wooden_sword, (Achievement *) buildWorkbench, "013", IDS_ACHIEVE_NAME_TIME_TO_STRIKE, IDS_ACHIEVE_DESC_TIME_TO_STRIKE))->postConstruct();
Achievements::killEnemy = (new Achievement(eAward_MonsterHunter, L"killEnemy", 8, -1, Item::bone, (Achievement *) buildSword, "014", IDS_ACHIEVE_NAME_MONSTER_HUNTER, IDS_ACHIEVE_DESC_MONSTER_HUNTER))->postConstruct();
Achievements::killCow = (new Achievement(eAward_CowTipper, L"killCow", 7, -3, Item::leather, (Achievement *) buildSword, "015", IDS_ACHIEVE_NAME_COW_TIPPER, IDS_ACHIEVE_DESC_COW_TIPPER))->postConstruct();
Achievements::flyPig = (new Achievement(eAward_WhenPigsFly, L"flyPig", 8, -4, Item::saddle, (Achievement *) killCow, "016", IDS_ACHIEVE_NAME_WHEN_PIGS_FLY, IDS_ACHIEVE_DESC_WHEN_PIGS_FLY))->setGolden()->postConstruct();
@ -138,18 +138,18 @@ void Achievements::staticCtor()
// 4J Stu - These added in 1.0.1, but do not map to any Xbox achievements
Achievements::diamonds = (new Achievement(eAward_diamonds, L"diamonds", -1, 5, Item::diamond, (Achievement *) acquireIron, "022", IDS_ACHIEVE_NAME_DIAMONDS, IDS_ACHIEVE_DESC_DIAMONDS) )->postConstruct();
//Achievements::portal = (new Achievement(eAward_portal, L"portal", -1, 7, Tile::obsidian, (Achievement *)diamonds) )->postConstruct();
Achievements::ghast = (new Achievement(eAward_ghast, L"ghast", -4, 8, Item::ghastTear, (Achievement *)ghast, "023", IDS_ACHIEVE_NAME_GHAST, IDS_ACHIEVE_DESC_GHAST) )->setGolden()->postConstruct();
Achievements::blazeRod = (new Achievement(eAward_blazeRod, L"blazeRod", 0, 9, Item::blazeRod, (Achievement *)blazeRod, "024", IDS_ACHIEVE_NAME_BLAZEROD, IDS_ACHIEVE_DESC_BLAZEROD) )->postConstruct();
Achievements::ghast = (new Achievement(eAward_ghast, L"ghast", -4, 8, Item::ghast_tear, (Achievement *)ghast, "023", IDS_ACHIEVE_NAME_GHAST, IDS_ACHIEVE_DESC_GHAST) )->setGolden()->postConstruct();
Achievements::blaze_rod = (new Achievement(eAward_blazeRod, L"blaze_rod", 0, 9, Item::blaze_rod, (Achievement *)blaze_rod, "024", IDS_ACHIEVE_NAME_BLAZEROD, IDS_ACHIEVE_DESC_BLAZEROD) )->postConstruct();
Achievements::potion = (new Achievement(eAward_potion, L"potion", 2, 8, Item::potion, (Achievement *)potion, "025", IDS_ACHIEVE_NAME_POTION, IDS_ACHIEVE_DESC_POTION) )->postConstruct();
Achievements::theEnd = (new Achievement(eAward_theEnd, L"theEnd", 3, 10, Item::eyeOfEnder, (Achievement *)theEnd, "026", IDS_ACHIEVE_NAME_THE_END, IDS_ACHIEVE_DESC_THE_END) )->setGolden()->postConstruct();
Achievements::theEnd = (new Achievement(eAward_theEnd, L"theEnd", 3, 10, Item::eye_of_ender, (Achievement *)theEnd, "026", IDS_ACHIEVE_NAME_THE_END, IDS_ACHIEVE_DESC_THE_END) )->setGolden()->postConstruct();
Achievements::winGame = (new Achievement(eAward_winGame, L"theEnd2", 4, 13, Tile::dragonEgg, (Achievement *)winGame, "027", IDS_ACHIEVE_NAME_WINGAME, IDS_ACHIEVE_DESC_WINGAME) )->setGolden()->postConstruct();
Achievements::enchantments = (new Achievement(eAward_enchantments, L"enchantments", -4, 4, Tile::enchantTable, (Achievement *)enchantments, "028", IDS_ACHIEVE_NAME_ENCHANTMENTS, IDS_ACHIEVE_DESC_ENCHANTMENTS) )->postConstruct();
// Achievements::overkill = (new Achievement(eAward_overkill, L"overkill", -4, 1, Item::sword_diamond, (Achievement *)enchantments) )->setGolden()->postConstruct();
// Achievements::overkill = (new Achievement(eAward_overkill, L"overkill", -4, 1, Item::diamond_sword, (Achievement *)enchantments) )->setGolden()->postConstruct();
// Achievements::bookcase = (new Achievement(eAward_bookcase, L"bookcase", -3, 6, Tile::bookshelf, (Achievement *)enchantments) )->postConstruct();
#endif
Achievements::overkill = (new Achievement(eAward_overkill, L"overkill", -4,1, Item::sword_diamond, (Achievement *)enchantments, "029", IDS_ACHIEVE_NAME_OVERKILL, IDS_ACHIEVE_DESC_OVERKILL) )->setGolden()->postConstruct();
Achievements::overkill = (new Achievement(eAward_overkill, L"overkill", -4,1, Item::diamond_sword, (Achievement *)enchantments, "029", IDS_ACHIEVE_NAME_OVERKILL, IDS_ACHIEVE_DESC_OVERKILL) )->setGolden()->postConstruct();
Achievements::bookcase = (new Achievement(eAward_bookcase, L"bookcase", -3,6, Tile::bookshelf, (Achievement *)enchantments, "030", IDS_ACHIEVE_NAME_BOOKCASE, IDS_ACHIEVE_DESC_BOOKCASE) )->postConstruct();
Achievements::adventuringTime = (new Achievement(eAward_adventuringTime, L"adventuringTime", 0,0, Tile::bookshelf, (Achievement*) nullptr, "031", IDS_ACHIEVE_NAME_ADVENTURING_TIME, IDS_ACHIEVE_DESC_ADVENTURING_TIME) )->setAwardLocallyOnly()->postConstruct();

View file

@ -42,7 +42,7 @@ public:
static Achievement *diamonds;
//static Achievement *portal; //4J-JEV: Whats this?
static Achievement *ghast;
static Achievement *blazeRod;
static Achievement *blaze_rod;
static Achievement *potion;
static Achievement *theEnd;
static Achievement *winGame;

View file

@ -15,6 +15,7 @@ AddPaintingPacket::AddPaintingPacket()
z = 0;
dir = 0;
motive = L"";
placedByPlayer = false;
}
AddPaintingPacket::AddPaintingPacket(shared_ptr<Painting> e)
@ -25,6 +26,7 @@ AddPaintingPacket::AddPaintingPacket(shared_ptr<Painting> e)
z = e->zTile;
dir = e->dir;
motive = e->motive->name;
placedByPlayer = e->placedByPlayer;
}
void AddPaintingPacket::read(DataInputStream *dis) //throws IOException
@ -35,6 +37,7 @@ void AddPaintingPacket::read(DataInputStream *dis) //throws IOException
y = dis->readInt();
z = dis->readInt();
dir = dis->readInt();
placedByPlayer = dis->readByte() != 0;
}
void AddPaintingPacket::write(DataOutputStream *dos) //throws IOException
@ -45,6 +48,7 @@ void AddPaintingPacket::write(DataOutputStream *dos) //throws IOException
dos->writeInt(y);
dos->writeInt(z);
dos->writeInt(dir);
dos->writeByte(placedByPlayer ? 1 : 0);
}
void AddPaintingPacket::handle(PacketListener *listener)
@ -54,5 +58,5 @@ void AddPaintingPacket::handle(PacketListener *listener)
int AddPaintingPacket::getEstimatedSize()
{
return 24;
return 25;
}

View file

@ -12,6 +12,7 @@ public:
int x, y, z;
int dir;
wstring motive;
bool placedByPlayer;
public:
AddPaintingPacket();

View file

@ -17,7 +17,7 @@ bool AgableMob::mobInteract(shared_ptr<Player> player)
{
shared_ptr<ItemInstance> item = player->inventory->getSelected();
if (item != nullptr && item->id == Item::spawnEgg_Id)
if (item != nullptr && item->id == Item::spawn_egg_Id)
{
if (!level->isClientSide)
{

View file

@ -78,7 +78,7 @@ void AnvilMenu::createResult()
if (addition != nullptr)
{
usingBook = addition->id == Item::enchantedBook_Id && Item::enchantedBook->getEnchantments(addition)->size() > 0;
usingBook = addition->id == Item::enchanted_book_Id && Item::enchanted_book->getEnchantments(addition)->size() > 0;
if (result->isDamageableItem() && Item::items[result->id]->isValidRepairItem(input, addition))
{
@ -147,7 +147,7 @@ void AnvilMenu::createResult()
int extra = level - current;
bool compatible = enchantment->canEnchant(input);
if (player->abilities.instabuild || input->id == EnchantedBookItem::enchantedBook_Id) compatible = true;
if (player->abilities.instabuild || input->id == EnchantedBookItem::enchanted_book_Id) compatible = true;
for (auto& it2 : *enchantments)
{

View file

@ -27,7 +27,7 @@ bool ArmorDyeRecipe::matches(shared_ptr<CraftingContainer> craftSlots, Level *le
return false;
}
}
else if (item->id == Item::dye_powder_Id)
else if (item->id == Item::dye_Id)
{
dyes.push_back(item);
}
@ -83,7 +83,7 @@ shared_ptr<ItemInstance> ArmorDyeRecipe::assembleDyedArmor(shared_ptr<CraftingCo
return nullptr;
}
}
else if (item->id == Item::dye_powder_Id)
else if (item->id == Item::dye_Id)
{
int tileData = ColoredTile::getTileDataForItemAuxValue(item->getAuxValue());
int red = static_cast<int>(Sheep::COLOR[tileData][0] * 0xFF);

View file

@ -107,15 +107,15 @@ int _ArmorMaterial::getTierItemId() const
}
else if (this == CHAIN)
{
return Item::ironIngot_Id;
return Item::iron_ingot_Id;
}
else if (this == GOLD)
{
return Item::goldIngot_Id;
return Item::gold_ingot_Id;
}
else if (this == IRON)
{
return Item::ironIngot_Id;
return Item::iron_ingot_Id;
}
else if (this == DIAMOND)
{
@ -289,13 +289,13 @@ Icon *ArmorItem::getEmptyIcon(int slot)
switch (slot)
{
case 0:
return Item::helmet_diamond->iconEmpty;
return Item::diamond_helmet->iconEmpty;
case 1:
return Item::chestplate_diamond->iconEmpty;
return Item::diamond_chestplate->iconEmpty;
case 2:
return Item::leggings_diamond->iconEmpty;
return Item::diamond_leggings->iconEmpty;
case 3:
return Item::boots_diamond->iconEmpty;
return Item::diamond_boots->iconEmpty;
}
return nullptr;

View file

@ -30,11 +30,11 @@ wstring ArmorRecipes::shapes[][4] =
/*
ArmorRecipes::map[5] =
{
{Item::leather, Tile::fire, Item::ironIngot, Item::diamond, Item::goldIngot},
{Item::helmet_cloth, Item::helmet_chain, Item::helmet_iron, Item::helmet_diamond, Item::helmet_gold},
{Item::chestplate_cloth, Item::chestplate_chain, Item::chestplate_iron, Item::chestplate_diamond, Item::chestplate_gold},
{Item::leggings_cloth, Item::leggings_chain, Item::leggings_iron, Item::leggings_diamond, Item::leggings_gold},
{Item::boots_cloth, Item::boots_chain, Item::boots_iron, Item::boots_diamond, Item::boots_gold},
{Item::leather, Tile::fire, Item::iron_ingot, Item::diamond, Item::gold_ingot},
{Item::helmet_cloth, Item::chainmail_helmet, Item::iron_helmet, Item::diamond_helmet, Item::golden_helmet},
{Item::chestplate_cloth, Item::chainmail_chestplate, Item::iron_chestplate, Item::diamond_chestplate, Item::golden_chestplate},
{Item::leggings_cloth, Item::chainmail_leggings, Item::iron_leggings, Item::diamond_leggings, Item::golden_leggings},
{Item::boots_cloth, Item::chainmail_boots, Item::iron_boots, Item::diamond_boots, Item::golden_boots},
};
*/
@ -45,33 +45,33 @@ void ArmorRecipes::_init()
// 4J-PB - removing the chain armour, since we show all possible recipes in the xbox game, and it's not one you can make
ADD_OBJECT(map[0],Item::leather);
// ADD_OBJECT(map[0],Tile::fire);
ADD_OBJECT(map[0],Item::ironIngot);
ADD_OBJECT(map[0],Item::iron_ingot);
ADD_OBJECT(map[0],Item::diamond);
ADD_OBJECT(map[0],Item::goldIngot);
ADD_OBJECT(map[0],Item::gold_ingot);
ADD_OBJECT(map[1],Item::helmet_leather);
// ADD_OBJECT(map[1],Item::helmet_chain);
ADD_OBJECT(map[1],Item::helmet_iron);
ADD_OBJECT(map[1],Item::helmet_diamond);
ADD_OBJECT(map[1],Item::helmet_gold);
ADD_OBJECT(map[1],Item::leather_helmet);
// ADD_OBJECT(map[1],Item::chainmail_helmet);
ADD_OBJECT(map[1],Item::iron_helmet);
ADD_OBJECT(map[1],Item::diamond_helmet);
ADD_OBJECT(map[1],Item::golden_helmet);
ADD_OBJECT(map[2],Item::chestplate_leather);
// ADD_OBJECT(map[2],Item::chestplate_chain);
ADD_OBJECT(map[2],Item::chestplate_iron);
ADD_OBJECT(map[2],Item::chestplate_diamond);
ADD_OBJECT(map[2],Item::chestplate_gold);
ADD_OBJECT(map[2],Item::leather_chestplate);
// ADD_OBJECT(map[2],Item::chainmail_chestplate);
ADD_OBJECT(map[2],Item::iron_chestplate);
ADD_OBJECT(map[2],Item::diamond_chestplate);
ADD_OBJECT(map[2],Item::golden_chestplate);
ADD_OBJECT(map[3],Item::leggings_leather);
// ADD_OBJECT(map[3],Item::leggings_chain);
ADD_OBJECT(map[3],Item::leggings_iron);
ADD_OBJECT(map[3],Item::leggings_diamond);
ADD_OBJECT(map[3],Item::leggings_gold);
ADD_OBJECT(map[3],Item::leather_leggings);
// ADD_OBJECT(map[3],Item::chainmail_leggings);
ADD_OBJECT(map[3],Item::iron_leggings);
ADD_OBJECT(map[3],Item::diamond_leggings);
ADD_OBJECT(map[3],Item::golden_leggings);
ADD_OBJECT(map[4],Item::boots_leather);
// ADD_OBJECT(map[4],Item::boots_chain);
ADD_OBJECT(map[4],Item::boots_iron);
ADD_OBJECT(map[4],Item::boots_diamond);
ADD_OBJECT(map[4],Item::boots_gold);
ADD_OBJECT(map[4],Item::leather_boots);
// ADD_OBJECT(map[4],Item::chainmail_boots);
ADD_OBJECT(map[4],Item::iron_boots);
ADD_OBJECT(map[4],Item::diamond_boots);
ADD_OBJECT(map[4],Item::golden_boots);
}
// 4J-PB added for quick equip in the inventory
@ -79,37 +79,37 @@ ArmorRecipes::_eArmorType ArmorRecipes::GetArmorType(int iId)
{
switch(iId)
{
case Item::helmet_leather_Id:
case Item::helmet_chain_Id:
case Item::helmet_iron_Id:
case Item::helmet_diamond_Id:
case Item::helmet_gold_Id:
case Item::leather_helmet_Id:
case Item::chainmail_helmet_Id:
case Item::iron_helmet_Id:
case Item::diamond_helmet_Id:
case Item::golden_helmet_Id:
return eArmorType_Helmet;
break;
case Item::chestplate_leather_Id:
case Item::chestplate_chain_Id:
case Item::chestplate_iron_Id:
case Item::chestplate_diamond_Id:
case Item::chestplate_gold_Id:
case Item::leather_chestplate_Id:
case Item::chainmail_chestplate_Id:
case Item::iron_chestplate_Id:
case Item::diamond_chestplate_Id:
case Item::golden_chestplate_Id:
case Item::elytra_Id:
return eArmorType_Chestplate;
break;
case Item::leggings_leather_Id:
case Item::leggings_chain_Id:
case Item::leggings_iron_Id:
case Item::leggings_diamond_Id:
case Item::leggings_gold_Id:
case Item::leather_leggings_Id:
case Item::chainmail_leggings_Id:
case Item::iron_leggings_Id:
case Item::diamond_leggings_Id:
case Item::golden_leggings_Id:
return eArmorType_Leggings;
break;
case Item::boots_leather_Id:
case Item::boots_chain_Id:
case Item::boots_iron_Id:
case Item::boots_diamond_Id:
case Item::boots_gold_Id:
case Item::leather_boots_Id:
case Item::chainmail_boots_Id:
case Item::iron_boots_Id:
case Item::diamond_boots_Id:
case Item::golden_boots_Id:
return eArmorType_Boots;
break;
}

View file

@ -17,6 +17,32 @@ BasePressurePlateTile::BasePressurePlateTile(int id, const wstring &tex, Materia
//updateShape(getDataForSignal(Redstone::SIGNAL_MAX));
}
void BasePressurePlateTile::createBlockStateDefinition()
{
if (!m_blockStateDefinition)
m_blockStateDefinition = new BlockStateDefinition(this);
}
int BasePressurePlateTile::defaultBlockState()
{
return 0;
}
int BasePressurePlateTile::convertBlockStateToLegacyData(BlockState *state)
{
return state ? (state->value & 0xF) : 0;
}
Tile::BlockState BasePressurePlateTile::getBlockState(int data)
{
return Tile::BlockState(data & 0xF);
}
Tile::BlockState BasePressurePlateTile::getBlockState(LevelSource *level, int x, int y, int z)
{
return Tile::BlockState(level->getData(x, y, z) & 0xF);
}
void BasePressurePlateTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr<TileEntity> forceEntity)
{
updateShape(level->getData(x, y, z));

View file

@ -12,6 +12,11 @@ protected:
public:
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>());
virtual void createBlockStateDefinition() override;
virtual int defaultBlockState() override;
virtual int convertBlockStateToLegacyData(BlockState *state) override;
virtual Tile::BlockState getBlockState(LevelSource *level, int x, int y, int z) override;
virtual Tile::BlockState getBlockState(int data);
protected:
virtual void updateShape(int data);

View file

@ -32,6 +32,36 @@ BaseRailTile::Rail::Rail(Level *level, int x, int y, int z)
}
}
void BaseRailTile::createBlockStateDefinition()
{
if (!m_blockStateDefinition)
m_blockStateDefinition = new BlockStateDefinition(this);
}
int BaseRailTile::defaultBlockState()
{
return 0;
}
int BaseRailTile::convertBlockStateToLegacyData(BlockState *state)
{
if (!state) return 0;
int mask = RAIL_DIRECTION_MASK | (usesDataBit ? RAIL_DATA_BIT : 0);
return state->value & mask;
}
Tile::BlockState BaseRailTile::getBlockState(int data)
{
int mask = RAIL_DIRECTION_MASK | (usesDataBit ? RAIL_DATA_BIT : 0);
return Tile::BlockState(data & mask);
}
Tile::BlockState BaseRailTile::getBlockState(LevelSource *level, int x, int y, int z)
{
int mask = RAIL_DIRECTION_MASK | (usesDataBit ? RAIL_DATA_BIT : 0);
return Tile::BlockState(level->getData(x, y, z) & mask);
}
BaseRailTile::Rail::~Rail()
{
for( size_t i = 0; i < connections.size(); i++ )
@ -351,7 +381,7 @@ bool BaseRailTile::isRail(Level *level, int x, int y, int z)
bool BaseRailTile::isRail(int id)
{
return id == Tile::rail_Id || id == Tile::goldenRail_Id || id == Tile::detectorRail_Id || id == Tile::activatorRail_Id;
return id == Tile::rail_Id || id == Tile::golden_rail_Id || id == Tile::detector_rail_Id || id == Tile::activator_rail_Id;
}
BaseRailTile::BaseRailTile(int id, bool usesDataBit) : Tile(id, Material::decoration, isSolidRender())

View file

@ -65,6 +65,11 @@ protected:
BaseRailTile(int id, bool usesDataBit);
public:
using Tile::getResourceCount;
virtual void createBlockStateDefinition() override;
virtual int defaultBlockState() override;
virtual int convertBlockStateToLegacyData(BlockState *state) override;
virtual Tile::BlockState getBlockState(LevelSource *level, int x, int y, int z) override;
virtual Tile::BlockState getBlockState(int data);
bool isUsesDataBit();
virtual AABB *getAABB(Level *level, int x, int y, int z);

View file

@ -342,18 +342,18 @@ void BasicTree::makeTrunk()
int z = origin[2];
int startCoord[] = { x, startY, z };
int endCoord[] = { x, topY, z };
limb(startCoord, endCoord, Tile::treeTrunk_Id);
limb(startCoord, endCoord, Tile::log_Id);
if (trunkWidth == 2)
{
startCoord[0] += 1;
endCoord[0] += 1;
limb(startCoord, endCoord, Tile::treeTrunk_Id);
limb(startCoord, endCoord, Tile::log_Id);
startCoord[2] += 1;
endCoord[2] += 1;
limb(startCoord, endCoord, Tile::treeTrunk_Id);
limb(startCoord, endCoord, Tile::log_Id);
startCoord[0] += -1;
endCoord[0] += -1;
limb(startCoord, endCoord, Tile::treeTrunk_Id);
limb(startCoord, endCoord, Tile::log_Id);
}
}
@ -373,7 +373,7 @@ void BasicTree::makeBranches()
int localY = baseCoord[1] - origin[1];
if (trimBranches(localY))
{
limb(baseCoord, endCoord, Tile::treeTrunk_Id);
limb(baseCoord, endCoord, Tile::log_Id);
}
idx++;
}

View file

@ -152,7 +152,7 @@ bool BeaconMenu::PaymentSlot::mayPlace(shared_ptr<ItemInstance> item)
{
if (item != nullptr)
{
return (item->id == Item::emerald_Id || item->id == Item::diamond_Id || item->id == Item::goldIngot_Id || item->id == Item::ironIngot_Id);
return (item->id == Item::emerald_Id || item->id == Item::diamond_Id || item->id == Item::gold_ingot_Id || item->id == Item::iron_ingot_Id);
}
return false;
}

View file

@ -131,7 +131,7 @@ void BeaconTileEntity::updateShape()
for (int lz = z - step; lz <= z + step; lz++)
{
int tile = level->getTile(lx, ly, lz);
if (tile != Tile::emeraldBlock_Id && tile != Tile::goldBlock_Id && tile != Tile::diamondBlock_Id && tile != Tile::ironBlock_Id)
if (tile != Tile::emerald_block_Id && tile != Tile::gold_block_Id && tile != Tile::diamond_block_Id && tile != Tile::iron_block_Id)
{
isOk = false;
break;
@ -373,5 +373,5 @@ void BeaconTileEntity::stopOpen()
bool BeaconTileEntity::canPlaceItem(int slot, shared_ptr<ItemInstance> item)
{
return (item->id == Item::emerald_Id || item->id == Item::diamond_Id || item->id == Item::goldIngot_Id || item->id == Item::ironIngot_Id);
return (item->id == Item::emerald_Id || item->id == Item::diamond_Id || item->id == Item::gold_ingot_Id || item->id == Item::iron_ingot_Id);
}

View file

@ -21,6 +21,32 @@ BedTile::BedTile(int id) : DirectionalTile(id, Material::cloth, isSolidRender())
iconTop = nullptr;
}
void BedTile::createBlockStateDefinition()
{
if (!m_blockStateDefinition)
m_blockStateDefinition = new BlockStateDefinition(this);
}
int BedTile::defaultBlockState()
{
return 0;
}
int BedTile::convertBlockStateToLegacyData(BlockState *state)
{
return state ? (state->value & 0xF) : 0;
}
Tile::BlockState BedTile::getBlockState(int data)
{
return Tile::BlockState(data & 0xF);
}
Tile::BlockState BedTile::getBlockState(LevelSource *level, int x, int y, int z)
{
return Tile::BlockState(level->getData(x, y, z) & 0xF);
}
// 4J Added override
void BedTile::updateDefaultShape()
{

View file

@ -23,6 +23,11 @@ public:
static int HEAD_DIRECTION_OFFSETS[4][2];
BedTile(int id);
virtual void createBlockStateDefinition() override;
virtual int defaultBlockState() override;
virtual int convertBlockStateToLegacyData(BlockState *state) override;
virtual Tile::BlockState getBlockState(LevelSource *level, int x, int y, int z) override;
virtual Tile::BlockState getBlockState(int data);
virtual void updateDefaultShape();
virtual bool TestUse(Level *level, int x, int y, int z, shared_ptr<Player> player);

View file

@ -410,7 +410,7 @@ void Biome::buildSurfaceAtDefault(Level *level, Random *random, byte* chunkBlock
if (y <= 1 + random->nextInt(2))
{
chunkBlocks[index] = static_cast<byte>(Tile::unbreakable_Id);
chunkBlocks[index] = static_cast<byte>(Tile::bedrock_Id);
continue;
}
@ -444,7 +444,7 @@ void Biome::buildSurfaceAtDefault(Level *level, Random *random, byte* chunkBlock
if (this->getTemperature(x, y, z) < 0.15f)
topState = static_cast<byte>(Tile::ice_Id);
else
topState = static_cast<byte>(Tile::calmWater_Id);
topState = static_cast<byte>(Tile::water_Id);
topStateData = 0;
}
@ -482,7 +482,7 @@ void Biome::buildSurfaceAtDefault(Level *level, Random *random, byte* chunkBlock
}
else
{
fillerState = static_cast<byte>(Tile::sandStone_Id);
fillerState = static_cast<byte>(Tile::sandstone_Id);
fillerStateData = 0;
}
}
@ -542,9 +542,9 @@ Feature *Biome::getFlowerFeature(Random *random, int x, int y, int z)
if (random->nextInt(3) > 0)
{
return new FlowerFeature(Tile::flower_Id);
return new FlowerFeature(Tile::yellow_flower_Id);
}
return new FlowerFeature(Tile::rose_Id);
return new FlowerFeature(Tile::red_flower_Id);
}
int Biome::getRandomDoublePlantType(Random *random)

View file

@ -49,19 +49,19 @@ void BiomeDecorator::_init()
gravelFeature = new SandFeature(6, Tile::gravel_Id);
dirtOreFeature = new OreFeature(Tile::dirt_Id, 32);
gravelOreFeature = new OreFeature(Tile::gravel_Id, 32);
coalOreFeature = new OreFeature(Tile::coalOre_Id, 16);
ironOreFeature = new OreFeature(Tile::ironOre_Id, 8);
goldOreFeature = new OreFeature(Tile::goldOre_Id, 8);
redStoneOreFeature = new OreFeature(Tile::redStoneOre_Id, 7);
diamondOreFeature = new OreFeature(Tile::diamondOre_Id, 7);
lapisOreFeature = new OreFeature(Tile::lapisOre_Id, 6);
coalOreFeature = new OreFeature(Tile::coal_ore_Id, 16);
ironOreFeature = new OreFeature(Tile::iron_ore_Id, 8);
goldOreFeature = new OreFeature(Tile::gold_ore_Id, 8);
redStoneOreFeature = new OreFeature(Tile::redstone_ore_Id, 7);
diamondOreFeature = new OreFeature(Tile::diamond_ore_Id, 7);
lapisOreFeature = new OreFeature(Tile::lapis_ore_Id, 6);
graniteOreFeature = new OreFeature(Tile::stone_Id, StoneTile::GRANITE, 33);
dioriteOreFeature = new OreFeature(Tile::stone_Id, StoneTile::DIORITE, 33);
andesiteOreFeature = new OreFeature(Tile::stone_Id, StoneTile::ANDESITE, 33);
yellowFlowerFeature = new FlowerFeature(Tile::flower_Id);
roseFlowerFeature = new FlowerFeature(Tile::rose_Id);
yellowFlowerFeature = new FlowerFeature(Tile::yellow_flower_Id);
roseFlowerFeature = new FlowerFeature(Tile::red_flower_Id);
brownMushroomFeature = new FlowerFeature(Tile::mushroom_brown_Id);
redMushroomFeature = new FlowerFeature(Tile::mushroom_red_Id);
hugeMushroomFeature = new HugeMushroomFeature();
@ -69,14 +69,14 @@ void BiomeDecorator::_init()
cactusFeature = new CactusFeature();
waterlilyFeature = new WaterlilyFeature();
blueOrchidFeature = new FlowerFeature(Tile::rose_Id, Rose::BLUE_ORCHID);
alliumFeature = new FlowerFeature(Tile::rose_Id, Rose::ALLIUM);
azureBluetFeature = new FlowerFeature(Tile::rose_Id, Rose::AZURE_BLUET);
oxeyeDaisyFeature = new FlowerFeature(Tile::rose_Id, Rose::OXEYE_DAISY);
tulipRedFeature = new FlowerFeature(Tile::rose_Id, Rose::RED_TULIP);
tulipOrangeFeature = new FlowerFeature(Tile::rose_Id, Rose::ORANGE_TULIP);
tulipWhiteFeature = new FlowerFeature(Tile::rose_Id, Rose::WHITE_TULIP);
tulipPinkFeature = new FlowerFeature(Tile::rose_Id, Rose::PINK_TULIP);
blueOrchidFeature = new FlowerFeature(Tile::red_flower_Id, Rose::BLUE_ORCHID);
alliumFeature = new FlowerFeature(Tile::red_flower_Id, Rose::ALLIUM);
azureBluetFeature = new FlowerFeature(Tile::red_flower_Id, Rose::AZURE_BLUET);
oxeyeDaisyFeature = new FlowerFeature(Tile::red_flower_Id, Rose::OXEYE_DAISY);
tulipRedFeature = new FlowerFeature(Tile::red_flower_Id, Rose::RED_TULIP);
tulipOrangeFeature = new FlowerFeature(Tile::red_flower_Id, Rose::ORANGE_TULIP);
tulipWhiteFeature = new FlowerFeature(Tile::red_flower_Id, Rose::WHITE_TULIP);
tulipPinkFeature = new FlowerFeature(Tile::red_flower_Id, Rose::PINK_TULIP);
doublePlantFeature = new DoublePlantFeature(false);
@ -241,7 +241,7 @@ void BiomeDecorator::decorate()
PIXBeginNamedEvent(0,"Decorate bush/waterlily/mushroom/reeds/pumpkins/cactuses");
DeadBushFeature *deadBushFeature = nullptr;
if(deadBushCount > 0) deadBushFeature = new DeadBushFeature(Tile::deadBush_Id);
if(deadBushCount > 0) deadBushFeature = new DeadBushFeature(Tile::deadbush_Id);
for (int i = 0; i < deadBushCount; i++)
{
int x = xo + random->nextInt(16) + 8;
@ -335,7 +335,7 @@ void BiomeDecorator::decorate()
if( liquids )
{
SpringFeature *waterSpringFeature = new SpringFeature(Tile::water_Id);
SpringFeature *waterSpringFeature = new SpringFeature(Tile::flowing_water_Id);
for (int i = 0; i < 50; i++)
{
int x = xo + random->nextInt(16) + 8;
@ -345,7 +345,7 @@ void BiomeDecorator::decorate()
}
delete waterSpringFeature;
SpringFeature *lavaSpringFeature = new SpringFeature(Tile::lava_Id);
SpringFeature *lavaSpringFeature = new SpringFeature(Tile::flowing_lava_Id);
for (int i = 0; i < 20; i++)
{
int x = xo + random->nextInt(16) + 8;

View file

@ -84,7 +84,7 @@ bool BirchFeature::place(Level *level, Random *random, int x, int y, int z)
for (int hh = 0; hh < treeHeight; hh++)
{
int t = level->getTile(x, y + hh, z);
if (t == 0 || t == Tile::leaves_Id) placeBlock(level, x, y + hh, z, Tile::treeTrunk_Id, TreeTile::BIRCH_TRUNK);
if (t == 0 || t == Tile::leaves_Id) placeBlock(level, x, y + hh, z, Tile::log_Id, TreeTile::BIRCH_TRUNK);
}
return true;
}

View file

@ -174,7 +174,7 @@ void Blaze::causeFallDamage(float distance)
int Blaze::getDeathLoot()
{
return Item::blazeRod_Id;
return Item::blaze_rod_Id;
}
bool Blaze::isOnFire()
@ -189,13 +189,13 @@ void Blaze::dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel)
int count = random->nextInt(2 + playerBonusLevel);
for (int i = 0; i < count; i++)
{
spawnAtLocation(Item::blazeRod_Id, 1);
spawnAtLocation(Item::blaze_rod_Id, 1);
}
// 4J-PB - added to the XBLA version due to our limited amount of glowstone in the Nether - drop 0-2 glowstone dust
count = random->nextInt(3 + playerBonusLevel);
for (int i = 0; i < count; i++)
{
spawnAtLocation(Item::yellowDust_Id, 1);
spawnAtLocation(Item::glowstone_dust_Id, 1);
}
}
}

View file

@ -0,0 +1,782 @@
// extra file dictating the data mappings in the f3 menu
// e.x. facing: north shows up instead of state: 2
#include "BlockStateDecoder.h"
#include "BlockStateDecoderRegistry.h"
#include "CocoaTile.h"
#include "DirectionalTile.h"
#include "Direction.h"
#include "FireTile.h"
#include "ButtonTile.h"
#include "CropTile.h"
#include "BedTile.h"
#include "FenceGateTile.h"
#include "FenceTile.h"
#include "DoorTile.h"
#include "FlowerPotTile.h"
#include "HalfSlabTile.h"
#include "HayBlockTile.h"
#include "HugeMushroomTile.h"
#include "HopperTile.h"
#include "BrewingStandTile.h"
#include "PistonBaseTile.h"
#include "PistonExtensionTile.h"
#include "LeverTile.h"
#include "TorchTile.h"
#include "FurnaceTile.h"
#include "RedStoneOreTile.h"
#include "NotGateTile.h"
#include "RedlightTile.h"
#include "JukeboxTile.h"
#include "CakeTile.h"
#include "DispenserTile.h"
#include "TntTile.h"
#include "BaseRailTile.h"
#include "NetherStalkTile.h"
#include "ReedTile.h"
#include "RepeaterTile.h"
#include "Sapling.h"
#include "StoneSlabTile.h"
#include "StoneSlabTile2.h"
#include "StairTile.h"
#include "StemTile.h"
#include "TreeTile.h"
#include "TreeTile2.h"
#include "TheEndPortalFrameTile.h"
#include "TrapDoorTile.h"
#include "TripWireTile.h"
#include "WoodSlabTile.h"
#include "TallGrass.h"
#include "TallGrass2.h"
#include "VineTile.h"
#include "Facing.h"
#include <sstream>
using namespace BlockStateDecoder;
DoorProps BlockStateDecoder::decodeDoor(int composite)
{
DoorProps p;
p.dir = composite & DoorTile::C_DIR_MASK;
static const std::wstring dirNames[] = { L"south", L"west", L"north", L"east" };
if (p.dir >= 0 && p.dir < 4) p.dirName = dirNames[p.dir]; else p.dirName = L"unknown";
p.open = (composite & DoorTile::C_OPEN_MASK) != 0;
p.upper = (composite & DoorTile::C_IS_UPPER_MASK) != 0;
p.hingeRight = (composite & DoorTile::C_RIGHT_HINGE_MASK) != 0;
return p;
}
std::wstring BlockStateDecoder::doorPropsToString(const DoorProps &p)
{
std::wstringstream ss;
ss << L"facing: " << p.dirName << L"\n";
ss << L"open: " << (p.open ? L"true" : L"false") << L"\n";
ss << L"half: " << (p.upper ? L"upper" : L"lower") << L"\n";
ss << L"hinge: " << (p.hingeRight ? L"right" : L"left");
return ss.str();
}
static std::wstring agePropsToString(int age)
{
std::wstringstream ss;
ss << L"age: " << age;
return ss.str();
}
static std::wstring cocoaPropsToString(int composite)
{
int dir = composite & 0x3;
int age = (composite >> 2) & 0x3;
static const std::wstring dirNames[] = { L"south", L"west", L"north", L"east" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"age: " << age;
return ss.str();
}
static std::wstring stemPropsToString(int composite)
{
int age = composite & 0x7;
int facingCode = (composite >> 3) & 0x7;
static const std::wstring facingNames[] = { L"none", L"west", L"east", L"north", L"south" };
std::wstring facing = (facingCode >= 0 && facingCode < 5) ? facingNames[facingCode] : L"unknown";
std::wstringstream ss;
ss << L"age: " << age << L"\n";
ss << L"facing: " << facing;
return ss.str();
}
static std::wstring vinePropsToString(int composite)
{
std::wstringstream ss;
ss << L"north: " << (((composite & VineTile::VINE_NORTH) != 0) ? L"true" : L"false") << L"\n";
ss << L"south: " << (((composite & VineTile::VINE_SOUTH) != 0) ? L"true" : L"false") << L"\n";
ss << L"east: " << (((composite & VineTile::VINE_EAST) != 0) ? L"true" : L"false") << L"\n";
ss << L"west: " << (((composite & VineTile::VINE_WEST) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring flowerPotTypeToString(int type)
{
switch (type)
{
case FlowerPotTile::TYPE_FLOWER_RED: return L"red_flower";
case FlowerPotTile::TYPE_FLOWER_YELLOW: return L"yellow_flower";
case FlowerPotTile::TYPE_SAPLING_DEFAULT: return L"sapling_default";
case FlowerPotTile::TYPE_SAPLING_EVERGREEN: return L"sapling_evergreen";
case FlowerPotTile::TYPE_SAPLING_BIRCH: return L"sapling_birch";
case FlowerPotTile::TYPE_SAPLING_JUNGLE: return L"sapling_jungle";
case FlowerPotTile::TYPE_MUSHROOM_RED: return L"red_mushroom";
case FlowerPotTile::TYPE_MUSHROOM_BROWN: return L"brown_mushroom";
case FlowerPotTile::TYPE_CACTUS: return L"cactus";
case FlowerPotTile::TYPE_DEAD_BUSH: return L"dead_bush";
case FlowerPotTile::TYPE_FERN: return L"fern";
default: return L"empty";
}
}
static std::wstring flowerPotPropsToString(int composite)
{
std::wstringstream ss;
ss << L"type: " << flowerPotTypeToString(composite & 0xF);
return ss.str();
}
static std::wstring saplingPropsToString(int composite)
{
int type = composite & 0x7;
bool grown = (composite & 0x8) != 0;
static const std::wstring typeNames[] = { L"oak", L"spruce", L"birch", L"jungle", L"acacia", L"dark_oak" };
std::wstring typeName = (type >= 0 && type < 6) ? typeNames[type] : L"unknown";
std::wstringstream ss;
ss << L"type: " << typeName << L"\n";
ss << L"age: " << (grown ? 1 : 0);
return ss.str();
}
static std::wstring tallGrassPropsToString(int composite)
{
int type = composite & 0x3;
static const std::wstring typeNames[] = { L"dead_shrub", L"tall_grass", L"fern" };
std::wstring typeName = (type >= 0 && type < 3) ? typeNames[type] : L"unknown";
std::wstringstream ss;
ss << L"variant: " << typeName;
return ss.str();
}
static std::wstring double_plantPropsToString(int composite)
{
int type = composite & 0x7;
bool upper = (composite & TallGrass2::UPPER_BIT) != 0;
static const std::wstring typeNames[] = { L"sunflower", L"lilac", L"tall_grass", L"large_fern", L"rose_bush", L"peony" };
std::wstring typeName = (type >= 0 && type < TallGrass2::VARIANT_COUNT) ? typeNames[type] : L"unknown";
std::wstringstream ss;
ss << L"variant: " << typeName << L"\n";
ss << L"half: " << (upper ? L"upper" : L"lower");
return ss.str();
}
static std::wstring brewingStandPropsToString(int composite)
{
std::wstringstream ss;
ss << L"bottle_0: " << (((composite & 0x1) != 0) ? L"true" : L"false") << L"\n";
ss << L"bottle_1: " << (((composite & 0x2) != 0) ? L"true" : L"false") << L"\n";
ss << L"bottle_2: " << (((composite & 0x4) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring jukeboxPropsToString(int composite)
{
std::wstringstream ss;
ss << L"has_record: " << (((composite & 0x1) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring daylightDetectorPropsToString(int composite, bool inverted)
{
std::wstringstream ss;
int power = composite & 0xF;
ss << L"inverted: " << (inverted ? L"true" : L"false") << L"\n";
ss << L"power: " << power << L"\n";
ss << L"powered: " << (power > 0 ? L"true" : L"false");
return ss.str();
}
static std::wstring snowPropsToString(int composite)
{
std::wstringstream ss;
int layers = composite & 0x7;
if (layers == 0) layers = 8;
ss << L"layers: " << layers;
return ss.str();
}
static std::wstring cauldronPropsToString(int composite)
{
std::wstringstream ss;
int level = composite & 0x3;
ss << L"level: " << level;
return ss.str();
}
static std::wstring bedPropsToString(int composite)
{
int dir = DirectionalTile::getDirection(composite);
static const std::wstring dirNames[] = { L"south", L"west", L"north", L"east" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
bool head = (composite & BedTile::HEAD_PIECE_DATA) != 0;
bool occupied = (composite & BedTile::OCCUPIED_DATA) != 0;
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"part: " << (head ? L"head" : L"foot") << L"\n";
ss << L"occupied: " << (occupied ? L"true" : L"false");
return ss.str();
}
static std::wstring railPropsToString(int composite, bool usesDataBit)
{
int shape = composite & BaseRailTile::RAIL_DIRECTION_MASK;
std::wstring shapeName = L"unknown";
static const std::wstring shapeNames[] = {
L"north_south", L"east_west", L"ascending_east", L"ascending_west",
L"ascending_north", L"ascending_south", L"south_east", L"south_west",
L"north_west", L"north_east"
};
if (shape >= 0 && shape < 10) shapeName = shapeNames[shape];
std::wstringstream ss;
ss << L"shape: " << shapeName;
if (usesDataBit)
{
bool powered = (composite & BaseRailTile::RAIL_DATA_BIT) != 0;
ss << L"\n";
ss << L"powered: " << (powered ? L"true" : L"false");
}
return ss.str();
}
static std::wstring pressurePlatePropsToString(int composite)
{
int power = composite & 0xF;
std::wstringstream ss;
ss << L"power: " << power << L"\n";
ss << L"powered: " << (power > 0 ? L"true" : L"false");
return ss.str();
}
static std::wstring facingToString(int facing)
{
static const std::wstring facingNames[] = { L"down", L"up", L"north", L"south", L"west", L"east" };
return (facing >= 0 && facing < 6) ? facingNames[facing] : L"unknown";
}
static std::wstring dispenserPropsToString(int composite)
{
int facing = composite & DispenserTile::FACING_MASK;
bool triggered = (composite & DispenserTile::TRIGGER_BIT) != 0;
std::wstringstream ss;
ss << L"facing: " << facingToString(facing) << L"\n";
ss << L"triggered: " << (triggered ? L"true" : L"false");
return ss.str();
}
static std::wstring tntPropsToString(int composite)
{
bool explode = (composite & TntTile::EXPLODE_BIT) != 0;
std::wstringstream ss;
ss << L"explode: " << (explode ? L"true" : L"false");
return ss.str();
}
static std::wstring cakePropsToString(int composite)
{
int bites = composite & 0x7;
std::wstringstream ss;
ss << L"bites: " << bites;
return ss.str();
}
static std::wstring comparatorPropsToString(int composite)
{
int dir = DirectionalTile::getDirection(composite);
static const std::wstring dirNames[] = { L"south", L"west", L"north", L"east" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
bool subtract = (composite & 0x4) != 0;
bool powered = (composite & 0x8) != 0;
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"mode: " << (subtract ? L"subtract" : L"compare") << L"\n";
ss << L"powered: " << (powered ? L"true" : L"false");
return ss.str();
}
static std::wstring farmPropsToString(int composite)
{
std::wstringstream ss;
ss << L"moisture: " << (composite & 0x7);
return ss.str();
}
static std::wstring redstoneDustPropsToString(int composite)
{
std::wstringstream ss;
int power = composite & 0xF;
ss << L"power: " << power << L"\n";
ss << L"powered: " << (power > 0 ? L"true" : L"false");
return ss.str();
}
static std::wstring firePropsToString(int composite) {
std::wstringstream ss;
ss << L"age: " << (composite & FireTile::AGE_MASK);
return ss.str();
}
static std::wstring torchPropsToString(int composite)
{
int dir = composite & 0x7;
static const std::wstring dirNames[] = { L"up", L"west", L"east", L"south", L"north", L"unknown" };
std::wstring dirName = (dir >= 0 && dir < 6) ? dirNames[dir > 4 ? 5 : dir] : L"unknown";
std::wstringstream ss;
ss << L"facing: " << dirName;
return ss.str();
}
static std::wstring furnacePropsToString(int composite)
{
int facing = composite & 0x7;
static const std::wstring facingNames[] = { L"unknown", L"unknown", L"north", L"south", L"west", L"east" };
std::wstring facingName = (facing >= 2 && facing <= 5) ? facingNames[facing] : L"unknown";
std::wstringstream ss;
ss << L"facing: " << facingName;
return ss.str();
}
static std::wstring redstoneOrePropsToString(int composite)
{
std::wstringstream ss;
ss << L"lit: " << (((composite & 0x1) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring redstoneTorchPropsToString(int composite)
{
int dir = composite & 0x7;
static const std::wstring dirNames[] = { L"up", L"west", L"east", L"south", L"north", L"unknown" };
std::wstring dirName = (dir >= 0 && dir < 6) ? dirNames[dir > 4 ? 5 : dir] : L"unknown";
std::wstringstream ss;
ss << L"facing: " << dirName;
return ss.str();
}
static std::wstring redlightPropsToString(int composite)
{
std::wstringstream ss;
ss << L"lit: " << (((composite & 0x1) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring buttonFacingToString(int data)
{
switch (data & 0x7)
{
case 1: return L"east";
case 2: return L"west";
case 3: return L"south";
case 4: return L"north";
case 5: return L"ceiling";
case 6: return L"floor";
default: return L"unknown";
}
}
static std::wstring buttonPropsToString(int composite)
{
std::wstringstream ss;
ss << L"facing: " << buttonFacingToString(composite) << L"\n";
ss << L"powered: " << (((composite & 0x8) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring leverFacingToString(int data)
{
static const std::wstring names[] = {
L"down_south", L"down_east", L"down_west", L"down_north",
L"up_south", L"up_north", L"ceiling_west", L"ceiling_east"
};
int facing = data & 7;
return (facing >= 0 && facing < 8) ? names[facing] : L"unknown";
}
static std::wstring leverPropsToString(int composite)
{
std::wstringstream ss;
ss << L"facing: " << leverFacingToString(composite) << L"\n";
ss << L"powered: " << (((composite & 0x8) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring fenceGatePropsToString(int composite)
{
int dir = DirectionalTile::getDirection(composite);
static const std::wstring dirNames[] = { L"south", L"west", L"north", L"east" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
bool powered = (composite & 0x8) != 0;
bool inWall = (composite & 0x10) != 0;
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"open: " << (FenceGateTile::isOpen(composite) ? L"true" : L"false") << L"\n";
ss << L"powered: " << (powered ? L"true" : L"false") << L"\n";
ss << L"in_wall: " << (inWall ? L"true" : L"false");
return ss.str();
}
static std::wstring slabTypeToString(int tileId, int type)
{
if (tileId == Tile::double_wooden_slab_Id || tileId == Tile::wooden_slab_Id)
{
static const std::wstring typeNames[] = { L"oak", L"spruce", L"birch", L"jungle", L"acacia", L"dark_oak" };
return (type >= 0 && type < 6) ? typeNames[type] : L"unknown";
}
if (tileId == Tile::stone_slab2_Id || tileId == Tile::double_stone_slab2_Id)
{
return (type == StoneSlabTile2::RED_SANDSTONE_SLAB) ? L"red_sandstone" : L"unknown";
}
static const std::wstring typeNames[] = {
L"stone", L"sandstone", L"wood", L"cobblestone",
L"brick", L"stone_brick", L"nether_brick", L"quartz"
};
return (type >= 0 && type < 8) ? typeNames[type] : L"unknown";
}
static std::wstring slabPropsToString(int tileId, int composite)
{
int type = composite & HalfSlabTile::TYPE_MASK;
bool top = (composite & HalfSlabTile::TOP_SLOT_BIT) != 0;
std::wstringstream ss;
ss << L"type: " << slabTypeToString(tileId, type);
if (tileId == Tile::wooden_slab_Id || tileId == Tile::stone_slab_Id || tileId == Tile::stone_slab2_Id)
{
ss << L"\n";
ss << L"half: " << (top ? L"top" : L"bottom");
}
else
{
ss << L"\n";
ss << L"half: double";
}
return ss.str();
}
static std::wstring trapDoorPropsToString(int composite)
{
int dir = composite & 0x3;
static const std::wstring dirNames[] = { L"north", L"south", L"west", L"east" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
bool open = (composite & 0x4) != 0;
bool top = (composite & 0x8) != 0;
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"open: " << (open ? L"true" : L"false") << L"\n";
ss << L"half: " << (top ? L"top" : L"bottom");
return ss.str();
}
static std::wstring fencePropsToString(int composite)
{
std::wstringstream ss;
ss << L"north: " << (((composite & 0x1) != 0) ? L"true" : L"false") << L"\n";
ss << L"south: " << (((composite & 0x2) != 0) ? L"true" : L"false") << L"\n";
ss << L"east: " << (((composite & 0x4) != 0) ? L"true" : L"false") << L"\n";
ss << L"west: " << (((composite & 0x8) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring axisToString(int composite)
{
switch (composite & RotatedPillarTile::MASK_FACING)
{
case RotatedPillarTile::FACING_X: return L"x";
case RotatedPillarTile::FACING_Z: return L"z";
default: return L"y";
}
}
static std::wstring hayBlockPropsToString(int composite)
{
std::wstringstream ss;
ss << L"axis: " << axisToString(composite);
return ss.str();
}
static std::wstring pistonBasePropsToString(int composite)
{
int facing = PistonBaseTile::getFacing(composite);
std::wstringstream ss;
ss << L"facing: " << facingToString(facing) << L"\n";
ss << L"extended: " << (PistonBaseTile::isExtended(composite) ? L"true" : L"false");
return ss.str();
}
static std::wstring pistonExtensionPropsToString(int composite)
{
int facing = PistonExtensionTile::getFacing(composite);
std::wstringstream ss;
ss << L"facing: " << facingToString(facing) << L"\n";
ss << L"type: " << (((composite & PistonExtensionTile::STICKY_BIT) != 0) ? L"sticky" : L"normal");
return ss.str();
}
static std::wstring endPortalFramePropsToString(int composite)
{
static const std::wstring dirNames[] = { L"south", L"west", L"north", L"east" };
int facing = composite & 0x3;
std::wstring facingName = (facing >= 0 && facing < 4) ? dirNames[facing] : L"unknown";
std::wstringstream ss;
ss << L"facing: " << facingName << L"\n";
ss << L"eye: " << ((composite & TheEndPortalFrameTile::EYE_BIT) != 0 ? L"true" : L"false");
return ss.str();
}
static std::wstring repeaterPropsToString(int composite, bool powered)
{
int dir = DirectionalTile::getDirection(composite);
static const std::wstring dirNames[] = { L"south", L"west", L"north", L"east" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
int delay = ((composite & RepeaterTile::DELAY_MASK) >> RepeaterTile::DELAY_SHIFT) + 1;
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"delay: " << delay << L"\n";
ss << L"powered: " << (powered ? L"true" : L"false");
return ss.str();
}
static std::wstring hugeMushroomPropsToString(int composite)
{
std::wstringstream ss;
ss << L"variant: " << (composite & 0xF);
return ss.str();
}
static std::wstring hopperPropsToString(int composite)
{
int face = HopperTile::getAttachedFace(composite);
static const std::wstring faceNames[] = { L"down", L"up", L"north", L"south", L"west", L"east" };
std::wstring facing = (face >= 0 && face < 6) ? faceNames[face] : L"unknown";
bool enabled = HopperTile::isTurnedOn(composite);
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"enabled: " << (enabled ? L"true" : L"false");
return ss.str();
}
static std::wstring logBlockPropsToString(int tileId, int composite)
{
int type = composite & RotatedPillarTile::MASK_TYPE;
std::wstring axis = axisToString(composite);
std::wstring typeName;
if (tileId == Tile::log_Id)
{
static const std::wstring typeNames[] = { L"oak", L"spruce", L"birch", L"jungle" };
typeName = (type >= 0 && type < 4) ? typeNames[type] : L"unknown";
}
else
{
static const std::wstring typeNames[] = { L"acacia", L"dark_oak" };
typeName = (type >= 0 && type < 2) ? typeNames[type] : L"unknown";
}
std::wstringstream ss;
ss << L"type: " << typeName << L"\n";
ss << L"axis: " << axis;
return ss.str();
}
static std::wstring tripWirePropsToString(int composite)
{
std::wstringstream ss;
ss << L"north: " << (((composite & 0x1) != 0) ? L"true" : L"false") << L"\n";
ss << L"south: " << (((composite & 0x2) != 0) ? L"true" : L"false") << L"\n";
ss << L"east: " << (((composite & 0x4) != 0) ? L"true" : L"false") << L"\n";
ss << L"west: " << (((composite & 0x8) != 0) ? L"true" : L"false") << L"\n";
ss << L"powered: " << (((composite & TripWireTile::BLOCKSTATE_POWERED_BIT) != 0) ? L"true" : L"false");
return ss.str();
}
static std::wstring tripWireSourcePropsToString(int composite)
{
int dir = composite & 0x3;
static const std::wstring dirNames[] = { L"north", L"east", L"south", L"west" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
bool attached = (composite & 0x4) != 0;
bool powered = (composite & 0x8) != 0;
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"attached: " << (attached ? L"true" : L"false") << L"\n";
ss << L"powered: " << (powered ? L"true" : L"false");
return ss.str();
}
static bool registerDoorDecoder()
{
using namespace BlockStateDecoderRegistry;
DecoderFn fn = [](int composite)->std::wstring {
return BlockStateDecoder::doorPropsToString(BlockStateDecoder::decodeDoor(composite));
};
registerDecoder(Tile::wooden_door_Id, fn);
registerDecoder(Tile::iron_door_Id, fn);
registerDecoder(Tile::spruce_door_Id, fn);
registerDecoder(Tile::birch_door_Id, fn);
registerDecoder(Tile::jungle_door_Id, fn);
registerDecoder(Tile::acacia_door_Id, fn);
registerDecoder(Tile::dark_oak_door_Id, fn);
return true;
}
static bool s_doorDecoderRegistered = registerDoorDecoder();
static bool registerStairDecoder()
{
using namespace BlockStateDecoderRegistry;
DecoderFn fn = [](int composite)->std::wstring {
int dir = composite & 0x3;
static const std::wstring dirNames[] = { L"east", L"west", L"south", L"north" };
std::wstring facing = (dir >= 0 && dir < 4) ? dirNames[dir] : L"unknown";
bool upside = (composite & StairTile::UPSIDEDOWN_BIT) != 0;
int shape = (composite >> 3) & 0x7;
std::wstring shapeName = L"straight";
if (shape == 1) shapeName = L"inner";
else if (shape == 2) shapeName = L"outer";
std::wstringstream ss;
ss << L"facing: " << facing << L"\n";
ss << L"half: " << (upside ? L"top" : L"bottom") << L"\n";
ss << L"shape: " << shapeName;
return ss.str();
};
registerDecoder(Tile::oak_stairs_Id, fn);
registerDecoder(Tile::stone_stairs_Id, fn);
registerDecoder(Tile::brick_stairs_Id, fn);
registerDecoder(Tile::stone_brick_stairs_Id, fn);
registerDecoder(Tile::nether_brick_stairs_Id, fn);
registerDecoder(Tile::sandstone_stairs_Id, fn);
registerDecoder(Tile::spruce_stairs_Id, fn);
registerDecoder(Tile::birch_stairs_Id, fn);
registerDecoder(Tile::jungle_stairs_Id, fn);
registerDecoder(Tile::quartz_stairs_Id, fn);
registerDecoder(Tile::acacia_stairs_Id, fn);
registerDecoder(Tile::dark_oak_stairs_Id, fn);
registerDecoder(Tile::red_sandstone_stairs_Id, fn);
return true;
}
static bool s_stairDecoderRegistered = registerStairDecoder();
static bool registerPlantDecoders()
{
using namespace BlockStateDecoderRegistry;
DecoderFn ageDecoder = [](int composite)->std::wstring {
return agePropsToString(composite);
};
registerDecoder(Tile::wheat_Id, ageDecoder);
registerDecoder(Tile::carrots_Id, ageDecoder);
registerDecoder(Tile::potatoes_Id, ageDecoder);
registerDecoder(Tile::cactus_Id, ageDecoder);
registerDecoder(Tile::nether_wart_Id, ageDecoder);
registerDecoder(Tile::reeds_Id, ageDecoder);
registerDecoder(Tile::bed_Id, [](int composite)->std::wstring { return bedPropsToString(composite); });
registerDecoder(Tile::rail_Id, [](int composite)->std::wstring { return railPropsToString(composite, false); });
registerDecoder(Tile::golden_rail_Id, [](int composite)->std::wstring { return railPropsToString(composite, true); });
registerDecoder(Tile::detector_rail_Id, [](int composite)->std::wstring { return railPropsToString(composite, true); });
registerDecoder(Tile::activator_rail_Id, [](int composite)->std::wstring { return railPropsToString(composite, true); });
registerDecoder(Tile::dispenser_Id, [](int composite)->std::wstring { return dispenserPropsToString(composite); });
registerDecoder(Tile::dropper_Id, [](int composite)->std::wstring { return dispenserPropsToString(composite); });
registerDecoder(Tile::tnt_Id, [](int composite)->std::wstring { return tntPropsToString(composite); });
registerDecoder(Tile::cake_Id, [](int composite)->std::wstring { return cakePropsToString(composite); });
registerDecoder(Tile::stone_pressure_plate_Id, [](int composite)->std::wstring { return pressurePlatePropsToString(composite); });
registerDecoder(Tile::wooden_pressure_plate_Id, [](int composite)->std::wstring { return pressurePlatePropsToString(composite); });
registerDecoder(Tile::light_weighted_pressure_plate_Id, [](int composite)->std::wstring { return pressurePlatePropsToString(composite); });
registerDecoder(Tile::heavy_weighted_pressure_plate_Id, [](int composite)->std::wstring { return pressurePlatePropsToString(composite); });
registerDecoder(Tile::farmland_Id, [](int composite)->std::wstring { return farmPropsToString(composite); });
registerDecoder(Tile::cocoa_Id, [](int composite)->std::wstring { return cocoaPropsToString(composite); });
registerDecoder(Tile::brewing_stand_Id, [](int composite)->std::wstring { return brewingStandPropsToString(composite); });
registerDecoder(Tile::fire_Id, [](int composite)->std::wstring { return firePropsToString(composite); });
registerDecoder(Tile::stone_button_Id, [](int composite)->std::wstring { return buttonPropsToString(composite); });
registerDecoder(Tile::wooden_button_Id, [](int composite)->std::wstring { return buttonPropsToString(composite); });
registerDecoder(Tile::pumpkin_stem_Id, [](int composite)->std::wstring { return stemPropsToString(composite); });
registerDecoder(Tile::melon_stem_Id, [](int composite)->std::wstring { return stemPropsToString(composite); });
registerDecoder(Tile::vine_Id, [](int composite)->std::wstring { return vinePropsToString(composite); });
registerDecoder(Tile::flower_pot_Id, [](int composite)->std::wstring { return flowerPotPropsToString(composite); });
registerDecoder(Tile::sapling_Id, [](int composite)->std::wstring { return saplingPropsToString(composite); });
registerDecoder(Tile::tallgrass_Id, [](int composite)->std::wstring { return tallGrassPropsToString(composite); });
registerDecoder(Tile::double_plant_Id, [](int composite)->std::wstring { return double_plantPropsToString(composite); });
registerDecoder(Tile::fence_Id, [](int composite)->std::wstring { return fencePropsToString(composite); });
registerDecoder(Tile::nether_brick_fence_Id, [](int composite)->std::wstring { return fencePropsToString(composite); });
registerDecoder(Tile::spruce_fence_Id, [](int composite)->std::wstring { return fencePropsToString(composite); });
registerDecoder(Tile::birch_fence_Id, [](int composite)->std::wstring { return fencePropsToString(composite); });
registerDecoder(Tile::jungle_fence_Id, [](int composite)->std::wstring { return fencePropsToString(composite); });
registerDecoder(Tile::dark_oak_fence_Id, [](int composite)->std::wstring { return fencePropsToString(composite); });
registerDecoder(Tile::acacia_fence_Id, [](int composite)->std::wstring { return fencePropsToString(composite); });
registerDecoder(Tile::double_stone_slab_Id, [](int composite)->std::wstring { return slabPropsToString(Tile::double_stone_slab_Id, composite); });
registerDecoder(Tile::stone_slab_Id, [](int composite)->std::wstring { return slabPropsToString(Tile::stone_slab_Id, composite); });
registerDecoder(Tile::double_wooden_slab_Id, [](int composite)->std::wstring { return slabPropsToString(Tile::double_wooden_slab_Id, composite); });
registerDecoder(Tile::wooden_slab_Id, [](int composite)->std::wstring { return slabPropsToString(Tile::wooden_slab_Id, composite); });
registerDecoder(Tile::double_stone_slab2_Id, [](int composite)->std::wstring { return slabPropsToString(Tile::double_stone_slab2_Id, composite); });
registerDecoder(Tile::stone_slab2_Id, [](int composite)->std::wstring { return slabPropsToString(Tile::stone_slab2_Id, composite); });
registerDecoder(Tile::trapdoor_Id, [](int composite)->std::wstring { return trapDoorPropsToString(composite); });
registerDecoder(Tile::iron_trapdoor_Id, [](int composite)->std::wstring { return trapDoorPropsToString(composite); });
registerDecoder(Tile::tripwire_Id, [](int composite)->std::wstring { return tripWirePropsToString(composite); });
registerDecoder(Tile::tripwire_hook_Id, [](int composite)->std::wstring { return tripWireSourcePropsToString(composite); });
registerDecoder(Tile::hay_block_Id, [](int composite)->std::wstring { return hayBlockPropsToString(composite); });
registerDecoder(Tile::log_Id, [](int composite)->std::wstring { return logBlockPropsToString(Tile::log_Id, composite); });
registerDecoder(Tile::log2_Id, [](int composite)->std::wstring { return logBlockPropsToString(Tile::log2_Id, composite); });
registerDecoder(Tile::lever_Id, [](int composite)->std::wstring { return leverPropsToString(composite); });
registerDecoder(Tile::piston_Id, [](int composite)->std::wstring { return pistonBasePropsToString(composite); });
registerDecoder(Tile::sticky_piston_Id, [](int composite)->std::wstring { return pistonBasePropsToString(composite); });
registerDecoder(Tile::piston_head_Id, [](int composite)->std::wstring { return pistonExtensionPropsToString(composite); });
registerDecoder(Tile::end_portal_frame_Id, [](int composite)->std::wstring { return endPortalFramePropsToString(composite); });
registerDecoder(Tile::unpowered_repeater_Id, [](int composite)->std::wstring { return repeaterPropsToString(composite, false); });
registerDecoder(Tile::powered_repeater_Id, [](int composite)->std::wstring { return repeaterPropsToString(composite, true); });
registerDecoder(Tile::unpowered_comparator_Id, [](int composite)->std::wstring { return comparatorPropsToString(composite); });
registerDecoder(Tile::powered_comparator_Id, [](int composite)->std::wstring { return comparatorPropsToString(composite); });
registerDecoder(Tile::redstone_wire_Id, [](int composite)->std::wstring { return redstoneDustPropsToString(composite); });
registerDecoder(Tile::brown_mushroom_block_Id, [](int composite)->std::wstring { return hugeMushroomPropsToString(composite); });
registerDecoder(Tile::red_mushroom_block_Id, [](int composite)->std::wstring { return hugeMushroomPropsToString(composite); });
registerDecoder(Tile::hopper_Id, [](int composite)->std::wstring { return hopperPropsToString(composite); });
registerDecoder(Tile::jukebox_Id, [](int composite)->std::wstring { return jukeboxPropsToString(composite); });
registerDecoder(Tile::fence_gate_Id, [](int composite)->std::wstring { return fenceGatePropsToString(composite); });
registerDecoder(Tile::spruce_fence_gate_Id, [](int composite)->std::wstring { return fenceGatePropsToString(composite); });
registerDecoder(Tile::birch_fence_gate_Id, [](int composite)->std::wstring { return fenceGatePropsToString(composite); });
registerDecoder(Tile::jungle_fence_gate_Id, [](int composite)->std::wstring { return fenceGatePropsToString(composite); });
registerDecoder(Tile::dark_oak_fence_gate_Id, [](int composite)->std::wstring { return fenceGatePropsToString(composite); });
registerDecoder(Tile::acacia_fence_gate_Id, [](int composite)->std::wstring { return fenceGatePropsToString(composite); });
registerDecoder(Tile::daylight_detector_Id, [](int composite)->std::wstring { return daylightDetectorPropsToString(composite, false); });
registerDecoder(Tile::daylight_detector_inverted_Id, [](int composite)->std::wstring { return daylightDetectorPropsToString(composite, true); });
registerDecoder(Tile::snow_Id, [](int composite)->std::wstring { return snowPropsToString(composite); });
registerDecoder(Tile::snow_layer_Id, [](int composite)->std::wstring { return snowPropsToString(composite); });
registerDecoder(Tile::cauldron_Id, [](int composite)->std::wstring { return cauldronPropsToString(composite); });
registerDecoder(Tile::torch_Id, [](int composite)->std::wstring { return torchPropsToString(composite); });
registerDecoder(Tile::furnace_Id, [](int composite)->std::wstring { return furnacePropsToString(composite); });
registerDecoder(Tile::lit_furnace_Id, [](int composite)->std::wstring { return furnacePropsToString(composite); });
registerDecoder(Tile::redstone_ore_Id, [](int composite)->std::wstring { return redstoneOrePropsToString(composite); });
registerDecoder(Tile::lit_redstone_ore_Id, [](int composite)->std::wstring { return redstoneOrePropsToString(composite); });
registerDecoder(Tile::unlit_redstone_torch_Id, [](int composite)->std::wstring { return redstoneTorchPropsToString(composite); });
registerDecoder(Tile::redstone_torch_Id, [](int composite)->std::wstring { return redstoneTorchPropsToString(composite); });
registerDecoder(Tile::redstone_lamp_Id, [](int composite)->std::wstring { return redlightPropsToString(composite); });
registerDecoder(Tile::lit_redstone_lamp_Id, [](int composite)->std::wstring { return redlightPropsToString(composite); });
return true;
}
static bool s_plantDecoderRegistered = registerPlantDecoders();

Some files were not shown because too many files have changed in this diff Show more