Skip to content

Commit

Permalink
Add special handling for the infinity sword (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
glowredman authored Dec 29, 2023
1 parent 5aaf2df commit 3d9e176
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
import cpw.mods.fml.relauncher.Side;
import fox.spiteful.avaritia.DamageSourceInfinitySword;
import fox.spiteful.avaritia.items.LudicrousItems;
import tconstruct.library.tools.ToolCore;

Expand Down Expand Up @@ -123,8 +124,9 @@ public void onLivingHurt(LivingAttackEvent event) {
UUID uuid = player.getUniqueID();
int deathCount = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager()
.func_152602_a(player).writeStat(StatList.deathsStat);
float amount = event.source instanceof DamageSourceInfinitySword ? Float.POSITIVE_INFINITY : event.ammount;
LAST_DEATHCOUNT.put(uuid, deathCount);
LAST_DAMAGE.put(uuid, event.ammount);
LAST_DAMAGE.put(uuid, amount);

}

Expand Down

0 comments on commit 3d9e176

Please sign in to comment.