File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
api/src/main/java/me/tofaa/entitylib/meta/mobs/tameable Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11package me .tofaa .entitylib .meta .mobs .tameable ;
22
33import com .github .retrooper .packetevents .protocol .entity .data .EntityDataTypes ;
4+ import com .github .retrooper .packetevents .protocol .entity .wolfvariant .WolfVariant ;
5+ import com .github .retrooper .packetevents .protocol .entity .wolfvariant .WolfVariants ;
46import me .tofaa .entitylib .extras .DyeColor ;
57import me .tofaa .entitylib .meta .Metadata ;
68import me .tofaa .entitylib .meta .types .TameableMeta ;
9+ import org .jetbrains .annotations .NotNull ;
710
811public class WolfMeta extends TameableMeta {
912
1013 public static final byte OFFSET = TameableMeta .MAX_OFFSET ;
11- public static final byte MAX_OFFSET = OFFSET + 3 ;
14+ public static final byte MAX_OFFSET = OFFSET + 5 ;
1215
1316 public WolfMeta (int entityId , Metadata metadata ) {
1417 super (entityId , metadata );
1518 }
1619
20+ @ NotNull
21+ public WolfVariant getVariant () {
22+ return super .metadata .getIndex (offset (OFFSET , 3 ), WolfVariants .PALE );
23+ }
24+
25+ public void setVariant (@ NotNull WolfVariant value ) {
26+ super .metadata .setIndex (offset (OFFSET , 3 ), EntityDataTypes .TYPED_WOLF_VARIANT , value );
27+ }
28+
1729 public boolean isBegging () {
1830 return super .metadata .getIndex (OFFSET , false );
1931 }
You can’t perform that action at this time.
0 commit comments