Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Mod Properties
mod_version=2.4.5
mod_version=2.4.6
maven_group=io.github.markassk.fishonmcextras
archives_base_name=fishonmc-extras
project_url=https://modrinth.com/project/fishonmc-extras
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static FOMCItem getFOMCItem(ItemStack itemStack) {
|| itemStack.getItem() == Items.ROTTEN_FLESH
|| itemStack.getItem() == Items.GOLD_INGOT
|| itemStack.getItem() == Items.PRISMARINE_SHARD
|| itemStack.getItem() == Items.DRIED_KELP
) {
String line = Objects.requireNonNull(itemStack.getComponents().get(DataComponentTypes.LORE)).lines().get(15).getString();
return Fish.getFish(itemStack, Defaults.ItemTypes.FISH, line.substring(line.lastIndexOf(" ") + 1));
Expand Down Expand Up @@ -72,6 +73,7 @@ public static boolean isFOMCItem(ItemStack itemStack) {
|| itemStack.getItem() == Items.ROTTEN_FLESH
|| itemStack.getItem() == Items.GOLD_INGOT
|| itemStack.getItem() == Items.PRISMARINE_SHARD
|| itemStack.getItem() == Items.DRIED_KELP
|| itemStack.getItem() == Items.FISHING_ROD;
}
}
Expand All @@ -95,7 +97,8 @@ public static boolean isFish(ItemStack itemStack) {
|| itemStack.getItem() == Items.BLACK_DYE
|| itemStack.getItem() == Items.GOLD_INGOT
|| itemStack.getItem() == Items.ROTTEN_FLESH
|| itemStack.getItem() == Items.PRISMARINE_SHARD;
|| itemStack.getItem() == Items.PRISMARINE_SHARD
|| itemStack.getItem() == Items.DRIED_KELP;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public static Fish getFish(ItemStack itemStack) {
|| itemStack.getItem() == Items.BLACK_DYE
|| itemStack.getItem() == Items.GOLD_INGOT
|| itemStack.getItem() == Items.PRISMARINE_SHARD
|| itemStack.getItem() == Items.DRIED_KELP
) {
String line = Objects.requireNonNull(itemStack.getComponents().get(DataComponentTypes.LORE)).lines().get(15).getString();
return Fish.getFish(itemStack, Defaults.ItemTypes.FISH, line.substring(line.lastIndexOf(" ") + 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.time.LocalDate;
import java.util.Objects;
import java.util.UUID;
Expand Down Expand Up @@ -160,8 +159,10 @@ private static float getPercentPetRating(float climateLuck, float climateScale,
}

public static Constant getConstantFromPercent(float value) {
BigDecimal input = new BigDecimal(value);

BigDecimal input = new BigDecimal(value * 100f);
float ceilValue = input.setScale(2, RoundingMode.HALF_EVEN).floatValue();

if (ceilValue <= 20f) return Constant.SICKLY;
else if (ceilValue < 30f) return Constant.BAD;
else if (ceilValue < 40f) return Constant.BELOW_AVERAGE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static class VariantToggles {
public boolean showAlbino = true;
public boolean showMelanistic = true;
public boolean showTrophy = true;
public boolean showFabled = false;
public boolean showFabled = true;
public boolean showAlternate = false;
}

Expand All @@ -88,7 +88,7 @@ public static class DryStreakToggles {
public boolean showAlbino = true;
public boolean showMelanistic = true;
public boolean showTrophy = true;
public boolean showFabled = false;
public boolean showFabled = true;
public boolean showAlternate = true;
@ConfigEntry.Gui.PrefixText
public boolean showPet = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) {
textList.add(Text.literal("Welcome to FishOnMC-Extras").formatted(Formatting.WHITE));
textList.add(TabHandler.instance().player);
textList.add(Text.empty());
textList.add(Text.literal("2.4.5").formatted(Formatting.GRAY));
textList.add(Text.literal("2.4.6").formatted(Formatting.GRAY));
textList.add(Text.literal("Quality of Fishing Part 2 Update").formatted(Formatting.GRAY, Formatting.ITALIC));

textList.forEach(text -> context.drawText(textRenderer, text, width / 2 - 4 - textRenderer.getWidth(text), height / 2 - (textList.size() * (textRenderer.fontHeight + 1)) / 2 + count.getAndIncrement() * (textRenderer.fontHeight + 1), 0xFFFFFF, true));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "fishonmcextras",
"version": "2.4.5",
"version": "2.4.6",
"name": "FishOnMC-Extras",
"description": "A QOL mod for play.fishonmc.net.",
"authors": [
Expand Down