summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java
blob: b9e42f41c5a5c17454fb5cbcd5f27d05ac9df31c (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
package com.keuin.ohmyvanillamc;

import java.util.Objects;

public class OmvmConfiguration {

    private final boolean fixEntityTrackerEntrySpamming;
    private final boolean disableFishSchooling;
    private final boolean disablePhantomSpawning;
    private final boolean disableWanderingTraderSpawning;
    private final boolean reintroduceLlamaItemDuplicating;

    public OmvmConfiguration() {
        this(true, false, false, false, false);
    }

    public OmvmConfiguration(boolean fixEntityTrackerEntrySpamming, boolean disableFishSchooling, boolean disablePhantomSpawning, boolean disableWanderingTraderSpawning, boolean reintroduceLlamaItemDuplicating) {
        this.fixEntityTrackerEntrySpamming = fixEntityTrackerEntrySpamming;
        this.disableFishSchooling = disableFishSchooling;
        this.disablePhantomSpawning = disablePhantomSpawning;
        this.disableWanderingTraderSpawning = disableWanderingTraderSpawning;
        this.reintroduceLlamaItemDuplicating = reintroduceLlamaItemDuplicating;
    }

    public boolean isFixEntityTrackerEntrySpamming() {
        return fixEntityTrackerEntrySpamming;
    }

    public boolean isDisableFishSchooling() {
        return disableFishSchooling;
    }

    public boolean isDisablePhantomSpawning() {
        return disablePhantomSpawning;
    }

    public boolean isDisableWanderingTraderSpawning() {
        return disableWanderingTraderSpawning;
    }

    public boolean isReintroduceLlamaItemDuplicating() {
        return reintroduceLlamaItemDuplicating;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OmvmConfiguration that = (OmvmConfiguration) o;
        return fixEntityTrackerEntrySpamming == that.fixEntityTrackerEntrySpamming &&
                disableFishSchooling == that.disableFishSchooling &&
                disablePhantomSpawning == that.disablePhantomSpawning &&
                disableWanderingTraderSpawning == that.disableWanderingTraderSpawning &&
                reintroduceLlamaItemDuplicating == that.reintroduceLlamaItemDuplicating;
    }

    @Override
    public int hashCode() {
        return Objects.hash(fixEntityTrackerEntrySpamming, disableFishSchooling, disablePhantomSpawning, disableWanderingTraderSpawning, reintroduceLlamaItemDuplicating);
    }

    @Override
    public String toString() {
        String s = "";
        s += "(BugFix) Fix Entity Tracker Entry Spamming: " + fixEntityTrackerEntrySpamming + "\n";
        s += "(Optimization) Disable Fish Schooling: " + disableFishSchooling + "\n";
        s += "(Exotic Feature) Disable Phantom Spawning: " + disablePhantomSpawning + "\n";
        s += "(Exotic Feature) Disable Wandering Trader Spawning: " + disableWanderingTraderSpawning + "\n";
        s += "(Obsolete Vanilla Feature) Reintroduce Llama Item Duplicating: " + reintroduceLlamaItemDuplicating;
        return s;
    }
}