diff --git a/CHANGELOG.md b/CHANGELOG.md index 19b81f6..82669bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Changelog +**1.0.13** +* Rename ```SpellRegistry.registerSpell``` to ```SpellRegistry.register``` + **1.0.12** * Update Mappings * Add API Docs diff --git a/README.md b/README.md index 1d17bf0..2e18eba 100644 --- a/README.md +++ b/README.md @@ -134,10 +134,7 @@ This removes the specified spell from the item in the player's main hand. 4. Register the Spell in your ModInitializer ```java public class ExampleMod implements ModInitializer { - @Override - public void onInitialize() { - SpellRegistry.registerSpell(new Identifier("modid", "example_spell"), ExampleSpell.class); - } + public static final Identifier EXAMPLE_SPELL = SpellRegistry.register(new Identifier("modid", "example_spell"), ExampleSpell.class); } ``` 5. Add Spell Translation diff --git a/gradle.properties b/gradle.properties index 2ddb697..3fdc535 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G loader_version = 0.7.8+build.186 # Mod Properties - mod_version = 1.0.12 + mod_version = 1.0.13 maven_group = com.thebrokenrail archives_base_name = sorcerycraft diff --git a/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/SpellRegistry.java b/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/SpellRegistry.java index 7b58ca0..9e8f30d 100644 --- a/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/SpellRegistry.java +++ b/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/SpellRegistry.java @@ -52,7 +52,7 @@ public class SpellRegistry { return out.toArray(new Spell[0]); } - public static Identifier registerSpell(Identifier id, Class spell) { + public static Identifier register(Identifier id, Class spell) { spells.put(id, spell); return id; } diff --git a/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/Spells.java b/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/Spells.java index db2a047..ce3e7cc 100644 --- a/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/Spells.java +++ b/src/main/java/com/thebrokenrail/sorcerycraft/spell/registry/Spells.java @@ -25,14 +25,14 @@ public class Spells { public static final Identifier COOLING_SPELL; static { - HEAL_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "heal_spell"), HealSpell.class); - DAMAGE_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "damage_spell"), DamageSpell.class); - DISSOLVE_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "dissolve_spell"), DissolveSpell.class); - STEADFAST_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "steadfast_spell"), SteadfastSpell.class); - FLAME_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "flame_spell"), FlameSpell.class); - LEVITATE_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "levitate_spell"), LevitateSpell.class); - TELEPORT_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "teleport_spell"), TeleportSpell.class); - INWARD_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "inward_spell"), InwardSpell.class); - COOLING_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "cooling_spell"), CoolingSpell.class); + HEAL_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "heal_spell"), HealSpell.class); + DAMAGE_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "damage_spell"), DamageSpell.class); + DISSOLVE_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "dissolve_spell"), DissolveSpell.class); + STEADFAST_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "steadfast_spell"), SteadfastSpell.class); + FLAME_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "flame_spell"), FlameSpell.class); + LEVITATE_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "levitate_spell"), LevitateSpell.class); + TELEPORT_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "teleport_spell"), TeleportSpell.class); + INWARD_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "inward_spell"), InwardSpell.class); + COOLING_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "cooling_spell"), CoolingSpell.class); } }