Skip to content

Commit

Permalink
Update mek radiation heal command to set to baseline instead of zero (#…
Browse files Browse the repository at this point in the history
…7559)

Also updates baseline radiation of the entity when joining to baseline from zero
  • Loading branch information
toddlersizedsharkcage committed Jul 27, 2022
1 parent 19a5d53 commit 9baddb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/mekanism/common/command/RadiationCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class RadiationCommand {
.executes(ctx -> {
CommandSourceStack source = ctx.getSource();
source.getPlayerOrException().getCapability(Capabilities.RADIATION_ENTITY).ifPresent(c -> {
c.set(0);
c.set(RadiationManager.BASELINE);
source.sendSuccess(MekanismLang.COMMAND_RADIATION_CLEAR.translateColored(EnumColor.GRAY), true);
});
return 0;
Expand All @@ -83,7 +83,7 @@ public class RadiationCommand {
for (Entity entity : EntityArgument.getEntities(ctx, "targets")) {
if (entity instanceof LivingEntity) {
entity.getCapability(Capabilities.RADIATION_ENTITY).ifPresent(c -> {
c.set(0);
c.set(RadiationManager.BASELINE);
source.sendSuccess(MekanismLang.COMMAND_RADIATION_CLEAR_ENTITY.translateColored(EnumColor.GRAY, EnumColor.INDIGO,
entity.getDisplayName()), true);
});
Expand Down Expand Up @@ -130,4 +130,4 @@ private static int getRadiationLevel(CommandSourceStack source, Vec3 pos, Level
private static Component getPosition(BlockPos pos) {
return MekanismLang.GENERIC_BLOCK_POS.translate(pos.getX(), pos.getY(), pos.getZ());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class DefaultRadiationEntity implements IRadiationEntity {

private double radiation;
private double radiation = RadiationManager.BASELINE;

@Override
public double getRadiation() {
Expand Down

0 comments on commit 9baddb9

Please sign in to comment.