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