chore: format Minecraft.World

This commit is contained in:
Tropical
2026-03-13 17:06:56 -05:00
parent bd6284025d
commit 33d0737d1d
1511 changed files with 108661 additions and 115521 deletions

View File

@@ -7,101 +7,88 @@
#include "WeaponRecipes.h"
// 4J-PB - adding "" on the end of these so we can detect it
std::wstring WeaponRecipies::shapes[][4] =
{
{L"X", //
L"X",//
L"#",L""},//
std::wstring WeaponRecipies::shapes[][4] = {
{L"X", //
L"X", //
L"#", L""}, //
};
/*
private Object[][] map = {
{Tile.wood, Tile.stoneBrick, Item.ironIngot, Item.diamond, Item.goldIngot},
{Item.sword_wood, Item.sword_stone, Item.sword_iron, Item.sword_diamond, Item.sword_gold},
};
private Object[][] map = {
{Tile.wood, Tile.stoneBrick, Item.ironIngot,
Item.diamond, Item.goldIngot}, {Item.sword_wood, Item.sword_stone,
Item.sword_iron, Item.sword_diamond, Item.sword_gold},
};
*/
void WeaponRecipies::_init()
{
map = new std::vector <Object *> [MAX_WEAPON_RECIPES];
void WeaponRecipies::_init() {
map = new std::vector<Object*>[MAX_WEAPON_RECIPES];
ADD_OBJECT(map[0],Tile::wood);
ADD_OBJECT(map[0],Tile::stoneBrick);
ADD_OBJECT(map[0],Item::ironIngot);
ADD_OBJECT(map[0],Item::diamond);
ADD_OBJECT(map[0],Item::goldIngot);
ADD_OBJECT(map[0], Tile::wood);
ADD_OBJECT(map[0], Tile::stoneBrick);
ADD_OBJECT(map[0], Item::ironIngot);
ADD_OBJECT(map[0], Item::diamond);
ADD_OBJECT(map[0], Item::goldIngot);
ADD_OBJECT(map[1],Item::sword_wood);
ADD_OBJECT(map[1],Item::sword_stone);
ADD_OBJECT(map[1],Item::sword_iron);
ADD_OBJECT(map[1],Item::sword_diamond);
ADD_OBJECT(map[1],Item::sword_gold);
ADD_OBJECT(map[1], Item::sword_wood);
ADD_OBJECT(map[1], Item::sword_stone);
ADD_OBJECT(map[1], Item::sword_iron);
ADD_OBJECT(map[1], Item::sword_diamond);
ADD_OBJECT(map[1], Item::sword_gold);
}
void WeaponRecipies::addRecipes(Recipes *r)
{
wchar_t wchTypes[7];
wchTypes[6]=0;
void WeaponRecipies::addRecipes(Recipes* r) {
wchar_t wchTypes[7];
wchTypes[6] = 0;
for (unsigned int m = 0; m < map[0].size(); m++)
{
Object *pObjMaterial = map[0].at(m);
for (unsigned int m = 0; m < map[0].size(); m++) {
Object* pObjMaterial = map[0].at(m);
for (int t=0; t<MAX_WEAPON_RECIPES-1; t++)
{
Item *target = map[t+1].at(m)->item;
for (int t = 0; t < MAX_WEAPON_RECIPES - 1; t++) {
Item* target = map[t + 1].at(m)->item;
wchTypes[0]=L'w';
wchTypes[1]=L'c';
wchTypes[2]=L'i';
wchTypes[3]=L'c';
wchTypes[5]=L'g';
if(pObjMaterial->GetType()==eType_TILE)
{
wchTypes[4]=L't';
r->addShapedRecipy(new ItemInstance(target),
wchTypes,
shapes[t],
wchTypes[0] = L'w';
wchTypes[1] = L'c';
wchTypes[2] = L'i';
wchTypes[3] = L'c';
wchTypes[5] = L'g';
if (pObjMaterial->GetType() == eType_TILE) {
wchTypes[4] = L't';
r->addShapedRecipy(
new ItemInstance(target), wchTypes, shapes[t],
L'#', Item::stick,
L'X', pObjMaterial->tile,
L'T');
}
else
{
// must be Item
wchTypes[4]=L'i';
r->addShapedRecipy(new ItemInstance(target),
wchTypes,
shapes[t],
L'#', Item::stick, L'X', pObjMaterial->tile, L'T');
} else {
// must be Item
wchTypes[4] = L'i';
r->addShapedRecipy(
new ItemInstance(target), wchTypes, shapes[t],
L'#', Item::stick,
L'X', pObjMaterial->item,
L'T');
}
}
}
L'#', Item::stick, L'X', pObjMaterial->item, L'T');
}
}
}
/* 4J-PB - moved out to main recipes so we can avoid them stacking on the group display name
r->addShapedRecipy(new ItemInstance(Item::bow, 1), //
L"ssscicig",
L" #X", //
L"# X", //
L" #X", //
/* 4J-PB - moved out to main recipes so we can avoid them stacking on the
group display name r->addShapedRecipy(new ItemInstance(Item::bow, 1), //
L"ssscicig",
L" #X", //
L"# X", //
L" #X", //
L'X', Item::string,//
L'#', Item::stick,
L'T');
L'X', Item::string,//
L'#', Item::stick,
L'T');
r->addShapedRecipy(new ItemInstance(Item::arrow, 4), //
L"ssscicicig",
L"X", //
L"#", //
L"Y", //
r->addShapedRecipy(new ItemInstance(Item::arrow, 4), //
L"ssscicicig",
L"X", //
L"#", //
L"Y", //
L'Y', Item::feather,//
L'X', Item::flint,//
L'#', Item::stick,
L'T');
*/
L'Y', Item::feather,//
L'X', Item::flint,//
L'#', Item::stick,
L'T');
*/
}