Implemented title positions for dialogs.

This commit is contained in:
Luis C.M committed 2022-06-10 04:47:28 -05:00
1 parent ff8fc68e88
commit 486e37cd7f
5 files changed
+95 -69

No files matched your search

@@ -8,21 +8,25 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import noppes.npcs.NoppesStringUtils;
import noppes.npcs.TextBlock;
import noppes.npcs.controllers.data.Dialog;
import noppes.npcs.entity.EntityNPCInterface;
public class TextBlockClient extends TextBlock{
private ChatStyle style;
public int color = 0xe0e0e0;
public int titleColor = 0xe0e0e0;
public int titlePos = 0;
private String name;
private ICommandSender sender;
public TextBlockClient(ICommandSender sender, String text, int lineWidth, int color, int titleColor, Object... obs) {
this(text, lineWidth, false, obs);
this.color = color;
this.titleColor = titleColor;
public TextBlockClient(ICommandSender sender, Dialog dialog, Object... obs) {
this(dialog.text, dialog.textWidth, false, obs);
this.color = dialog.color;
this.titleColor = dialog.titleColor;
this.titlePos = dialog.titlePos;
this.sender = sender;
}
public TextBlockClient(String name, String text, int lineWidth, int color, Object... obs) {
this(text, lineWidth, false, obs);
this.color = color;