From 315a8e2e0dd635b599a97816084922e0c4375f27 Mon Sep 17 00:00:00 2001 From: CreepyCre Date: Sat, 13 Feb 2021 14:05:25 +0100 Subject: [PATCH] added "setup_loot" boolean to PocketGenerator --- .../dimdoors/pockets/generator/PocketGenerator.java | 9 +++++++++ .../virtual/reference/PocketGeneratorReference.java | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/dimdev/dimdoors/pockets/generator/PocketGenerator.java b/src/main/java/org/dimdev/dimdoors/pockets/generator/PocketGenerator.java index 8a2bafde..130ed60c 100644 --- a/src/main/java/org/dimdev/dimdoors/pockets/generator/PocketGenerator.java +++ b/src/main/java/org/dimdev/dimdoors/pockets/generator/PocketGenerator.java @@ -41,6 +41,7 @@ public abstract class PocketGenerator implements Weighted tags = new ArrayList<>(); @@ -83,6 +84,8 @@ public abstract class PocketGenerator implements Weighted())); } + public Boolean getSetupLoot() { + return setupLoot; + } + public void applyModifiers(PocketGenerationParameters parameters, RiftManager manager) { for (Modifier modifier : modifierList) { modifier.apply(parameters, manager); diff --git a/src/main/java/org/dimdev/dimdoors/pockets/virtual/reference/PocketGeneratorReference.java b/src/main/java/org/dimdev/dimdoors/pockets/virtual/reference/PocketGeneratorReference.java index 62d761cb..047a6132 100644 --- a/src/main/java/org/dimdev/dimdoors/pockets/virtual/reference/PocketGeneratorReference.java +++ b/src/main/java/org/dimdev/dimdoors/pockets/virtual/reference/PocketGeneratorReference.java @@ -99,7 +99,7 @@ public abstract class PocketGeneratorReference extends VirtualSingularPocket { generator.applyModifiers(parameters, manager); this.applyModifiers(parameters, manager); - generator.setup(pocket, parameters, setupLoot != null ? setupLoot : true); + generator.setup(pocket, parameters, setupLoot != null ? setupLoot : (generator.getSetupLoot()) != null ? generator.getSetupLoot() : true); return pocket; }