minecraft-src/net/minecraft/client/gui/narration/NarrationElementOutput.java
2025-07-04 01:41:11 +03:00

25 lines
771 B
Java

package net.minecraft.client.gui.narration;
import com.google.common.collect.ImmutableList;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.network.chat.Component;
@Environment(EnvType.CLIENT)
public interface NarrationElementOutput {
default void add(NarratedElementType type, Component contents) {
this.add(type, NarrationThunk.from(contents.getString()));
}
default void add(NarratedElementType type, String contents) {
this.add(type, NarrationThunk.from(contents));
}
default void add(NarratedElementType type, Component... contents) {
this.add(type, NarrationThunk.from(ImmutableList.copyOf(contents)));
}
void add(NarratedElementType type, NarrationThunk<?> contents);
NarrationElementOutput nest();
}