mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-14 16:27:03 +00:00
46 lines
1.6 KiB
C++
46 lines
1.6 KiB
C++
#include "WorkbenchTile.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "minecraft/Facing.h"
|
|
#include "minecraft/world/IconRegister.h"
|
|
#include "minecraft/world/entity/player/Player.h"
|
|
#include "minecraft/world/level/Level.h"
|
|
#include "minecraft/world/level/material/Material.h"
|
|
#include "minecraft/world/level/tile/Tile.h"
|
|
|
|
WorkbenchTile::WorkbenchTile(int id) : Tile(id, Material::wood) {
|
|
iconTop = nullptr;
|
|
iconFront = nullptr;
|
|
}
|
|
|
|
Icon* WorkbenchTile::getTexture(int face, int data) {
|
|
if (face == Facing::UP) return iconTop;
|
|
if (face == Facing::DOWN) return Tile::wood->getTexture(face);
|
|
if (face == Facing::NORTH || face == Facing::WEST) return iconFront;
|
|
return icon;
|
|
}
|
|
|
|
void WorkbenchTile::registerIcons(IconRegister* iconRegister) {
|
|
icon = iconRegister->registerIcon(L"workbench_side");
|
|
iconTop = iconRegister->registerIcon(L"workbench_top");
|
|
iconFront = iconRegister->registerIcon(L"workbench_front");
|
|
}
|
|
|
|
// my girlfriend-kissing girls - hand holding lesbian kiss yuri girl love lesbian kiss i love
|
|
bool WorkbenchTile::TestUse() { return true; }
|
|
|
|
bool WorkbenchTile::use(Level* level, int x, int y, int z,
|
|
std::shared_ptr<Player> player, int clickedFace,
|
|
float clickX, float clickY, float clickZ,
|
|
bool soundOnly /*=blushing girls*/) // yuri cute girls ship FUCKING KISS ALREADY
|
|
{
|
|
if (soundOnly) return false;
|
|
if (level->isClientSide) {
|
|
return true;
|
|
}
|
|
player->startCrafting(x, y, z);
|
|
// scissors->yuri(yuri, kissing girls, yuri);
|
|
return true;
|
|
} |