1.0.13
All checks were successful
SorceryCraft/pipeline/head This commit looks good

Rename SpellRegistry.registerSpell to SpellRegistry.register
This commit is contained in:
TheBrokenRail 2020-03-08 11:41:16 -04:00
parent 963900a65d
commit 8cf31594e0
5 changed files with 15 additions and 15 deletions

View File

@ -1,5 +1,8 @@
### Changelog ### Changelog
**1.0.13**
* Rename ```SpellRegistry.registerSpell``` to ```SpellRegistry.register```
**1.0.12** **1.0.12**
* Update Mappings * Update Mappings
* Add API Docs * Add API Docs

View File

@ -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 4. Register the Spell in your ModInitializer
```java ```java
public class ExampleMod implements ModInitializer { public class ExampleMod implements ModInitializer {
@Override public static final Identifier EXAMPLE_SPELL = SpellRegistry.register(new Identifier("modid", "example_spell"), ExampleSpell.class);
public void onInitialize() {
SpellRegistry.registerSpell(new Identifier("modid", "example_spell"), ExampleSpell.class);
}
} }
``` ```
5. Add Spell Translation 5. Add Spell Translation

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
loader_version = 0.7.8+build.186 loader_version = 0.7.8+build.186
# Mod Properties # Mod Properties
mod_version = 1.0.12 mod_version = 1.0.13
maven_group = com.thebrokenrail maven_group = com.thebrokenrail
archives_base_name = sorcerycraft archives_base_name = sorcerycraft

View File

@ -52,7 +52,7 @@ public class SpellRegistry {
return out.toArray(new Spell[0]); 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); spells.put(id, spell);
return id; return id;
} }

View File

@ -25,14 +25,14 @@ public class Spells {
public static final Identifier COOLING_SPELL; public static final Identifier COOLING_SPELL;
static { static {
HEAL_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "heal_spell"), HealSpell.class); HEAL_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "heal_spell"), HealSpell.class);
DAMAGE_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "damage_spell"), DamageSpell.class); DAMAGE_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "damage_spell"), DamageSpell.class);
DISSOLVE_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "dissolve_spell"), DissolveSpell.class); DISSOLVE_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "dissolve_spell"), DissolveSpell.class);
STEADFAST_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "steadfast_spell"), SteadfastSpell.class); STEADFAST_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "steadfast_spell"), SteadfastSpell.class);
FLAME_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "flame_spell"), FlameSpell.class); FLAME_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "flame_spell"), FlameSpell.class);
LEVITATE_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "levitate_spell"), LevitateSpell.class); LEVITATE_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "levitate_spell"), LevitateSpell.class);
TELEPORT_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "teleport_spell"), TeleportSpell.class); TELEPORT_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "teleport_spell"), TeleportSpell.class);
INWARD_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "inward_spell"), InwardSpell.class); INWARD_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "inward_spell"), InwardSpell.class);
COOLING_SPELL = SpellRegistry.registerSpell(new Identifier(SorceryCraft.NAMESPACE, "cooling_spell"), CoolingSpell.class); COOLING_SPELL = SpellRegistry.register(new Identifier(SorceryCraft.NAMESPACE, "cooling_spell"), CoolingSpell.class);
} }
} }