Skip to content

Commit

Permalink
Merge pull request ByteExceptionM#2 from RappyLabyAddons/master
Browse files Browse the repository at this point in the history
Add 1.20.2 support, fix 1.19.4-1.20.1, keep up labygradle version
  • Loading branch information
ByteExceptionM authored Nov 26, 2023
2 parents f946160 + 5b7aabf commit 153ff5f
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 6 deletions.
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ labyMod {
displayName = "NBT Viewer"
author = "ByteException_"
description = "LabyMod addon to view item nbt data in minecraft. Enable Advanced Tooltips (F3+H), hover over an item and press SHIFT. Magic starts..."
minecraftVersion = "1.17.1<*"
version = System.getenv().getOrDefault("VERSION", "1.2.0")
minecraftVersion = "1.17.1<1.20.2"
version = System.getenv().getOrDefault("VERSION", "1.3.0")
}

minecraft {
Expand All @@ -27,7 +27,8 @@ labyMod {
"1.19.2",
"1.19.3",
"1.19.4",
"1.20.1"
"1.20.1",
"1.20.2"
) { version, provider ->
configureRun(provider, version)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"nbtaddon": {
"nbt-viewer": {
"settings": {
"name": "NBTAddon",
"name": "NBT Viewer",
"enabled": {
"name": "Enabled"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.masel.nbtviewer.v1_20_2;

import io.masel.nbtviewer.api.INBTApi;
import net.labymod.api.models.Implements;
import net.labymod.api.nbt.tags.NBTTagCompound;
import net.minecraft.client.Minecraft;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils;

@Implements(INBTApi.class)
public class NBTApiImpl implements INBTApi {

@Override
public boolean hasAdvancedToolsTips() {
return Minecraft.getInstance().options.advancedItemTooltips;
}

@Override
public String prettyPrint(NBTTagCompound nbtTagCompound) {
CompoundTag compound = (CompoundTag) nbtTagCompound;

return NbtUtils.prettyPrint(compound);
}

}
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rootProject.name = "laby-nbt-addon"

pluginManagement {
val labyGradlePluginVersion = "0.3.25"
val labyGradlePluginVersion = "0.3.30"
plugins {
id("net.labymod.gradle") version (labyGradlePluginVersion)
}
Expand Down

0 comments on commit 153ff5f

Please sign in to comment.