This commit is contained in:
Electroblob77
2019-01-05 22:18:14 +00:00
parent b374f71533
commit 224ee281ef
33 changed files with 160 additions and 273 deletions
@@ -59,7 +59,6 @@ public class Light extends Spell {
BlockPos pos = new BlockPos(x, y, z);
if(world.isAirBlock(pos)){
// world.playSound(x, y, z, "sound.ambient.cave.cave", 1.0f, 1.5f, false);
if(!world.isRemote){
world.setBlockState(pos, WizardryBlocks.magic_light.getDefaultState());
if(world.getTileEntity(pos) instanceof TileEntityTimer){
@@ -272,7 +272,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
return modID;
}
/** Returns the ResourceLocation for this spell's icon. */
/** Returns the {@code ResourceLocation} for this spell's icon. */
public final ResourceLocation getIcon(){
return icon;
}
@@ -368,7 +368,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
/**
* Returns the total number of registered spells, excluding the 'None' spell. Returns the same number that would be
* returned by Spell.getSpells(Spell.allSpells).size(), but this method is more efficient.
* returned by {@code Spell.getSpells(Spell.allSpells).size()}, but this method is more efficient.
*/
public static int getTotalSpellCount(){
return registry.getValuesCollection().size() - 1;
@@ -40,7 +40,7 @@ import net.minecraft.world.World;
*/
public class SpellConstruct<T extends EntityMagicConstruct> extends Spell {
/** A factory that creates projectile entities. */
/** A factory that creates construct entities. */
protected final Function<World, T> constructFactory;
/** The base lifetime of the construct created by this spell, or -1 if the construct does not despawn. */
protected final int baseDuration;
@@ -276,6 +276,10 @@ public abstract class SpellRay extends Spell {
spawnParticle(world, x, y, z, velocity.x, velocity.y, velocity.z);
}
}
// The exact behaviour of the returned values of the following three methods can be a little confusing. Normally,
// either onEntityHit or onBlockHit (or both) will return true when the spell succeeded in hitting the block or
// entity, and false if not (note that those two methods are mutually exclusive). If false is returned, onMiss will
// be called - onMiss will never be called if either of the other methods returns true.
/**
* Called when the spell hits an entity. Will never be called if ignoreEntities is true.