Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Special Handling for the Infinity Sword #784

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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