aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/GameRules
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
commit119bff351450ea16ffda550b6e0f67379b29f708 (patch)
treed9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.Client/Common/GameRules
parent8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff)
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.Client/Common/GameRules')
-rw-r--r--Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp4
-rw-r--r--Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h2
-rw-r--r--Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp4
-rw-r--r--Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h2
-rw-r--r--Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp6
-rw-r--r--Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h8
-rw-r--r--Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp8
-rw-r--r--Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h2
-rw-r--r--Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp8
-rw-r--r--Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h4
-rw-r--r--Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp28
-rw-r--r--Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h4
-rw-r--r--Minecraft.Client/Common/GameRules/GameRule.cpp6
-rw-r--r--Minecraft.Client/Common/GameRules/GameRule.h2
-rw-r--r--Minecraft.Client/Common/GameRules/GameRuleDefinition.h6
-rw-r--r--Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp4
-rw-r--r--Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h6
-rw-r--r--Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp6
-rw-r--r--Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp2
19 files changed, 56 insertions, 56 deletions
diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
index b2687619..eabc1401 100644
--- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.cpp
@@ -43,14 +43,14 @@ void AddEnchantmentRuleDefinition::addAttribute(const wstring &attributeName, co
}
}
-bool AddEnchantmentRuleDefinition::enchantItem(std::shared_ptr<ItemInstance> item)
+bool AddEnchantmentRuleDefinition::enchantItem(shared_ptr<ItemInstance> item)
{
bool enchanted = false;
if (item != NULL)
{
// 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::enchantedBook_Id)
{
Item::enchantedBook->addEnchantment( item, new EnchantmentInstance(m_enchantmentId, m_enchantmentLevel) );
}
diff --git a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h
index 0ec2ff44..3beece10 100644
--- a/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/AddEnchantmentRuleDefinition.h
@@ -19,5 +19,5 @@ public:
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
- bool enchantItem(std::shared_ptr<ItemInstance> item);
+ bool enchantItem(shared_ptr<ItemInstance> item);
}; \ No newline at end of file
diff --git a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp
index 6b99c59e..0d14884a 100644
--- a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.cpp
@@ -94,13 +94,13 @@ void AddItemRuleDefinition::addAttribute(const wstring &attributeName, const wst
}
}
-bool AddItemRuleDefinition::addItemToContainer(std::shared_ptr<Container> container, int slotId)
+bool AddItemRuleDefinition::addItemToContainer(shared_ptr<Container> container, int slotId)
{
bool added = false;
if(Item::items[m_itemId] != NULL)
{
int quantity = min(m_quantity, Item::items[m_itemId]->getMaxStackSize());
- std::shared_ptr<ItemInstance> newItem = std::shared_ptr<ItemInstance>(new ItemInstance(m_itemId,quantity,m_auxValue) );
+ shared_ptr<ItemInstance> newItem = shared_ptr<ItemInstance>(new ItemInstance(m_itemId,quantity,m_auxValue) );
newItem->set4JData(m_dataTag);
for(AUTO_VAR(it, m_enchantments.begin()); it != m_enchantments.end(); ++it)
diff --git a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h
index bd8c466a..602f2d82 100644
--- a/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/AddItemRuleDefinition.h
@@ -26,5 +26,5 @@ public:
virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType);
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
- bool addItemToContainer(std::shared_ptr<Container> container, int slotId);
+ bool addItemToContainer(shared_ptr<Container> container, int slotId);
}; \ No newline at end of file
diff --git a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp
index d94ce63b..66abefbb 100644
--- a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.cpp
@@ -74,7 +74,7 @@ void CollectItemRuleDefinition::populateGameRule(GameRulesInstance::EGameRulesIn
GameRuleDefinition::populateGameRule(type, rule);
}
-bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item)
+bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item)
{
bool statusChanged = false;
if(item != NULL && item->id == m_itemId && item->getAuxValue() == m_auxValue && item->get4JData() == m_4JDataValue)
@@ -94,7 +94,7 @@ bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<It
if(rule->getConnection() != NULL)
{
- rule->getConnection()->send( std::shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0)));
+ rule->getConnection()->send( shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId, m_itemId, m_auxValue, this->m_4JDataValue,NULL,0)));
}
}
}
@@ -102,7 +102,7 @@ bool CollectItemRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<It
return statusChanged;
}
-wstring CollectItemRuleDefinition::generateXml(std::shared_ptr<ItemInstance> item)
+wstring CollectItemRuleDefinition::generateXml(shared_ptr<ItemInstance> item)
{
// 4J Stu - This should be kept in sync with the GameRulesDefinition.xsd
wstring xml = L"";
diff --git a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h
index 1c6821e4..5ee6f4c5 100644
--- a/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/CollectItemRuleDefinition.h
@@ -25,16 +25,16 @@ public:
virtual int getGoal();
virtual int getProgress(GameRule *rule);
-
+
virtual int getIcon() { return m_itemId; }
virtual int getAuxValue() { return m_auxValue; }
void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule);
- bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item);
+ bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item);
- static wstring generateXml(std::shared_ptr<ItemInstance> item);
+ static wstring generateXml(shared_ptr<ItemInstance> item);
-private:
+private:
//static wstring generateXml(CollectItemRuleDefinition *ruleDef);
}; \ No newline at end of file
diff --git a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp
index f0362f48..adaf70c8 100644
--- a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp
@@ -17,7 +17,7 @@ bool CompleteAllRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, int
return statusChanged;
}
-bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item)
+bool CompleteAllRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item)
{
bool statusChanged = CompoundGameRuleDefinition::onCollectItem(rule,item);
if(statusChanged) updateStatus(rule);
@@ -44,14 +44,14 @@ void CompleteAllRuleDefinition::updateStatus(GameRule *rule)
int icon = -1;
int auxValue = 0;
-
+
if(m_lastRuleStatusChanged != NULL)
- {
+ {
icon = m_lastRuleStatusChanged->getIcon();
auxValue = m_lastRuleStatusChanged->getAuxValue();
m_lastRuleStatusChanged = NULL;
}
- rule->getConnection()->send( std::shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId,icon, auxValue, 0,&data,sizeof(PacketData))));
+ rule->getConnection()->send( shared_ptr<UpdateGameRuleProgressPacket>( new UpdateGameRuleProgressPacket(getActionType(), this->m_descriptionId,icon, auxValue, 0,&data,sizeof(PacketData))));
}
app.DebugPrintf("Updated CompleteAllRule - Completed %d of %d\n", progress, goal);
}
diff --git a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h
index 2ecbc303..b2cb8847 100644
--- a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h
@@ -17,7 +17,7 @@ public:
virtual void getChildren(vector<GameRuleDefinition *> *children);
virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z);
- virtual bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item);
+ virtual bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item);
static wstring generateDescriptionString(const wstring &description, void *data, int dataLength);
diff --git a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp
index 106302ee..0481a54b 100644
--- a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.cpp
@@ -40,7 +40,7 @@ GameRuleDefinition *CompoundGameRuleDefinition::addChild(ConsoleGameRules::EGame
rule = new UseTileRuleDefinition();
}
else if(ruleType == ConsoleGameRules::eGameRuleType_UpdatePlayerRule)
- {
+ {
rule = new UpdatePlayerRuleDefinition();
}
else
@@ -91,7 +91,7 @@ bool CompoundGameRuleDefinition::onUseTile(GameRule *rule, int tileId, int x, in
return statusChanged;
}
-bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item)
+bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item)
{
bool statusChanged = false;
for(AUTO_VAR(it, rule->m_parameters.begin()); it != rule->m_parameters.end(); ++it)
@@ -100,7 +100,7 @@ bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<I
{
bool changed = it->second.gr->getGameRuleDefinition()->onCollectItem(it->second.gr,item);
if(!statusChanged && changed)
- {
+ {
m_lastRuleStatusChanged = it->second.gr->getGameRuleDefinition();
statusChanged = true;
}
@@ -109,7 +109,7 @@ bool CompoundGameRuleDefinition::onCollectItem(GameRule *rule, std::shared_ptr<I
return statusChanged;
}
-void CompoundGameRuleDefinition::postProcessPlayer(std::shared_ptr<Player> player)
+void CompoundGameRuleDefinition::postProcessPlayer(shared_ptr<Player> player)
{
for(AUTO_VAR(it, m_children.begin()); it != m_children.end(); ++it)
{
diff --git a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h
index 4b91cda8..bfedfd09 100644
--- a/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/CompoundGameRuleDefinition.h
@@ -18,6 +18,6 @@ public:
virtual void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule);
virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z);
- virtual bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item);
- virtual void postProcessPlayer(std::shared_ptr<Player> player);
+ virtual bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item);
+ virtual void postProcessPlayer(shared_ptr<Player> player);
}; \ No newline at end of file
diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp
index 5f4bc737..0eef096b 100644
--- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp
+++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp
@@ -116,7 +116,7 @@ void ConsoleSchematicFile::load(DataInputStream *dis)
for (int i = 0; i < tileEntityTags->size(); i++)
{
CompoundTag *teTag = tileEntityTags->get(i);
- std::shared_ptr<TileEntity> te = TileEntity::loadStatic(teTag);
+ shared_ptr<TileEntity> te = TileEntity::loadStatic(teTag);
if(te == NULL)
{
@@ -433,7 +433,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
{
for(AUTO_VAR(it, m_tileEntities.begin()); it != m_tileEntities.end();++it)
{
- std::shared_ptr<TileEntity> te = *it;
+ shared_ptr<TileEntity> te = *it;
double targetX = te->x;
double targetY = te->y + destinationBox->y0;
@@ -444,7 +444,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
Vec3 *pos = Vec3::newTemp(targetX,targetY,targetZ);
if( chunkBox->containsIncludingLowerBound(pos) )
{
- std::shared_ptr<TileEntity> teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 );
+ shared_ptr<TileEntity> teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 );
if ( teCopy != NULL )
{
@@ -495,11 +495,11 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
}
CompoundTag *eTag = it->second;
- std::shared_ptr<Entity> e = EntityIO::loadStatic(eTag, NULL);
+ shared_ptr<Entity> e = EntityIO::loadStatic(eTag, NULL);
if( e->GetType() == eTYPE_PAINTING )
{
- std::shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(e);
+ shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(e);
double tileX = painting->xTile;
double tileZ = painting->zTile;
@@ -512,7 +512,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
}
else if( e->GetType() == eTYPE_ITEM_FRAME )
{
- std::shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e);
+ shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e);
double tileX = frame->xTile;
double tileZ = frame->zTile;
@@ -678,12 +678,12 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
{
for (int zc = zc0; zc <= zc1; zc++)
{
- vector<std::shared_ptr<TileEntity> > *tileEntities = getTileEntitiesInRegion(level->getChunk(xc, zc), xStart, yStart, zStart, xStart + xSize, yStart + ySize, zStart + zSize);
+ vector<shared_ptr<TileEntity> > *tileEntities = getTileEntitiesInRegion(level->getChunk(xc, zc), xStart, yStart, zStart, xStart + xSize, yStart + ySize, zStart + zSize);
for(AUTO_VAR(it, tileEntities->begin()); it != tileEntities->end(); ++it)
{
- std::shared_ptr<TileEntity> te = *it;
+ shared_ptr<TileEntity> te = *it;
CompoundTag *teTag = new CompoundTag();
- std::shared_ptr<TileEntity> teCopy = te->clone();
+ shared_ptr<TileEntity> teCopy = te->clone();
// Adjust the tileEntity position to schematic coords from world co-ords
teCopy->x -= xStart;
@@ -698,12 +698,12 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
tag.put(L"TileEntities", tileEntitiesTag);
AABB *bb = AABB::newTemp(xStart,yStart,zStart,xEnd,yEnd,zEnd);
- vector<std::shared_ptr<Entity> > *entities = level->getEntities(nullptr, bb);
+ vector<shared_ptr<Entity> > *entities = level->getEntities(nullptr, bb);
ListTag<CompoundTag> *entitiesTag = new ListTag<CompoundTag>(L"entities");
for(AUTO_VAR(it, entities->begin()); it != entities->end(); ++it)
{
- std::shared_ptr<Entity> e = *it;
+ shared_ptr<Entity> e = *it;
bool mobCanBeSaved = false;
if(bSaveMobs)
@@ -1005,12 +1005,12 @@ void ConsoleSchematicFile::setBlocksAndData(LevelChunk *chunk, byteArray blockDa
}
}
-vector<std::shared_ptr<TileEntity> > *ConsoleSchematicFile::getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1)
+vector<shared_ptr<TileEntity> > *ConsoleSchematicFile::getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1)
{
- vector<std::shared_ptr<TileEntity> > *result = new vector<std::shared_ptr<TileEntity> >;
+ vector<shared_ptr<TileEntity> > *result = new vector<shared_ptr<TileEntity> >;
for (AUTO_VAR(it, chunk->tileEntities.begin()); it != chunk->tileEntities.end(); ++it)
{
- std::shared_ptr<TileEntity> te = it->second;
+ shared_ptr<TileEntity> te = it->second;
if (te->x >= x0 && te->y >= y0 && te->z >= z0 && te->x < x1 && te->y < y1 && te->z < z1)
{
result->push_back(te);
diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h
index 299f81d4..b0eebf9e 100644
--- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h
+++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h
@@ -55,7 +55,7 @@ public:
} XboxSchematicInitParam;
private:
int m_xSize, m_ySize, m_zSize;
- vector<std::shared_ptr<TileEntity> > m_tileEntities;
+ vector<shared_ptr<TileEntity> > m_tileEntities;
vector< pair<Vec3 *, CompoundTag *> > m_entities;
public:
@@ -83,7 +83,7 @@ private:
void load_tags(DataInputStream *dis);
static void getBlocksAndData(LevelChunk *chunk, byteArray *data, int x0, int y0, int z0, int x1, int y1, int z1, int &blocksP, int &dataP, int &blockLightP, int &skyLightP);
- static vector<std::shared_ptr<TileEntity> > *getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1);
+ static vector<shared_ptr<TileEntity> > *getTileEntitiesInRegion(LevelChunk *chunk, int x0, int y0, int z0, int x1, int y1, int z1);
void chunkCoordToSchematicCoord(AABB *destinationBox, int chunkX, int chunkZ, ESchematicRotation rot, int &schematicX, int &schematicZ);
void schematicCoordToChunkCoord(AABB *destinationBox, double schematicX, double schematicZ, ESchematicRotation rot, double &chunkX, double &chunkZ);
diff --git a/Minecraft.Client/Common/GameRules/GameRule.cpp b/Minecraft.Client/Common/GameRules/GameRule.cpp
index 310d6d65..34d6196c 100644
--- a/Minecraft.Client/Common/GameRules/GameRule.cpp
+++ b/Minecraft.Client/Common/GameRules/GameRule.cpp
@@ -53,7 +53,7 @@ GameRuleDefinition *GameRule::getGameRuleDefinition()
}
void GameRule::onUseTile(int tileId, int x, int y, int z) { m_definition->onUseTile(this,tileId,x,y,z); }
-void GameRule::onCollectItem(std::shared_ptr<ItemInstance> item) { m_definition->onCollectItem(this,item); }
+void GameRule::onCollectItem(shared_ptr<ItemInstance> item) { m_definition->onCollectItem(this,item); }
void GameRule::write(DataOutputStream *dos)
{
@@ -63,7 +63,7 @@ void GameRule::write(DataOutputStream *dos)
{
wstring pName = (*it).first;
ValueType vType = (*it).second;
-
+
dos->writeUTF( (*it).first );
dos->writeBoolean( vType.isPointer );
@@ -80,7 +80,7 @@ void GameRule::read(DataInputStream *dis)
for (int i = 0; i < savedParams; i++)
{
wstring pNames = dis->readUTF();
-
+
ValueType vType = getParameter(pNames);
if (dis->readBoolean())
diff --git a/Minecraft.Client/Common/GameRules/GameRule.h b/Minecraft.Client/Common/GameRules/GameRule.h
index c2b6c826..3b9dba7e 100644
--- a/Minecraft.Client/Common/GameRules/GameRule.h
+++ b/Minecraft.Client/Common/GameRules/GameRule.h
@@ -51,7 +51,7 @@ public:
// All the hooks go here
void onUseTile(int tileId, int x, int y, int z);
- void onCollectItem(std::shared_ptr<ItemInstance> item);
+ void onCollectItem(shared_ptr<ItemInstance> item);
// 4J-JEV: For saving.
//CompoundTag *toTags(unordered_map<GameRuleDefinition *, int> *map);
diff --git a/Minecraft.Client/Common/GameRules/GameRuleDefinition.h b/Minecraft.Client/Common/GameRules/GameRuleDefinition.h
index ea7647bf..afec8fbc 100644
--- a/Minecraft.Client/Common/GameRules/GameRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/GameRuleDefinition.h
@@ -39,7 +39,7 @@ public:
virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType);
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
-
+
virtual void populateGameRule(GameRulesInstance::EGameRulesInstanceType type, GameRule *rule);
bool getComplete(GameRule *rule);
@@ -53,8 +53,8 @@ public:
// Here we should have functions for all the hooks, with a GameRule* as the first parameter
virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z) { return false; }
- virtual bool onCollectItem(GameRule *rule, std::shared_ptr<ItemInstance> item) { return false; }
- virtual void postProcessPlayer(std::shared_ptr<Player> player) { }
+ virtual bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item) { return false; }
+ virtual void postProcessPlayer(shared_ptr<Player> player) { }
vector<GameRuleDefinition *> *enumerate();
unordered_map<GameRuleDefinition *, int> *enumerateMap();
diff --git a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp
index 7ef8e577..6e55cd45 100644
--- a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp
+++ b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.cpp
@@ -11,7 +11,7 @@ UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition()
{
m_bUpdateHealth = m_bUpdateFood = m_bUpdateYRot = false;;
m_health = 0;
- m_food = 0;
+ m_food = 0;
m_spawnPos = NULL;
m_yRot = 0.0f;
}
@@ -130,7 +130,7 @@ void UpdatePlayerRuleDefinition::addAttribute(const wstring &attributeName, cons
}
}
-void UpdatePlayerRuleDefinition::postProcessPlayer(std::shared_ptr<Player> player)
+void UpdatePlayerRuleDefinition::postProcessPlayer(shared_ptr<Player> player)
{
if(m_bUpdateHealth)
{
diff --git a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h
index f02ba848..538aefa1 100644
--- a/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/UpdatePlayerRuleDefinition.h
@@ -13,7 +13,7 @@ private:
bool m_bUpdateHealth, m_bUpdateFood, m_bUpdateYRot, m_bUpdateInventory;
int m_health;
- int m_food;
+ int m_food;
Pos *m_spawnPos;
float m_yRot;
@@ -22,12 +22,12 @@ public:
~UpdatePlayerRuleDefinition();
virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_UpdatePlayerRule; }
-
+
virtual void getChildren(vector<GameRuleDefinition *> *children);
virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType);
virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes);
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
- virtual void postProcessPlayer(std::shared_ptr<Player> player);
+ virtual void postProcessPlayer(shared_ptr<Player> player);
}; \ No newline at end of file
diff --git a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp
index 25b7f6ab..8184f45b 100644
--- a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp
+++ b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceContainer.cpp
@@ -22,7 +22,7 @@ XboxStructureActionPlaceContainer::~XboxStructureActionPlaceContainer()
// 4J-JEV: Super class handles attr-facing fine.
//void XboxStructureActionPlaceContainer::writeAttributes(DataOutputStream *dos, UINT numAttrs)
-
+
void XboxStructureActionPlaceContainer::getChildren(vector<GameRuleDefinition *> *children)
{
@@ -78,8 +78,8 @@ bool XboxStructureActionPlaceContainer::placeContainerInLevel(StructurePiece *st
}
level->setTile( worldX, worldY, worldZ, m_tile );
- std::shared_ptr<Container> container = dynamic_pointer_cast<Container>(level->getTileEntity( worldX, worldY, worldZ ));
-
+ shared_ptr<Container> container = dynamic_pointer_cast<Container>(level->getTileEntity( worldX, worldY, worldZ ));
+
app.DebugPrintf("XboxStructureActionPlaceContainer - placing a container at (%d,%d,%d)\n", worldX, worldY, worldZ);
if ( container != NULL )
{
diff --git a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp
index fcb8a018..1eca3342 100644
--- a/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp
+++ b/Minecraft.Client/Common/GameRules/XboxStructureActionPlaceSpawner.cpp
@@ -54,7 +54,7 @@ bool XboxStructureActionPlaceSpawner::placeSpawnerInLevel(StructurePiece *struct
}
level->setTile( worldX, worldY, worldZ, m_tile );
- std::shared_ptr<MobSpawnerTileEntity> entity = dynamic_pointer_cast<MobSpawnerTileEntity>(level->getTileEntity( worldX, worldY, worldZ ));
+ shared_ptr<MobSpawnerTileEntity> entity = dynamic_pointer_cast<MobSpawnerTileEntity>(level->getTileEntity( worldX, worldY, worldZ ));
#ifndef _CONTENT_PACKAGE
wprintf(L"XboxStructureActionPlaceSpawner - placing a %ls spawner at (%d,%d,%d)\n", m_entityId.c_str(), worldX, worldY, worldZ);