build fixes

This commit is contained in:
Tropical 2026-03-21 19:19:31 -05:00
parent 401a19ad67
commit d9aa793075
24 changed files with 1620 additions and 627 deletions

View file

@ -8604,4 +8604,60 @@ If you try to save while using the trial version, you will be given the option t
<data name="IDS_ERROR_NETWORK_TITLE">
<value>Network Error</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_HORSE_JUMPSTRENGTH">
<value>Horse Jump Strength</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_ZOMBIE_SPAWNREINFORCEMENTS">
<value>Zombie Reinforcements</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_GENERIC_MAXHEALTH">
<value>Max Health</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_GENERIC_FOLLOWRANGE">
<value>Mob Follow Range</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_GENERIC_KNOCKBACKRESISTANCE">
<value>Knockback Resistance</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_GENERIC_MOVEMENTSPEED">
<value>Speed</value>
</data>
<data name="IDS_ATTRIBUTE_NAME_GENERIC_ATTACKDAMAGE">
<value>Attack Damage</value>
</data>
<data name="IDS_CONTAINER_ANIMAL">
<value>Horse</value>
</data>
<data name="IDS_WITHER">
<value>Wither</value>
</data>
<data name="IDS_CONTAINER_DROPPER">
<value>Dropper</value>
</data>
<data name="IDS_CONTAINER_HOPPER">
<value>Hopper</value>
</data>
<data name="IDS_CONTAINER_BEACON">
<value>Beacon</value>
</data>
<data name="IDS_CONTAINER_BEACON_PRIMARY_POWER">
<value>Primary Power</value>
</data>
<data name="IDS_CONTAINER_BEACON_SECONDARY_POWER">
<value>Secondary Power</value>
</data>
<data name="IDS_CONTAINER_MINECART">
<value>Minecart</value>
</data>
</root>

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
#pragma once
#include "Goal.h"
#include "../Minecraft.World/SharedConstants.h"
#include "../Minecraft.World/Util/SharedConstants.h"
class Mob;

View file

@ -19,7 +19,7 @@ void PoweredRailTile::registerIcons(IconRegister* iconRegister) {
}
bool PoweredRailTile::findPoweredRailSignal(Level* level, int x, int y, int z,
int data, bool std::forward,
int data, bool forward,
int searchDepth) {
if (searchDepth >= 8) {
return false;
@ -30,21 +30,21 @@ bool PoweredRailTile::findPoweredRailSignal(Level* level, int x, int y, int z,
bool checkBelow = true;
switch (dir) {
case DIR_FLAT_Z:
if (std::forward) {
if (forward) {
z++;
} else {
z--;
}
break;
case DIR_FLAT_X:
if (std::forward) {
if (forward) {
x--;
} else {
x++;
}
break;
case 2:
if (std::forward) {
if (forward) {
x--;
} else {
x++;
@ -54,7 +54,7 @@ bool PoweredRailTile::findPoweredRailSignal(Level* level, int x, int y, int z,
dir = DIR_FLAT_X;
break;
case 3:
if (std::forward) {
if (forward) {
x--;
y++;
checkBelow = false;
@ -64,7 +64,7 @@ bool PoweredRailTile::findPoweredRailSignal(Level* level, int x, int y, int z,
dir = DIR_FLAT_X;
break;
case 4:
if (std::forward) {
if (forward) {
z++;
} else {
z--;
@ -74,7 +74,7 @@ bool PoweredRailTile::findPoweredRailSignal(Level* level, int x, int y, int z,
dir = DIR_FLAT_Z;
break;
case 5:
if (std::forward) {
if (forward) {
z++;
y++;
checkBelow = false;
@ -85,10 +85,10 @@ bool PoweredRailTile::findPoweredRailSignal(Level* level, int x, int y, int z,
break;
}
if (isSameRailWithPower(level, x, y, z, std::forward, searchDepth, dir)) {
if (isSameRailWithPower(level, x, y, z, forward, searchDepth, dir)) {
return true;
}
if (checkBelow && isSameRailWithPower(level, x, y - 1, z, std::forward,
if (checkBelow && isSameRailWithPower(level, x, y - 1, z, forward,
searchDepth, dir)) {
return true;
}
@ -96,7 +96,7 @@ bool PoweredRailTile::findPoweredRailSignal(Level* level, int x, int y, int z,
}
bool PoweredRailTile::isSameRailWithPower(Level* level, int x, int y, int z,
bool std::forward, int searchDepth,
bool forward, int searchDepth,
int dir) {
int tile = level->getTile(x, y, z);
@ -118,7 +118,7 @@ bool PoweredRailTile::isSameRailWithPower(Level* level, int x, int y, int z,
return true;
} else {
return findPoweredRailSignal(level, x, y, z, tileData,
std::forward, searchDepth + 1);
forward, searchDepth + 1);
}
}
}

View file

@ -16,10 +16,10 @@ public:
protected:
virtual bool findPoweredRailSignal(Level* level, int x, int y, int z,
int data, bool std::forward,
int data, bool forward,
int searchDepth);
virtual bool isSameRailWithPower(Level* level, int x, int y, int z,
bool std::forward, int searchDepth,
bool forward, int searchDepth,
int dir);
virtual void updateState(Level* level, int x, int y, int z, int data,
int dir, int type);

View file

@ -16,11 +16,12 @@ StoneMonsterTile::StoneMonsterTile(int id) : Tile(id, Material::clay) {
}
Icon* StoneMonsterTile::getTexture(int face, int data) {
#ifndef _CONTENT_PACKAGE
if (app.DebugArtToolsOn()) {
return Tile::fire->getTexture(face, 0);
}
#endif
// 4jcraft: removed in TU19 merge for now
// #ifndef _CONTENT_PACKAGE
// if (app.DebugArtToolsOn()) {
// return Tile::fire->getTexture(face, 0);
// }
// #endif
if (data == HOST_COBBLE) {
return Tile::cobblestone->getTexture(face);
}

View file

@ -276,9 +276,9 @@ void Boat::tick() {
if (rider.lock() != NULL && rider.lock()->instanceof(eTYPE_LIVINGENTITY)) {
std::shared_ptr<LivingEntity> livingRider =
std::dynamic_pointer_cast<LivingEntity>(rider.lock());
double std::forward = livingRider->yya;
double forward = livingRider->yya;
if (std::forward > 0) {
if (forward > 0) {
double riderXd = -sin(livingRider->yRot * PI / 180);
double riderZd = cos(livingRider->yRot * PI / 180);
xd += riderXd * acceleration * 0.05f;

View file

@ -408,9 +408,9 @@ void Minecart::moveAlongTrack(int xt, int yt, int zt, double maxSpeed,
std::shared_ptr<LivingEntity> living =
std::dynamic_pointer_cast<LivingEntity>(rider.lock());
double std::forward = living->yya;
double forward = living->yya;
if (std::forward > 0) {
if (forward > 0) {
double riderXd = -sin(living->yRot * PI / 180);
double riderZd = cos(living->yRot * PI / 180);

View file

@ -34,7 +34,7 @@
#include "../Items/ShearsItem.h"
#include "../Items/ShovelItem.h"
#include "../Items/SignItem.h"
#include "SnowballItem.h"
#include "../Items/SnowballItem.h"
#include "../Items/TileItems/StoneSlabTileItem.h"
#include "../Items/TileItems/TileItem.h"
#include "../Items/TileItems/PlanterTileItem.h"

View file

@ -44,7 +44,7 @@
#include "../Blocks/FlowerPotTile.h"
#include "../Blocks/FurnaceTile.h"
#include "../Blocks/GlassTile.h"
#include "GlowstoneTile.h"
#include "../Blocks/GlowstoneTile.h"
#include "../Blocks/GrassTile.h"
#include "../Blocks/GravelTile.h"
#include "../Blocks/HalfSlabTile.h"

View file

@ -219,7 +219,7 @@ public:
static Item* pickAxe_gold;
static Item* hatchet_gold;
static Item* std::string;
static Item* string;
static Item* feather;
static Item* gunpowder;

View file

@ -122,9 +122,9 @@ const ItemInstance* ArmorDyeRecipe::getResultItem() { return NULL; }
const int ArmorDyeRecipe::getGroup() { return ShapedRecipy::eGroupType_Armour; }
// 4J-PB
bool ArmorDyeRecipe::requires(int iRecipe) { return false; }
bool ArmorDyeRecipe::collectRequirements(int iRecipe) { return false; }
void ArmorDyeRecipe::requires(INGREDIENTS_REQUIRED* pIngReq) {
void ArmorDyeRecipe::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
// int iCount=0;
// bool bFound;
// int j;

View file

@ -20,7 +20,7 @@ public:
// 4J-PB
virtual bool
requires(int iRecipe);
requiresRecipe(int iRecipe);
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq);
collectRequirements(INGREDIENTS_REQUIRED* pIngReq);
};

View file

@ -39,12 +39,12 @@ public:
// 4J-PB
virtual bool
requires(int iRecipe)
requiresRecipe(int iRecipe)
{
return false;
};
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq)
collectRequirements(INGREDIENTS_REQUIRED* pIngReq)
{};
// 4J Added

View file

@ -1190,7 +1190,7 @@ void Recipes::buildRecipeIngredientsArray(void) {
Recipy* recipe = *it;
// wprintf(L"RECIPE - [%d] is
// %w\n",iCount,recipe->getResultItem()->getItem()->getName());
recipe->requires(&m_pRecipeIngredientsRequired[iCount++]);
recipe->collectRequirements(&m_pRecipeIngredientsRequired[iCount++]);
}
// printf("Total recipes in buildRecipeIngredientsArray - %d",iCount);

View file

@ -52,9 +52,9 @@ public:
// 4J-PB
virtual bool
requires(int iRecipe)
prerequisite(int iRecipe)
= 0;
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq)
prerequisite(INGREDIENTS_REQUIRED* pIngReq)
= 0;
};

View file

@ -92,7 +92,7 @@ std::shared_ptr<ItemInstance> ShapedRecipy::assemble(
int ShapedRecipy::size() { return width * height; }
// 4J-PB
bool ShapedRecipy::requires(int iRecipe) {
bool ShapedRecipy::requiresRecipe(int iRecipe) {
app.DebugPrintf("ShapedRecipy %d\n", iRecipe);
int iCount = 0;
for (int x = 0; x < 3; x++) {
@ -109,7 +109,7 @@ bool ShapedRecipy::requires(int iRecipe) {
return false;
}
void ShapedRecipy::requires(INGREDIENTS_REQUIRED* pIngReq) {
void ShapedRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
// printf("ShapedRecipy %d\n",iRecipe);
int iCount = 0;

View file

@ -32,7 +32,7 @@ public:
// 4J-PB - to return the items required to make a recipe
virtual bool
requires(int iRecipe);
requiresRecipe(int iRecipe);
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq);
collectRequirements(INGREDIENTS_REQUIRED* pIngReq);
};

View file

@ -65,7 +65,7 @@ std::shared_ptr<ItemInstance> ShapelessRecipy::assemble(
int ShapelessRecipy::size() { return (int)ingredients->size(); }
// 4J-PB
bool ShapelessRecipy::requires(int iRecipe) {
bool ShapelessRecipy::requiresRecipe(int iRecipe) {
std::vector<ItemInstance*>* tempList = new std::vector<ItemInstance*>;
*tempList = *ingredients;
@ -87,7 +87,7 @@ bool ShapelessRecipy::requires(int iRecipe) {
return false;
}
void ShapelessRecipy::requires(INGREDIENTS_REQUIRED* pIngReq) {
void ShapelessRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
int iCount = 0;
bool bFound;
int j;

View file

@ -21,7 +21,7 @@ public:
// 4J-PB - to return the items required to make a recipe
virtual bool
requires(int iRecipe);
requiresRecipe(int iRecipe);
virtual void
requires(INGREDIENTS_REQUIRED* pIngReq);
collectRequirements(INGREDIENTS_REQUIRED* pIngReq);
};

View file

@ -43,7 +43,7 @@ void Achievement::_init() {
* @param prerequisite Achievement object that is required to unlock this one
*/
Achievement::Achievement(int id, const std::wstring& name, int x, int y,
Item* icon, Achievement* requires)
Item* icon, Achievement* prerequisite)
: Stat(Achievements::ACHIEVEMENT_OFFSET + id,
I18n::get(std::wstring(L"achievement.").append(name))),
desc(I18n::get(
@ -51,10 +51,10 @@ Achievement::Achievement(int id, const std::wstring& name, int x, int y,
icon(new ItemInstance(icon)),
x(x),
y(y),
requires(requires) {}
prerequisite(prerequisite) {}
Achievement::Achievement(int id, const std::wstring& name, int x, int y,
Tile* icon, Achievement* requires)
Tile* icon, Achievement* prerequisite)
: Stat(Achievements::ACHIEVEMENT_OFFSET + id,
I18n::get(std::wstring(L"achievement.").append(name))),
desc(I18n::get(
@ -62,11 +62,11 @@ Achievement::Achievement(int id, const std::wstring& name, int x, int y,
icon(new ItemInstance(icon)),
x(x),
y(y),
requires(requires) {}
prerequisite(prerequisite) {}
Achievement::Achievement(int id, const std::wstring& name, int x, int y,
std::shared_ptr<ItemInstance> icon,
Achievement* requires)
Achievement* prerequisite)
: Stat(Achievements::ACHIEVEMENT_OFFSET + id,
I18n::get(std::wstring(L"achievement.").append(name))),
desc(I18n::get(
@ -74,7 +74,7 @@ Achievement::Achievement(int id, const std::wstring& name, int x, int y,
icon(icon),
x(x),
y(y),
requires(requires) {}
prerequisite(prerequisite) {}
/**
* @brief Returns whether the Achivement is golden

View file

@ -8,7 +8,7 @@ class Achievement : public Stat {
public:
const int x, y;
Achievement*
requires;
prerequisite;
private:
const std::wstring desc;
@ -23,11 +23,11 @@ private:
public:
Achievement(int id, const std::wstring& name, int x, int y, Item* icon,
Achievement* requires);
Achievement* prerequisite);
Achievement(int id, const std::wstring& name, int x, int y, Tile* icon,
Achievement* requires);
Achievement* prerequisite);
Achievement(int id, const std::wstring& name, int x, int y,
std::shared_ptr<ItemInstance> icon, Achievement* requires);
std::shared_ptr<ItemInstance> icon, Achievement* prerequisite);
Achievement* setAwardLocallyOnly();
Achievement* setGolden();

View file

@ -1,5 +1,5 @@
#pragma once
#include "../Minecraft.World/JavaIntHash.h"
#include "../Minecraft.World/Util/JavaIntHash.h"
class BiomeCache {
private:

View file

@ -5,8 +5,8 @@ project('4jcraft-chucklegrounds', ['cpp', 'c'],
'cpp_std=c++23',
'warning_level=0',
'buildtype=debug', # for now
'unity=on', # merge source files per target
'unity_size=8', # TODO: mess around with this
'unity=off', # merge source files per target
# 'unity_size=8', # TODO: mess around with this
'b_pch=true', # precompiled headers
],
)