the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "StructurePiece.h"
4
5class ScatteredFeaturePieces
6{
7public:
8 static void loadStatic();
9
10private:
11 class ScatteredFeaturePiece : public StructurePiece
12 {
13 protected:
14 int width;
15 int height;
16 int depth;
17
18 int heightPosition;
19
20 ScatteredFeaturePiece();
21 ScatteredFeaturePiece(Random *random, int west, int floor, int north, int width, int height, int depth);
22
23 virtual void addAdditonalSaveData(CompoundTag *tag);
24 virtual void readAdditonalSaveData(CompoundTag *tag);
25 bool updateAverageGroundHeight(Level *level, BoundingBox *chunkBB, int offset);
26 };
27
28public:
29 class DesertPyramidPiece : public ScatteredFeaturePiece
30 {
31 public:
32 static StructurePiece *Create() { return new DesertPyramidPiece(); }
33 virtual EStructurePiece GetType() { return eStructurePiece_DesertPyramidPiece; }
34
35 public:
36 static const int TREASURE_ITEMS_COUNT = 10;
37 private:
38 bool hasPlacedChest[4];
39 static WeighedTreasure *treasureItems[TREASURE_ITEMS_COUNT];
40
41 public:
42 DesertPyramidPiece();
43 DesertPyramidPiece(Random *random, int west, int north);
44
45 protected:
46 virtual void addAdditonalSaveData(CompoundTag *tag);
47 virtual void readAdditonalSaveData(CompoundTag *tag);
48
49 bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
50
51 };
52
53 class JunglePyramidPiece : public ScatteredFeaturePiece
54 {
55 public:
56 static StructurePiece *Create() { return new JunglePyramidPiece(); }
57 virtual EStructurePiece GetType() { return eStructurePiece_JunglePyramidPiece; }
58
59 public:
60 static const int TREASURE_ITEMS_COUNT = 10;
61 static const int DISPENSER_ITEMS_COUNT = 1;
62 private:
63 bool placedMainChest;
64 bool placedHiddenChest;
65 bool placedTrap1;
66 bool placedTrap2;
67
68 static WeighedTreasure *treasureItems[TREASURE_ITEMS_COUNT];
69 static WeighedTreasure *dispenserItems[DISPENSER_ITEMS_COUNT];
70
71 public:
72 JunglePyramidPiece();
73 JunglePyramidPiece(Random *random, int west, int north);
74
75 protected:
76 virtual void addAdditonalSaveData(CompoundTag *tag);
77 virtual void readAdditonalSaveData(CompoundTag *tag);
78
79 public:
80 bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
81
82 private:
83 class MossStoneSelector : public BlockSelector
84 {
85 public:
86 void next(Random *random, int worldX, int worldY, int worldZ, bool isEdge);
87 };
88
89 static MossStoneSelector stoneSelector;
90
91 };
92
93 class SwamplandHut : public ScatteredFeaturePiece
94 {
95 public:
96 static StructurePiece *Create() { return new SwamplandHut(); }
97 virtual EStructurePiece GetType() { return eStructurePiece_SwamplandHut; }
98
99 private:
100 bool spawnedWitch;
101
102 public:
103 SwamplandHut();
104 SwamplandHut(Random *random, int west, int north);
105
106 protected:
107 virtual void addAdditonalSaveData(CompoundTag *tag);
108 virtual void readAdditonalSaveData(CompoundTag *tag);
109
110 public:
111 bool postProcess(Level *level, Random *random, BoundingBox *chunkBB);
112 };
113};