Skip to content

Commit

Permalink
piglin_brute
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTheTech committed Sep 27, 2023
1 parent 61113d5 commit 831cd7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
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, 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 -> {
Expand Down Expand Up @@ -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 -> {
Expand Down Expand Up @@ -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 -> {
Expand Down

0 comments on commit 831cd7b

Please sign in to comment.