File BlockLegacy.hpp¶
Enums
-
enum BlockSupportType¶
Values:
-
enum BlockProperty¶
Values:
-
enum Flip¶
Values:
-
class BlockLegacy : public BlockComponentStorage¶
Subclassed by ActorBlock
Public Functions
-
virtual ~BlockLegacy()¶
-
virtual std::shared_ptr<BlockActor> newBlockEntity(const BlockPos &pos, const Block &block) const¶
-
virtual bool shouldConnectToRedstone(BlockSource&, const BlockPos&, Direction::Type) const¶
-
virtual HitResult clip(const Block&, const BlockSource&, const BlockPos&, const Vec3&, const Vec3&, ShapeType, optional_ref<const GetCollisionShapeInterface>) const¶
-
virtual AABB getCollisionShape(const Block&, const IConstBlockSource&, const BlockPos&, optional_ref<const GetCollisionShapeInterface>) const¶
-
virtual bool getCollisionShapeForCamera(AABB&, const Block&, const IConstBlockSource&, const BlockPos&) const¶
-
virtual bool addCollisionShapes(const Block&, const IConstBlockSource&, const BlockPos&, const AABB*, std::vector<AABB>&, optional_ref<const GetCollisionShapeInterface>) const¶
-
virtual void addAABBs(const Block&, const IConstBlockSource&, const BlockPos&, const AABB*, std::vector<AABB>&) const¶
-
virtual const AABB &getOutline(const Block&, const IConstBlockSource&, const BlockPos&, AABB&) const¶
-
virtual const AABB &getVisualShapeInWorld(const Block&, const IConstBlockSource&, const BlockPos&, AABB&) const¶
-
virtual bool getLiquidClipVolume(const Block&, BlockSource&, const BlockPos&, AABB&) const¶
-
virtual bool isObstructingChests(BlockSource ®ion, const BlockPos &pos, const Block &thisBlock) const¶
-
virtual void onProjectileHit(BlockSource ®ion, const BlockPos &pos, const Actor &projectile) const¶
-
virtual void onLightningHit(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual bool liquidCanFlowIntoFromDirection(unsigned char, std::function<const Block&>(const BlockPos&))¶
-
virtual void _unknown_20()¶
-
virtual void _unknown_21()¶
-
virtual void _unknown_22()¶
-
virtual bool canProvideSupport(const Block &block, unsigned char face, BlockSupportType type) const¶
-
virtual bool canConnect(const Block &otherBlock, unsigned char toOther, const Block &thisBlock) const¶
-
virtual void _unknown_26()¶
-
virtual const CopperBehavior *tryGetCopperBehavior() const¶
-
virtual void _unknown_28()¶
-
virtual void _unknown_29()¶
-
virtual void _unknown_30()¶
-
virtual bool isContainerBlock() const¶
-
virtual void _unknown_32()¶
-
virtual bool isWaterBlocking() const¶
-
virtual void _unknown_34()¶
-
virtual void _unknown_35()¶
-
virtual void _unknown_36()¶
-
virtual void _unknown_37()¶
-
virtual bool isStairBlock() const¶
-
virtual bool isSlabBlock() const¶
-
virtual bool isDoubleSlabBlock() const¶
-
virtual void _unknown_41()¶
-
virtual void _unknown_42()¶
-
virtual void _unknown_43()¶
-
virtual void _unknown_44()¶
-
virtual void _unknown_45()¶
-
virtual void _unknown_46()¶
-
virtual bool isSignalSource() const¶
-
virtual bool canBeOriginalSurface() const¶
-
virtual void _unknown_49()¶
-
virtual bool isValidAuxValue(int value) const¶
-
virtual bool canFillAtPos(BlockSource ®ion, const BlockPos &pos, const Block &block) const¶
-
virtual void onFillBlock(BlockSource ®ion, const BlockPos &pos, const Block &block) const¶
-
virtual int getDirectSignal(BlockSource ®ion, const BlockPos &pos, int dir) const¶
-
virtual void _unknown_55()¶
-
virtual void _unknown_56()¶
-
virtual bool canContainLiquid() const¶
-
virtual std::optional<HashedString> getRequiredMedium() const¶
-
virtual void _unknown_59()¶
-
virtual void handlePrecipitation(BlockSource ®ion, const BlockPos &pos, float downfallAmount, float temperature) const¶
-
virtual bool canBeUsedInCommands(const BaseGameVersion &baseGameVersion) const¶
-
virtual bool checkIsPathable(Actor &entity, const BlockPos &lastPathPos, const BlockPos &pathPos) const¶
-
virtual bool shouldDispense(BlockSource ®ion, Container &container) const¶
-
virtual bool dispense(BlockSource ®ion, Container &container, int slot, const Vec3 &pos, unsigned char face) const¶
-
virtual void transformOnFall(BlockSource ®ion, const BlockPos &pos, Actor *entity, float fallDistance) const¶
-
virtual void onRedstoneUpdate(BlockSource ®ion, const BlockPos &pos, int strength, bool isFirstTime) const¶
-
virtual void onMove(BlockSource ®ion, const BlockPos &from, const BlockPos &to) const¶
-
virtual bool detachesOnPistonMove(BlockSource&, BlockPos const&) const¶
-
virtual void movedByPiston(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void onStructureBlockPlace(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void onStructureNeighborBlockPlace(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void setupRedstoneComponent(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual BlockProperty getRedstoneProperty(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void updateEntityAfterFallOn(const BlockPos &pos, UpdateEntityAfterFallOnInterface &entity) const¶
-
virtual void _unknown_75()¶
-
virtual bool isPreservingMediumWhenPlaced(const BlockLegacy *medium) const¶
-
virtual bool isFilteredOut(BlockRenderLayer heldItemRenderLayer) const¶
-
virtual bool canRenderSelectionOverlay(BlockRenderLayer) const¶
-
virtual bool onFertilized(BlockSource ®ion, const BlockPos &pos, Actor *actor, FertilizerType fType) const¶
-
virtual bool mayConsumeFertilizer(BlockSource ®ion) const¶
-
virtual bool canBeFertilized(BlockSource ®ion, const BlockPos &pos, const Block &aboveBlock) const¶
-
virtual bool mayPick() const¶
-
virtual bool mayPick(const BlockSource ®ion, const Block &block, bool liquid) const¶
-
virtual bool mayPlace(BlockSource ®ion, const BlockPos &pos, unsigned char face) const¶
-
virtual bool mayPlace(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual bool mayPlaceOn(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual bool tryToPlace(BlockSource ®ion, const BlockPos &pos, const Block &block, const ActorBlockSyncMessage *syncMsg) const¶
-
virtual bool tryToTill(BlockSource ®ion, const BlockPos &pos, Actor &entity, ItemStack &item) const¶
-
virtual bool breaksFallingBlocks(const Block &block, BaseGameVersion version) const¶
-
virtual void destroy(BlockSource ®ion, const BlockPos &pos, const Block &block, Actor *entitySource) const¶
-
virtual void neighborChanged(BlockSource ®ion, const BlockPos &pos, const BlockPos &neighborPos) const¶
-
virtual const Block *playerWillDestroy(Player &player, const BlockPos &pos, const Block &block) const¶
-
virtual ItemInstance asItemInstance(const Block &block, const BlockActor *a4) const¶
-
virtual void spawnAfterBreak(BlockSource&, const Block&, const BlockPos&, const ResourceDropsContext&) const¶
-
virtual const Block &getPlacementBlock(const Actor&, const BlockPos&, unsigned char, const Vec3&, int) const¶
-
virtual int calcVariant(BlockSource ®ion, const BlockPos &pos, const mce::Color &baseColor) const¶
-
virtual bool isAttachedTo(BlockSource ®ion, const BlockPos &pos, BlockPos &outAttachedTo) const¶
-
virtual bool shouldTriggerEntityInside(BlockSource ®ion, const BlockPos &pos, Actor &entity) const¶
-
virtual bool canBeBuiltOver(BlockSource ®ion, const BlockPos &pos, const BlockItem &newItem) const¶
-
virtual bool canBeBuiltOver(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void triggerEvent(BlockSource ®ion, const BlockPos &pos, int b0, int b1) const¶
-
virtual void executeEvent(BlockSource ®ion, const BlockPos &pos, const Block &block, const std::string &eventName, Actor &sourceEntity) const¶
-
virtual const MobSpawnerData *getMobToSpawn(const SpawnConditions &conditions, BlockSource ®ion) const¶
-
virtual void _unknown_109()¶
-
virtual void _unknown_110()¶
-
virtual bool hasComparatorSignal() const¶
-
virtual int getComparatorSignal(BlockSource ®ion, const BlockPos &pos, const Block &block, unsigned char dir) const¶
-
virtual bool canSlide(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void _unknown_114()¶
-
virtual bool canSpawnAt(const BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void notifySpawnedAt(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void _unknown_117()¶
-
virtual int getIconYOffset() const¶
-
virtual bool isAuxValueRelevantForPicking() const¶
-
virtual int getColor(BlockSource ®ion, const BlockPos &pos, const Block &block) const¶
-
virtual int getColorAtPos(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual int getColorForParticle(BlockSource ®ion, const BlockPos &pos, const Block &block) const¶
-
virtual bool isSeasonTinted(const Block &block, BlockSource ®ion, const BlockPos &p) const¶
-
virtual void onGraphicsModeChanged(const BlockGraphicsModeChangeContext &context)¶
-
virtual int telemetryVariant(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void animateTickBedrockLegacy(BlockSource&, const BlockPos&, Random&) const¶
-
virtual void animateTick(BlockSource ®ion, const BlockPos &pos, Random &random) const¶
-
virtual BlockLegacy &init()¶
-
virtual void _addHardCodedBlockComponents(const Experiments&)¶
-
short getBlockItemId()¶
-
void setDestroyTime(float destroyTime, float explosionResistance)¶
-
void addState(const BlockState &blockState)¶
Public Members
-
BlockLegacy::NameInfo mNameInfo¶
-
BlockActorType mBlockEntityType¶
-
unsigned char mLightBlock¶
-
unsigned char mLightEmission¶
-
float mDestroySpeed¶
-
float mExplosionResistance¶
-
unsigned short mID¶
-
BaseGameVersion mMinRequiredBaseGameVersion¶
-
bool mIsVanilla¶
-
std::map<uint64_t, BlockStateInstance> mStates¶
-
std::unordered_map<HashedString, uint64_t> mStateNameMap¶
-
uint64_t mCreativeEnumState¶
-
std::vector<std::shared_ptr<BlockLegacy::AlteredStateCollection>> mAlteredStateCollections¶
Protected Functions
-
virtual Brightness getLightEmission(const Block &a2) const¶
-
virtual void onRemove(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void onExploded(BlockSource ®ion, const BlockPos &pos, Actor *entitySource) const¶
-
virtual void onStandOn(EntityContext &entity, const BlockPos &pos) const¶
-
virtual void onPlace(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual void _unknown_147()¶
-
virtual void tick(BlockSource ®ion, const BlockPos &pos, Random &random) const¶
-
virtual void randomTick(BlockSource ®ion, const BlockPos &pos, Random &random) const¶
-
virtual bool isInteractive() const¶
-
virtual void _unknown_153()¶
-
virtual bool canSurvive(BlockSource ®ion, const BlockPos &pos) const¶
-
virtual BlockRenderLayer getRenderLayer() const¶
-
virtual BlockRenderLayer getRenderLayer(const Block &block, BlockSource &a3, const BlockPos &pos) const¶
-
virtual int getExtraRenderLayers() const¶
-
virtual Brightness getLight(const Block&) const¶
-
virtual Brightness getEmissiveBrightness(const Block &a2) const¶
Private Functions
-
virtual void _onHitByActivatingAttack(BlockSource&, const BlockPos&, Actor*) const¶
-
virtual void entityInside(BlockSource &a2, const BlockPos &a3, Actor &a4) const¶
Friends
- friend class Block
-
class AlteredStateCollection¶
Public Functions
-
virtual std::optional<int> getState(const BlockLegacy &blockLegacy, int blockData) const = 0¶
-
virtual const Block *setState(const BlockLegacy&, int, int) const = 0¶
-
virtual ~AlteredStateCollection() = default¶
Public Members
-
std::reference_wrapper<const BlockState> mBlockState¶
-
virtual std::optional<int> getState(const BlockLegacy &blockLegacy, int blockData) const = 0¶
-
struct NameInfo¶
-
virtual ~BlockLegacy()¶
-
namespace Direction¶