Added WardenMeta
This commit is contained in:
parent
99a465e46b
commit
08062bd3d5
2 changed files with 27 additions and 1 deletions
|
@ -151,7 +151,7 @@ final class MetaConverterRegistry {
|
||||||
put(VILLAGER, VillagerMeta.class, VillagerMeta::new);
|
put(VILLAGER, VillagerMeta.class, VillagerMeta::new);
|
||||||
put(VINDICATOR, VindicatorMeta.class, VindicatorMeta::new);
|
put(VINDICATOR, VindicatorMeta.class, VindicatorMeta::new);
|
||||||
put(WANDERING_TRADER, WanderingTraderMeta.class, WanderingTraderMeta::new);
|
put(WANDERING_TRADER, WanderingTraderMeta.class, WanderingTraderMeta::new);
|
||||||
put(WARDEN, LivingEntityMeta.class, LivingEntityMeta::new); // TODO: Implement
|
put(WARDEN, WardenMeta.class, WardenMeta::new);
|
||||||
put(WIND_CHARGE, SmallFireballMeta.class, SmallFireballMeta::new); // TODO: Verify correctness
|
put(WIND_CHARGE, SmallFireballMeta.class, SmallFireballMeta::new); // TODO: Verify correctness
|
||||||
put(WITCH, WitchMeta.class, WitchMeta::new);
|
put(WITCH, WitchMeta.class, WitchMeta::new);
|
||||||
put(WITHER, WitherMeta.class, WitherMeta::new);
|
put(WITHER, WitherMeta.class, WitherMeta::new);
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package me.tofaa.entitylib.meta.mobs.monster;
|
||||||
|
|
||||||
|
import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes;
|
||||||
|
import me.tofaa.entitylib.meta.Metadata;
|
||||||
|
import me.tofaa.entitylib.meta.types.MobMeta;
|
||||||
|
|
||||||
|
public class WardenMeta extends MobMeta {
|
||||||
|
|
||||||
|
public static final byte OFFSET = MobMeta.MAX_OFFSET;
|
||||||
|
public static final byte MAX_OFFSET = OFFSET + 1;
|
||||||
|
|
||||||
|
public WardenMeta(int entityId, Metadata metadata) {
|
||||||
|
super(entityId, metadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAngerLevel() {
|
||||||
|
return super.metadata.getIndex(OFFSET, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAngerLevel(int value) {
|
||||||
|
if (getAngerLevel() == value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
super.metadata.setIndex(OFFSET, EntityDataTypes.INT, value);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue