Added CamelMeta
This commit is contained in:
parent
427bb61ef5
commit
7ea64e74aa
2 changed files with 31 additions and 0 deletions
|
@ -61,6 +61,7 @@ final class MetaConverterRegistry {
|
|||
put(BOGGED, LivingEntityMeta.class, LivingEntityMeta::new); // TODO: Implement
|
||||
put(BREEZE, LivingEntityMeta.class, LivingEntityMeta::new); // TODO: Implement
|
||||
put(BREEZE_WIND_CHARGE, SmallFireballMeta.class, SmallFireballMeta::new); // TODO: Verify correctness
|
||||
put(CAMEL, CamelMeta.class, CamelMeta::new); // TODO: Verify correctness
|
||||
put(CAT, CatMeta.class, CatMeta::new);
|
||||
put(CAVE_SPIDER, CaveSpiderMeta.class, CaveSpiderMeta::new);
|
||||
put(CHEST_MINECART, ChestMinecartMeta.class, ChestMinecartMeta::new);
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package me.tofaa.entitylib.meta.mobs.horse;
|
||||
|
||||
import com.github.retrooper.packetevents.protocol.entity.data.EntityDataTypes;
|
||||
import me.tofaa.entitylib.meta.Metadata;
|
||||
|
||||
public class CamelMeta extends BaseHorseMeta {
|
||||
|
||||
public static final byte OFFSET = BaseHorseMeta.MAX_OFFSET;
|
||||
public static final byte MAX_OFFSET = OFFSET + 2;
|
||||
|
||||
public CamelMeta(int entityId, Metadata metadata) {
|
||||
super(entityId, metadata);
|
||||
}
|
||||
|
||||
public boolean isDashing() {
|
||||
return super.metadata.getIndex(OFFSET, false);
|
||||
}
|
||||
|
||||
public void setDashing(boolean value) {
|
||||
super.metadata.setIndex(OFFSET, EntityDataTypes.BOOLEAN, value);
|
||||
}
|
||||
|
||||
public long getLastPoseChangeTick() {
|
||||
return super.metadata.getIndex(OFFSET, 0L);
|
||||
}
|
||||
|
||||
public void setLastPoseChangeTick(long value) {
|
||||
super.metadata.setIndex(OFFSET, EntityDataTypes.LONG, value);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue