Added ArmadilloMeta
This commit is contained in:
parent
08062bd3d5
commit
427bb61ef5
2 changed files with 25 additions and 1 deletions
|
@ -48,7 +48,7 @@ final class MetaConverterRegistry {
|
||||||
MetaConverterRegistry() {
|
MetaConverterRegistry() {
|
||||||
put(ABSTRACT_WIND_CHARGE, SmallFireballMeta.class, SmallFireballMeta::new); // TODO: Verify correctness
|
put(ABSTRACT_WIND_CHARGE, SmallFireballMeta.class, SmallFireballMeta::new); // TODO: Verify correctness
|
||||||
put(AREA_EFFECT_CLOUD, AreaEffectCloudMeta.class, AreaEffectCloudMeta::new);
|
put(AREA_EFFECT_CLOUD, AreaEffectCloudMeta.class, AreaEffectCloudMeta::new);
|
||||||
put(ARMADILLO, LivingEntityMeta.class, LivingEntityMeta::new); // TODO: Implement
|
put(ARMADILLO, ArmadilloMeta.class, ArmadilloMeta::new); // TODO: Verify correctness
|
||||||
put(ARMOR_STAND, ArmorStandMeta.class, ArmorStandMeta::new);
|
put(ARMOR_STAND, ArmorStandMeta.class, ArmorStandMeta::new);
|
||||||
put(ALLAY, LivingEntityMeta.class, LivingEntityMeta::new); // TODO: Implement
|
put(ALLAY, LivingEntityMeta.class, LivingEntityMeta::new); // TODO: Implement
|
||||||
put(ARROW, ArrowMeta.class, ArrowMeta::new);
|
put(ARROW, ArrowMeta.class, ArrowMeta::new);
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package me.tofaa.entitylib.meta.mobs.passive;
|
||||||
|
|
||||||
|
import com.github.retrooper.packetevents.protocol.entity.armadillo.ArmadilloState;
|
||||||
|
import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes;
|
||||||
|
import me.tofaa.entitylib.meta.Metadata;
|
||||||
|
import me.tofaa.entitylib.meta.types.AgeableMeta;
|
||||||
|
|
||||||
|
public class ArmadilloMeta extends AgeableMeta {
|
||||||
|
|
||||||
|
public static final byte OFFSET = AgeableMeta.MAX_OFFSET;
|
||||||
|
public static final byte MAX_OFFSET = OFFSET + 1;
|
||||||
|
|
||||||
|
public ArmadilloMeta(int entityId, Metadata metadata) {
|
||||||
|
super(entityId, metadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArmadilloState getState() {
|
||||||
|
return metadata.getIndex(OFFSET, ArmadilloState.IDLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(ArmadilloState state) {
|
||||||
|
super.metadata.setIndex(OFFSET, EntityDataTypes.ARMADILLO_STATE, state);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue