mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-09 02:13:09 +00:00
Added Dirt and Stone Variants
Added podzol, coarse dirt, granite, polished granite, andesite, polished andesite, diorite, polished diorite.
This commit is contained in:
parent
71018169b5
commit
c1124d2f26
|
|
@ -31,7 +31,7 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
DEF(eCreativeInventory_BuildingBlocks)
|
||||
ITEM(Tile::stone_Id)
|
||||
ITEM(Tile::grass_Id)
|
||||
ITEM(Tile::dirt_Id)
|
||||
ITEM_AUX(Tile::dirt_Id, 0)
|
||||
ITEM(Tile::cobblestone_Id)
|
||||
ITEM(Tile::sand_Id)
|
||||
ITEM(Tile::sandStone_Id)
|
||||
|
|
@ -77,6 +77,18 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
ITEM(Tile::glowstone_Id)
|
||||
ITEM(Tile::fence_Id)
|
||||
|
||||
ITEM_AUX(Tile::dirt_Id, DirtTile::COARSE_DIRT)
|
||||
ITEM_AUX(Tile::dirt_Id, DirtTile::PODZOL)
|
||||
|
||||
ITEM_AUX(Tile::stone_Id, StoneTile::GRANITE)
|
||||
ITEM_AUX(Tile::stone_Id, StoneTile::POLISHED_GRANITE)
|
||||
|
||||
ITEM_AUX(Tile::stone_Id, StoneTile::DIORITE)
|
||||
ITEM_AUX(Tile::stone_Id, StoneTile::POLISHED_DIORITE)
|
||||
|
||||
ITEM_AUX(Tile::stone_Id, StoneTile::ANDESITE)
|
||||
ITEM_AUX(Tile::stone_Id, StoneTile::POLISHED_ANDESITE)
|
||||
|
||||
// TU25
|
||||
ITEM(Tile::spruceFence_Id)
|
||||
ITEM(Tile::birchFence_Id)
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 162 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 48 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
|
@ -1001,10 +1001,30 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(20, 11, L"iron_trapdoor");
|
||||
ADD_ICON(20, 12, L"inverted_daylight_detector");
|
||||
|
||||
ADD_ICON(20, 13, L"dirt_podzol_side");
|
||||
ADD_ICON(20, 14, L"dirt_podzol_top");
|
||||
ADD_ICON(20, 15, L"coarse_dirt");
|
||||
|
||||
ADD_ICON(21, 0, L"door_spruce_lower");
|
||||
ADD_ICON(21, 1, L"door_birch_lower");
|
||||
ADD_ICON(21, 2, L"door_jungle_lower");
|
||||
ADD_ICON(21, 3, L"door_acacia_lower");
|
||||
ADD_ICON(21, 4, L"door_dark_lower");
|
||||
|
||||
ADD_ICON(21, 5, L"stone_andesite");
|
||||
ADD_ICON(21, 6, L"stone_andesite_smooth");
|
||||
ADD_ICON(21, 7, L"stone_granite");
|
||||
ADD_ICON(21, 8, L"stone_granite_smooth");
|
||||
ADD_ICON(21, 9, L"stone_diorite");
|
||||
ADD_ICON(21, 10, L"stone_diorite_smooth");
|
||||
|
||||
ADD_ICON(22, 1, L"flower_blue_orchid");
|
||||
ADD_ICON(22, 2, L"flower_allium");
|
||||
ADD_ICON(22, 3, L"flower_houstonia");
|
||||
ADD_ICON(22, 4, L"flower_tulip_red");
|
||||
ADD_ICON(22, 5, L"flower_tulip_orange");
|
||||
ADD_ICON(22, 6, L"flower_tulip_white");
|
||||
ADD_ICON(22, 7, L"flower_tulip_pink");
|
||||
ADD_ICON(22, 8, L"flower_oxeye_daisy");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,58 @@
|
|||
#include "stdafx.h"
|
||||
#include "DirtTile.h"
|
||||
#include "net.minecraft.world.h"
|
||||
#include "net.minecraft.h"
|
||||
|
||||
const unsigned int DirtTile::DIRT_NAMES[DIRT_NAMES_LENGTH] = { IDS_TILE_DIRT,
|
||||
IDS_TILE_DIRT,
|
||||
IDS_TILE_DIRT
|
||||
};
|
||||
|
||||
const wstring DirtTile::TEXTURE_NAMES[] = { L"dirt", L"coarse_dirt", L"dirt_podzol"};
|
||||
|
||||
DirtTile::DirtTile(int id) : Tile(id, Material::dirt)
|
||||
{
|
||||
icons = nullptr;
|
||||
podzolTop = nullptr;
|
||||
podzolSide = nullptr;
|
||||
}
|
||||
|
||||
unsigned int DirtTile::getDescriptionId(int iData)
|
||||
{
|
||||
if (iData < 0 || iData >= DIRT_NAMES_LENGTH) iData = 0;
|
||||
|
||||
return DIRT_NAMES[iData];
|
||||
}
|
||||
|
||||
int DirtTile::getSpawnResourcesAuxValue(int data)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
Icon* DirtTile::getTexture(int face, int data)
|
||||
{
|
||||
if (data < 0 || data >= DIRT_NAMES_LENGTH)
|
||||
data = 0;
|
||||
|
||||
if (TEXTURE_NAMES[data] == L"dirt_podzol") {
|
||||
return (face == Facing::UP) ? podzolTop : podzolSide;
|
||||
}
|
||||
|
||||
return icons[data];
|
||||
}
|
||||
|
||||
void DirtTile::registerIcons(IconRegister* iconRegister)
|
||||
{
|
||||
icons = new Icon * [DIRT_NAMES_LENGTH];
|
||||
|
||||
for (int i = 0; i < DIRT_NAMES_LENGTH; i++)
|
||||
{
|
||||
if (TEXTURE_NAMES[i] == L"dirt_podzol") {
|
||||
icons[i] = nullptr;
|
||||
podzolTop = iconRegister->registerIcon(L"dirt_podzol_top");
|
||||
podzolSide = iconRegister->registerIcon(L"dirt_podzol_side");
|
||||
} else {
|
||||
icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,24 @@
|
|||
|
||||
class DirtTile : public Tile
|
||||
{
|
||||
friend class Tile;
|
||||
protected:
|
||||
friend class Tile;
|
||||
public:
|
||||
static const int COARSE_DIRT = 1;
|
||||
static const int PODZOL = 2;
|
||||
|
||||
static const int DIRT_NAMES_LENGTH = 3;
|
||||
|
||||
static const unsigned int DIRT_NAMES[DIRT_NAMES_LENGTH];
|
||||
static const wstring TEXTURE_NAMES[];
|
||||
private:
|
||||
Icon** icons;
|
||||
Icon* podzolTop;
|
||||
Icon* podzolSide;
|
||||
|
||||
public:
|
||||
DirtTile(int id);
|
||||
virtual Icon* getTexture(int face, int data);
|
||||
virtual unsigned int getDescriptionId(int iData = -1);
|
||||
virtual int getSpawnResourcesAuxValue(int data);
|
||||
void registerIcons(IconRegister* iconRegister);
|
||||
};
|
||||
|
|
@ -22,7 +22,7 @@ GrassTile::GrassTile(int id) : Tile(id, Material::grass)
|
|||
Icon *GrassTile::getTexture(int face, int data)
|
||||
{
|
||||
if (face == Facing::UP) return iconTop;
|
||||
if (face == Facing::DOWN) return Tile::dirt->getTexture(face);
|
||||
if (face == Facing::DOWN) return Tile::dirt->getTexture(face, 0);
|
||||
return icon;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,53 @@
|
|||
#include "stdafx.h"
|
||||
#include "StoneTile.h"
|
||||
#include "net.minecraft.world.h"
|
||||
#include "net.minecraft.h"
|
||||
|
||||
const unsigned int StoneTile::STONE_NAMES[STONE_NAMES_LENGTH] = { IDS_TILE_STONE,
|
||||
IDS_TILE_STONE,
|
||||
IDS_TILE_STONE,
|
||||
IDS_TILE_STONE,
|
||||
IDS_TILE_STONE,
|
||||
IDS_TILE_STONE,
|
||||
IDS_TILE_STONE };
|
||||
|
||||
const wstring StoneTile::TEXTURE_NAMES[] = { L"stone",
|
||||
L"stone_granite", L"stone_granite_smooth",
|
||||
L"stone_diorite", L"stone_diorite_smooth",
|
||||
L"stone_andesite", L"stone_andesite_smooth"};
|
||||
|
||||
StoneTile::StoneTile(int id) : Tile(id, Material::stone)
|
||||
{
|
||||
icons = nullptr;
|
||||
}
|
||||
|
||||
int StoneTile::getResource(int data, Random *random, int playerBonusLevel)
|
||||
unsigned int StoneTile::getDescriptionId(int iData)
|
||||
{
|
||||
return Tile::cobblestone_Id;
|
||||
if (iData < 0 || iData >= STONE_NAMES_LENGTH) iData = 0;
|
||||
|
||||
return STONE_NAMES[iData];
|
||||
}
|
||||
|
||||
int StoneTile::getSpawnResourcesAuxValue(int data)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
Icon* StoneTile::getTexture(int face, int data)
|
||||
{
|
||||
if (data < 0 || data >= STONE_NAMES_LENGTH)
|
||||
{
|
||||
data = 0;
|
||||
}
|
||||
return icons[data];
|
||||
}
|
||||
|
||||
void StoneTile::registerIcons(IconRegister* iconRegister)
|
||||
{
|
||||
icons = new Icon * [STONE_NAMES_LENGTH];
|
||||
|
||||
for (int i = 0; i < STONE_NAMES_LENGTH; i++)
|
||||
{
|
||||
icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,24 @@ class Random;
|
|||
|
||||
class StoneTile : public Tile
|
||||
{
|
||||
public:
|
||||
static const int GRANITE = 1;
|
||||
static const int POLISHED_GRANITE = 2;
|
||||
static const int DIORITE = 3;
|
||||
static const int POLISHED_DIORITE = 4;
|
||||
static const int ANDESITE = 5;
|
||||
static const int POLISHED_ANDESITE = 6;
|
||||
|
||||
static const int STONE_NAMES_LENGTH = 7;
|
||||
|
||||
static const unsigned int STONE_NAMES[STONE_NAMES_LENGTH];
|
||||
static const wstring TEXTURE_NAMES[];
|
||||
private:
|
||||
Icon** icons;
|
||||
public:
|
||||
StoneTile(int id);
|
||||
virtual int getResource(int data, Random *random, int playerBonusLevel);
|
||||
virtual Icon* getTexture(int face, int data);
|
||||
virtual unsigned int getDescriptionId(int iData = -1);
|
||||
virtual int getSpawnResourcesAuxValue(int data);
|
||||
void registerIcons(IconRegister* iconRegister);
|
||||
};
|
||||
|
|
@ -519,7 +519,8 @@ void Tile::staticCtor()
|
|||
Item::items[pistonStickyBase_Id] = ( new PistonTileItem(Tile::pistonStickyBase_Id - 256) )->setDescriptionId(IDS_TILE_PISTON_STICK_BASE)->setUseDescriptionId(IDS_DESC_STICKY_PISTON);
|
||||
Item::items[cobbleWall_Id] = ( new MultiTextureTileItem(cobbleWall_Id - 256, cobbleWall, (int *)WallTile::COBBLE_NAMES, 2) )->setDescriptionId(IDS_TILE_COBBLESTONE_WALL)->setUseDescriptionId(IDS_DESC_COBBLESTONE_WALL);
|
||||
Item::items[anvil_Id] = ( new AnvilTileItem(anvil) )->setDescriptionId(IDS_TILE_ANVIL)->setUseDescriptionId(IDS_DESC_ANVIL);
|
||||
|
||||
Item::items[dirt_Id] = (new MultiTextureTileItem(Tile::dirt_Id - 256, dirt, (int*)DirtTile::DIRT_NAMES, 3))->setIconName(L"dirt")->setDescriptionId(IDS_TILE_DIRT)->setUseDescriptionId(IDS_DESC_DIRT);
|
||||
Item::items[stone_Id] = (new MultiTextureTileItem(Tile::stone_Id - 256, dirt, (int*)StoneTile::STONE_NAMES, 3))->setIconName(L"stone")->setDescriptionId(IDS_TILE_STONE)->setUseDescriptionId(IDS_DESC_STONE);
|
||||
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue