Cleanup
This commit is contained in:
@@ -20,8 +20,10 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
@Mod.EventBusSubscriber
|
||||
public interface IElementalDamage {
|
||||
|
||||
/** Returns the type of this damage, which determines how it interacts with different entities. */
|
||||
DamageType getType();
|
||||
|
||||
/** Returns true is this damage is from a retaliatory effect (i.e. in response to other damage). Used to avoid
|
||||
* infinite loops with retaliatory effects. */
|
||||
boolean isRetaliatory();
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -33,8 +33,8 @@ import net.minecraft.util.EntityDamageSource;
|
||||
|
||||
// A note on the use of the vanilla damagesources:
|
||||
// When using indirect damage sources, the SECOND argument is the original entity (i.e. the caster), and the
|
||||
// FIRST argument is the actual projectile or whatever that does the damage. getEntity() will return
|
||||
// the original entity, and getSourceOfDamage() will return the projectile.
|
||||
// FIRST argument is the actual projectile or whatever that does the damage. getTrueSource() will return
|
||||
// the original entity, and getImmediateSource() will return the projectile.
|
||||
|
||||
// The vanilla approach to damage types is inconsistent, to say the least. Poison is simply 'magic', and relies on
|
||||
// EntityLivingBase.isPotionApplicable to determine whether an entity is affected or not. Wither, on the other hand, is
|
||||
|
||||
@@ -344,8 +344,7 @@ public final class WizardryUtilities {
|
||||
* defaults to {@link SoundCategory#PLAYERS}.
|
||||
*/
|
||||
public static void playSoundAtPlayer(EntityPlayer player, SoundEvent sound, float volume, float pitch){
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, sound, SoundCategory.PLAYERS, volume,
|
||||
pitch);
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, sound, SoundCategory.PLAYERS, volume, pitch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user