The goal of this PR is to replace constant entity properties (for example, isUndead and isArthropod) with annotations (@EntityProperties) instead of allowing these methods to be overriden.
I also added a Sounds annotation for hurt/death/ambient sounds instead of overriding the getters. The getters are not final for the moment because I only implemented it for certain entities.
I'm thinking of adding other properties like the bounding box dimensions (setSize()). Other technical annotations like entity metadata are planned but not part of the scope of this PR.
Example (click to expand)
For example, `GlowZombie.java`:
```java
public class GlowZombie extends GlowMonster implements Zombie {
/* ... */
@Override
protected Sound getHurtSound() {
return Sound.ENTITY_ZOMBIE_HURT;
}
@Override
protected Sound getDeathSound() {
return Sound.ENTITY_ZOMBIE_DEATH;
}
@Override
protected Sound getAmbientSound() {
return Sound.ENTITY_ZOMBIE_AMBIENT;
}
@Override
public boolean isUndead() {
return true;
}
}
```
Becomes:
```java
@EntityProperties(undead = true)
@Sounds(hurt = Sound.ENTITY_ZOMBIE_HURT,
death = Sound.ENTITY_ZOMBIE_DEATH,
ambient = Sound.ENTITY_ZOMBIE_AMBIENT)
public class GlowZombie extends GlowMonster implements Zombie {
/* ... */
}
```
The goal of this PR is to replace constant entity properties (for example,
isUndead
andisArthropod
) with annotations (@EntityProperties
) instead of allowing these methods to be overriden.I also added a
Sounds
annotation for hurt/death/ambient sounds instead of overriding the getters. The getters are not final for the moment because I only implemented it for certain entities.I'm thinking of adding other properties like the bounding box dimensions (
setSize()
). Other technical annotations like entity metadata are planned but not part of the scope of this PR.Example (click to expand)
For example, `GlowZombie.java`: ```java public class GlowZombie extends GlowMonster implements Zombie { /* ... */ @Override protected Sound getHurtSound() { return Sound.ENTITY_ZOMBIE_HURT; } @Override protected Sound getDeathSound() { return Sound.ENTITY_ZOMBIE_DEATH; } @Override protected Sound getAmbientSound() { return Sound.ENTITY_ZOMBIE_AMBIENT; } @Override public boolean isUndead() { return true; } } ``` Becomes: ```java @EntityProperties(undead = true) @Sounds(hurt = Sound.ENTITY_ZOMBIE_HURT, death = Sound.ENTITY_ZOMBIE_DEATH, ambient = Sound.ENTITY_ZOMBIE_AMBIENT) public class GlowZombie extends GlowMonster implements Zombie { /* ... */ } ```