From eba219bcce89e1754416e393057a52444bb77770 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Mon, 27 Jul 2020 12:32:05 +0100 Subject: [PATCH] Add getter for SpellBuff#potionSet --- src/main/java/electroblob/wizardry/spell/SpellBuff.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/electroblob/wizardry/spell/SpellBuff.java b/src/main/java/electroblob/wizardry/spell/SpellBuff.java index 7c08374a..30fb464e 100644 --- a/src/main/java/electroblob/wizardry/spell/SpellBuff.java +++ b/src/main/java/electroblob/wizardry/spell/SpellBuff.java @@ -19,6 +19,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Set; import java.util.function.Supplier; @@ -85,6 +86,11 @@ public class SpellBuff extends Spell { } } + /** Returns an unmodifiable view of the set of {@link Potion} objects that this spell applies to its caster. */ + public Set getPotionSet(){ + return Collections.unmodifiableSet(potionSet); + } + // Potion-specific equivalent to defining the identifiers as constants protected static String getDurationKey(Potion potion){