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;
16class LevelChunk;
17class Material;
18class Vec3;
19struct Bounds;
20struct DimensionType;
21namespace BlockSourceVisitor { struct CollisionShape; }
22// clang-format on
23
25public:
26 // virtual functions
27 // NOLINTBEGIN
28 virtual ~IConstBlockSource() = default;
29
30 virtual ::Block const& getBlock(::BlockPos const& pos) const = 0;
31
32 virtual ::Block const& getBlock(::BlockPos const& pos, uint layer) const = 0;
33
34 virtual ::BlockActor const* getBlockEntity(::BlockPos const& pos) const = 0;
35
36 virtual ::Block const& getExtraBlock(::BlockPos const& pos) const = 0;
37
38 virtual ::Block const& getLiquidBlock(::BlockPos const& pos) const = 0;
39
40 virtual bool hasBlock(::BlockPos const& pos) const = 0;
41
42 virtual bool containsAnyLiquid(::AABB const& box) const = 0;
43
44 virtual bool containsMaterial(::AABB const& box, ::SharedTypes::v1_26_20::MaterialType material) const = 0;
45
46 virtual bool isInWall(::Vec3 const& pos) const = 0;
47
48 virtual bool isUnderWater(::BlockPos const& pos, ::Block const& block) const = 0;
49
50 virtual ::Material const& getMaterial(::BlockPos const& pos) const = 0;
51
52 virtual ::Material const& getMaterial(int x, int y, int z) const = 0;
53
54 virtual bool hasBorderBlock(::BlockPos const pos) const = 0;
55
56 virtual bool hasChunksAt(::Bounds const& bounds, bool ignoreClientChunk) const = 0;
57
58 virtual bool hasChunksAt(::BlockPos const& pos, int r, bool ignoreClientChunk) const = 0;
59
60 virtual bool hasChunksAt(::AABB const& bb, bool ignoreClientChunk) const = 0;
61
62 virtual ::DimensionType getDimensionId() const = 0;
63
64 virtual bool shouldFireEvents(::LevelChunk const& c) const = 0;
65
66 virtual void
67 fetchAABBs(::std::vector<::AABB>& shapes, ::AABB const& intersectTestBox, bool withUnloadedChunks) const = 0;
68
69 virtual void fetchCollisionShapes(
70 ::std::vector<::AABB>& shapes,
71 ::AABB const& intersectTestBox,
72 bool withUnloadedChunks,
74 ::std::vector<::AABB>* tempShapes
75 ) const = 0;
76
77 virtual void fetchCollisionShapesAndBlocks(
78 ::std::vector<::BlockSourceVisitor::CollisionShape>& shapes,
79 ::AABB const& intersectTestBox,
80 bool withUnloadedChunks,
82 ::std::vector<::AABB>* tempShapes
83 ) const = 0;
84
85 virtual ::AABB getTallestCollisionShape(
86 ::AABB const& intersectTestBox,
87 float* actualSurfaceOffset,
88 bool withUnloadedChunks,
90 ) const = 0;
91
92 virtual float getBrightness(::BlockPos const& pos) const = 0;
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98
99 // NOLINTEND
100};
Definition AABB.h:18
Definition BlockActor.h:30
Definition BlockPos.h:21
Definition Block.h:69
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition LevelChunk.h:87
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