mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-15 18:24:45 +00:00
Annotate all the things
This commit is contained in:
63 files changed
+623
-369
No files matched your search
@@ -149,6 +149,7 @@ public final class FormattedText {
|
||||
*
|
||||
* @return The parsed text structure
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static FormattedText parse(String text) {
|
||||
EnumChatFormatting currentColorStyle = EnumChatFormatting.WHITE;
|
||||
val currentFancyStyle = new HashSet<EnumChatFormatting>();
|
||||
@@ -198,6 +199,7 @@ public final class FormattedText {
|
||||
return result;
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public void addChatMessage(ICommandSender target) {
|
||||
addChatMessage(target::addChatMessage);
|
||||
}
|
||||
@@ -214,6 +216,7 @@ public final class FormattedText {
|
||||
*
|
||||
* @return The chat component.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public List<ChatComponentText> toChatText() {
|
||||
var thisComponent = toChatTextSingle();
|
||||
val result = new ArrayList<ChatComponentText>();
|
||||
@@ -261,27 +264,33 @@ public final class FormattedText {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI.Expose
|
||||
public void addChatMessage(EntityOtherPlayerMP target) {
|
||||
addChatMessage(target::addChatMessage);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI.Expose
|
||||
public void addChatMessage(EntityPlayerSP target) {
|
||||
addChatMessage(target::addChatMessage);
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public void addChatMessage(CommandBlockLogic target) {
|
||||
addChatMessage(target::addChatMessage);
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public void addChatMessage(EntityPlayerMP target) {
|
||||
addChatMessage(target::addChatMessage);
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public void addChatMessage(RConConsoleSource target) {
|
||||
addChatMessage(target::addChatMessage);
|
||||
}
|
||||
|
||||
@StableAPI.Expose
|
||||
public void addChatMessage(MinecraftServer target) {
|
||||
addChatMessage(target::addChatMessage);
|
||||
}
|
||||
@@ -294,6 +303,7 @@ public final class FormattedText {
|
||||
* @param y Top side
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI.Expose
|
||||
public void draw(FontRenderer renderer, int x, int y) {
|
||||
draw(renderer, x, y, false);
|
||||
}
|
||||
@@ -307,6 +317,7 @@ public final class FormattedText {
|
||||
* @param shadow Whether to have drop shadow under the text
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI.Expose
|
||||
public void draw(FontRenderer renderer, int x, int y, boolean shadow) {
|
||||
int startX = x;
|
||||
x = renderer.drawString(text, x, y, colorMap.get(colorStyle).getRGB(), shadow);
|
||||
@@ -331,6 +342,7 @@ public final class FormattedText {
|
||||
* @param y Top side
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@StableAPI.Expose
|
||||
public void drawWithShadow(FontRenderer renderer, int x, int y) {
|
||||
draw(renderer, x, y, true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user