Reformat code

This commit is contained in:
themode 2020-11-17 15:58:36 +01:00
parent 36986f6aa2
commit ccaf9b5c47
4 changed files with 293 additions and 297 deletions

View File

@ -1,13 +1,13 @@
package net.minestom.server.attribute; package net.minestom.server.attribute;
import java.util.HashMap;
import java.util.Map;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import java.util.HashMap;
import java.util.Map;
/** /**
* Represent a {@link net.minestom.server.entity.LivingEntity living entity} attribute. * Represents a {@link net.minestom.server.entity.LivingEntity living entity} attribute.
*/ */
public class Attribute { public class Attribute {
@ -90,10 +90,9 @@ public class Attribute {
/** /**
* Register this attribute. * Register this attribute.
* *
* @return this attribute
* @see #fromKey(String) * @see #fromKey(String)
* @see #values() * @see #values()
*
* @return this attribute
*/ */
@NotNull @NotNull
public Attribute register() { public Attribute register() {

View File

@ -1,14 +1,14 @@
package net.minestom.server.attribute; package net.minestom.server.attribute;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/** /**
* Represents an instance of an attribute and its modifiers. * Represents an instance of an attribute and its modifiers.
*/ */
@ -40,9 +40,8 @@ public class AttributeInstance {
/** /**
* The base value of this instance without modifiers * The base value of this instance without modifiers
* *
* @see #setBaseValue(float)
*
* @return the instance base value * @return the instance base value
* @see #setBaseValue(float)
*/ */
public float getBaseValue() { public float getBaseValue() {
return baseValue; return baseValue;
@ -64,9 +63,8 @@ public class AttributeInstance {
/** /**
* Sets the base value of this instance. * Sets the base value of this instance.
* *
* @see #getBaseValue()
*
* @param baseValue the new base value * @param baseValue the new base value
* @see #getBaseValue()
*/ */
public void setBaseValue(float baseValue) { public void setBaseValue(float baseValue) {
if (this.baseValue != baseValue) { if (this.baseValue != baseValue) {

View File

@ -1,11 +1,11 @@
package net.minestom.server.attribute; package net.minestom.server.attribute;
import java.util.UUID;
import io.netty.util.internal.ThreadLocalRandom; import io.netty.util.internal.ThreadLocalRandom;
import net.minestom.server.utils.UniqueIdUtils; import net.minestom.server.utils.UniqueIdUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.UUID;
/** /**
* Represent an attribute modifier. * Represent an attribute modifier.
*/ */

View File

@ -3,8 +3,7 @@ package net.minestom.server.attribute;
/** /**
* The Minecraft, vanilla, standards attributes. * The Minecraft, vanilla, standards attributes.
*/ */
public final class Attributes public final class Attributes {
{
public static final Attribute MAX_HEALTH = (new Attribute("generic.max_health", true, 20, 1024)).register(); public static final Attribute MAX_HEALTH = (new Attribute("generic.max_health", true, 20, 1024)).register();
public static final Attribute FOLLOW_RANGE = (new Attribute("generic.follow_range", true, 32, 2048)).register(); public static final Attribute FOLLOW_RANGE = (new Attribute("generic.follow_range", true, 32, 2048)).register();
public static final Attribute KNOCKBACK_RESISTANCE = (new Attribute("generic.knockback_resistance", true, 0, 1)).register(); public static final Attribute KNOCKBACK_RESISTANCE = (new Attribute("generic.knockback_resistance", true, 0, 1)).register();