mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-13 07:09:51 +01:00
Do not fill attributes by default
This commit is contained in:
parent
169dbedea2
commit
7cd2d1b896
@ -88,7 +88,6 @@ public class LivingEntity extends Entity implements EquipmentHandler {
|
||||
*/
|
||||
public LivingEntity(@NotNull EntityType entityType, @NotNull UUID uuid) {
|
||||
this(entityType, uuid, new Position());
|
||||
setupAttributes();
|
||||
setGravity(0.02f, 0.08f, 3.92f);
|
||||
initEquipments();
|
||||
}
|
||||
@ -103,7 +102,6 @@ public class LivingEntity extends Entity implements EquipmentHandler {
|
||||
@Deprecated
|
||||
public LivingEntity(@NotNull EntityType entityType, @NotNull UUID uuid, @NotNull Position spawnPosition) {
|
||||
super(entityType, uuid, spawnPosition);
|
||||
setupAttributes();
|
||||
setGravity(0.02f, 0.08f, 3.92f);
|
||||
initEquipments();
|
||||
}
|
||||
@ -641,16 +639,6 @@ public class LivingEntity extends Entity implements EquipmentHandler {
|
||||
return propertiesPacket;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets all the attributes to {@link Attribute#getDefaultValue()}
|
||||
*/
|
||||
private void setupAttributes() {
|
||||
for (Attribute attribute : Attribute.values()) {
|
||||
final AttributeInstance attributeInstance = new AttributeInstance(attribute, this::onAttributeChanged);
|
||||
this.attributeModifiers.put(attribute.getKey(), attributeInstance);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleVoid() {
|
||||
// Kill if in void
|
||||
|
Loading…
Reference in New Issue
Block a user