Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -23,27 +23,31 @@ public class DiscoverSpellEvent extends PlayerEvent {
private final Spell spell;
private final Source source;
public DiscoverSpellEvent(EntityPlayer player, Spell spell, 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 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
}
}
@@ -5,11 +5,10 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerContainerEvent;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
/**
* SpellBindEvent is fired when a player presses the apply button in the arcane workbench. <i>Note that this
* event is only fired on the server side.</i><br>
* SpellBindEvent is fired when a player presses the apply button in the arcane workbench. <i>Note that this event is
* only fired on the server side.</i><br>
* <br>
* This event is {@link Cancelable}. If this event is canceled, no further processing takes place: spells are not bound,
* upgrades are not applied and crystals are not consumed.<br>
@@ -24,7 +23,7 @@ import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
@Cancelable
public class SpellBindEvent extends PlayerContainerEvent {
public SpellBindEvent(EntityPlayer player, ContainerArcaneWorkbench container) {
public SpellBindEvent(EntityPlayer player, ContainerArcaneWorkbench container){
super(player, container);
}
@@ -9,8 +9,8 @@ import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
/**
* SpellCastEvent is the parent event class for all spell casting events. Methods which subscribe to this event
* will receive all three child events (it is recommended that you use {@link SpellCastEvent.Pre},
* SpellCastEvent is the parent event class for all spell casting events. Methods which subscribe to this event will
* receive all three child events (it is recommended that you use {@link SpellCastEvent.Pre},
* {@link SpellCastEvent.Post} or {@link SpellCastEvent.Tick}, depending on the application).<br>
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
@@ -19,39 +19,44 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable;
* @since Wizardry 2.1
*/
public abstract class SpellCastEvent extends LivingEvent {
private final Spell spell;
private final SpellModifiers modifiers;
private final Source source;
public SpellCastEvent(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source) {
public SpellCastEvent(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source){
super(caster);
this.spell = spell;
this.modifiers = modifiers;
this.source = source;
}
/** Returns the spell being cast. */
public Spell getSpell(){
return spell;
}
/** Returns the modifiers for the spell being cast. */
public SpellModifiers getModifiers(){
return modifiers;
}
/** Returns the source of the spell being cast. */
public Source getSource(){
return source;
}
public enum Source {
/** Signifies that the spell was cast using a wand. */ WAND,
/** Signifies that the spell was cast using a scroll. */ SCROLL,
/** Signifies that the spell was cast using commands. */ COMMAND,
/** Signifies that the spell was cast by an {@link ISpellCaster}. */ NPC,
/** Signifies that the spell was cast by some other means. */ OTHER
/** Signifies that the spell was cast using a wand. */
WAND,
/** Signifies that the spell was cast using a scroll. */
SCROLL,
/** Signifies that the spell was cast using commands. */
COMMAND,
/** Signifies that the spell was cast by an {@link ISpellCaster}. */
NPC,
/** Signifies that the spell was cast by some other means. */
OTHER
}
/**
@@ -75,18 +80,18 @@ public abstract class SpellCastEvent extends LivingEvent {
@Cancelable
public static class Pre extends SpellCastEvent {
public Pre(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source) {
public Pre(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source){
super(caster, spell, modifiers, source);
}
}
/**
* SpellCastEvent.Post is fired just after a spell is cast. Use this event for any processing which depends
* on whether the spell succeeds, and does not affect the spell itself. For example, wizardry uses this event
* to keep track of spellcasting stats. Note that although this event is fired from both sides, it is not fired from
* common code; rather, both sides fire it separately, so timing is not guaranteed. Also note that this event is
* only fired once for continuous spells, after the first casting tick.<br>
* SpellCastEvent.Post is fired just after a spell is cast. Use this event for any processing which depends on
* whether the spell succeeds, and does not affect the spell itself. For example, wizardry uses this event to keep
* track of spellcasting stats. Note that although this event is fired from both sides, it is not fired from common
* code; rather, both sides fire it separately, so timing is not guaranteed. Also note that this event is only fired
* once for continuous spells, after the first casting tick.<br>
* <br>
* This event is not {@link Cancelable}.<br>
* <br>
@@ -99,12 +104,12 @@ public abstract class SpellCastEvent extends LivingEvent {
*/
public static class Post extends SpellCastEvent {
public Post(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source) {
public Post(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source){
super(caster, spell, modifiers, source);
}
}
/**
* SpellCastEvent.Tick is fired each tick while a continuous spell is being cast.<br>
* <br>
@@ -123,17 +128,17 @@ public abstract class SpellCastEvent extends LivingEvent {
public static class Tick extends SpellCastEvent {
private final int count;
public Tick(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source, int count) {
public Tick(EntityLivingBase caster, Spell spell, SpellModifiers modifiers, Source source, int count){
super(caster, spell, modifiers, source);
this.count = count;
}
/** Returns the number of ticks this (continuous) spell has already been cast for. */
public int getCount(){
return count;
}
}
}