Fix code formatting
This commit is contained in:
@@ -455,8 +455,8 @@ public final class ComponentBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the component built by this builder. If this builder is
|
||||
* empty, an empty text component will be returned.
|
||||
* Returns the component built by this builder. If this builder is empty, an
|
||||
* empty text component will be returned.
|
||||
*
|
||||
* @return the component
|
||||
*/
|
||||
@@ -478,8 +478,8 @@ public final class ComponentBuilder
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> {@link #build()} is preferred as it will
|
||||
* consolidate all components into a single BaseComponent with extra
|
||||
* contents as opposed to an array of components which is non-standard
|
||||
* and may result in unexpected behavior.
|
||||
* contents as opposed to an array of components which is non-standard and
|
||||
* may result in unexpected behavior.
|
||||
*
|
||||
* @return the created components
|
||||
*/
|
||||
|
@@ -43,7 +43,7 @@ public final class ItemTag
|
||||
private final int level;
|
||||
private final int id;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
private ItemTag(String nbt)
|
||||
{
|
||||
|
@@ -26,7 +26,10 @@ public class Text extends Content
|
||||
public Text(BaseComponent value)
|
||||
{
|
||||
// For legacy serialization reasons, this has to be an array of components
|
||||
this( new BaseComponent[]{value} );
|
||||
this( new BaseComponent[]
|
||||
{
|
||||
value
|
||||
} );
|
||||
}
|
||||
|
||||
public Text(String value)
|
||||
|
@@ -44,16 +44,17 @@ public class ComponentSerializer implements JsonDeserializer<BaseComponent>
|
||||
|
||||
/**
|
||||
* Parse a JSON-compliant String as an array of base components. The input
|
||||
* can be one of either an array of components, or a single component object.
|
||||
* If the input is an array, each component will be parsed individually and
|
||||
* returned in the order that they were parsed. If the input is a single
|
||||
* component object, a single-valued array with the component will be returned.
|
||||
* can be one of either an array of components, or a single component
|
||||
* object. If the input is an array, each component will be parsed
|
||||
* individually and returned in the order that they were parsed. If the
|
||||
* input is a single component object, a single-valued array with the
|
||||
* component will be returned.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> {@link #deserialize(String)} is preferred as it will
|
||||
* parse only one component as opposed to an array of components which is non-
|
||||
* standard behavior. This method is still appropriate for parsing multiple
|
||||
* components at once, although such use case is rarely (if at all) exhibited
|
||||
* in vanilla Minecraft.
|
||||
* <strong>NOTE:</strong> {@link #deserialize(String)} is preferred as it
|
||||
* will parse only one component as opposed to an array of components which
|
||||
* is non- standard behavior. This method is still appropriate for parsing
|
||||
* multiple components at once, although such use case is rarely (if at all)
|
||||
* exhibited in vanilla Minecraft.
|
||||
*
|
||||
* @param json the component json to parse
|
||||
* @return an array of all parsed components
|
||||
|
Reference in New Issue
Block a user