* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a4399472.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
#include "stdafx.h"
|
|
#include "net.minecraft.world.entity.player.h"
|
|
#include "net.minecraft.world.level.h"
|
|
#include "net.minecraft.world.h"
|
|
#include "net.minecraft.h"
|
|
#include "WorkbenchTile.h"
|
|
|
|
WorkbenchTile::WorkbenchTile(int id) : Tile(id, Material::wood)
|
|
{
|
|
iconTop = NULL;
|
|
iconFront = NULL;
|
|
}
|
|
|
|
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");
|
|
}
|
|
|
|
// 4J-PB - Adding a TestUse for tooltip display
|
|
bool WorkbenchTile::TestUse()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool WorkbenchTile::use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly/*=false*/) // 4J added soundOnly param
|
|
{
|
|
if( soundOnly ) return false;
|
|
if (level->isClientSide)
|
|
{
|
|
return true;
|
|
}
|
|
player->startCrafting(x, y, z);
|
|
//player->openFireworks(x, y, z);
|
|
return true;
|
|
} |