From 009321d90533a828172086ec3bdf015459d8bd64 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Sat, 6 Jun 2020 23:30:24 +0100 Subject: [PATCH] Some more cleanup --- .../java/electroblob/wizardry/data/IVariable.java | 6 +++--- .../java/electroblob/wizardry/data/WizardData.java | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/electroblob/wizardry/data/IVariable.java b/src/main/java/electroblob/wizardry/data/IVariable.java index 3388be93..3f123159 100644 --- a/src/main/java/electroblob/wizardry/data/IVariable.java +++ b/src/main/java/electroblob/wizardry/data/IVariable.java @@ -6,9 +6,9 @@ import net.minecraft.entity.player.EntityPlayer; import java.util.function.BiFunction; /** - * Instances of this interface act as keys which allow spellData of any type to be stored in {@link WizardData} at - * runtime. This means spells (or anything else, for that matter) may define their own storedVariables to be stored - * with the player and handle those storedVariables themselves. This prevents {@code WizardData} from being cluttered + * Instances of this interface act as keys which allow data of any type to be stored in {@link WizardData} at + * runtime. This means spells (or anything else, for that matter) may define their own variables to be stored + * with the player and handle those variables themselves. This prevents {@code WizardData} from being cluttered * with spell-specific fields and allows addon mods to leverage {@code WizardData} for their own spells or other data, * rather than defining their own capability. This system is somewhat similar to {@code DataManager}. *

diff --git a/src/main/java/electroblob/wizardry/data/WizardData.java b/src/main/java/electroblob/wizardry/data/WizardData.java index 2380c52f..50d9ecc1 100644 --- a/src/main/java/electroblob/wizardry/data/WizardData.java +++ b/src/main/java/electroblob/wizardry/data/WizardData.java @@ -192,7 +192,7 @@ public class WizardData implements INBTSerializable { /** Registers the given {@link IStoredVariable} objects as keys that will be stored to NBT for each {@code WizardData} * instance. */ - public static void registerStoredVariables(IStoredVariable... variables){ + public static void registerStoredVariables(IStoredVariable... variables){ storedVariables.addAll(Arrays.asList(variables)); } @@ -211,7 +211,7 @@ public class WizardData implements INBTSerializable { * other words, if an {@code Integer} is stored under a {@code IVariable}, a {@code Number} will * be returned when the value is retrieved. */ - // This use of type parameters guarantees that spellData may only be stored (and therefore may only be accessed) + // This use of type parameters guarantees that data may only be stored (and therefore may only be accessed) // using a compatible key. For instance, the following code will not compile: // Number i = 1; // setVariable(StoredVariable.ofInt("key", Persistence.ALWAYS), i); @@ -484,7 +484,7 @@ public class WizardData implements INBTSerializable { prevMotionY = player.motionY; - // This new system removes a lot of repetitive event handler code and inflexible spellData which had duplicate + // This new system removes a lot of repetitive event handler code and inflexible data which had duplicate // functions, just for different enchantments. updateImbuedItems(); updateContinuousSpellCasting(); @@ -495,10 +495,10 @@ public class WizardData implements INBTSerializable { /** * Called from the event handler each time the associated player entity is cloned, i.e. on respawn or when - * travelling to a different dimension. Used to copy over any spellData that should persist over player death. This - * is the inverse of the old onPlayerDeath method, which reset the spellData that shouldn't persist. + * travelling to a different dimension. Used to copy over any data that should persist over player death. This + * is the inverse of the old onPlayerDeath method, which reset the data that shouldn't persist. * - * @param data The old WizardData whose spellData are to be copied over. + * @param data The old WizardData whose data is to be copied over. * @param respawn True if the player died and is respawning, false if they are just travelling between dimensions. */ public void copyFrom(WizardData data, boolean respawn){