aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/galacticgreg/api/enums/properties/AsteroidPropertyBuilder.java
blob: bf5fecc78adeb8230cd9307b1f4fd1d4aff3fcbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package galacticgreg.api.enums.properties;

public class AsteroidPropertyBuilder {

    public int probability;
    public int sizeMin, sizeMax;
    public int specialBlockChance;
    public OreSpawnPropertyBuilder oreSpawn;
    public LootPropertyBuilder loot;

    public static class OreSpawnPropertyBuilder {

        public int baseOreChance;
        public boolean obeyHeighLimits;
        public boolean oresOnlyInsideAsteroids;
        public int primaryToRareOreOffset;
        public int smallOreChance;

        public OreSpawnPropertyBuilder baseOreChance(int baseOreChance) {
            this.baseOreChance = baseOreChance;
            return this;
        }

        public OreSpawnPropertyBuilder doesObeyingHeightLimits(boolean obeyHeighLimits) {
            this.obeyHeighLimits = obeyHeighLimits;
            return this;
        }

        public OreSpawnPropertyBuilder AreOresOnlyInsideAsteroids(boolean oresOnlyInsideAsteroids) {
            this.oresOnlyInsideAsteroids = oresOnlyInsideAsteroids;
            return this;
        }

        public OreSpawnPropertyBuilder primaryToRareOreOffset(int primaryToRareOreOffset) {
            this.primaryToRareOreOffset = primaryToRareOreOffset;
            return this;
        }

        public OreSpawnPropertyBuilder smallOreChance(int smallOreChance) {
            this.smallOreChance = smallOreChance;
            return this;
        }

    }

    public static class LootPropertyBuilder {

        public int lootChestChance;
        public int lootChestItemCount;
        public int lootChestTable;
        public boolean randomizeLootItemCount;

        public LootPropertyBuilder lootChestChance(int lootChestChance) {
            this.lootChestChance = lootChestChance;
            return this;
        }

        public LootPropertyBuilder lootChestItemCount(int lootChestItemCount) {
            this.lootChestItemCount = lootChestItemCount;
            return this;
        }

        public LootPropertyBuilder lootChestTable(int lootChestTable) {
            this.lootChestTable = lootChestTable;
            return this;
        }

        public LootPropertyBuilder isLootItemCountRandomized(boolean randomizeLootItemCount) {
            this.randomizeLootItemCount = randomizeLootItemCount;
            return this;
        }

    }

    public AsteroidPropertyBuilder() {
        oreSpawn = new OreSpawnPropertyBuilder();
        loot = new LootPropertyBuilder();
    }

    public AsteroidPropertyBuilder probability(int probability) {
        this.probability = probability;
        return this;
    }

    public AsteroidPropertyBuilder sizeRange(int sizeMin, int sizeMax) {
        this.sizeMin = sizeMin;
        this.sizeMax = sizeMax;
        return this;
    }

    public AsteroidPropertyBuilder specialBlockChance(int specialBlockChance) {
        this.specialBlockChance = specialBlockChance;
        return this;
    }

    public AsteroidPropertyBuilder oreSpawn(OreSpawnPropertyBuilder oreSpawnPropertyBuilder) {
        this.oreSpawn = oreSpawnPropertyBuilder;
        return this;
    }

    public AsteroidPropertyBuilder loot(LootPropertyBuilder lootPropertyBuilder) {
        this.loot = lootPropertyBuilder;
        return this;
    }
}