Add Industrial Laser Death Messages
All checks were successful
EnergonRelics/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2020-07-28 18:40:35 -04:00
parent 1b27c895f3
commit 03be2d58cd
3 changed files with 17 additions and 5 deletions

View File

@ -29,6 +29,16 @@ public class IndustrialLaserBlock extends AbstractFieldBlock {
return EnergonRelics.INDUSTRIAL_LASER_PROJECTOR_BLOCK.getDefaultState();
}
private static class IndustrialLaserDamageSource extends DamageSource {
protected IndustrialLaserDamageSource() {
super(EnergonRelics.NAMESPACE + ".industrial_laser");
setBypassesArmor();
setFire();
}
}
private static final DamageSource DAMAGE_SOURCE = new IndustrialLaserDamageSource();
@SuppressWarnings("deprecation")
@Override
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
@ -37,7 +47,7 @@ public class IndustrialLaserBlock extends AbstractFieldBlock {
if (entity instanceof CreeperEntity) {
((CreeperEntity) entity).setIgnited();
} else if (entity instanceof LivingEntity) {
entity.damage(DamageSource.IN_FIRE, HardcodedConfig.INDUSTRIAL_LASER_BEAM_DAMAGE);
entity.damage(DAMAGE_SOURCE, HardcodedConfig.INDUSTRIAL_LASER_BEAM_DAMAGE);
} else if (entity instanceof ItemEntity) {
ItemStack stack = ((ItemEntity) entity).getStack();
if (stack.getItem() == Items.GUNPOWDER) {

View File

@ -34,7 +34,7 @@ public class HardcodedConfig {
public static final double TRACTOR_BEAM_MOVEMENT_MULTIPLIER = 0.95d;
public static final double TRACTOR_BEAM_PULL_FORCE = 0.065d;
public static final float INDUSTRIAL_LASER_BEAM_DAMAGE = 1f;
public static final float INDUSTRIAL_LASER_BEAM_DAMAGE = 2.5f;
public static final long INDUSTRIAL_LASER_ENERGY_REQUIRED = 58;
public static final int INDUSTRIAL_LASER_BEAM_TIME = 148;
public static final int INDUSTRIAL_LASER_MIN_INGOTS_FROM_ORE = 1;

View File

@ -24,8 +24,8 @@
"block.energonrelics.defensive_laser": "Defensive Laser",
"text.autoconfig.energonrelics.title": "EnergonRelics",
"text.autoconfig.energonrelics.option.textureSet": "Texture Set",
"death.attack.energonrelics.defensive_laser": "%s was evaporated by a laser",
"death.attack.energonrelics.defensive_laser.player": "%s was evaporated by a laser whilst fighting %s",
"death.attack.energonrelics.defensive_laser": "%s was evaporated by a defensive laser",
"death.attack.energonrelics.defensive_laser.player": "%s was evaporated by a defensive laser whilst fighting %s",
"block.energonrelics.research_complex_generator": "Research Complex Generator",
"block.energonrelics.block_breaker": "Block Breaker",
"item.energonrelics.veridium_powder": "Veridium Powder",
@ -43,5 +43,7 @@
"block.energonrelics.tractor_beam": "Tractor Beam",
"block.energonrelics.repulsor_beam": "Repulsor Beam",
"block.energonrelics.industrial_laser_projector": "Industrial Laser Projector",
"block.energonrelics.industrial_laser": "Industrial Laser"
"block.energonrelics.industrial_laser": "Industrial Laser",
"death.attack.energonrelics.industrial_laser": "%s was melted by an industrial laser",
"death.attack.energonrelics.industrial_laser.player": "%s was melted by an industrial laser whilst fighting %s"
}