diff options
Diffstat (limited to 'src/Java/gtPlusPlus/api')
-rw-r--r-- | src/Java/gtPlusPlus/api/damage/BaseCustomDamageSource.java | 22 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/api/damage/BaseCustomDamageSource.java b/src/Java/gtPlusPlus/api/damage/BaseCustomDamageSource.java new file mode 100644 index 0000000000..24348988d6 --- /dev/null +++ b/src/Java/gtPlusPlus/api/damage/BaseCustomDamageSource.java @@ -0,0 +1,22 @@ +package gtPlusPlus.api.damage; + +import net.minecraft.entity.Entity; +import net.minecraft.util.EntityDamageSourceIndirect; + +public class BaseCustomDamageSource extends EntityDamageSourceIndirect { + + public BaseCustomDamageSource(String name, Entity transmitter, Entity indirectSource) { + super(name, transmitter, indirectSource); + this.setDifficultyScaled(); + } + + /** + * Return whether this damage source will have its damage amount scaled based on the current difficulty. + */ + public boolean isDifficultyScaled() + { + return true; + } + + +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java b/src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java new file mode 100644 index 0000000000..ada2ba5c3d --- /dev/null +++ b/src/Java/gtPlusPlus/api/damage/DamageTeslaTower.java @@ -0,0 +1,22 @@ +package gtPlusPlus.api.damage; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraft.util.IChatComponent; + +public class DamageTeslaTower extends BaseCustomDamageSource{ + + public DamageTeslaTower(Entity transmitter) { + super("plasmabolt", transmitter, null); + this.setDamageBypassesArmor(); + this.setDamageIsAbsolute(); + } + + @Override + public IChatComponent func_151519_b(EntityLivingBase target) { + String s = "death.attack." + this.damageType; + return new ChatComponentTranslation(s, target.getCommandSenderName(), "Plasma"); + } + +} |