Skip to content

Commit

Permalink
Upgrade to 1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kaz-mighty committed Apr 25, 2024
1 parent eeadee9 commit 105c210
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.19
yarn_mappings=1.19+build.4
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.15.10

#Fabric api
fabric_version=0.58.0+1.19
fabric_version=0.76.1+1.19.3

loom_version=1.6-SNAPSHOT

# Mod Properties
mod_version=1.2.0+1.19.0
mod_version=1.2.0+1.19.3
maven_group=com.github.kaz_mighty
archives_base_name=MoreMoreTooltips
# https://www.curseforge.com/minecraft/mc-mods/cloth-config/files
cloth_config_version=8.3.115
cloth_config_version=9.1.104
# https://www.curseforge.com/minecraft/mc-mods/modmenu/files
modmenu_version=4.0.4
modmenu_version=5.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import net.minecraft.item.ToolItem;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtElement;
import net.minecraft.registry.Registries;
import net.minecraft.text.MutableText;
import net.minecraft.text.Style;
import net.minecraft.text.Text;
import net.minecraft.text.TextColor;
import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

public class TooltipEventHandler {
private static DecimalFormat Formatter = new DecimalFormat("###.#");
Expand Down Expand Up @@ -93,7 +93,7 @@ public static void addMoreTooltip() {
return;
}
Item item = itemStack.getItem();
Identifier itemId = Registry.ITEM.getKey(item).get().getValue();
Identifier itemId = Registries.ITEM.getKey(item).get().getValue();

var clientInstance = MinecraftClient.getInstance();
int threshold = clientInstance.getWindow().getScaledWidth() / 2;
Expand Down Expand Up @@ -171,7 +171,7 @@ public static void addMoreTooltip() {
// Tooltip - Registry Name
if (config.ID.isShown(isShiftDown, config.debug)) {
String string = Text.translatable("tooltip.more_tooltips.registryName",
Registry.ITEM.getId(item).toString()).getString();
Registries.ITEM.getId(item).toString()).getString();
string = LimitStringLength(string, config.TextMaxLength);
list.addAll(splitToolTip(clientInstance.textRenderer, string, threshold, DARK_GRAY));
}
Expand Down Expand Up @@ -215,7 +215,7 @@ public static void addMoreTooltip() {

// Tooltip - Light level
if (config.LightLevel.isShown(isShiftDown, config.debug)) {
int luminance = Registry.BLOCK.get(itemId).getDefaultState().getLuminance();
int luminance = Registries.BLOCK.get(itemId).getDefaultState().getLuminance();
if (luminance > 0) {
String string = Text.translatable("tooltip.more_tooltips.LightLevel", luminance).getString();
string = LimitStringLength(string, config.TextMaxLength);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@

"depends": {
"java": ">=17",
"minecraft": ">=1.19 <1.19.3",
"minecraft": "~1.19.3",
"fabricloader": ">=0.14.6",
"fabric": "*",
"fabric-api": "*",
"cloth-config": "*"
},
"recommends": {
Expand Down

0 comments on commit 105c210

Please sign in to comment.