Put these arguments the right way round
This commit is contained in:
@@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
||||
public class Arc extends SpellRay {
|
||||
|
||||
public Arc(){
|
||||
super("arc", false, SpellActions.POINT);
|
||||
super("arc", SpellActions.POINT, false);
|
||||
this.aimAssist(0.6f);
|
||||
this.soundValues(1, 1.7f, 0.2f);
|
||||
this.addProperties(DAMAGE);
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ArcaneJammer extends SpellRay {
|
||||
}
|
||||
|
||||
public ArcaneJammer(){
|
||||
super("arcane_jammer", false, SpellActions.POINT);
|
||||
super("arcane_jammer", SpellActions.POINT, false);
|
||||
this.soundValues(0.7f, 1, 0.4f);
|
||||
this.addProperties(EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ArcaneLock extends SpellRay {
|
||||
public static final String NBT_KEY = "arcaneLockOwner";
|
||||
|
||||
public ArcaneLock(){
|
||||
super("arcane_lock", false, SpellActions.POINT);
|
||||
super("arcane_lock", SpellActions.POINT, false);
|
||||
}
|
||||
|
||||
@Override public boolean requiresPacket(){ return true; }
|
||||
|
||||
@@ -23,7 +23,7 @@ public class Banish extends SpellRay {
|
||||
public static final String MAXIMUM_TELEPORT_DISTANCE = "maximum_teleport_distance";
|
||||
|
||||
public Banish(){
|
||||
super("banish", false, SpellActions.POINT);
|
||||
super("banish", SpellActions.POINT, false);
|
||||
this.addProperties(MINIMUM_TELEPORT_DISTANCE, MAXIMUM_TELEPORT_DISTANCE);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.world.World;
|
||||
public class Bubble extends SpellRay {
|
||||
|
||||
public Bubble(){
|
||||
super("bubble", false, SpellActions.POINT);
|
||||
super("bubble", SpellActions.POINT, false);
|
||||
this.soundValues(0.5f, 1.1f, 0.2f);
|
||||
addProperties(DURATION);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ChainLightning extends SpellRay {
|
||||
public static final String TERTIARY_MAX_TARGETS = "tertiary_max_targets"; // This is per secondary target
|
||||
|
||||
public ChainLightning(){
|
||||
super("chain_lightning", false, SpellActions.POINT);
|
||||
super("chain_lightning", SpellActions.POINT, false);
|
||||
this.aimAssist(0.6f);
|
||||
this.soundValues(1, 1.7f, 0.2f);
|
||||
addProperties(PRIMARY_DAMAGE, SECONDARY_DAMAGE, TERTIARY_DAMAGE, SECONDARY_RANGE, TERTIARY_RANGE,
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
public class Cobwebs extends SpellRay {
|
||||
|
||||
public Cobwebs(){
|
||||
super("cobwebs", false, SpellActions.POINT);
|
||||
super("cobwebs", SpellActions.POINT, false);
|
||||
this.ignoreLivingEntities(true);
|
||||
addProperties(EFFECT_RADIUS, DURATION);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class ConjureBlock extends SpellRay {
|
||||
private static final String BLOCK_LIFETIME = "block_lifetime";
|
||||
|
||||
public ConjureBlock(){
|
||||
super("conjure_block", false, SpellActions.POINT);
|
||||
super("conjure_block", SpellActions.POINT, false);
|
||||
this.ignoreLivingEntities(true);
|
||||
addProperties(BLOCK_LIFETIME);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.world.World;
|
||||
public class Containment extends SpellRay {
|
||||
|
||||
public Containment(){
|
||||
super("containment", false, SpellActions.POINT);
|
||||
super("containment", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1, 0.2f);
|
||||
addProperties(EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.world.World;
|
||||
public class CurseOfEnfeeblement extends SpellRay {
|
||||
|
||||
public CurseOfEnfeeblement(){
|
||||
super("curse_of_enfeeblement", false, SpellActions.POINT);
|
||||
super("curse_of_enfeeblement", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.1f, 0.2f);
|
||||
addProperties(EFFECT_STRENGTH);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class CurseOfSoulbinding extends SpellRay {
|
||||
Persistence.DIMENSION_CHANGE);
|
||||
|
||||
public CurseOfSoulbinding(){
|
||||
super("curse_of_soulbinding", false, SpellActions.POINT);
|
||||
super("curse_of_soulbinding", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.1f, 0.2f);
|
||||
WizardData.registerStoredVariables(TARGETS_KEY);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.world.World;
|
||||
public class CurseOfUndeath extends SpellRay {
|
||||
|
||||
public CurseOfUndeath(){
|
||||
super("curse_of_undeath", false, SpellActions.POINT);
|
||||
super("curse_of_undeath", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.1f, 0.2f);
|
||||
addProperties(EFFECT_STRENGTH);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class Detonate extends SpellRay {
|
||||
public static final String MAX_DAMAGE = "max_damage";
|
||||
|
||||
public Detonate(){
|
||||
super("detonate", false, SpellActions.POINT);
|
||||
super("detonate", SpellActions.POINT, false);
|
||||
this.soundValues(4, 0.7f, 0.14f);
|
||||
this.ignoreLivingEntities(true);
|
||||
addProperties(MAX_DAMAGE, BLAST_RADIUS);
|
||||
|
||||
@@ -25,7 +25,7 @@ public class Disintegration extends SpellRay {
|
||||
public static final String NBT_KEY = "disintegrating";
|
||||
|
||||
public Disintegration(){
|
||||
super("disintegration", false, SpellActions.POINT);
|
||||
super("disintegration", SpellActions.POINT, false);
|
||||
addProperties(DAMAGE, BURN_DURATION, EMBER_LIFETIME, EMBER_COUNT);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class Entrapment extends SpellRay {
|
||||
public static final String DAMAGE_INTERVAL = "damage_interval";
|
||||
|
||||
public Entrapment(){
|
||||
super("entrapment", false, SpellActions.POINT);
|
||||
super("entrapment", SpellActions.POINT, false);
|
||||
this.soundValues(1, 0.85f, 0.3f);
|
||||
addProperties(EFFECT_DURATION, DAMAGE_INTERVAL);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.world.World;
|
||||
public class FireBreath extends SpellRay {
|
||||
|
||||
public FireBreath(){
|
||||
super("fire_breath", true, SpellActions.POINT);
|
||||
super("fire_breath", SpellActions.POINT, true);
|
||||
this.particleVelocity(1);
|
||||
this.particleJitter(0.3);
|
||||
this.particleSpacing(0.25);
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.world.World;
|
||||
public class FlameRay extends SpellRay {
|
||||
|
||||
public FlameRay(){
|
||||
super("flame_ray", true, SpellActions.POINT);
|
||||
super("flame_ray", SpellActions.POINT, true);
|
||||
this.particleVelocity(1);
|
||||
this.particleSpacing(0.5);
|
||||
addProperties(DAMAGE, BURN_DURATION);
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.world.World;
|
||||
public class Freeze extends SpellRay {
|
||||
|
||||
public Freeze(){
|
||||
super("freeze", false, SpellActions.POINT);
|
||||
super("freeze", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.4f, 0.4f);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
this.hitLiquids(true);
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
public class FrostRay extends SpellRay {
|
||||
|
||||
public FrostRay(){
|
||||
super("frost_ray", true, SpellActions.POINT);
|
||||
super("frost_ray", SpellActions.POINT, true);
|
||||
this.particleVelocity(1);
|
||||
this.particleSpacing(0.5);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
|
||||
@@ -33,7 +33,7 @@ public class GreaterTelekinesis extends SpellRay {
|
||||
private static final float UNDERSHOOT = 0.2f;
|
||||
|
||||
public GreaterTelekinesis(){
|
||||
super("greater_telekinesis", true, SpellActions.POINT);
|
||||
super("greater_telekinesis", SpellActions.POINT, true);
|
||||
this.aimAssist(0.4f);
|
||||
this.particleSpacing(1);
|
||||
this.particleJitter(0.05);
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.world.World;
|
||||
public class HealAlly extends SpellRay {
|
||||
|
||||
public HealAlly(){
|
||||
super("heal_ally", false, SpellActions.POINT);
|
||||
super("heal_ally", SpellActions.POINT, false);
|
||||
this.soundValues(0.7f, 1.2f, 0.4f);
|
||||
addProperties(HEALTH);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.world.World;
|
||||
public class IceStatue extends SpellRay {
|
||||
|
||||
public IceStatue(){
|
||||
super("ice_statue", false, SpellActions.POINT);
|
||||
super("ice_statue", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.4f, 0.4f);
|
||||
addProperties(EFFECT_DURATION);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.world.World;
|
||||
public class Ignite extends SpellRay {
|
||||
|
||||
public Ignite(){
|
||||
super("ignite", false, SpellActions.POINT);
|
||||
super("ignite", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1, 0.4f);
|
||||
addProperties(BURN_DURATION);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class LifeDrain extends SpellRay {
|
||||
public static final String HEAL_FACTOR = "heal_factor";
|
||||
|
||||
public LifeDrain(){
|
||||
super("life_drain", true, SpellActions.POINT);
|
||||
super("life_drain", SpellActions.POINT, true);
|
||||
this.particleVelocity(-0.5);
|
||||
this.particleSpacing(0.4);
|
||||
addProperties(DAMAGE, HEAL_FACTOR);
|
||||
|
||||
@@ -20,7 +20,7 @@ public class LightningBolt extends SpellRay {
|
||||
public static final String NBT_KEY = "summoningPlayer";
|
||||
|
||||
public LightningBolt(){
|
||||
super("lightning_bolt", false, SpellActions.POINT);
|
||||
super("lightning_bolt", SpellActions.POINT, false);
|
||||
this.ignoreLivingEntities(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.world.World;
|
||||
public class LightningRay extends SpellRay {
|
||||
|
||||
public LightningRay(){
|
||||
super("lightning_ray", true, SpellActions.POINT);
|
||||
super("lightning_ray", SpellActions.POINT, true);
|
||||
this.aimAssist(0.6f);
|
||||
addProperties(DAMAGE);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class LightningWeb extends SpellRay {
|
||||
public static final String TERTIARY_MAX_TARGETS = "tertiary_max_targets"; // This is per secondary target
|
||||
|
||||
public LightningWeb(){
|
||||
super("lightning_web", true, SpellActions.POINT);
|
||||
super("lightning_web", SpellActions.POINT, true);
|
||||
this.aimAssist(0.6f);
|
||||
addProperties(PRIMARY_DAMAGE, SECONDARY_DAMAGE, TERTIARY_DAMAGE, SECONDARY_RANGE, TERTIARY_RANGE,
|
||||
SECONDARY_MAX_TARGETS, TERTIARY_MAX_TARGETS);
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Metamorphosis extends SpellRay {
|
||||
}
|
||||
|
||||
public Metamorphosis(){
|
||||
super("metamorphosis", false, SpellActions.POINT);
|
||||
super("metamorphosis", SpellActions.POINT, false);
|
||||
this.soundValues(0.5f, 1f, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public class Meteor extends SpellRay {
|
||||
public static final String BLAST_STRENGTH = "blast_strength";
|
||||
|
||||
public Meteor(){
|
||||
super("meteor", false, SpellActions.POINT);
|
||||
super("meteor", SpellActions.POINT, false);
|
||||
this.soundValues(3, 1, 0);
|
||||
this.ignoreLivingEntities(true);
|
||||
addProperties(BLAST_STRENGTH);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MindControl extends SpellRay {
|
||||
public static final String NBT_KEY = "controllingEntity";
|
||||
|
||||
public MindControl(){
|
||||
super("mind_control", false, SpellActions.POINT);
|
||||
super("mind_control", SpellActions.POINT, false);
|
||||
addProperties(EFFECT_DURATION);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
public class MindTrick extends SpellRay {
|
||||
|
||||
public MindTrick(){
|
||||
super("mind_trick", false, SpellActions.POINT);
|
||||
super("mind_trick", SpellActions.POINT, false);
|
||||
this.soundValues(0.7f, 1, 0.4f);
|
||||
addProperties(EFFECT_DURATION);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Mine extends SpellRay {
|
||||
}
|
||||
|
||||
public Mine(){
|
||||
super("mine", false, SpellActions.POINT);
|
||||
super("mine", SpellActions.POINT, false);
|
||||
this.ignoreLivingEntities(true);
|
||||
this.particleSpacing(0.5);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Paralysis extends SpellRay {
|
||||
private static final String CRITICAL_HEALTH = "critical_health";
|
||||
|
||||
public Paralysis(){
|
||||
super("paralysis", false, SpellActions.POINT);
|
||||
super("paralysis", SpellActions.POINT, false);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, CRITICAL_HEALTH);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Petrify extends SpellRay {
|
||||
public static final String MINIMUM_EFFECT_DURATION = "minimum_effect_duration";
|
||||
|
||||
public Petrify(){
|
||||
super("petrify", false, SpellActions.POINT);
|
||||
super("petrify", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.1f, 0.2f);
|
||||
addProperties(MINIMUM_EFFECT_DURATION);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.world.World;
|
||||
public class Poison extends SpellRay {
|
||||
|
||||
public Poison(){
|
||||
super("poison", false, SpellActions.POINT);
|
||||
super("poison", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.1f, 0.2f);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class Possession extends SpellRay {
|
||||
}
|
||||
|
||||
public Possession(){
|
||||
super("possession", false, SpellActions.POINT);
|
||||
super("possession", SpellActions.POINT, false);
|
||||
addProperties(EFFECT_DURATION, CRITICAL_HEALTH);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public class RayOfPurification extends SpellRay {
|
||||
public static final String UNDEAD_DAMAGE_MULTIPLIER = "undead_damage_multiplier";
|
||||
|
||||
public RayOfPurification(){
|
||||
super("ray_of_purification", true, SpellActions.POINT);
|
||||
super("ray_of_purification", SpellActions.POINT, true);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, BURN_DURATION, UNDEAD_DAMAGE_MULTIPLIER);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Reversal extends SpellRay {
|
||||
public static final String REVERSED_EFFECTS = "reversed_effects";
|
||||
|
||||
public Reversal(){
|
||||
super("reversal", false, SpellActions.POINT);
|
||||
super("reversal", SpellActions.POINT, false);
|
||||
addProperties(REVERSED_EFFECTS);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
public class Slime extends SpellRay {
|
||||
|
||||
public Slime(){
|
||||
super("slime", false, SpellActions.POINT);
|
||||
super("slime", SpellActions.POINT, false);
|
||||
addProperties(DURATION);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.world.World;
|
||||
public class Snare extends SpellRay {
|
||||
|
||||
public Snare(){
|
||||
super("snare", false, SpellActions.POINT);
|
||||
super("snare", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.4f, 0.4f);
|
||||
this.ignoreLivingEntities(true);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
|
||||
@@ -66,11 +66,11 @@ public abstract class SpellRay extends Spell {
|
||||
/** The aim assist to use when raytracing. Defaults to 0. */
|
||||
protected float aimAssist = 0;
|
||||
|
||||
public SpellRay(String name, boolean isContinuous, EnumAction action){
|
||||
this(Wizardry.MODID, name, isContinuous, action);
|
||||
public SpellRay(String name, EnumAction action, boolean isContinuous){
|
||||
this(Wizardry.MODID, name, action, isContinuous);
|
||||
}
|
||||
|
||||
public SpellRay(String modID, String name, boolean isContinuous, EnumAction action){
|
||||
public SpellRay(String modID, String name, EnumAction action, boolean isContinuous){
|
||||
super(modID, name, action, isContinuous);
|
||||
this.addProperties(RANGE);
|
||||
this.npcSelector((e, o) -> true);
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.world.World;
|
||||
public class Telekinesis extends SpellRay {
|
||||
|
||||
public Telekinesis(){
|
||||
super("telekinesis", false, SpellActions.POINT);
|
||||
super("telekinesis", SpellActions.POINT, false);
|
||||
}
|
||||
|
||||
@Override public boolean requiresPacket(){ return false; }
|
||||
|
||||
@@ -21,7 +21,7 @@ public class WallOfFrost extends SpellRay {
|
||||
private static final int MINIMUM_PLACEMENT_RANGE = 2;
|
||||
|
||||
public WallOfFrost(){
|
||||
super("wall_of_frost", true, SpellActions.POINT);
|
||||
super("wall_of_frost", SpellActions.POINT, true);
|
||||
this.particleVelocity(1);
|
||||
this.particleSpacing(0.5);
|
||||
addProperties(DURATION);
|
||||
|
||||
@@ -22,7 +22,7 @@ public class Whirlwind extends SpellRay {
|
||||
public static final String REPULSION_VELOCITY = "repulsion_velocity";
|
||||
|
||||
public Whirlwind(){
|
||||
super("whirlwind", false, SpellActions.POINT);
|
||||
super("whirlwind", SpellActions.POINT, false);
|
||||
this.soundValues(0.8f, 0.7f, 0.2f);
|
||||
addProperties(REPULSION_VELOCITY);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.world.World;
|
||||
public class Wither extends SpellRay {
|
||||
|
||||
public Wither(){
|
||||
super("wither", false, SpellActions.POINT);
|
||||
super("wither", SpellActions.POINT, false);
|
||||
this.soundValues(1, 1.1f, 0.2f);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, EFFECT_STRENGTH);
|
||||
}
|
||||
|
||||
@@ -257,10 +257,11 @@ public final class EntityUtils {
|
||||
return server.getPlayerList().getOppedPlayers().getEntry(player.getGameProfile()) != null;
|
||||
}
|
||||
|
||||
/** Checks that the given entity is allowed to damage blocks in the given world. If the entity is a player, this
|
||||
* checks the player block damage config setting, otherwise it posts a mob griefing event and returns the result. */
|
||||
/** Checks that the given entity is allowed to damage blocks in the given world. If the entity is a player or null,
|
||||
* this checks the player block damage config setting, otherwise it posts a mob griefing event and returns the result. */
|
||||
public static boolean canDamageBlocks(EntityLivingBase entity, World world){
|
||||
if(entity instanceof EntityPlayer) return Wizardry.settings.playerBlockDamage;
|
||||
// TODO: Dispenser griefing!
|
||||
if(entity == null || entity instanceof EntityPlayer) return Wizardry.settings.playerBlockDamage;
|
||||
return ForgeEventFactory.getMobGriefingEvent(world, entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user