mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 15:07:36 +02:00
Reformat code
This commit is contained in:
parent
36986f6aa2
commit
ccaf9b5c47
@ -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() {
|
||||||
|
@ -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) {
|
||||||
|
@ -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.
|
||||||
*/
|
*/
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user