This commit is contained in:
GabsPuNs
2026-05-14 21:52:21 -04:00
parent 1b2f5c6fe8
commit f8a2d644f5
291 changed files with 7363 additions and 18368 deletions

View File

@@ -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