Miscellaneous setup

This commit is contained in:
Electroblob
2018-01-30 16:02:13 +00:00
parent da6b007a3a
commit 2af7329478
59 changed files with 1833 additions and 13509 deletions
@@ -7,10 +7,9 @@ import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
/**
* [NYI] DiscoverSpellEvent is fired when a player discovers a spell by any method.<br>
* DiscoverSpellEvent is fired when a player discovers a spell by any method.<br>
* <br>
* This event is {@link Cancelable}.<br>
* If this event is canceled, the spell is not discovered.<br>
* This event is {@link Cancelable}. If this event is canceled, the spell is not discovered.<br>
* <br>
* This event does not have a result. {@link HasResult}<br>
* <br>
@@ -21,15 +20,30 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
*/
public class DiscoverSpellEvent extends PlayerEvent {
private final Spell spell;
private final Source source;
public DiscoverSpellEvent(EntityPlayer player, Spell spell, Source source) {
super(player);
this.spell = spell;
this.source = source;
}
/** Returns the spell that is being discovered. */
public Spell getSpell(){
return spell;
}
/** Returns the method used to discover the spell. */
public Source getSource(){
return source;
}
public enum Source {
/** Signifies that the spell was discovered by trying to cast it. */ CASTING,
/** Signifies that the spell was discovered using a scroll of identification. */ IDENTIFICATION_SCROLL,
/** Signifies that the spell was discovered using commands. */ COMMAND,
/** Signifies that the spell was discovered by some other means (. */ OTHER
/** Signifies that the spell was discovered by some other means. */ OTHER
}
}
}