fixed Windows build for networking branch

This commit is contained in:
2026-07-14 10:54:43 -07:00
parent 21e2add09a
commit 43b9d829c8
7 changed files with 19 additions and 15 deletions
+2 -2
View File
@@ -552,13 +552,13 @@ bool AbstractContainerMenu::isPauseScreen()
void AbstractContainerMenu::setItem(unsigned int slot, shared_ptr<ItemInstance> item)
{
if (slot >= slots->size()) return;
if (slot >= slots.size()) return;
getSlot(slot)->set(item);
}
void AbstractContainerMenu::setAll(ItemInstanceArray *items)
{
for (unsigned int i = 0; i < items->length && i < slots->size(); i++)
for (unsigned int i = 0; i < items->length && i < slots.size(); i++)
{
getSlot(i)->set( (*items)[i] );
}
+1 -1
View File
@@ -18,7 +18,7 @@ public:
dos->write(data);
}
void load(DataInput *dis)
void load(DataInput *dis, int tagDepth)
{
int length = dis->readInt();
if (length < 0 || length > 2 * 1024 * 1024) length = 0;
+1 -1
View File
@@ -490,7 +490,7 @@ LevelChunk *OldChunkStorage::load(Level *level, DataInputStream *dis)
{
CompoundTag *teTag = tileTicks->get(i);
level->forceAddTileTick(teTag->getInt(L"x"), teTag->getInt(L"y"), teTag->getInt(L"z"), teTag->getInt(L"i"), teTag->getInt(L"t"));
level->forceAddTileTick(teTag->getInt(L"x"), teTag->getInt(L"y"), teTag->getInt(L"z"), teTag->getInt(L"i"), teTag->getInt(L"t"), teTag->getInt(L"p"));
}
}
}
+1 -4
View File
@@ -126,7 +126,4 @@ DataOutputStream *RegionFileCache::_getChunkDataOutputStream(ConsoleSaveFile *sa
}
RegionFileCache::~RegionFileCache()
{
_clear();
}
+1 -1
View File
@@ -17,7 +17,7 @@ private:
public:
// Made public and non-static so we can have a cache for input and output files
RegionFileCache() { InitializeCriticalSectionAndSpinCount(&m_cs, 4000); }
~RegionFileCache() { DeleteCriticalSection(&m_cs); }
~RegionFileCache() { _clear(); DeleteCriticalSection(&m_cs); }
RegionFile *_getRegionFile(ConsoleSaveFile *saveFile, const wstring &prefix, int chunkX, int chunkZ); // 4J - TODO was synchronized
void _clear(); // 4J - TODO was synchronized
+1 -1
View File
@@ -115,7 +115,7 @@ Tag *Tag::readNamedTag(DataInput *dis)
Tag *tag = newTag(type, name);
if (tag == NULL) { depth--; return new EndTag(); }
tag->load(dis);
tag->load(dis, depth + 1);
depth--;
return tag;
}