Skip to content

Commit

Permalink
pig & polar_bear
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTheTech committed Sep 26, 2023
1 parent 15b606e commit aeba609
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public enum OptionSelector {
LLAMA(new String[] {Option.NAME.name(), Option.BABY.name(), Option.CHEST.name(), Option.VARIANT.name(), Option.SADDLE.name(), Option.COLOR.name()}),
MUSHROOM_COW(new String[] {Option.NAME.name(), Option.BABY.name(), Option.VARIANT.name()}),
OCELOT(new String[] {Option.NAME.name(), Option.BABY.name()}),
PANDA(new String[] {Option.NAME.name(), Option.BABY.name(), Option.MAIN_GENE.name(), Option.HIDDEN_GENE.name()})
PANDA(new String[] {Option.NAME.name(), Option.BABY.name(), Option.MAIN_GENE.name(), Option.HIDDEN_GENE.name()}),
PIG(new String[] {Option.NAME.name(), Option.BABY.name()}),
POLAR_BEAR(new String[] {Option.NAME.name(), Option.BABY.name()})
;

@Getter private final String[] options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void tick() {

// Set the mob's motion
mob.setYRot(yaw);
mob.setSpeed(0.2F);
mob.setSpeed(0.4F);
mob.setZza(forward);
mob.setXxa(0.0F);
if (rider.jumping) jump();
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/lee/code/pets/utils/PetDataUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static String getPetData(EntityType entityType, String[] data, Option opt
case ALLAY, BAT, IRON_GOLEM -> {
return data[1];
}
case COW, BEE, CHICKEN, HOGLIN, OCELOT -> {
case COW, BEE, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR -> {
switch (option) {
case NAME -> {return data[1];}
case BABY -> {return data[2];}
Expand Down Expand Up @@ -116,7 +116,7 @@ public static String serializePetData(Entity entity) {
case ALLAY, BAT, IRON_GOLEM -> {
return startingData;
}
case COW, BEE, CHICKEN, HOGLIN, OCELOT -> {
case COW, BEE, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR -> {
return startingData + sep + isBaby;
}
case FOX -> {
Expand Down Expand Up @@ -183,7 +183,7 @@ public static String addNewPetData(EntityType entityType, String[] data, String
case ALLAY, BAT, IRON_GOLEM -> {
return data[0] + sep + newData;
}
case COW, BEE, CHICKEN, HOGLIN, OCELOT -> {
case COW, BEE, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR -> {
switch (option) {
case NAME -> {return data[0] + sep + newData + sep + data[2];}
case BABY -> {return data[0] + sep + data[1] + sep + newData;}
Expand Down

0 comments on commit aeba609

Please sign in to comment.