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/AutomaticID.h"
7#include "mc/deps/core/utility/optional_ref.h"
8#include "mc/world/level/material/MaterialType.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Block;
14class BlockActor;
15class BlockPos;
16class Dimension;
18class LevelChunk;
19class Material;
20class Vec3;
21struct Bounds;
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, ::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 hasChunksAt(::Bounds const& bounds, bool ignoreClientChunk) const = 0;
58
59 virtual bool hasChunksAt(::BlockPos const& pos, int r, bool ignoreClientChunk) const = 0;
60
61 virtual bool hasChunksAt(::AABB const& bb, bool ignoreClientChunk) const = 0;
62
63 virtual ::DimensionType getDimensionId() const = 0;
64
65 virtual bool shouldFireEvents(::LevelChunk const& c) const = 0;
66
67 virtual void
68 fetchAABBs(::std::vector<::AABB>& shapes, ::AABB const& intersectTestBox, bool withUnloadedChunks) const = 0;
69
70 virtual void fetchCollisionShapes(
71 ::std::vector<::AABB>& shapes,
72 ::AABB const& intersectTestBox,
73 bool withUnloadedChunks,
75 ::std::vector<::AABB>* tempShapes
76 ) const = 0;
77
78 virtual void fetchCollisionShapesAndBlocks(
79 ::std::vector<::BlockSourceVisitor::CollisionShape>& shapes,
80 ::AABB const& intersectTestBox,
81 bool withUnloadedChunks,
83 ::std::vector<::AABB>* tempShapes
84 ) const = 0;
85
86 virtual ::AABB getTallestCollisionShape(
87 ::AABB const& intersectTestBox,
88 float* actualSurfaceOffset,
89 bool withUnloadedChunks,
91 ) const = 0;
92
93 virtual float getBrightness(::BlockPos const& pos) const = 0;
94 // NOLINTEND
95
96public:
97 // virtual function thunks
98 // NOLINTBEGIN
99
100 // NOLINTEND
101};
Definition AABB.h:18
Definition BlockActor.h:30
Definition BlockPos.h:19
Definition Block.h:43
Definition Dimension.h:86
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:25
Definition LevelChunk.h:79
Definition Material.h:8
Definition Vec3.h:10
Definition optional_ref.h:10
Definition CollisionShape.h:16
Definition Bounds.h:8