From 831cd7b0d239d7595852d7fb3ab5d4c8b1641fb0 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 27 Sep 2023 14:54:29 -0700 Subject: [PATCH] piglin_brute --- .../pets/menus/menu/menudata/options/OptionSelector.java | 1 + .../java/lee/code/pets/pets/pet/monster/PiglinBrutePet.java | 1 - src/main/java/lee/code/pets/utils/PetDataUtil.java | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/lee/code/pets/menus/menu/menudata/options/OptionSelector.java b/src/main/java/lee/code/pets/menus/menu/menudata/options/OptionSelector.java index a386fcd..9c8fa90 100644 --- a/src/main/java/lee/code/pets/menus/menu/menudata/options/OptionSelector.java +++ b/src/main/java/lee/code/pets/menus/menu/menudata/options/OptionSelector.java @@ -62,6 +62,7 @@ public enum OptionSelector { MAGMA_CUBE(new String[] {Option.NAME.name(), Option.SIZE.name()}), SLIME(new String[] {Option.NAME.name(), Option.SIZE.name()}), PHANTOM(new String[] {Option.NAME.name()}), + PIGLIN_BRUTE(new String[] {Option.NAME.name()}), ; @Getter private final String[] options; diff --git a/src/main/java/lee/code/pets/pets/pet/monster/PiglinBrutePet.java b/src/main/java/lee/code/pets/pets/pet/monster/PiglinBrutePet.java index 9ea1963..610dd1c 100644 --- a/src/main/java/lee/code/pets/pets/pet/monster/PiglinBrutePet.java +++ b/src/main/java/lee/code/pets/pets/pet/monster/PiglinBrutePet.java @@ -28,7 +28,6 @@ public PiglinBrutePet(Player player, String[] data) { collides = false; target = ((CraftPlayer) player).getHandle(); setCustomName(Component.Serializer.fromJson(CoreUtil.serializeColorComponentJson(data[1]))); - setBaby(Boolean.parseBoolean(data[2])); setTarget(target, EntityTargetEvent.TargetReason.CUSTOM, false); moveControl = new ControllerWASD(this, player.getUniqueId(), 0.4F); targetSelector.getAvailableGoals().clear(); diff --git a/src/main/java/lee/code/pets/utils/PetDataUtil.java b/src/main/java/lee/code/pets/utils/PetDataUtil.java index f63d9c2..cf61df4 100644 --- a/src/main/java/lee/code/pets/utils/PetDataUtil.java +++ b/src/main/java/lee/code/pets/utils/PetDataUtil.java @@ -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, ENDERMAN, EVOKER, GHAST, ILLUSIONER, PHANTOM -> { + case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER, ENDERMAN, EVOKER, GHAST, ILLUSIONER, PHANTOM, PIGLIN_BRUTE -> { return data[1]; } case COW, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR, SNIFFER, ZOGLIN, TURTLE, DROWNED, HUSK -> { @@ -163,7 +163,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, ENDERMAN, EVOKER, GHAST, ILLUSIONER, PHANTOM -> { + case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER, ENDERMAN, EVOKER, GHAST, ILLUSIONER, PHANTOM, PIGLIN_BRUTE -> { return startingData; } case COW, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR, SNIFFER, ZOGLIN, TURTLE, DROWNED, HUSK -> { @@ -294,7 +294,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, ENDERMAN, EVOKER, GHAST, ILLUSIONER, PHANTOM -> { + case ALLAY, BAT, IRON_GOLEM, WANDERING_TRADER, COD, DOLPHIN, ELDER_GUARDIAN, GLOW_SQUID, GUARDIAN, PUFFERFISH, SALMON, SQUID, TADPOLE, BLAZE, CAVE_SPIDER, ENDERMAN, EVOKER, GHAST, ILLUSIONER, PHANTOM, PIGLIN_BRUTE -> { return data[0] + sep + newData; } case COW, CHICKEN, HOGLIN, OCELOT, PIG, POLAR_BEAR, SNIFFER, ZOGLIN, TURTLE, DROWNED, HUSK -> {