Skip to content

Commit

Permalink
more pets
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTheTech committed Sep 27, 2023
1 parent 34cbcb4 commit b9984b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public enum OptionSelector {
BLAZE(new String[] {Option.NAME.name()}),
CAVE_SPIDER(new String[] {Option.NAME.name()}),
CREEPER(new String[] {Option.NAME.name(), Option.POWERED.name()}),
DROWNED(new String[] {Option.NAME.name(), Option.BABY.name()})
DROWNED(new String[] {Option.NAME.name(), Option.BABY.name()}),
ENDERMAN(new String[] {Option.NAME.name()}),
EVOKER(new String[] {Option.NAME.name()}),
GHAST(new String[] {Option.NAME.name()})
;

@Getter private final String[] options;
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 @@ -13,7 +13,7 @@ public class PetDataUtil {

public static String getPetData(EntityType entityType, String[] data, Option option) {
switch (entityType) {
case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER -> {
case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER, ENDERMAN, EVOKER, GHAST -> {
return data[1];
}
case COW, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR, SNIFFER, ZOGLIN, TURTLE, DROWNED -> {
Expand Down Expand Up @@ -157,7 +157,7 @@ public static String serializePetData(Entity entity) {
final String sep = ",";
final String startingData = entityType.name() + sep + petName;
switch (entityType) {
case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER -> {
case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER, ENDERMAN, EVOKER, GHAST -> {
return startingData;
}
case COW, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR, SNIFFER, ZOGLIN, TURTLE, DROWNED -> {
Expand Down Expand Up @@ -280,7 +280,7 @@ public static String serializePetData(Entity entity) {
public static String addNewPetData(EntityType entityType, String[] data, String newData, Option option) {
final String sep = ",";
switch (entityType) {
case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER -> {
case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER, ENDERMAN, EVOKER, GHAST -> {
return data[0] + sep + newData;
}
case COW, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR, SNIFFER, ZOGLIN, TURTLE, DROWNED -> {
Expand Down

0 comments on commit b9984b2

Please sign in to comment.