mcNows
Nows Loader 0.9.1 / Minecraft 26.2

Text And NBT

Create native text components and NBT tags from stable Nows values.

Some APIs may still change or behave unevenly because they do not have enough real-world use cases and test coverage yet.

Text And NBT

Text and NBT are small but noisy cross-version surfaces. Nows gives you stable values for your own code and adapter services for native conversion.

Text With McText

Use McText when text travels through stable APIs.

McText title = McText.translatable("screen.my_mod.machine");
McText fallback = McText.literal("Machine");
McText jump = McText.keybind("key.jump");

Convert to the native component type with TextApi.

TextApi text = MinecraftApi.text(context);

Component titleComponent = text.component(
        McText.translatable("screen.my_mod.machine"));

Component direct = text.literal("Debug value");

Use text.translatable and text.keybind when you already know you are in adapter-specific code and want native components immediately.

When To Use NativeTextBridge

Most mod code should not need NativeTextBridge; TextApi.component is clearer. Use the bridge only in utility code that receives McText but cannot access NowsContext.

Component component = NativeTextBridge.nativeComponent(
        McText.literal("Ready"),
        Component.class);

If your code has a context, prefer:

Component component = MinecraftApi.text(context).component(McText.literal("Ready"));

Stable NBT Values

Use NbtCompound, NbtList and NbtValue when data should be built without importing native tag classes.

NbtCompound stable = new NbtCompound()
        .putString("owner", "my_mod")
        .putInt("heat", 7)
        .putBoolean("active", true);

Convert to a native compound with NbtApi.

NbtApi nbt = MinecraftApi.nbt(context);
CompoundTag tag = nbt.compound(stable);

Native NBT Helpers

When you already have native tags, NbtApi gives safe read/write helpers with fallbacks.

CompoundTag tag = nbt.compound();
nbt.putString(tag, "owner", "my_mod");
nbt.putInt(tag, "heat", 7);

int heat = nbt.getInt(tag, "heat", 0);
String owner = nbt.getString(tag, "owner", "unknown");

Lists work the same way:

ListTag list = nbt.list();
nbt.addString(list, "copper");
nbt.addString(list, "iron");

String first = nbt.getString(list, 0, "missing");

Use native Minecraft NBT APIs directly when a block entity, entity or item stack needs version-specific serialization behavior.