QueuedTooltip.java 1004 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package me.shedaniel.clothconfig2.api;
  2. import com.google.common.collect.Lists;
  3. import me.shedaniel.math.Point;
  4. import net.minecraft.text.Text;
  5. import java.util.Collections;
  6. import java.util.List;
  7. public class QueuedTooltip {
  8. private Point location;
  9. private List<Text> text;
  10. private QueuedTooltip(Point location, List<Text> text) {
  11. this.location = location;
  12. this.text = Collections.unmodifiableList(text);
  13. }
  14. public static QueuedTooltip create(Point location, List<Text> text) {
  15. return new QueuedTooltip(location, text);
  16. }
  17. public static QueuedTooltip create(Point location, Text... text) {
  18. return QueuedTooltip.create(location, Lists.newArrayList(text));
  19. }
  20. public Point getPoint() {
  21. return location;
  22. }
  23. public int getX() {
  24. return location.x;
  25. }
  26. public int getY() {
  27. return location.y;
  28. }
  29. public List<Text> getText() {
  30. return text;
  31. }
  32. }