aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/damagesources
diff options
context:
space:
mode:
authorShawn Buckley <shawntbuckley@gmail.com>2015-10-21 22:15:09 -0400
committerShawn Buckley <shawntbuckley@gmail.com>2015-10-21 22:15:09 -0400
commit123aa6ed288b2f67b0d47177f4d27cd6893daf3a (patch)
tree358e3704182f5b6fda44fa8b20605ab63edca092 /src/main/java/gregtech/api/damagesources
parent43ddecc7b9715d2038747566f89930b5db8d0181 (diff)
downloadGT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.tar.gz
GT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.tar.bz2
GT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.zip
Reformat code
Diffstat (limited to 'src/main/java/gregtech/api/damagesources')
-rw-r--r--src/main/java/gregtech/api/damagesources/GT_DamageSources.java158
1 files changed, 79 insertions, 79 deletions
diff --git a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java
index d83bf661fe..bb5ff01b8f 100644
--- a/src/main/java/gregtech/api/damagesources/GT_DamageSources.java
+++ b/src/main/java/gregtech/api/damagesources/GT_DamageSources.java
@@ -4,83 +4,83 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.*;
public class GT_DamageSources {
- public static DamageSource getElectricDamage() {
- return ic2.api.info.Info.DMG_ELECTRIC;
- }
-
- public static DamageSource getRadioactiveDamage() {
- return ic2.api.info.Info.DMG_RADIATION;
- }
-
- public static DamageSource getNukeExplosionDamage() {
- return ic2.api.info.Info.DMG_NUKE_EXPLOSION;
- }
-
- public static DamageSource getExplodingDamage() {
- return new DamageSourceExploding();
- }
-
- public static DamageSource getCombatDamage(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {
- return new DamageSourceCombat(aType, aPlayer, aDeathMessage);
- }
-
- public static DamageSource getHeatDamage() {
- return new DamageSourceHeat();
- }
-
- public static DamageSource getFrostDamage() {
- return new DamageSourceFrost();
- }
-
- private static class DamageSourceCombat extends EntityDamageSource {
- private IChatComponent mDeathMessage;
-
- public DamageSourceCombat(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {
- super(aType, aPlayer);
- mDeathMessage = aDeathMessage;
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return mDeathMessage == null ? super.func_151519_b(aTarget) : mDeathMessage;
- }
- }
-
- private static class DamageSourceFrost extends DamageSource {
- public DamageSourceFrost() {
- super("frost");
- setDifficultyScaled();
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " got frozen");
- }
- }
-
- private static class DamageSourceHeat extends DamageSource {
- public DamageSourceHeat() {
- super("steam");
- setDifficultyScaled();
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " was boiled alive");
- }
- }
-
- public static class DamageSourceExploding extends DamageSource {
- public DamageSourceExploding() {
- super("exploded");
- setDamageAllowedInCreativeMode();
- setDamageBypassesArmor();
- setDamageIsAbsolute();
- }
-
- @Override
- public IChatComponent func_151519_b(EntityLivingBase aTarget) {
- return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " exploded");
- }
- }
+ public static DamageSource getElectricDamage() {
+ return ic2.api.info.Info.DMG_ELECTRIC;
+ }
+
+ public static DamageSource getRadioactiveDamage() {
+ return ic2.api.info.Info.DMG_RADIATION;
+ }
+
+ public static DamageSource getNukeExplosionDamage() {
+ return ic2.api.info.Info.DMG_NUKE_EXPLOSION;
+ }
+
+ public static DamageSource getExplodingDamage() {
+ return new DamageSourceExploding();
+ }
+
+ public static DamageSource getCombatDamage(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {
+ return new DamageSourceCombat(aType, aPlayer, aDeathMessage);
+ }
+
+ public static DamageSource getHeatDamage() {
+ return new DamageSourceHeat();
+ }
+
+ public static DamageSource getFrostDamage() {
+ return new DamageSourceFrost();
+ }
+
+ private static class DamageSourceCombat extends EntityDamageSource {
+ private IChatComponent mDeathMessage;
+
+ public DamageSourceCombat(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) {
+ super(aType, aPlayer);
+ mDeathMessage = aDeathMessage;
+ }
+
+ @Override
+ public IChatComponent func_151519_b(EntityLivingBase aTarget) {
+ return mDeathMessage == null ? super.func_151519_b(aTarget) : mDeathMessage;
+ }
+ }
+
+ private static class DamageSourceFrost extends DamageSource {
+ public DamageSourceFrost() {
+ super("frost");
+ setDifficultyScaled();
+ }
+
+ @Override
+ public IChatComponent func_151519_b(EntityLivingBase aTarget) {
+ return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " got frozen");
+ }
+ }
+
+ private static class DamageSourceHeat extends DamageSource {
+ public DamageSourceHeat() {
+ super("steam");
+ setDifficultyScaled();
+ }
+
+ @Override
+ public IChatComponent func_151519_b(EntityLivingBase aTarget) {
+ return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " was boiled alive");
+ }
+ }
+
+ public static class DamageSourceExploding extends DamageSource {
+ public DamageSourceExploding() {
+ super("exploded");
+ setDamageAllowedInCreativeMode();
+ setDamageBypassesArmor();
+ setDamageIsAbsolute();
+ }
+
+ @Override
+ public IChatComponent func_151519_b(EntityLivingBase aTarget) {
+ return new ChatComponentText(EnumChatFormatting.RED + aTarget.getCommandSenderName() + EnumChatFormatting.WHITE + " exploded");
+ }
+ }
} \ No newline at end of file