mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-22 10:12:53 +00:00
Merge branch 'main' of https://github.com/piebotc/LegacyEvolved
This commit is contained in:
commit
547106b080
BIN
.github/roadmap.png
vendored
BIN
.github/roadmap.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
|
@ -72,9 +72,7 @@ void BeaconRenderer::render(shared_ptr<TileEntity> _beacon, double x, double y,
|
|||
|
||||
if (tileID == Tile::stained_glass_Id || tileID == Tile::stained_glass_pane_Id) {
|
||||
int meta = level->getData(bx, i, bz);
|
||||
int colorIdx = (tileID == Tile::stained_glass_Id) ?
|
||||
StainedGlassBlock::getItemAuxValueForBlockData(meta) :
|
||||
StainedGlassPaneBlock::getItemAuxValueForBlockData(meta);
|
||||
int colorIdx = StainedGlassBlock::getItemAuxValueForBlockData(meta);
|
||||
|
||||
|
||||
if (firstGlass) {
|
||||
|
|
|
|||
|
|
@ -87,9 +87,9 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
ITEM(Tile::soulsand_Id)
|
||||
ITEM(Tile::glowstone_Id)
|
||||
ITEM(Tile::seaLantern_Id)
|
||||
ITEM(Tile::prismarine_Id)
|
||||
ITEM(Tile::prismarinedark_Id)
|
||||
ITEM(Tile::prismarinebrick_Id)
|
||||
ITEM_AUX(Tile::prismarine_Id, PrismarineTile::TYPE_DEFAULT)
|
||||
ITEM_AUX(Tile::prismarine_Id, PrismarineTile::TYPE_BRICKS)
|
||||
ITEM_AUX(Tile::prismarine_Id, PrismarineTile::TYPE_DARK)
|
||||
ITEM(Tile::fence_Id)
|
||||
|
||||
ITEM_AUX(Tile::dirt_Id, DirtTile::COARSE_DIRT)
|
||||
|
|
@ -206,8 +206,8 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_EVERGREEN)
|
||||
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_BIRCH)
|
||||
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_JUNGLE)
|
||||
ITEM_AUX(Tile::sapling2_Id, Sapling2::TYPE_ACACIA)
|
||||
ITEM_AUX(Tile::sapling2_Id, Sapling2::TYPE_DARK_OAK)
|
||||
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_ACACIA)
|
||||
ITEM_AUX(Tile::sapling_Id, Sapling::TYPE_DARK_OAK)
|
||||
ITEM_AUX(Tile::leaves_Id, LeafTile::NORMAL_LEAF)
|
||||
ITEM_AUX(Tile::leaves_Id, LeafTile::EVERGREEN_LEAF)
|
||||
ITEM_AUX(Tile::leaves_Id, LeafTile::BIRCH_LEAF)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
// Ingredients etc should go here
|
||||
#define CRAFTING_INGREDIENTS_DESCRIPTION_START CRAFTING_HOTBAR_SLOT_END
|
||||
#define CRAFTING_INGREDEINTS_DESCRIPTION_END (CRAFTING_INGREDIENTS_DESCRIPTION_START + 4)
|
||||
#define CRAFTING_INGREDEINTS_DESCRIPTION_END (CRAFTING_INGREDIENTS_DESCRIPTION_START + 9)
|
||||
|
||||
#define CRAFTING_OUTPUT_SLOT_START CRAFTING_INGREDEINTS_DESCRIPTION_END
|
||||
#define CRAFTING_OUTPUT_SLOT_END (CRAFTING_OUTPUT_SLOT_START + 1)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public:
|
|||
CXuiControl m_pHSlotsCraftingTableCursors[m_iMaxHSlotC];
|
||||
CXuiControl *m_pCursors;
|
||||
CXuiControl m_hCraftIngredientA[m_iIngredients3x3SlotC];
|
||||
CXuiControl m_hCraftIngredientDescA[4]; // Max ingredients is 4 for bread
|
||||
CXuiControl m_hCraftIngredientDescA[9]; // Max ingredients is 9
|
||||
CXuiControl m_hCraftOutput;
|
||||
CXuiControl m_sceneGroup;
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ private:
|
|||
|
||||
CXuiCtrlCraftIngredientSlot *m_pCraftingOutput;
|
||||
CXuiCtrlCraftIngredientSlot *m_pCraftingIngredientA[m_iIngredients3x3SlotC];
|
||||
CXuiCtrlCraftIngredientSlot *m_pCraftIngredientDescA[4];
|
||||
CXuiCtrlCraftIngredientSlot *m_pCraftIngredientDescA[9];
|
||||
CXuiCtrlMinecraftSlot *m_pHSlotsBrushImageControl[m_iMaxHSlotC];
|
||||
CXuiCtrlMinecraftSlot *m_pVSlotsBrushImageControl[m_iMaxDisplayedVSlotC];
|
||||
CXuiControl *GroupTypeIconA[Recipy::eGroupType_Max];
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(13, 2, L"doorDark")
|
||||
ADD_ICON(13, 3, L"doorJungle")
|
||||
ADD_ICON(13, 4, L"doorSpruce")
|
||||
ADD_ICON(13, 5, L"rabbitStew")
|
||||
ADD_ICON(13, 5, L"rabbitStew")
|
||||
ADD_ICON(13, 6, L"salmonCooked")
|
||||
|
||||
|
||||
|
|
@ -1044,7 +1044,7 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(23, 3, L"door_jungle_upper");
|
||||
ADD_ICON(23, 4, L"door_spruce_upper");
|
||||
ADD_ICON(23, 13, L"sea_lantern");
|
||||
ADD_ICON(22, 13, L"prismarine_rough");
|
||||
ADD_ICON(22, 13, L"prismarine");
|
||||
ADD_ICON(21, 13, L"prismarine_dark");
|
||||
ADD_ICON(20, 13, L"prismarine_bricks");
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ int DoorTile::getCompositeData(LevelSource *level, int x, int y, int z)
|
|||
|
||||
int DoorTile::cloneTileId(Level *level, int x, int y, int z)
|
||||
{
|
||||
return material == Material::metal ? Item::door_iron_Id : Item::door_wood_Id;
|
||||
return doorItemMap[doorType];
|
||||
}
|
||||
|
||||
void DoorTile::playerWillDestroy(Level *level, int x, int y, int z, int data, shared_ptr<Player> player)
|
||||
|
|
|
|||
|
|
@ -183,18 +183,7 @@ bool DyePowderItem::growCrop(shared_ptr<ItemInstance> itemInstance, Level *level
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (tile == Tile::sapling2_Id)
|
||||
{
|
||||
if(!bTestUseOnOnly)
|
||||
{
|
||||
if (!level->isClientSide)
|
||||
{
|
||||
if (level->random->nextFloat() < 0.45) static_cast<Sapling2 *>(Tile::tiles[Tile::sapling2_Id])->growTree(level, x, y, z, level->random);
|
||||
itemInstance->count--;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
else if (tile == Tile::mushroom_brown_Id || tile == Tile::mushroom_red_Id)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,18 @@ void FoodRecipies::addRecipes(Recipes *r)
|
|||
L'4', Item::bowl, // ci
|
||||
L'F');
|
||||
|
||||
r->addShapedRecipy(new ItemInstance(Item::rabbitStew),
|
||||
L"ssscicictcicig",
|
||||
L" 1 ",//s
|
||||
L"2X3",//s
|
||||
L" 4 ",//s
|
||||
L'1', Item::rabbit_cooked, // ci
|
||||
L'2', Item::carrots, // ci
|
||||
L'3', Tile::mushroom_red, // ct
|
||||
L'X', Item::potato, // ci
|
||||
L'4', Item::bowl, // ci
|
||||
L'F');
|
||||
|
||||
|
||||
|
||||
r->addShapedRecipy(new ItemInstance(Item::cookie, 8), //
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ bool HugeMushroomFeature::place(Level *level, Random *random, int x, int y, int
|
|||
if (yy >= 0 && yy < Level::maxBuildHeight)
|
||||
{
|
||||
int tt = level->getTile(xx, yy, zz);
|
||||
if (tt != 0 && tt != Tile::leaves_Id && tt != Tile::leaves2_Id && tt != Tile::tallgrass_Id && tt != Tile::sapling_Id && tt != Tile::sapling2_Id)
|
||||
if (tt != 0 && tt != Tile::leaves_Id && tt != Tile::leaves2_Id && tt != Tile::tallgrass_Id && tt != Tile::sapling_Id)
|
||||
free = false;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -642,10 +642,25 @@ public:
|
|||
static const int horseArmorDiamond_Id = 419;
|
||||
static const int lead_Id = 420;
|
||||
static const int nameTag_Id = 421;
|
||||
|
||||
|
||||
|
||||
// TU25
|
||||
|
||||
//422 command_block_minecart
|
||||
static const int prismarine_shard_Id = 409;
|
||||
static const int prismarine_cystal_Id = 410;
|
||||
static const int rabbit_raw_Id = 411;
|
||||
static const int rabbit_cooked_Id = 412;
|
||||
static const int rabbitStew_Id = 413;
|
||||
static const int rabbits_foot_Id = 414;
|
||||
static const int rabbit_hide_Id = 415;
|
||||
static const int armor_stand_Id = 416;
|
||||
|
||||
static const int mutton_raw_Id = 423;
|
||||
static const int mutton_cooked_Id = 424;
|
||||
//425 banner
|
||||
//426 end_crystal
|
||||
|
||||
static const int door_spruce_Id = 427;
|
||||
static const int door_birch_Id = 428;
|
||||
static const int door_jungle_Id = 429;
|
||||
|
|
@ -653,17 +668,11 @@ public:
|
|||
static const int door_dark_Id = 431;
|
||||
|
||||
//TU31
|
||||
static const int mutton_raw_Id = 423;
|
||||
static const int mutton_cooked_Id = 424;
|
||||
static const int rabbit_raw_Id = 411;
|
||||
static const int rabbit_cooked_Id = 412;
|
||||
static const int rabbits_foot_Id = 414;
|
||||
static const int rabbit_hide_Id = 415;
|
||||
static const int armor_stand_Id = 416;
|
||||
static const int rabbitStew_Id = 413;
|
||||
|
||||
|
||||
|
||||
|
||||
static const int prismarine_cystal_Id = 410;
|
||||
static const int prismarine_shard_Id = 409;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ void LeafTile2::spawnResources(Level *level, int x, int y, int z, int data, floa
|
|||
{
|
||||
|
||||
|
||||
popResource(level, x, y, z, std::make_shared<ItemInstance>(Tile::sapling2_Id, 1, data & 3));
|
||||
popResource(level, x, y, z, std::make_shared<ItemInstance>(Tile::sapling_Id, 1, data & 3));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2720,7 +2720,6 @@
|
|||
<ClInclude Include="RoofedForestBiome.h" />
|
||||
<ClInclude Include="RotatedPillarTile.h" />
|
||||
<ClInclude Include="SandTile.h" />
|
||||
<ClInclude Include="Sapling2.h" />
|
||||
<ClInclude Include="SavannaBiome.h" />
|
||||
<ClInclude Include="SavannaTreeFeature.h" />
|
||||
<ClInclude Include="Score.h" />
|
||||
|
|
@ -3664,7 +3663,6 @@
|
|||
<ClInclude Include="Rose.h" />
|
||||
<ClCompile Include="RotatedPillarTile.cpp" />
|
||||
<ClCompile Include="SandTile.cpp" />
|
||||
<ClCompile Include="Sapling2.cpp" />
|
||||
<ClCompile Include="SavannaBiome.cpp" />
|
||||
<ClCompile Include="SavannaTreeFeature.cpp" />
|
||||
<ClCompile Include="Score.cpp" />
|
||||
|
|
|
|||
|
|
@ -821,7 +821,6 @@
|
|||
<ClCompile Include="PackedIceTile.cpp" />
|
||||
<ClCompile Include="LeafTile2.cpp" />
|
||||
<ClCompile Include="LeafTileItem2.cpp" />
|
||||
<ClCompile Include="Sapling2.cpp" />
|
||||
<ClCompile Include="SavannaTreeFeature.cpp" />
|
||||
<ClCompile Include="DarkOakFeature.cpp" />
|
||||
<ClCompile Include="SavannaBiome.cpp" />
|
||||
|
|
@ -1818,7 +1817,6 @@
|
|||
<ClInclude Include="PackedIceTile.h" />
|
||||
<ClInclude Include="LeafTile2.h" />
|
||||
<ClInclude Include="LeafTileItem2.h" />
|
||||
<ClInclude Include="Sapling2.h" />
|
||||
<ClInclude Include="SavannaTreeFeature.h" />
|
||||
<ClInclude Include="DarkOakFeature.h" />
|
||||
<ClInclude Include="SavannaBiome.h" />
|
||||
|
|
|
|||
|
|
@ -1,18 +1,60 @@
|
|||
#include "stdafx.h"
|
||||
#include "PrismarineTile.h"
|
||||
#include "net.minecraft.world.item.h"
|
||||
#include "net.minecraft.world.h"
|
||||
#include "Item.h"
|
||||
#include "IconRegister.h"
|
||||
|
||||
PrismarineTile::PrismarineTile(int id, Material* material) : Tile(id, material)
|
||||
const wstring PrismarineTile::TEXTURE_NAMES[] = {L"", L"bricks", L"dark"};
|
||||
|
||||
const unsigned int PrismarineTile::PRISMARINE_NAMES[PRISMARINE_NAMES_LENGTH] = {
|
||||
IDS_TILE_PRISMARINE,
|
||||
IDS_TILE_PRISMARINE_BRICKS,
|
||||
IDS_TILE_PRISMARINE_DARK
|
||||
};
|
||||
|
||||
const unsigned int PrismarineTile::PRISMARINE_USE_DESCS[PRISMARINE_NAMES_LENGTH] = {
|
||||
IDS_ITEM_PRISMARINE_DESC,
|
||||
IDS_ITEM_PRISMARINE_BRICK_DESC,
|
||||
IDS_ITEM_PRISMARINE_DARK_DESC
|
||||
};
|
||||
|
||||
PrismarineTile::PrismarineTile(int id) : Tile(id, Material::stone)
|
||||
{
|
||||
setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone);
|
||||
icons = nullptr;
|
||||
}
|
||||
|
||||
void PrismarineTile::registerIcons(IconRegister* iconRegister)
|
||||
Icon *PrismarineTile::getTexture(int face, int data)
|
||||
{
|
||||
icon = iconRegister->registerIcon(L"prismarine_rough");
|
||||
if (data < 0 || data >= PRISMARINE_NAMES_LENGTH) data = 0;
|
||||
return icons[data];
|
||||
}
|
||||
|
||||
Icon* PrismarineTile::getTexture(int face, int data)
|
||||
int PrismarineTile::getSpawnResourcesAuxValue(int data)
|
||||
{
|
||||
return icon;
|
||||
return data;
|
||||
}
|
||||
|
||||
unsigned int PrismarineTile::getDescriptionId(int iData )
|
||||
{
|
||||
if(iData < 0 ) iData = 0;
|
||||
return PrismarineTile::PRISMARINE_NAMES[iData];
|
||||
}
|
||||
|
||||
unsigned int PrismarineTile::getUseDescriptionId(int iData )
|
||||
{
|
||||
if(iData < 0 ) iData = 0;
|
||||
return PrismarineTile::PRISMARINE_USE_DESCS[iData];
|
||||
}
|
||||
|
||||
void PrismarineTile::registerIcons(IconRegister *iconRegister)
|
||||
{
|
||||
icons = new Icon*[PRISMARINE_NAMES_LENGTH];
|
||||
|
||||
for (int i = 0; i < PRISMARINE_NAMES_LENGTH; i++)
|
||||
{
|
||||
wstring name = getIconName();
|
||||
if (!TEXTURE_NAMES[i].empty() ) name += L"_" + TEXTURE_NAMES[i];
|
||||
icons[i] = iconRegister->registerIcon(name);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,34 @@
|
|||
#pragma once
|
||||
#include "Tile.h"
|
||||
|
||||
class ChunkRebuildData;
|
||||
class PrismarineTile : public Tile
|
||||
{
|
||||
friend class ChunkRebuildData;
|
||||
public:
|
||||
PrismarineTile(int id, Material* material);
|
||||
virtual void registerIcons(IconRegister* iconRegister);
|
||||
virtual Icon* getTexture(int face, int data);
|
||||
static const int TYPE_DEFAULT = 0;
|
||||
static const int TYPE_BRICKS = 1;
|
||||
static const int TYPE_DARK = 2;
|
||||
|
||||
static const wstring TEXTURE_NAMES[];
|
||||
|
||||
static const int PRISMARINE_NAMES_LENGTH = 3;
|
||||
|
||||
static const unsigned int PRISMARINE_NAMES[PRISMARINE_NAMES_LENGTH];
|
||||
static const unsigned int PRISMARINE_USE_DESCS[PRISMARINE_NAMES_LENGTH];
|
||||
|
||||
private:
|
||||
Icon* icon;
|
||||
Icon **icons;
|
||||
|
||||
public:
|
||||
|
||||
PrismarineTile(int id);
|
||||
|
||||
public:
|
||||
virtual Icon *getTexture(int face, int data);
|
||||
|
||||
virtual unsigned int getDescriptionId(int iData = -1);
|
||||
virtual unsigned int getUseDescriptionId(int iData = -1);
|
||||
virtual int getSpawnResourcesAuxValue(int data);
|
||||
void registerIcons(IconRegister *iconRegister);
|
||||
};
|
||||
|
|
@ -464,7 +464,7 @@ Recipes::Recipes()
|
|||
L'#', Item::prismarine_shard,
|
||||
L'S');
|
||||
|
||||
addShapedRecipy(new ItemInstance(Tile::prismarinebrick, 1), //
|
||||
addShapedRecipy(new ItemInstance(Tile::prismarine, 1,PrismarineTile::TYPE_BRICKS), //
|
||||
L"ssscig",
|
||||
L"###", //
|
||||
L"###", //
|
||||
|
|
@ -474,7 +474,7 @@ Recipes::Recipes()
|
|||
L'S');
|
||||
|
||||
|
||||
addShapedRecipy(new ItemInstance(Tile::prismarinedark, 1), //
|
||||
addShapedRecipy(new ItemInstance(Tile::prismarine, 1,PrismarineTile::TYPE_DARK), //
|
||||
L"ssscicig",
|
||||
L"###", //
|
||||
L"#X#", //
|
||||
|
|
@ -1500,7 +1500,7 @@ shared_ptr<ItemInstance> Recipes::getItemForRecipe(Recipy *r)
|
|||
void Recipes::buildRecipeIngredientsArray(void)
|
||||
{
|
||||
//RecipyList *recipes = ((Recipes *)Recipes::getInstance())->getRecipies();
|
||||
|
||||
|
||||
int iRecipeC=static_cast<int>(recipies->size());
|
||||
|
||||
m_pRecipeIngredientsRequired= new Recipy::INGREDIENTS_REQUIRED [iRecipeC];
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ void SandTile::checkSlide(Level* level, int x, int y, int z)
|
|||
int x2 = x;
|
||||
int y2 = y;
|
||||
int z2 = z;
|
||||
|
||||
if (level->isNew || !level->hasChunksAt(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (y2 > 0 && isFree(level, x2, y2 - 1, z2))
|
||||
{
|
||||
int r = 32;
|
||||
|
|
|
|||
|
|
@ -5,165 +5,213 @@
|
|||
#include "net.minecraft.world.h"
|
||||
|
||||
#include "Sapling.h"
|
||||
#include "SavannaTreeFeature.h"
|
||||
#include "DarkOakFeature.h"
|
||||
|
||||
int Sapling::SAPLING_NAMES[SAPLING_NAMES_SIZE] = { IDS_TILE_SAPLING_OAK,
|
||||
IDS_TILE_SAPLING_SPRUCE,
|
||||
IDS_TILE_SAPLING_BIRCH,
|
||||
IDS_TILE_SAPLING_JUNGLE
|
||||
int Sapling::SAPLING_NAMES[SAPLING_NAMES_SIZE] = {
|
||||
IDS_TILE_SAPLING_OAK,
|
||||
IDS_TILE_SAPLING_SPRUCE,
|
||||
IDS_TILE_SAPLING_BIRCH,
|
||||
IDS_TILE_SAPLING_JUNGLE,
|
||||
IDS_TILE_SAPLING_ACACIA,
|
||||
IDS_TILE_SAPLING_DARK_OAK
|
||||
};
|
||||
|
||||
const wstring Sapling::TEXTURE_NAMES[] = {L"sapling", L"sapling_spruce", L"sapling_birch", L"sapling_jungle"};
|
||||
const wstring Sapling::TEXTURE_NAMES[] = {
|
||||
L"sapling",
|
||||
L"sapling_spruce",
|
||||
L"sapling_birch",
|
||||
L"sapling_jungle",
|
||||
L"sapling_acacia",
|
||||
L"sapling_dark_oak"
|
||||
};
|
||||
|
||||
Sapling::Sapling(int id) : Bush( id )
|
||||
{
|
||||
this->updateDefaultShape();
|
||||
icons = nullptr;
|
||||
this->updateDefaultShape();
|
||||
icons = nullptr;
|
||||
}
|
||||
|
||||
// 4J Added override
|
||||
void Sapling::updateDefaultShape()
|
||||
{
|
||||
float ss = 0.4f;
|
||||
this->setShape(0.5f - ss, 0, 0.5f - ss, 0.5f + ss, ss * 2, 0.5f + ss);
|
||||
float ss = 0.4f;
|
||||
this->setShape(0.5f - ss, 0, 0.5f - ss, 0.5f + ss, ss * 2, 0.5f + ss);
|
||||
}
|
||||
|
||||
void Sapling::tick(Level *level, int x, int y, int z, Random *random)
|
||||
{
|
||||
if (level->isClientSide) return;
|
||||
if (level->isClientSide) return;
|
||||
|
||||
Bush::tick(level, x, y, z, random);
|
||||
Bush::tick(level, x, y, z, random);
|
||||
|
||||
if (level->getRawBrightness(x, y + 1, z) >= Level::MAX_BRIGHTNESS - 6)
|
||||
{
|
||||
if (random->nextInt(7) == 0)
|
||||
{
|
||||
advanceTree(level, x, y, z, random);
|
||||
}
|
||||
}
|
||||
if (level->getRawBrightness(x, y + 1, z) >= Level::MAX_BRIGHTNESS - 6)
|
||||
{
|
||||
if (random->nextInt(7) == 0)
|
||||
{
|
||||
advanceTree(level, x, y, z, random);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Icon *Sapling::getTexture(int face, int data)
|
||||
{
|
||||
data = data & TYPE_MASK;
|
||||
return icons[data];
|
||||
data = data & TYPE_MASK;
|
||||
if (data < 0 || data >= SAPLING_NAMES_SIZE) data = 0;
|
||||
return icons[data];
|
||||
}
|
||||
|
||||
void Sapling::advanceTree(Level *level, int x, int y, int z, Random *random)
|
||||
{
|
||||
int data = level->getData(x, y, z);
|
||||
if ((data & AGE_BIT) == 0)
|
||||
{
|
||||
level->setData(x, y, z, data | AGE_BIT, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
growTree(level, x, y, z, random);
|
||||
}
|
||||
int data = level->getData(x, y, z);
|
||||
if ((data & AGE_BIT) == 0)
|
||||
{
|
||||
level->setData(x, y, z, data | AGE_BIT, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
growTree(level, x, y, z, random);
|
||||
}
|
||||
}
|
||||
|
||||
void Sapling::growTree(Level *level, int x, int y, int z, Random *random)
|
||||
{
|
||||
int data = level->getData(x, y, z) & TYPE_MASK;
|
||||
int data = level->getData(x, y, z) & TYPE_MASK;
|
||||
|
||||
Feature *f = nullptr;
|
||||
Feature *f = nullptr;
|
||||
|
||||
int ox = 0, oz = 0;
|
||||
bool multiblock = false;
|
||||
int ox = 0, oz = 0;
|
||||
bool multiblock = false;
|
||||
|
||||
if (data == TYPE_EVERGREEN)
|
||||
{
|
||||
f = new SpruceFeature(true);
|
||||
}
|
||||
else if (data == TYPE_BIRCH)
|
||||
{
|
||||
f = new BirchFeature(true);
|
||||
}
|
||||
else if (data == TYPE_JUNGLE)
|
||||
{
|
||||
// check for mega tree
|
||||
for (ox = 0; ox >= -1; ox--)
|
||||
{
|
||||
for (oz = 0; oz >= -1; oz--)
|
||||
{
|
||||
if (isSapling(level, x + ox, y, z + oz, TYPE_JUNGLE) && isSapling(level, x + ox + 1, y, z + oz, TYPE_JUNGLE) && isSapling(level, x + ox, y, z + oz + 1, TYPE_JUNGLE)
|
||||
&& isSapling(level, x + ox + 1, y, z + oz + 1, TYPE_JUNGLE))
|
||||
{
|
||||
f = new MegaTreeFeature(true, 10 + random->nextInt(20), TreeTile::JUNGLE_TRUNK, LeafTile::JUNGLE_LEAF);
|
||||
multiblock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f != nullptr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f == nullptr)
|
||||
{
|
||||
ox = oz = 0;
|
||||
f = new TreeFeature(true, 4 + random->nextInt(7), TreeTile::JUNGLE_TRUNK, LeafTile::JUNGLE_LEAF, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
f = new TreeFeature(true);
|
||||
if (random->nextInt(10) == 0)
|
||||
{
|
||||
delete f;
|
||||
f = new BasicTree(true);
|
||||
}
|
||||
}
|
||||
if (multiblock)
|
||||
{
|
||||
level->setTileAndData(x + ox, y, z + oz, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox, y, z + oz + 1, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz + 1, 0, 0, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
level->setTileAndData(x, y, z, 0, 0, Tile::UPDATE_NONE);
|
||||
}
|
||||
if (!f->place(level, random, x + ox, y, z + oz))
|
||||
{
|
||||
if (multiblock)
|
||||
{
|
||||
level->setTileAndData(x + ox, y, z + oz, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox, y, z + oz + 1, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz + 1, id, data, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
level->setTileAndData(x, y, z, id, data, Tile::UPDATE_NONE);
|
||||
}
|
||||
}
|
||||
if( f != nullptr )
|
||||
delete f;
|
||||
if (data == TYPE_EVERGREEN)
|
||||
{
|
||||
f = new SpruceFeature(true);
|
||||
}
|
||||
else if (data == TYPE_BIRCH)
|
||||
{
|
||||
f = new BirchFeature(true);
|
||||
}
|
||||
else if (data == TYPE_JUNGLE)
|
||||
{
|
||||
for (ox = 0; ox >= -1; ox--)
|
||||
{
|
||||
for (oz = 0; oz >= -1; oz--)
|
||||
{
|
||||
if (isSapling(level, x + ox, y, z + oz, TYPE_JUNGLE) &&
|
||||
isSapling(level, x + ox + 1, y, z + oz, TYPE_JUNGLE) &&
|
||||
isSapling(level, x + ox, y, z + oz + 1, TYPE_JUNGLE) &&
|
||||
isSapling(level, x + ox + 1, y, z + oz + 1, TYPE_JUNGLE))
|
||||
{
|
||||
f = new MegaTreeFeature(true, 10 + random->nextInt(20), TreeTile::JUNGLE_TRUNK, LeafTile::JUNGLE_LEAF);
|
||||
multiblock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f != nullptr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f == nullptr)
|
||||
{
|
||||
ox = oz = 0;
|
||||
f = new TreeFeature(true, 4 + random->nextInt(7), TreeTile::JUNGLE_TRUNK, LeafTile::JUNGLE_LEAF, false);
|
||||
}
|
||||
}
|
||||
else if (data == TYPE_ACACIA)
|
||||
{
|
||||
f = new SavannaTreeFeature(true);
|
||||
}
|
||||
else if (data == TYPE_DARK_OAK)
|
||||
{
|
||||
for (ox = 0; ox >= -1; ox--)
|
||||
{
|
||||
for (oz = 0; oz >= -1; oz--)
|
||||
{
|
||||
if (isSapling(level, x + ox, y, z + oz, TYPE_DARK_OAK) &&
|
||||
isSapling(level, x + ox + 1, y, z + oz, TYPE_DARK_OAK) &&
|
||||
isSapling(level, x + ox, y, z + oz + 1, TYPE_DARK_OAK) &&
|
||||
isSapling(level, x + ox + 1, y, z + oz + 1, TYPE_DARK_OAK))
|
||||
{
|
||||
f = new DarkOakFeature(true);
|
||||
multiblock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f != nullptr) break;
|
||||
}
|
||||
|
||||
if (f == nullptr) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
f = new TreeFeature(true);
|
||||
if (random->nextInt(10) == 0)
|
||||
{
|
||||
delete f;
|
||||
f = new BasicTree(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (multiblock)
|
||||
{
|
||||
level->setTileAndData(x + ox, y, z + oz, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox, y, z + oz + 1, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz + 1, 0, 0, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
level->setTileAndData(x, y, z, 0, 0, Tile::UPDATE_NONE);
|
||||
}
|
||||
|
||||
if (!f->place(level, random, x + ox, y, z + oz))
|
||||
{
|
||||
if (multiblock)
|
||||
{
|
||||
level->setTileAndData(x + ox, y, z + oz, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox, y, z + oz + 1, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz + 1, id, data, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
level->setTileAndData(x, y, z, id, data, Tile::UPDATE_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
if( f != nullptr )
|
||||
delete f;
|
||||
}
|
||||
|
||||
unsigned int Sapling::getDescriptionId(int iData /*= -1*/)
|
||||
unsigned int Sapling::getDescriptionId(int iData )
|
||||
{
|
||||
if(iData < 0 ) iData = 0;
|
||||
return Sapling::SAPLING_NAMES[iData];
|
||||
if(iData < 0 || iData >= SAPLING_NAMES_SIZE) iData = 0;
|
||||
return Sapling::SAPLING_NAMES[iData];
|
||||
}
|
||||
|
||||
int Sapling::getSpawnResourcesAuxValue(int data)
|
||||
{
|
||||
return data & TYPE_MASK;
|
||||
return data & TYPE_MASK;
|
||||
}
|
||||
|
||||
bool Sapling::isSapling(Level *level, int x, int y, int z, int type)
|
||||
{
|
||||
return (level->getTile(x, y, z) == id) && ((level->getData(x, y, z) & TYPE_MASK) == type);
|
||||
return (level->getTile(x, y, z) == id) && ((level->getData(x, y, z) & TYPE_MASK) == type);
|
||||
}
|
||||
|
||||
bool Sapling::fertilize(Level *level, int x, int y, int z)
|
||||
{
|
||||
this->advanceTree(level, x, y, z, level->random);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Sapling::registerIcons(IconRegister *iconRegister)
|
||||
{
|
||||
icons = new Icon*[SAPLING_NAMES_SIZE];
|
||||
icons = new Icon*[SAPLING_NAMES_SIZE];
|
||||
|
||||
for (int i = 0; i < SAPLING_NAMES_SIZE; i++)
|
||||
{
|
||||
icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < SAPLING_NAMES_SIZE; i++)
|
||||
{
|
||||
icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,50 +1,56 @@
|
|||
#pragma once
|
||||
|
||||
#include "LeafTile.h"
|
||||
#include "LeafTile2.h"
|
||||
#include "Bush.h"
|
||||
|
||||
class Random;
|
||||
class ChunkRebuildData;
|
||||
class Tile;
|
||||
|
||||
class Sapling : public Bush
|
||||
{
|
||||
friend class Tile;
|
||||
friend class ChunkRebuildData;
|
||||
{
|
||||
friend class Tile;
|
||||
friend class ChunkRebuildData;
|
||||
public:
|
||||
static const int TYPE_DEFAULT = LeafTile::NORMAL_LEAF;
|
||||
static const int TYPE_EVERGREEN = LeafTile::EVERGREEN_LEAF;
|
||||
static const int TYPE_BIRCH = LeafTile::BIRCH_LEAF;
|
||||
static const int TYPE_JUNGLE = LeafTile::JUNGLE_LEAF;
|
||||
static const int TYPE_DEFAULT = LeafTile::NORMAL_LEAF;
|
||||
static const int TYPE_EVERGREEN = LeafTile::EVERGREEN_LEAF;
|
||||
static const int TYPE_BIRCH = LeafTile::BIRCH_LEAF;
|
||||
static const int TYPE_JUNGLE = LeafTile::JUNGLE_LEAF;
|
||||
static const int TYPE_ACACIA = LeafTile2::ACACIA_LEAF+4;
|
||||
static const int TYPE_DARK_OAK = LeafTile2::DARK_OAK_LEAF+4;
|
||||
|
||||
static const int SAPLING_NAMES_SIZE = 4;
|
||||
static const int SAPLING_NAMES_SIZE = 6;
|
||||
|
||||
static int SAPLING_NAMES[SAPLING_NAMES_SIZE];
|
||||
static int SAPLING_NAMES[SAPLING_NAMES_SIZE];
|
||||
|
||||
private:
|
||||
static const wstring TEXTURE_NAMES[];
|
||||
static const wstring TEXTURE_NAMES[];
|
||||
|
||||
Icon **icons;
|
||||
Icon **icons;
|
||||
|
||||
static const int TYPE_MASK = 3;
|
||||
static const int AGE_BIT = 8;
|
||||
static const int TYPE_MASK = 7;
|
||||
static const int AGE_BIT = 8;
|
||||
|
||||
protected:
|
||||
Sapling(int id);
|
||||
Sapling(int id);
|
||||
|
||||
public:
|
||||
virtual void updateDefaultShape(); // 4J Added override
|
||||
virtual void tick(Level *level, int x, int y, int z, Random *random);
|
||||
virtual void updateDefaultShape(); // 4J Added override
|
||||
virtual void tick(Level *level, int x, int y, int z, Random *random);
|
||||
|
||||
virtual Icon *getTexture(int face, int data);
|
||||
virtual void advanceTree(Level *level, int x, int y, int z, Random *random);
|
||||
void growTree(Level *level, int x, int y, int z, Random *random);
|
||||
virtual Icon *getTexture(int face, int data);
|
||||
virtual void advanceTree(Level *level, int x, int y, int z, Random *random);
|
||||
void growTree(Level *level, int x, int y, int z, Random *random);
|
||||
|
||||
virtual unsigned int getDescriptionId(int iData = -1);
|
||||
bool isSapling(Level *level, int x, int y, int z, int type);
|
||||
virtual unsigned int getDescriptionId(int iData = -1);
|
||||
bool isSapling(Level *level, int x, int y, int z, int type);
|
||||
|
||||
virtual bool fertilize(Level *level, int x, int y, int z);
|
||||
|
||||
protected:
|
||||
int getSpawnResourcesAuxValue(int data);
|
||||
int getSpawnResourcesAuxValue(int data);
|
||||
|
||||
public:
|
||||
void registerIcons(IconRegister *iconRegister);
|
||||
};
|
||||
void registerIcons(IconRegister *iconRegister);
|
||||
};
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
#include "stdafx.h"
|
||||
#include "net.minecraft.world.level.h"
|
||||
#include "net.minecraft.world.level.tile.h"
|
||||
#include "net.minecraft.world.level.levelgen.feature.h"
|
||||
#include "net.minecraft.world.h"
|
||||
|
||||
#include "SavannaTreeFeature.h"
|
||||
#include "DarkOakFeature.h"
|
||||
#include "Sapling2.h"
|
||||
|
||||
|
||||
int Sapling2::SAPLING_NAMES[SAPLING_NAMES_SIZE] = {
|
||||
IDS_TILE_SAPLING_ACACIA,
|
||||
IDS_TILE_SAPLING_DARK_OAK
|
||||
};
|
||||
|
||||
const wstring Sapling2::TEXTURE_NAMES[] = { L"sapling_acacia", L"sapling_dark_oak" };
|
||||
|
||||
Sapling2::Sapling2(int id) : Bush(id)
|
||||
{
|
||||
this->updateDefaultShape();
|
||||
icons = nullptr;
|
||||
}
|
||||
|
||||
void Sapling2::updateDefaultShape()
|
||||
{
|
||||
float ss = 0.4f;
|
||||
this->setShape(0.5f - ss, 0, 0.5f - ss, 0.5f + ss, ss * 2, 0.5f + ss);
|
||||
}
|
||||
|
||||
bool Sapling2::isSapling(Level *level, int x, int y, int z, int type)
|
||||
{
|
||||
return level->getTile(x, y, z) == this->id && (level->getData(x, y, z) & TYPE_MASK) == type;
|
||||
}
|
||||
|
||||
void Sapling2::tick(Level *level, int x, int y, int z, Random *random)
|
||||
{
|
||||
if (level->isClientSide) return;
|
||||
Bush::tick(level, x, y, z, random);
|
||||
|
||||
if (level->getRawBrightness(x, y + 1, z) >= 9 && random->nextInt(7) == 0)
|
||||
{
|
||||
this->growTree(level, x, y, z, random);
|
||||
}
|
||||
}
|
||||
|
||||
Icon *Sapling2::getTexture(int face, int data)
|
||||
{
|
||||
|
||||
if (icons == nullptr)
|
||||
{
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int type = data & TYPE_MASK;
|
||||
if (type < 0 || type >= SAPLING_NAMES_SIZE) type = 0;
|
||||
return icons[type];
|
||||
}
|
||||
|
||||
void Sapling2::registerIcons(IconRegister *iconRegister)
|
||||
{
|
||||
icons = new Icon*[SAPLING_NAMES_SIZE];
|
||||
for (int i = 0; i < SAPLING_NAMES_SIZE; ++i)
|
||||
{
|
||||
icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void Sapling2::growTree(Level *level, int x, int y, int z, Random *random)
|
||||
{
|
||||
int data = level->getData(x, y, z) & TYPE_MASK;
|
||||
Feature *f = nullptr;
|
||||
int ox = 0, oz = 0;
|
||||
bool multiblock = false;
|
||||
|
||||
if (data == TYPE_ACACIA)
|
||||
{
|
||||
f = new SavannaTreeFeature(true);
|
||||
}
|
||||
else if (data == TYPE_DARK_OAK)
|
||||
{
|
||||
|
||||
for (ox = 0; ox >= -1; ox--)
|
||||
{
|
||||
for (oz = 0; oz >= -1; oz--)
|
||||
{
|
||||
if (isSapling(level, x + ox, y, z + oz, TYPE_DARK_OAK) &&
|
||||
isSapling(level, x + ox + 1, y, z + oz, TYPE_DARK_OAK) &&
|
||||
isSapling(level, x + ox, y, z + oz + 1, TYPE_DARK_OAK) &&
|
||||
isSapling(level, x + ox + 1, y, z + oz + 1, TYPE_DARK_OAK))
|
||||
{
|
||||
f = new DarkOakFeature(true);
|
||||
multiblock = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f != nullptr) break;
|
||||
}
|
||||
if (f == nullptr) return;
|
||||
}
|
||||
|
||||
// Deletion
|
||||
if (multiblock)
|
||||
{
|
||||
level->setTileAndData(x + ox, y, z + oz, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox, y, z + oz + 1, 0, 0, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz + 1, 0, 0, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
level->setTileAndData(x, y, z, 0, 0, Tile::UPDATE_NONE);
|
||||
}
|
||||
|
||||
// Generation
|
||||
if (f != nullptr)
|
||||
{
|
||||
if (!f->place(level, random, x + ox, y, z + oz))
|
||||
{
|
||||
if (multiblock)
|
||||
{
|
||||
level->setTileAndData(x + ox, y, z + oz, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox, y, z + oz + 1, id, data, Tile::UPDATE_NONE);
|
||||
level->setTileAndData(x + ox + 1, y, z + oz + 1, id, data, Tile::UPDATE_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
level->setTileAndData(x, y, z, id, data, Tile::UPDATE_NONE);
|
||||
}
|
||||
}
|
||||
delete f;
|
||||
}
|
||||
}
|
||||
|
||||
bool Sapling2::fertilize(Level *level, int x, int y, int z)
|
||||
{
|
||||
this->growTree(level, x, y, z, level->random);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "LeafTile2.h"
|
||||
#include "Bush.h"
|
||||
#include "Sapling.h"
|
||||
|
||||
class Sapling2 : public Bush
|
||||
{
|
||||
friend class Tile;
|
||||
public:
|
||||
|
||||
static const int TYPE_ACACIA = 0;
|
||||
static const int TYPE_DARK_OAK = 1;
|
||||
|
||||
static const int SAPLING_NAMES_SIZE = 2;
|
||||
static int SAPLING_NAMES[SAPLING_NAMES_SIZE];
|
||||
|
||||
private:
|
||||
static const wstring TEXTURE_NAMES[];
|
||||
Icon **icons;
|
||||
|
||||
static const int TYPE_MASK = 7;
|
||||
static const int AGE_BIT = 8;
|
||||
|
||||
protected:
|
||||
Sapling2(int id);
|
||||
|
||||
bool isSapling(Level *level, int x, int y, int z, int type);
|
||||
public:
|
||||
virtual void updateDefaultShape();
|
||||
virtual void tick(Level *level, int x, int y, int z, Random *random);
|
||||
virtual Icon *getTexture(int face, int data);
|
||||
void growTree(Level *level, int x, int y, int z, Random *random);
|
||||
virtual bool fertilize(Level *level, int x, int y, int z);
|
||||
|
||||
virtual void registerIcons(IconRegister *iconRegister);
|
||||
};
|
||||
|
|
@ -28,7 +28,7 @@ int SmoothStoneBrickTile::getSpawnResourcesAuxValue(int data)
|
|||
return data;
|
||||
}
|
||||
|
||||
unsigned int SmoothStoneBrickTile::getDescriptionId(int iData /*= -1*/)
|
||||
unsigned int SmoothStoneBrickTile::getDescriptionId(int iData )
|
||||
{
|
||||
if(iData < 0 ) iData = 0;
|
||||
return SmoothStoneBrickTile::SMOOTH_STONE_BRICK_NAMES[iData];
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include "net.minecraft.world.h"
|
||||
#include "net.minecraft.h"
|
||||
#include "Tile.h"
|
||||
#include "PrismarineTile.h"
|
||||
|
||||
|
||||
|
||||
wstring Tile::TILE_DESCRIPTION_PREFIX = L"Tile.";
|
||||
|
|
@ -52,7 +52,7 @@ Tile *Tile::dirt = nullptr;
|
|||
Tile *Tile::cobblestone = nullptr;
|
||||
Tile *Tile::wood = nullptr;
|
||||
Tile *Tile::sapling = nullptr;
|
||||
Tile *Tile::sapling2 = nullptr;
|
||||
//Tile *Tile::sapling2 = nullptr;
|
||||
Tile *Tile::unbreakable = nullptr;
|
||||
LiquidTile *Tile::water = nullptr;
|
||||
Tile *Tile::calmWater = nullptr;
|
||||
|
|
@ -252,8 +252,7 @@ Tile* Tile::red_sandstone = nullptr;
|
|||
Tile* Tile::stairs_red_sandstone = nullptr;
|
||||
Tile* Tile::seaLantern = nullptr;
|
||||
Tile* Tile::prismarine = nullptr;
|
||||
Tile* Tile::prismarinedark = nullptr;
|
||||
Tile* Tile::prismarinebrick = nullptr;
|
||||
|
||||
|
||||
Tile* Tile::tree2Trunk = nullptr;
|
||||
Tile* Tile::packed_ice = nullptr;
|
||||
|
|
@ -301,8 +300,8 @@ void Tile::staticCtor()
|
|||
Tile::dirt = (new DirtTile(3)) ->setDestroyTime(0.5f)->setSoundType(Tile::SOUND_GRAVEL)->setIconName(L"dirt")->setDescriptionId(IDS_TILE_DIRT)->setUseDescriptionId(IDS_DESC_DIRT);
|
||||
Tile::cobblestone = (new Tile(4, Material::stone)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(2.0f)->setExplodeable(10)->setSoundType(Tile::SOUND_STONE)->setIconName(L"cobblestone")->setDescriptionId(IDS_TILE_STONE_BRICK)->setUseDescriptionId(IDS_DESC_STONE_BRICK);
|
||||
Tile::wood = (new WoodTile(5)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_structwoodstuff, Item::eMaterial_wood)->setDestroyTime(2.0f)->setExplodeable(5)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"planks")->setDescriptionId(IDS_TILE_OAKWOOD_PLANKS)->sendTileData()->setUseDescriptionId(IDS_DESC_WOODENPLANKS);
|
||||
Tile::sapling = (new Sapling(6)) ->setDestroyTime(0.0f)->setSoundType(Tile::SOUND_GRASS)->setIconName(L"sapling")->setDescriptionId(IDS_TILE_SAPLING)->sendTileData()->setUseDescriptionId(IDS_DESC_SAPLING)->disableMipmap();
|
||||
Tile::sapling2 = (new Sapling2(199)) ->setDestroyTime(0.0f)->setSoundType(Tile::SOUND_GRASS)->setIconName(L"sapling2")->setDescriptionId(IDS_TILE_SAPLING)->sendTileData()->setUseDescriptionId(IDS_DESC_SAPLING)->disableMipmap();
|
||||
Tile::sapling = (new Sapling(6))->setDestroyTime(0.0f)->setSoundType(Tile::SOUND_GRASS)->setIconName(L"sapling")->setDescriptionId(IDS_TILE_SAPLING)->sendTileData()->setUseDescriptionId(IDS_DESC_SAPLING)->disableMipmap();
|
||||
//Tile::sapling2 = (new Sapling2(199)) ->setDestroyTime(0.0f)->setSoundType(Tile::SOUND_GRASS)->setIconName(L"sapling2")->setDescriptionId(IDS_TILE_SAPLING)->sendTileData()->setUseDescriptionId(IDS_DESC_SAPLING)->disableMipmap();
|
||||
Tile::unbreakable = (new Tile(7, Material::stone)) ->setIndestructible()->setExplodeable(6000000)->setSoundType(Tile::SOUND_STONE)->setIconName(L"bedrock")->setDescriptionId(IDS_TILE_BEDROCK)->setNotCollectStatistics()->setUseDescriptionId(IDS_DESC_BEDROCK);
|
||||
Tile::water = static_cast<LiquidTile *>((new LiquidTileDynamic(8, Material::water))->setDestroyTime(100.0f)->setLightBlock(3)->setIconName(L"water_flow")->setDescriptionId(IDS_TILE_WATER)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_WATER));
|
||||
Tile::calmWater = (new LiquidTileStatic(9, Material::water)) ->setDestroyTime(100.0f)->setLightBlock(3)->setIconName(L"water_still")->setDescriptionId(IDS_TILE_WATER)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_WATER);
|
||||
|
|
@ -375,7 +374,11 @@ void Tile::staticCtor()
|
|||
Tile::wallSign = (new SignTile(68, eTYPE_SIGNTILEENTITY, false)) ->setDestroyTime(1.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"sign")->setDescriptionId(IDS_TILE_SIGN)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_SIGN);
|
||||
Tile::lever = (new LeverTile(69)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_lever, Item::eMaterial_wood)->setDestroyTime(0.5f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"lever")->setDescriptionId(IDS_TILE_LEVER)->sendTileData()->setUseDescriptionId(IDS_DESC_LEVER);
|
||||
Tile::pressurePlate_stone = (Tile *)(new PressurePlateTile(70, L"stone", Material::stone, PressurePlateTile::mobs)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_pressureplate, Item::eMaterial_stone)->setDestroyTime(0.5f)->setSoundType(Tile::SOUND_STONE)->setDescriptionId(IDS_TILE_PRESSURE_PLATE)->sendTileData()->setUseDescriptionId(IDS_DESC_PRESSUREPLATE);
|
||||
|
||||
Tile::door_spruce = (new DoorTile(193, Material::wood, L"doorSpruce"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_spruce")->setDescriptionId(IDS_TILE_DOOR_SPRUCE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_birch = (new DoorTile(194, Material::wood, L"doorBirch"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_birch")->setDescriptionId(IDS_TILE_DOOR_SPRUCE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_jungle = (new DoorTile(195, Material::wood, L"doorJungle"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_jungle")->setDescriptionId(IDS_TILE_DOOR_SPRUCE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_acacia = (new DoorTile(196, Material::wood, L"doorAcacia"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_acacia")->setDescriptionId(IDS_TILE_DOOR_SPRUCE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_dark = (new DoorTile(197, Material::wood, L"doorDark"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_dark")->setDescriptionId(IDS_TILE_DOOR_SPRUCE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_iron = (new DoorTile(71, Material::metal, L"doorIron"))->setDestroyTime(5.0f)->setSoundType(Tile::SOUND_METAL)->setIconName(L"door_iron")->setDescriptionId(IDS_TILE_DOOR_IRON)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_IRON);
|
||||
Tile::pressurePlate_wood = (new PressurePlateTile(72, L"planks_oak", Material::wood, PressurePlateTile::everything)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_pressureplate, Item::eMaterial_wood)->setDestroyTime(0.5f)->setSoundType(Tile::SOUND_WOOD)->setDescriptionId(IDS_TILE_PRESSURE_PLATE)->sendTileData()->setUseDescriptionId(IDS_DESC_PRESSUREPLATE);
|
||||
Tile::redStoneOre = (new RedStoneOreTile(73,false)) ->setDestroyTime(3.0f)->setExplodeable(5)->setSoundType(Tile::SOUND_STONE)->setIconName(L"redstone_ore")->setDescriptionId(IDS_TILE_ORE_REDSTONE)->sendTileData()->setUseDescriptionId(IDS_DESC_ORE_REDSTONE);
|
||||
|
|
@ -503,18 +506,9 @@ void Tile::staticCtor()
|
|||
Tile::jungleFence = (new FenceTile(190, L"planks_jungle", Material::wood))->setBaseItemTypeAndMaterial(Item::eBaseItemType_fence, Item::eMaterial_junglewood)->setDestroyTime(2.0f)->setExplodeable(5)->setSoundType(Tile::SOUND_WOOD)->setDescriptionId(IDS_TILE_JUNGLE_FENCE)->setUseDescriptionId(IDS_DESC_FENCE);
|
||||
Tile::darkFence = (new FenceTile(191, L"planks_dark", Material::wood))->setBaseItemTypeAndMaterial(Item::eBaseItemType_fence, Item::eMaterial_darkwood)->setDestroyTime(2.0f)->setExplodeable(5)->setSoundType(Tile::SOUND_WOOD)->setDescriptionId(IDS_TILE_DARK_FENCE)->setUseDescriptionId(IDS_DESC_FENCE);
|
||||
Tile::acaciaFence = (new FenceTile(192, L"planks_acacia", Material::wood))->setBaseItemTypeAndMaterial(Item::eBaseItemType_fence, Item::eMaterial_acaciawood)->setDestroyTime(2.0f)->setExplodeable(5)->setSoundType(Tile::SOUND_WOOD)->setDescriptionId(IDS_TILE_ACACIA_FENCE)->setUseDescriptionId(IDS_DESC_FENCE);
|
||||
|
||||
Tile::door_spruce = (new DoorTile(193, Material::wood, L"doorSpruce"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_spruce")->setDescriptionId(IDS_TILE_DOOR_SPRUCE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_birch = (new DoorTile(194, Material::wood, L"doorBirch"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_birch")->setDescriptionId(IDS_TILE_DOOR_BIRCH)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_jungle = (new DoorTile(195, Material::wood, L"doorJungle"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_jungle")->setDescriptionId(IDS_TILE_DOOR_JUNGLE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_acacia = (new DoorTile(196, Material::wood, L"doorAcacia"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_acacia")->setDescriptionId(IDS_TILE_DOOR_ACACIA)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_dark = (new DoorTile(197, Material::wood, L"doorDark"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_dark")->setDescriptionId(IDS_TILE_DOOR_DARK)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
|
||||
Tile::seaLantern = (new SeaLanternTile(169, Material::glass))->setBaseItemTypeAndMaterial(Item::eBaseItemType_torch, Item::eMaterial_glowstone)->setDestroyTime(0.3f)->setSoundType(Tile::SOUND_GLASS)->setLightEmission(1.0f)->setIconName(L"glowstone")->setDescriptionId(IDS_TILE_SEA_LANTERN)->setUseDescriptionId(IDS_DESC_GLOWSTONE);
|
||||
Tile::prismarine = (new PrismarineTile(168, Material::stone))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(1.5f)->setExplodeable(10)->setSoundType(Tile::SOUND_STONE)->setIconName(L"stone")->setDescriptionId(IDS_TILE_PRISMARINE)->setUseDescriptionId(IDS_ITEM_PRISMARINE_DESC);
|
||||
Tile::prismarinedark = (new Tile(201, Material::stone))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(2.0f)->setExplodeable(10)->setSoundType(Tile::SOUND_STONE)->setIconName(L"prismarine_dark")->setDescriptionId(IDS_TILE_PRISMARINE_DARK)->setUseDescriptionId(IDS_ITEM_PRISMARINE_DARK_DESC);
|
||||
Tile::prismarinebrick = (new Tile(202, Material::stone))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(2.0f)->setExplodeable(10)->setSoundType(Tile::SOUND_STONE)->setIconName(L"prismarine_bricks")->setDescriptionId(IDS_TILE_PRISMARINE_BRICKS)->setUseDescriptionId(IDS_ITEM_PRISMARINE_BRICK_DESC);
|
||||
|
||||
Tile::prismarine = (new PrismarineTile(168))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_stone)->setDestroyTime(1.5f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setIconName(L"prismarine")->setDescriptionId(IDS_TILE_PRISMARINE)->setUseDescriptionId(IDS_ITEM_PRISMARINE_DESC);
|
||||
|
||||
|
||||
// Special cases for certain items since they can have different icons
|
||||
|
|
@ -533,8 +527,8 @@ void Tile::staticCtor()
|
|||
Item::items[stoneSlab_Id] = ( new StoneSlabTileItem(Tile::stoneSlab_Id - 256, Tile::stoneSlabHalf, Tile::stoneSlab, true))->setIconName(L"stoneSlab")->setDescriptionId(IDS_DESC_STONESLAB)->setUseDescriptionId(IDS_DESC_SLAB);
|
||||
Item::items[woodSlabHalf_Id] = ( new StoneSlabTileItem(Tile::woodSlabHalf_Id - 256, Tile::woodSlabHalf, Tile::woodSlab, false))->setIconName(L"woodSlab")->setDescriptionId(IDS_DESC_WOODSLAB)->setUseDescriptionId(IDS_DESC_WOODSLAB);
|
||||
Item::items[woodSlab_Id] = ( new StoneSlabTileItem(Tile::woodSlab_Id - 256, Tile::woodSlabHalf, Tile::woodSlab, true))->setIconName(L"woodSlab")->setDescriptionId(IDS_DESC_WOODSLAB)->setUseDescriptionId(IDS_DESC_WOODSLAB);
|
||||
Item::items[sapling_Id] = ( new MultiTextureTileItem(Tile::sapling_Id - 256, Tile::sapling, Sapling::SAPLING_NAMES, 4) )->setIconName(L"sapling")->setDescriptionId(IDS_TILE_SAPLING)->setUseDescriptionId(IDS_DESC_SAPLING);
|
||||
Item::items[sapling2_Id] = ( new MultiTextureTileItem(Tile::sapling2_Id - 256, Tile::sapling2, Sapling2::SAPLING_NAMES, 2) )->setIconName(L"sapling2")->setDescriptionId(IDS_TILE_SAPLING)->setUseDescriptionId(IDS_DESC_SAPLING);
|
||||
Item::items[sapling_Id] = (new MultiTextureTileItem(Tile::sapling_Id - 256, Tile::sapling, Sapling::SAPLING_NAMES, Sapling::SAPLING_NAMES_SIZE))->setIconName(L"sapling")->setDescriptionId(IDS_TILE_SAPLING)->setUseDescriptionId(IDS_DESC_SAPLING);;
|
||||
//Item::items[sapling2_Id] = ( new MultiTextureTileItem(Tile::sapling2_Id - 256, Tile::sapling2, Sapling2::SAPLING_NAMES, 2) )->setIconName(L"sapling2")->setDescriptionId(IDS_TILE_SAPLING)->setUseDescriptionId(IDS_DESC_SAPLING);
|
||||
Item::items[leaves_Id] = ( new LeafTileItem(Tile::leaves_Id - 256) )->setIconName(L"leaves")->setDescriptionId(IDS_TILE_LEAVES)->setUseDescriptionId(IDS_DESC_LEAVES);
|
||||
Item::items[leaves2_Id] = ( new LeafTileItem(Tile::leaves2_Id - 256) )->setIconName(L"leaves_acacia")->setDescriptionId(IDS_TILE_LEAVES)->setUseDescriptionId(IDS_DESC_LEAVES);
|
||||
Item::items[vine_Id] = ( new ColoredTileItem(Tile::vine_Id - 256, false))->setDescriptionId(IDS_TILE_VINE)->setUseDescriptionId(IDS_DESC_VINE);
|
||||
|
|
@ -586,6 +580,8 @@ void Tile::staticCtor()
|
|||
}
|
||||
Tile::transculent[0] = true;
|
||||
|
||||
Item::items[prismarine_Id] = (new MultiTextureTileItem(Tile::prismarine_Id - 256, prismarine, (int *)PrismarineTile::PRISMARINE_NAMES, 3))->setIconName(L"prismarine")->setDescriptionId(IDS_TILE_PRISMARINE);
|
||||
|
||||
Stats::buildItemStats();
|
||||
|
||||
// */
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ public:
|
|||
static const int cobblestone_Id = 4;
|
||||
static const int wood_Id = 5;
|
||||
static const int sapling_Id = 6;
|
||||
static const int sapling2_Id = 199;
|
||||
//static const int sapling2_Id = 199;//should go inside sapling.
|
||||
static const int unbreakable_Id = 7;
|
||||
static const int water_Id = 8;
|
||||
static const int calmWater_Id = 9;
|
||||
|
|
@ -370,35 +370,42 @@ public:
|
|||
|
||||
static const int stairs_acaciawood_Id = 163;
|
||||
static const int stairs_darkwood_Id = 164;
|
||||
|
||||
//165 slimeblock
|
||||
//166 barrier
|
||||
static const int iron_trapdoor_Id = 167;
|
||||
|
||||
static const int prismarine_Id = 168;
|
||||
static const int seaLantern_Id = 169;
|
||||
static const int hayBlock_Id = 170;
|
||||
static const int woolCarpet_Id = 171;
|
||||
static const int clayHardened_Id = 172;
|
||||
static const int coalBlock_Id = 173;
|
||||
static const int packed_ice_Id = 174;
|
||||
|
||||
//175 double_plant
|
||||
//176 standing_banner
|
||||
//177 wall_banner
|
||||
static const int invertedDaylightDetector_Id = 178;
|
||||
static const int red_sandstone_Id = 179;
|
||||
static const int stairs_red_sandstone_Id = 180;
|
||||
|
||||
//181 double_stone_slab2 : sandstoneslab
|
||||
//182 stone_slab2 : sandstoneslab
|
||||
static const int spruceGate_Id = 183;
|
||||
static const int birchGate_Id = 184;
|
||||
static const int jungleGate_Id = 185;
|
||||
static const int darkGate_Id = 186;
|
||||
static const int acaciaGate_Id = 187;
|
||||
|
||||
static const int spruceFence_Id = 188;
|
||||
static const int birchFence_Id = 189;
|
||||
static const int jungleFence_Id = 190;
|
||||
static const int darkFence_Id = 191;
|
||||
static const int acaciaFence_Id = 192;
|
||||
static const int spruce_door_Id = 193;
|
||||
static const int birch_door_Id = 194;
|
||||
static const int jungle_door_Id = 195;
|
||||
static const int acacia_door_Id = 196;
|
||||
static const int dark_oak_door_Id = 197;
|
||||
|
||||
static const int seaLantern_Id = 169;
|
||||
static const int prismarine_Id = 168;
|
||||
static const int prismarinedark_Id = 201;
|
||||
static const int prismarinebrick_Id = 202;
|
||||
|
||||
|
||||
|
||||
static Tile *stone;
|
||||
static GrassTile *grass;
|
||||
|
|
@ -406,7 +413,7 @@ public:
|
|||
static Tile *cobblestone;
|
||||
static Tile *wood;
|
||||
static Tile *sapling;
|
||||
static Tile *sapling2;
|
||||
//static Tile *sapling2;
|
||||
static Tile *unbreakable;
|
||||
static LiquidTile *water;
|
||||
static Tile *calmWater;
|
||||
|
|
@ -606,8 +613,7 @@ public:
|
|||
static Tile* packed_ice;
|
||||
static Tile* seaLantern;
|
||||
static Tile* prismarine;
|
||||
static Tile* prismarinedark;
|
||||
static Tile* prismarinebrick;
|
||||
|
||||
|
||||
static void staticCtor();
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
#include "RotatedPillarTile.h"
|
||||
#include "SandStoneTile.h"
|
||||
#include "Sapling.h"
|
||||
#include "Sapling2.h"
|
||||
|
||||
#include "SignTile.h"
|
||||
#include "SkullTile.h"
|
||||
#include "SmoothStoneBrickTile.h"
|
||||
|
|
@ -136,5 +136,6 @@
|
|||
#include "TreeTile2.h"
|
||||
#include "SeaLanternTile.h"
|
||||
#include "LeafTile2.h"
|
||||
#include "PrismarineTile.h"
|
||||
|
||||
#include "PackedIceTile.h"
|
||||
|
|
@ -10,7 +10,7 @@ This project aims to backport the newer title updates back to the Minecraft: Leg
|
|||
|
||||
- Port Title Update 25 (98.21% complete)
|
||||
|
||||
- Port Title Update 31 (67.16% complete)
|
||||
- Port Title Update 31 (68.66%% complete)
|
||||
|
||||
See our our [Contributor's Guide](./CONTRIBUTING.md) for more information on the goals of this project.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue