Skip to content

Commit

Permalink
Release v3.13.1+fabric-1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCSDev committed Aug 17, 2024
1 parent acbf473 commit 0107530
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 30 deletions.
5 changes: 1 addition & 4 deletions betterstats-3-fabric-1.21/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ org.gradle.jvmargs=-Xmx1G
mod_name = Better Statistics Screen
mod_description = Improves the statistics screen and makes it more useful.
mod_author = TheCSDev
mod_version = 3.13+fabric-1.21
mod_version = 3.13.1+fabric-1.21

# Here you link the source code repository links:
mod_contact_homepage = https://github.com/TheCSMods
Expand All @@ -40,9 +40,6 @@ org.gradle.jvmargs=-Xmx1G
modmenu_link_website = https://thecsdev.com/
modmenu_link_youtube = https://www.youtube.com/@TheCSDev

link_feedback = https://thecsdev.github.io/ref/bss_feedback
link_fv = https://thecsdev.github.io/ref/bss_fv

# The name of the license that applies to this project.
# ( It is recommended to use the SPDX specification. More info at: https://spdx.org/licenses/ )
mod_license = LGPL-3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public final class BetterStatsProperties
private static final JsonObject MOD_PROPERTIES;
// --------------------------------------------------
public static final String URL_SOURCES, URL_ISSUES, URL_CURSEFORGE, URL_MODRINTH;
public static final String URL_WEBSITE, URL_YOUTUBE, URL_FEEDBACK, URL_FV;
public static final String URL_WEBSITE, URL_YOUTUBE;
public static final String URL_QS_LEGAL, URL_REMOTE_APIS;
// ==================================================
public static final void init() {/*calls static*/}
Expand All @@ -42,9 +42,6 @@ public static final void init() {/*calls static*/}
URL_WEBSITE = links.get("website") .getAsString();
URL_YOUTUBE = links.get("youtube") .getAsString();

URL_FEEDBACK = links.get("feedback") .getAsString();
URL_FV = links.get("full_version") .getAsString();

URL_QS_LEGAL = links.get("quickshare_legal").getAsString();
URL_REMOTE_APIS = links.get("remote_api_links").getAsString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public ItemStatWidget(int x, int y, int size, SUItemStat stat) throws NullPointe
final var stStat = ((StatType)st).getOrCreateStat(stRegIsItem ? stat.getItem() : stat.getBlock());

//use the Stat instance to obtain the Stat value
final int val = stat.getStatsProvider().getStatValue(stStat);
final String val = stStat.format(stat.getStatsProvider().getStatValue(stStat));

//append the stat value to the final Tooltip text
tttb.append("§e-§r ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ public MobStatWidget(int x, int y, int size, SUMobStat stat) throws NullPointerE
{
@SuppressWarnings("unchecked")
final var statTypeE = (StatType<EntityType<?>>)statType;
final var stVal = stat.getStatsProvider().getStatValue(statTypeE, stat.getEntityType());
ttt.append("\n§e-§r ").append(getEntityStatTypePhrase(statTypeE)).append(": " + stVal);
final int stVal = stat.getStatsProvider().getStatValue(statTypeE, stat.getEntityType());
ttt.append("\n§e-§r ")
.append(getEntityStatTypePhrase(statTypeE))
.append(": " + statTypeE.getOrCreateStat(stat.getEntityType()).format(stVal));
}
}
setTooltip(this.defaultTooltip = Tooltip.of(ttt));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
import static io.github.thecsdev.betterstats.client.BetterStatsClient.MC_CLIENT;
import static io.github.thecsdev.betterstats.network.BetterStatsNetwork.TXT_CONSENT_WARNING;
import static io.github.thecsdev.betterstats.network.BetterStatsNetwork.TXT_TOGGLE_TOOLTIP;
import static io.github.thecsdev.tcdcommons.TCDCommonsConfig.RESTRICTED_MODE;
import static io.github.thecsdev.tcdcommons.api.util.TextUtils.translatable;

import java.awt.Rectangle;
import java.util.Objects;

import io.github.thecsdev.betterstats.BetterStatsProperties;
import io.github.thecsdev.betterstats.api.client.gui.panel.BSComponentPanel;
import io.github.thecsdev.betterstats.api.client.registry.BSStatsTabs;
import io.github.thecsdev.betterstats.api.client.registry.StatsTab;
import io.github.thecsdev.betterstats.client.gui.stats.panel.impl.BetterStatsPanel.BetterStatsPanelProxy;
import io.github.thecsdev.betterstats.client.network.BetterStatsClientPlayNetworkHandler;
import io.github.thecsdev.tcdcommons.api.client.gui.screen.TScreenWrapper;
import io.github.thecsdev.tcdcommons.api.client.gui.util.GuiUtils;
import io.github.thecsdev.tcdcommons.api.client.gui.util.UITexture;
import io.github.thecsdev.tcdcommons.api.client.gui.widget.TButtonWidget;
import io.github.thecsdev.tcdcommons.api.client.util.interfaces.IParentScreenProvider;
Expand Down Expand Up @@ -95,20 +92,8 @@ public ActionBarPanel(int x, int y, int width, ActionBarPanelProxy proxy) throws
btn_bssNet.setEnabled(bssCpnh.serverHasBss && !MC_CLIENT.isInSingleplayer() && !bssCpnh.bssNetworkConsent);
addChild(btn_bssNet, false);

//feedback form button
final var btn_ff = new TButtonWidget(getX() + 1, getY() + 1, 20, 20);
btn_ff.setIcon(new UITexture(BS_WIDGETS_TEXTURE, new Rectangle(0, 180, 60, 60)));
btn_ff.setTooltip(Tooltip.of(translatable("menu.sendFeedback").formatted(Formatting.YELLOW)));
btn_ff.setEnabled(false);
if(!RESTRICTED_MODE)
{
btn_ff.setOnClick(__ -> GuiUtils.showUrlPrompt(BetterStatsProperties.URL_FEEDBACK, true));
btn_ff.setEnabled(true);
addChild(btn_ff, false);
}

//credits button
final var btn_credits = new TButtonWidget(btn_ff.getX() + 20, btn_ff.getY(), 20, 20);
final var btn_credits = new TButtonWidget(getX() + 1, getY() + 1, 20, 20);
btn_credits.setOnClick(btn -> this.proxy.setSelectedStatsTab(BSStatsTabs.BSS_CREDITS));
final var tt_credits = translatable("credits_and_attribution.button.credits").formatted(Formatting.YELLOW);
btn_credits.setTooltip(Tooltip.of(tt_credits));
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"website": "${project.properties.modmenu_link_website}",
"youtube": "${project.properties.modmenu_link_youtube}",

"feedback": "${project.properties.link_feedback}",
"full_version": "${project.properties.link_fv}",

"quickshare_legal": "https://thecsdev.github.io/ref/bss_qs_legal",
"remote_api_links": "https://thecsdev.github.io/api/links/betterstats.json"
},
Expand Down

0 comments on commit 0107530

Please sign in to comment.