feat: TU19 (Dec 2014) Features & Content (#155)

* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
This commit is contained in:
daoge
2026-03-03 03:04:10 +08:00
committed by GitHub
parent 84c31a2331
commit b3feddfef3
2069 changed files with 264842 additions and 139522 deletions

View File

@@ -94,7 +94,7 @@ void ItemEntity::tick()
xd = (random->nextFloat() - random->nextFloat()) * 0.2f;
zd = (random->nextFloat() - random->nextFloat()) * 0.2f;
MemSect(31);
level->playSound(shared_from_this(), eSoundType_RANDOM_FIZZ, 0.4f, 2.0f + random->nextFloat() * 0.4f);
playSound(eSoundType_RANDOM_FIZZ, 0.4f, 2.0f + random->nextFloat() * 0.4f);
MemSect(0);
}
@@ -184,13 +184,15 @@ void ItemEntity::burn(int dmg)
}
bool ItemEntity::hurt(DamageSource *source, int damage)
bool ItemEntity::hurt(DamageSource *source, float damage)
{
// 4J - added next line: found whilst debugging an issue with item entities getting into a bad state when being created by a cactus, since entities insides cactuses get hurt
// and therefore depending on the timing of things they could get removed from the client when they weren't supposed to be. Are there really any cases were we would want
// an itemEntity to be locally hurt?
if (level->isClientSide ) return false;
if (level->isClientSide ) return false;
if (isInvulnerable()) return false;
if (getItem() != NULL && getItem()->id == Item::netherStar_Id && source->isExplosion()) return false;
markHurt();
health -= damage;
if (health <= 0)
@@ -254,7 +256,7 @@ void ItemEntity::playerTouch(shared_ptr<Player> player)
if (item->id == Item::blazeRod_Id)
player->awardStat(GenericStats::blazeRod(), GenericStats::param_blazeRod());
level->playSound(shared_from_this(), eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f);
playSound(eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f);
player->take(shared_from_this(), orgCount);
// System.out.println(item.count + ", " + orgCount);
if (item->count <= 0) remove();
@@ -267,6 +269,13 @@ wstring ItemEntity::getAName()
//return I18n.get("item." + item.getDescriptionId());
}
void ItemEntity::changeDimension(int i)
{
Entity::changeDimension(i);
if (!level->isClientSide) mergeWithNeighbours();
}
shared_ptr<ItemInstance> ItemEntity::getItem()
{
shared_ptr<ItemInstance> result = getEntityData()->getItemInstance(DATA_ITEM);
@@ -278,7 +287,7 @@ shared_ptr<ItemInstance> ItemEntity::getItem()
app.DebugPrintf("Item entity %d has no item?!\n", entityId);
//level.getLogger().severe("Item entity " + entityId + " has no item?!");
}
return shared_ptr<ItemInstance>(new ItemInstance(Tile::rock));
return shared_ptr<ItemInstance>(new ItemInstance(Tile::stone));
}
return result;