Skip to content

Commit

Permalink
Add 1.20.4 implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
RappyTV committed Mar 2, 2024
1 parent 80a7caa commit b426b00
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.masel.nbtviewer.v1_20_4;

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);
}

}

0 comments on commit b426b00

Please sign in to comment.