* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides
53 lines
835 B
C++
53 lines
835 B
C++
#include "stdafx.h"
|
|
#include "net.minecraft.world.entity.h"
|
|
#include "net.minecraft.world.item.h"
|
|
#include "WebTile.h"
|
|
|
|
WebTile::WebTile(int id) : Tile(id, Material::web)
|
|
{
|
|
}
|
|
|
|
|
|
void WebTile::entityInside(Level *level, int x, int y, int z, shared_ptr<Entity> entity)
|
|
{
|
|
entity->makeStuckInWeb();
|
|
}
|
|
|
|
|
|
bool WebTile::isSolidRender(bool isServerLevel)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
AABB *WebTile::getAABB(Level *level, int x, int y, int z)
|
|
{
|
|
return nullptr;
|
|
}
|
|
|
|
|
|
int WebTile::getRenderShape()
|
|
{
|
|
return Tile::SHAPE_CROSS_TEXTURE;
|
|
}
|
|
|
|
bool WebTile::blocksLight()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool WebTile::isCubeShaped()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
int WebTile::getResource(int data, Random *random, int playerBonusLevel)
|
|
{
|
|
// @TODO: Explosives currently also give string back. Fix?
|
|
return Item::string->id;
|
|
}
|
|
|
|
bool WebTile::isSilkTouchable()
|
|
{
|
|
return true;
|
|
} |