Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions public/resources/ts/stats-defer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export function isEnchanted(item: Item): boolean {
return true;
}

// enchanted golden apple
if (item.id === 322 && item.Damage === 1) {
return true;
}

//potions with actual effects (not water bottles)
if (item.id === 373 && item.Damage !== 0) {
return true;
Expand Down
13 changes: 9 additions & 4 deletions views/stats.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,11 @@ function isEnchanted(item) {
return true;
}

// enchanted golden apple
if (item.id === 322 && item.Damage === 1) {
return true;
}

// potions potions with actual effects (not water bottles)
if (item.id === 373 && item.Damage !== 0) {
return true;
Expand Down Expand Up @@ -2804,23 +2809,23 @@ const metaDescription = getMetaDescription()
</p>
<% } %>

<% if('effects' in calculated.misc){
<% if('effects' in calculated.misc){
if (Object.keys(calculated.misc.effects).some((key) => Object.keys(calculated.misc.effects[key]).length > 0)) { %>
<div class="category-header">
<div class="category-icon">
<div class="item-icon custom-icon" style="background-image: url(/head/60226d4c1d30fbebecae939da900603e4cd0fed8592a1bb3e11f9ac92391a45a)"></div>
</div>
<span>Potions</span>
</div>
<%
<%
let effects_tooltips = [];
for (const key of Object.keys(calculated.misc.effects).sort()) {
effects_tooltips[key] ??= [];
for (let potion of calculated.misc.effects[key]) {
if (key === "active") {
if (potion?.effect === undefined || potion?.level === null) continue;
effects_tooltips[key].push(`<span class="stat-value">${constants.POTION_EFFECTS[potion.effect]?.[potion.level].name.replace('Potion', '') || potion.effect.split('_').map((effect) => helper.capitalizeFirstLetter(effect.toLowerCase())).join(' ')}</span><br>`)

} else {
potion = potion?.effect || potion

Expand All @@ -2833,7 +2838,7 @@ const metaDescription = getMetaDescription()
<span <%- effects_tooltips['active'] ? `data-tippy-content='<span class="stat-name">Active Potion Effects: :</span><br>${effects_tooltips['active'].join("")}'` : "" %>>
<span class="stat-name">Active Potion Effects: </span><span class="stat-value"><%= calculated.misc.effects.active.length %></span>
</span><br>

<span <%- effects_tooltips['paused'] ? `data-tippy-content='<span class="stat-name">Paused Potion Effects: </span><br>${effects_tooltips['paused'].join("")}'` : "" %>>
<span class="stat-name">Paused Potion Effects: </span><span class="stat-value"><%= calculated.misc.effects.paused.length %></span>
</span><br>
Expand Down