Cleanup
This commit is contained in:
@@ -61,19 +61,6 @@ import net.minecraftforge.fml.common.Mod;
|
|||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
|
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;
|
||||||
|
|
||||||
// Better ways of organising event handling:
|
|
||||||
// - Split it into several separate handlers, each with a logical area to deal with (see Astral Sorcery)
|
|
||||||
// - Remove most of the stuff, and have individual spell, item, block, entity, etc. classes handle their own events
|
|
||||||
// (see Botania)
|
|
||||||
// - Keep all the methods, but delegate near-repeated behaviours to their individual spell/potion/whatever classes
|
|
||||||
// (TGG does this, apparently)
|
|
||||||
// Incidentally, Twilight Forest still has one big event handler class - and a comment about how it's so long...!
|
|
||||||
|
|
||||||
// In the end, I decided the most pragmatic solution was to either use the second option or keep things how they were,
|
|
||||||
// whichever will result in more readable/easily maintainable code in each case. To keep in line with the modularity
|
|
||||||
// of the spell system, the goal is to have nothing in here which relates to a specific spell (mostly done, but a few
|
|
||||||
// things remain).
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* As of Wizardry 2.1, most of the code in this class has been relocated somewhere sensible, leaving only a few
|
* As of Wizardry 2.1, most of the code in this class has been relocated somewhere sensible, leaving only a few
|
||||||
* miscellaneous things that don't make much sense anywhere else, or that are better kept together. Previously, this was
|
* miscellaneous things that don't make much sense anywhere else, or that are better kept together. Previously, this was
|
||||||
|
|||||||
@@ -14,15 +14,14 @@ public enum Element {
|
|||||||
/**
|
/**
|
||||||
* The 'default' element, with {@link electroblob.wizardry.spell.MagicMissile MagicMissile} being its only spell.
|
* The 'default' element, with {@link electroblob.wizardry.spell.MagicMissile MagicMissile} being its only spell.
|
||||||
*/
|
*/
|
||||||
MAGIC(new Style().setColor(TextFormatting.GRAY), "simple", Wizardry.MODID), FIRE(
|
MAGIC(new Style().setColor(TextFormatting.GRAY), "simple", Wizardry.MODID),
|
||||||
new Style().setColor(TextFormatting.DARK_RED), "fire",
|
FIRE(new Style().setColor(TextFormatting.DARK_RED), "fire", Wizardry.MODID),
|
||||||
Wizardry.MODID), ICE(new Style().setColor(TextFormatting.AQUA), "ice", Wizardry.MODID), LIGHTNING(
|
ICE(new Style().setColor(TextFormatting.AQUA), "ice", Wizardry.MODID),
|
||||||
new Style().setColor(TextFormatting.DARK_AQUA), "lightning",
|
LIGHTNING(new Style().setColor(TextFormatting.DARK_AQUA), "lightning", Wizardry.MODID),
|
||||||
Wizardry.MODID), NECROMANCY(new Style().setColor(TextFormatting.DARK_PURPLE), "necromancy",
|
NECROMANCY(new Style().setColor(TextFormatting.DARK_PURPLE), "necromancy", Wizardry.MODID),
|
||||||
Wizardry.MODID), EARTH(new Style().setColor(TextFormatting.DARK_GREEN), "earth",
|
EARTH(new Style().setColor(TextFormatting.DARK_GREEN), "earth", Wizardry.MODID),
|
||||||
Wizardry.MODID), SORCERY(new Style().setColor(TextFormatting.GREEN), "sorcery",
|
SORCERY(new Style().setColor(TextFormatting.GREEN), "sorcery", Wizardry.MODID),
|
||||||
Wizardry.MODID), HEALING(new Style().setColor(TextFormatting.YELLOW),
|
HEALING(new Style().setColor(TextFormatting.YELLOW), "healing", Wizardry.MODID);
|
||||||
"healing", Wizardry.MODID);
|
|
||||||
|
|
||||||
/** Display colour for this element */
|
/** Display colour for this element */
|
||||||
private final Style colour;
|
private final Style colour;
|
||||||
|
|||||||
Reference in New Issue
Block a user