mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-11-19 03:53:03 +01:00
Co-authored-by: DrPerkyLegit <116128211+DrPerkyLegit@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Anaël <60509176+Bakoubak@users.noreply.github.com> Reviewed-on: https://git.neolegacy.dev/neoStudiosLCE/neoLegacy/pulls/4205
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
#include "stdafx.h"
|
|
#include "net.minecraft.world.level.h"
|
|
#include "net.minecraft.world.entity.item.h"
|
|
#include "SandTile.h"
|
|
#include "FireTile.h"
|
|
#include "net.minecraft.world.h"
|
|
|
|
const unsigned int SandTile::SAND_NAMES[SAND_NAMES_LENGTH] = { IDS_TILE_SAND, IDS_TILE_RED_SAND };
|
|
const wstring SandTile::TEXTURE_NAMES[] = { L"sand", L"red_sand" };
|
|
|
|
SandTile::SandTile(int type, bool isSolidRender) : HeavyTile(type, Material::sand, isSolidRender)
|
|
{
|
|
icons = nullptr;
|
|
}
|
|
|
|
int SandTile::getSpawnResourcesAuxValue(int data)
|
|
{
|
|
if (data < 0 || data >= SAND_NAMES_LENGTH) data = 0;
|
|
return data;
|
|
}
|
|
|
|
Icon* SandTile::getTexture(int face, int data)
|
|
{
|
|
if (data < 0 || data >= SAND_NAMES_LENGTH) data = 0;
|
|
return icons[data];
|
|
}
|
|
|
|
void SandTile::registerIcons(IconRegister* iconRegister)
|
|
{
|
|
icons = new Icon * [SAND_NAMES_LENGTH];
|
|
for (int i = 0; i < SAND_NAMES_LENGTH; i++)
|
|
{
|
|
icons[i] = iconRegister->registerIcon(TEXTURE_NAMES[i]);
|
|
}
|
|
}
|
|
unsigned int SandTile::getDustColor(int data)
|
|
{
|
|
return (data & 1) ? 0xffa95821 : 0xffdbd3a0;
|
|
}
|