Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Chat" components #110

Closed
kashike opened this issue Feb 26, 2016 · 3 comments
Closed

"Chat" components #110

kashike opened this issue Feb 26, 2016 · 3 comments

Comments

@kashike
Copy link
Collaborator

kashike commented Feb 26, 2016

I suggest renaming all of the existing "chat" components, and moving them to their own package.

This includes:

  • event.ClickEvent
  • event.HoverEvent
  • util.ChatComponentProcessor
  • util.ChatComponentScore
  • util.ChatComponentSelector
  • util.ChatComponentStyle
  • util.ChatComponentText
  • util.ChatComponentTranslation
  • util.ChatComponentTranslationFormatException
  • util.ChatStyle
  • util.EnumChatFormatting
  • util.IChatComponent

The "chat component" classes aren't used for chat only, so they should probably be renamed to remove "Chat".

Suggested renames:

  • event.ClickEvent -> text.event.ClickEvent
  • event.HoverEvent -> text.event.HoverEvent
  • util.ChatComponentProcessor -> text.ComponentProcessor
  • util.ChatComponentScore -> text.ScoreComponent or text.ComponentScore
  • util.ChatComponentSelector -> text.SelectorComponent or text.ComponentSelector
  • util.ChatComponentStyle -> text.BaseComponent or text.ComponentBase
  • util.ChatComponentText -> text.TextComponent or text.ComponentText
  • util.ChatComponentTranslation -> text.TranslatableComponent or text.ComponentTranslatable
  • util.ChatComponentTranslationFormatException -> text.TranslatableComponentFormatException or text.ComponentTranslatableFormatException
  • util.ChatStyle -> text.Style or text.ComponentStyle
  • util.EnumChatFormatting -> text.EnumComponentFormat
  • util.IChatComponent -> text.IComponent

Along with this, method renames:

  • func_150256_b: getChatStyle -> getStyle
  • func_150255_a: setChatStyle -> setStyle
  • func_150235_h: getChatClickEvent -> getClickEvent
  • func_150241_a: setChatClickEvent -> setClickEvent
  • func_150210_i: getChatHoverEvent -> getHoverEvent
  • func_150209_a: setChatHoverEvent -> setHoverEvent
@stephan-gh
Copy link

Even though this breaks quite a bit I personally think these are changes that should be made for the future, because the components are more and more used in a lot of other places as well. +1

@LexManos
Copy link
Member

1.9:
net/minecraft/event/ClickEvent -> net/minecraft/util/text/event/ClickEvent
net/minecraft/event/HoverEvent -> net/minecraft/util/text/event/HoverEvent
net/minecraft/util/IChatComponent -> net/minecraft/util/text/ITextComponent
net/minecraft/util/ChatComponentStyle -> net/minecraft/util/text/TextComponentBase
net/minecraft/util/ChatComponentProcessor -> net/minecraft/util/text/TextComponentUtils
net/minecraft/util/ChatComponentScore -> net/minecraft/util/text/TextComponentScore
net/minecraft/util/ChatComponentSelector -> net/minecraft/util/text/TextComponentSelector
net/minecraft/util/ChatStyle -> net/minecraft/util/text/Style
net/minecraft/util/ChatComponentText -> net/minecraft/util/text/TextComponentString
net/minecraft/util/ChatComponentTranslation -> net/minecraft/util/text/TextComponentTranslation
net/minecraft/util/ChatComponentTranslationFormatException -> net/minecraft/util/text/TextComponentTranslationFormatException
net/minecraft/util/EnumChatFormatting -> net/minecraft/util/text/TextFormatting

@RainWarrior RainWarrior added this to the 1.9 milestone Mar 2, 2016
@stephan-gh
Copy link

There are also method name changes in here for the changed class names that haven't been applied yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants