mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-06-25 15:15:33 +00:00
TU24
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "net.minecraft.h"
|
||||
#include "TrapDoorTile.h"
|
||||
|
||||
|
||||
TrapDoorTile::TrapDoorTile(int id, Material *material) : Tile(id, material,isSolidRender())
|
||||
{
|
||||
float r = 0.5f;
|
||||
@@ -17,11 +18,13 @@ bool TrapDoorTile::blocksLight()
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool TrapDoorTile::isSolidRender(bool isServerLevel)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool TrapDoorTile::isCubeShaped()
|
||||
{
|
||||
return false;
|
||||
@@ -37,31 +40,37 @@ int TrapDoorTile::getRenderShape()
|
||||
return Tile::SHAPE_BLOCK;
|
||||
}
|
||||
|
||||
|
||||
AABB *TrapDoorTile::getTileAABB(Level *level, int x, int y, int z)
|
||||
{
|
||||
updateShape(level, x, y, z);
|
||||
return Tile::getTileAABB(level, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
AABB *TrapDoorTile::getAABB(Level *level, int x, int y, int z)
|
||||
{
|
||||
updateShape(level, x, y, z);
|
||||
return Tile::getAABB(level, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
void TrapDoorTile::updateShape(LevelSource *level, int x, int y, int z, int forceData, shared_ptr<TileEntity> forceEntity) // 4J added forceData, forceEntity param
|
||||
{
|
||||
setShape(level->getData(x, y, z));
|
||||
}
|
||||
|
||||
|
||||
void TrapDoorTile::updateDefaultShape()
|
||||
{
|
||||
float r = 3 / 16.0f;
|
||||
setShape(0, 0.5f - r / 2, 0, 1, 0.5f + r / 2, 1);
|
||||
}
|
||||
|
||||
|
||||
void TrapDoorTile::setShape(int data)
|
||||
{
|
||||
|
||||
float r = 3 / 16.0f;
|
||||
if ((data & TOP_MASK) != 0)
|
||||
{
|
||||
@@ -80,9 +89,10 @@ void TrapDoorTile::setShape(int data)
|
||||
}
|
||||
}
|
||||
|
||||
bool TrapDoorTile::isTrapDoor(int tile)
|
||||
|
||||
void TrapDoorTile::attack(Level *level, int x, int y, int z, shared_ptr<Player> player)
|
||||
{
|
||||
return (tile == Tile::trapdoor_Id || tile == Tile::iron_trapdoor_Id);
|
||||
//use(level, x, y, z, player, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// 4J-PB - Adding a TestUse for tooltip display
|
||||
|
||||
Reference in New Issue
Block a user