Comments (3)
Tbh. when I read wrapping I think more of the width in characters of a line and not the pixel width. Imo. both have their use cases (and normal character count might be easier to implement first) and it would probably be good to properly differentiate those two methods.
Main issue with wrapping would be components that don't have a specific length (e.g. translatable ones, for those the default locale or a user provided one could be used to determine the length/width though), best would probably to split before that component in case it gets close to the end (maybe half-width with a minimum assumed per component or something like that)
from adventure.
Based on discussions in #262, we've decided this makes more sense to be released as an external library, unless Mojang changes what they offer us.
from adventure.
https://gist.github.com/Minikloon/e6a7679d171b90dc4e0731db46d77c84
from adventure.
Related Issues (20)
- `fastjson2` component serializer HOT 1
- MM rainbow phase problems
- LegacyComponentSerializer does not deserialize components properly if formatting code char is capitalized HOT 4
- Gradient tags in combination with length modifying tags
- Support new item hover format in 24w09+
- Particle Interfaces?
- Phase issues with <gradient> and more than 2 colors HOT 4
- BinaryTagIO.Reader & BinaryTagIO.Writer other tag support HOT 1
- Make `BinaryTagType.binaryTagType(int)` public HOT 1
- Emptying BossBar flags always calls bossBarFlagsChanged, even if nothing was changed
- Filtering tag provider
- Generic character mapping MiniMessage tag (for small caps)
- Default value for unresolved tags
- API for "caching" MiniMessage strings (or other serializer specific data) for ease of sending
- `CompoundBinaryTag#getBoolean` with default is incorrect
- `ListBinaryTag` is weakly immutable HOT 3
- NPE while sending a resource pack with no prompt HOT 1
- Adventure weighs hue too heavily when comparing colors HOT 3
- MiniMessage strips "redundant" tags which does not allow me to set prefixes as I can with legacy color codes HOT 1
- show_item client safety HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adventure.