Merge upstream/main into main

This commit is contained in:
Revela
2026-03-15 23:38:41 -05:00
19 changed files with 546 additions and 639 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ void Bat::defineSynchedData()
float Bat::getSoundVolume()
{
return 0.1f;
return 0.8f;
}
float Bat::getVoicePitch()
+1 -1
View File
@@ -72,7 +72,7 @@ void Cow::playStepSound(int xt, int yt, int zt, int t)
float Cow::getSoundVolume()
{
return 0.4f;
return 1.f;
}
int Cow::getDeathLoot()
+11
View File
@@ -96,9 +96,20 @@ int Entity::getSmallId()
puiUsedFlags++;
}
#ifdef MINECRAFT_SERVER_BUILD
// in mc server dedi, a server with 8+ playerrs can cause this to go wack
int fallbackId = Entity::entityCounter++;
if (entityCounter == 0x7ffffff)
{
entityCounter = 2048;
}
return fallbackId;
#else
app.DebugPrintf("Out of small entity Ids... possible leak?\n");
__debugbreak();
return -1;
#endif
}
void Entity::countFlagsForPIX()
+3
View File
@@ -37,6 +37,7 @@ void FireworksRecipe::ReleaseThreadStorage()
void FireworksRecipe::setResultItem(shared_ptr<ItemInstance> item)
{
ThreadStorage *tls = static_cast<ThreadStorage *>(TlsGetValue(tlsIdx));
if (tls == nullptr) tls = tlsDefault;
tls->resultItem = item;
}
@@ -269,6 +270,7 @@ bool FireworksRecipe::matches(shared_ptr<CraftingContainer> craftSlots, Level *l
shared_ptr<ItemInstance> FireworksRecipe::assemble(shared_ptr<CraftingContainer> craftSlots)
{
ThreadStorage *tls = static_cast<ThreadStorage *>(TlsGetValue(tlsIdx));
if (tls == nullptr) tls = tlsDefault;
return tls->resultItem->copy();
//return resultItem->copy();
}
@@ -281,6 +283,7 @@ int FireworksRecipe::size()
const ItemInstance *FireworksRecipe::getResultItem()
{
ThreadStorage *tls = static_cast<ThreadStorage *>(TlsGetValue(tlsIdx));
if (tls == nullptr) tls = tlsDefault;
return tls->resultItem.get();
//return resultItem.get();
}
+5
View File
@@ -16,7 +16,12 @@ using namespace std;
// 4J Stu - This value should be big enough that we don't get any crashes causes by memory overwrites,
// however it does seem way too large for what is actually needed. Needs further investigation
#ifdef MINECRAFT_SERVER_BUILD
// fixes a crash when 8+ players are present
#define LEVEL_CHUNKS_TO_UPDATE_MAX (32*32*8)
#else
#define LEVEL_CHUNKS_TO_UPDATE_MAX (19*19*8)
#endif
class Vec3;
class ChunkSource;