summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2021-01-15 00:42:54 +0800
committerkeuin <[email protected]>2021-01-15 00:42:54 +0800
commit75f26f4ed9011e9dd12f5b49b26b94f8f4dacac1 (patch)
tree7520c0c10220ec06624bd87c6115d564146a40a5 /src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java
parent6f84d79bc8452a2e37644e6f0419477b70a09e69 (diff)
Version 1.4.0: supports reintroducing llama item duplication. Add configuration file.
Diffstat (limited to 'src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java')
-rw-r--r--src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java b/src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java
new file mode 100644
index 0000000..4992f9b
--- /dev/null
+++ b/src/main/java/com/keuin/ohmyvanillamc/OmvmConfiguration.java
@@ -0,0 +1,58 @@
+package com.keuin.ohmyvanillamc;
+
+import java.util.Objects;
+
+public class OmvmConfiguration {
+
+ private final boolean disableFishSchooling;
+ private final boolean disablePhantomSpawning;
+ private final boolean disableWanderingTraderSpawning;
+ private final boolean reintroduceLlamaItemDuplicating;
+
+ public OmvmConfiguration(boolean disableFishSchooling, boolean disablePhantomSpawning, boolean disableWanderingTraderSpawning, boolean reintroduceLlamaItemDuplicating) {
+ this.disableFishSchooling = disableFishSchooling;
+ this.disablePhantomSpawning = disablePhantomSpawning;
+ this.disableWanderingTraderSpawning = disableWanderingTraderSpawning;
+ this.reintroduceLlamaItemDuplicating = reintroduceLlamaItemDuplicating;
+ }
+
+ 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 disableFishSchooling == that.disableFishSchooling &&
+ disablePhantomSpawning == that.disablePhantomSpawning &&
+ disableWanderingTraderSpawning == that.disableWanderingTraderSpawning &&
+ reintroduceLlamaItemDuplicating == that.reintroduceLlamaItemDuplicating;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(disableFishSchooling, disablePhantomSpawning, disableWanderingTraderSpawning, reintroduceLlamaItemDuplicating);
+ }
+
+ @Override
+ public String toString() {
+ return "Disable Fish Schooling: " + disableFishSchooling + "\n" +
+ "Disable Phantom Spawning: " + disablePhantomSpawning + "\n" +
+ "Disable Wandering Trader Spawning: " + disableWanderingTraderSpawning + "\n" +
+ "Reintroduce Llama Item Duplicating: " + reintroduceLlamaItemDuplicating;
+ }
+}