LeviLamina
Loading...
Searching...
No Matches
IConstBlockSource.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/optional_ref.h"
7#include "mc/deps/shared_types/v1_26_20/block/MaterialType.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Block;
13class BlockActor;
14class BlockPos;
15class ChunkPos;
17class LevelChunk;
18class Material;
19class Vec3;
20struct Bounds;
21struct DimensionType;
22namespace BlockSourceVisitor { struct CollisionShape; }
23// clang-format on
24
26public:
27 // virtual functions
28 // NOLINTBEGIN
29 virtual ~IConstBlockSource() = default;
30
31 virtual ::Block const& getBlock(::BlockPos const& pos) const = 0;
32
33 virtual ::Block const& getBlock(::BlockPos const& pos, uint layer) const = 0;
34
35 virtual ::BlockActor const* getBlockEntity(::BlockPos const& pos) const = 0;
36
37 virtual ::Block const& getExtraBlock(::BlockPos const& pos) const = 0;
38
39 virtual ::Block const& getLiquidBlock(::BlockPos const& pos) const = 0;
40
41 virtual bool hasBlock(::BlockPos const& pos) const = 0;
42
43 virtual bool containsAnyLiquid(::AABB const& box) const = 0;
44
45 virtual bool containsMaterial(::AABB const& box, ::SharedTypes::v1_26_20::MaterialType material) const = 0;
46
47 virtual bool isInWall(::Vec3 const& pos) const = 0;
48
49 virtual bool isUnderWater(::BlockPos const& pos, ::Block const& block) const = 0;
50
51 virtual ::Material const& getMaterial(::BlockPos const& pos) const = 0;
52
53 virtual ::Material const& getMaterial(int x, int y, int z) const = 0;
54
55 virtual bool hasBorderBlock(::BlockPos const pos) const = 0;
56
57 virtual bool hasChunk(::ChunkPos const& pos, bool serverSideOnly) const = 0;
58
59 virtual bool hasChunksAt(::Bounds const& bounds, bool ignoreClientChunk) const = 0;
60
61 virtual bool hasChunksAt(::BlockPos const& pos, int r, bool ignoreClientChunk) const = 0;
62
63 virtual bool hasChunksAt(::AABB const& bb, bool ignoreClientChunk) const = 0;
64
65 virtual ::DimensionType getDimensionId() const = 0;
66
67 virtual bool shouldFireEvents(::LevelChunk const& c) const = 0;
68
69 virtual void
70 fetchAABBs(::std::vector<::AABB>& shapes, ::AABB const& intersectTestBox, bool withUnloadedChunks) const = 0;
71
72 virtual void fetchCollisionShapes(
73 ::std::vector<::AABB>& shapes,
74 ::AABB const& intersectTestBox,
75 bool withUnloadedChunks,
77 ::std::vector<::AABB>* tempShapes
78 ) const = 0;
79
80 virtual void fetchCollisionShapesAndBlocks(
81 ::std::vector<::BlockSourceVisitor::CollisionShape>& shapes,
82 ::AABB const& intersectTestBox,
83 bool withUnloadedChunks,
85 ::std::vector<::AABB>* tempShapes
86 ) const = 0;
87
88 virtual ::AABB getTallestCollisionShape(
89 ::AABB const& intersectTestBox,
90 float* actualSurfaceOffset,
91 bool withUnloadedChunks,
93 ) const = 0;
94
95 virtual float getBrightness(::BlockPos const& pos) const = 0;
96 // NOLINTEND
97};
Definition AABB.h:18
Definition BlockActor.h:28
Definition BlockPos.h:17
Definition Block.h:42
Definition ChunkPos.h:12
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:25
Definition LevelChunk.h:75
Definition Material.h:8
Definition Vec3.h:10
Definition optional_ref.h:10
Definition CollisionShape.h:16
Definition Bounds.h:8
Definition DimensionType.h:5