mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-03 06:29:05 +01:00
Patch Notes: Blocks + Colored shulker boxes + Concrete powder + Concrete + Glazed terracotta Items + Shulker shell + Iron nugget UI Changes + Added Custom Controls to Keyboard & Mouse, as well as Controller + Added Custom SuperFlat + Added Edit Server Menu + Added Firework Crafting Feature Changes + Host Options + Added Pick Block + Added off-hand slot for maps and arrows. Bug Fixes & changes + TU47: Banner hitbox wrong (and inventory model fixed) + TU47/48: Ice not melting properly + TU48: Dead bushes not dropping sticks + TU48: Guardians and polar bears not dropping cooked fish when on fire + TU48: Bonus chest missing saplings and seeds + TU48: Frosted ice obtainable + TU48: Hoppers not collecting items + TU48: Wither skeletons spawning in 2-high gaps + TU48: End crystals exploding with “TNT Explodes” off + TU48: Tamed ocelots staying hostile + TU48: Signs not placing on tall grass + TU51: Skeleton hitbox wrong + TU53: Fall damage in shallow water + TU53: Squids not spawning in man-made pools + Elytra has been improved to be more accurate to the source material + Removed Spectral Arrow from crafting + Fixed several broken item descriptions + You can no longer cook Pufferfish or Clownfish + Fixed scaling issue with paperdoll and chat + Iron and gold armor can now be smelted into nuggets. + More items can now be used as fuel in a furnace. + Using a firework rocket while gliding with elytra will now give the player a boost. + Changed the color of dyes, wool, carpets, and banners. + Reordered all colored blocks and items in the Creative inventory. Banners now have the same order of colors as all other colored blocks and items. + Fishing rods can now hook on entities without causing knockback or pseudo-damage. + Fixed banner crafting + Fixed Map colors for certain blocks + Fixed Path block height + Fixed String block issues + Fixed Item frame culling. + Fixed Tutorial world NBT/Block State issues + Fixed World Slider + Fixed Enderman AI + Fixed Player animation bug + HUD Flash text changes + Generation accuracy changes + Many other small accuracy changes and fixes
79 lines
3.1 KiB
C++
79 lines
3.1 KiB
C++
#pragma once
|
|
#include "Tile.h"
|
|
#include "Definitions.h"
|
|
|
|
class Player;
|
|
class HitResult;
|
|
class ChunkRebuildData;
|
|
|
|
class DoorTile : public Tile
|
|
{
|
|
friend class Tile;
|
|
friend class ChunkRebuildData;
|
|
|
|
private:
|
|
static const int TEXTURE_NORMAL = 0;
|
|
static const int TEXTURE_FLIPPED = 1;
|
|
|
|
public:
|
|
static const int UPPER_BIT = 8;
|
|
static const int C_DIR_MASK = 3;
|
|
static const int C_OPEN_MASK = 4;
|
|
static const int C_LOWER_DATA_MASK = 7;
|
|
static const int C_IS_UPPER_MASK = 8;
|
|
static const int C_RIGHT_HINGE_MASK = 16;
|
|
wstring doorType;
|
|
|
|
private:
|
|
static const int DOOR_TILE_TEXTURE_COUNT = 4;
|
|
int texBase;
|
|
Icon *iconTop[2];
|
|
Icon *iconBottom[2];
|
|
|
|
protected:
|
|
DoorTile(int id, Material *material, const wstring& doorType);
|
|
public:
|
|
virtual Icon *getTexture(int face, int data);
|
|
virtual Icon *getTexture(LevelSource *level, int x, int y, int z, int face);
|
|
virtual void registerIcons(IconRegister *iconRegister);
|
|
virtual bool blocksLight();
|
|
virtual bool isSolidRender(bool isServerLevel = false);
|
|
virtual bool isCubeShaped();
|
|
virtual int getRenderShape();
|
|
virtual AABB *getTileAABB(Level *level, int x, int y, int z);
|
|
virtual AABB *getAABB(Level *level, int x, int y, int z);
|
|
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param
|
|
int getDir(LevelSource *level, int x, int y, int z);
|
|
bool isOpen(LevelSource *level, int x, int y, int z);
|
|
private:
|
|
using Tile::setShape;
|
|
virtual void setShape(int compositeData);
|
|
public:
|
|
virtual void attack(Level *level, int x, int y, int z, shared_ptr<Player> player);
|
|
virtual bool TestUse();
|
|
virtual bool 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
|
|
void setOpen(Level *level, int x, int y, int z, bool shouldOpen);
|
|
int getToggleSound(bool open);
|
|
virtual void neighborChanged(Level *level, int x, int y, int z, int type);
|
|
virtual int getResource(int data, Random *random, int playerBonusLevel);
|
|
virtual HitResult *clip(Level *level, int xt, int yt, int zt, Vec3 *a, Vec3 *b);
|
|
virtual bool mayPlace(Level *level, int x, int y, int z);
|
|
static bool isOpen(int data);
|
|
static bool isWoodenDoor(int tileId);
|
|
virtual int getPistonPushReaction();
|
|
int getCompositeData(LevelSource *level, int x, int y, int z);
|
|
virtual int cloneTileId(Level *level, int x, int y, int z);
|
|
virtual void playerWillDestroy(Level *level, int x, int y, int z, int data, shared_ptr<Player> player);
|
|
|
|
virtual void createBlockStateDefinition() override;
|
|
virtual int convertBlockStateToLegacyData(BlockState *state) override;
|
|
virtual int defaultBlockState() override;
|
|
|
|
Tile::BlockState getBlockState(LevelSource *level, int x, int y, int z);
|
|
Tile::BlockState getBlockState(int data);
|
|
|
|
void fillVirtualBlockStateProperties(Tile::BlockState *state, LevelSource *level, const BlockPos &pos);
|
|
|
|
virtual bool use(Level *level, const BlockPos &pos, Tile::BlockState *state, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly = false);
|
|
};
|