From 5fd1478e9a73fe280e8387c59eb3e6a46074852e Mon Sep 17 00:00:00 2001 From: Jakllp <57708725+Jakllp@users.noreply.github.com> Date: Tue, 24 Aug 2021 23:05:50 +0200 Subject: [PATCH] Axolotl+Goats - Bump to dev5 New: - Added Goats - Added Axolotls Bump to dev5 --- .../de/Keyle/MyPet/api/Configuration.java | 6 + .../de/Keyle/MyPet/api/entity/MyPetType.java | 6 + .../MyPet/api/entity/types/MyAxolotl.java | 32 ++++++ .../Keyle/MyPet/api/entity/types/MyGoat.java | 31 +++++ modules/MyPet/pom.xml | 2 +- .../commands/admin/CommandOptionCreate.java | 9 ++ .../de/Keyle/MyPet/entity/MyPetClass.java | 2 + .../Keyle/MyPet/entity/types/MyAxolotl.java | 91 +++++++++++++++ .../de/Keyle/MyPet/entity/types/MyGoat.java | 71 ++++++++++++ .../entity/types/EntityMyAxolotl.java | 79 +++++++++++++ .../v1_17_R1/entity/types/EntityMyBat.java | 2 - .../v1_17_R1/entity/types/EntityMyGoat.java | 107 ++++++++++++++++++ .../entity/types/EntityMyMooshroom.java | 2 +- .../v1_17_R1/services/EggIconService.java | 6 + 14 files changed, 442 insertions(+), 4 deletions(-) create mode 100644 modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyAxolotl.java create mode 100644 modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyGoat.java create mode 100644 modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyAxolotl.java create mode 100644 modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyGoat.java create mode 100644 modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyAxolotl.java create mode 100644 modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyGoat.java diff --git a/modules/API/src/main/java/de/Keyle/MyPet/api/Configuration.java b/modules/API/src/main/java/de/Keyle/MyPet/api/Configuration.java index 5e136bbed3..c018126f5a 100644 --- a/modules/API/src/main/java/de/Keyle/MyPet/api/Configuration.java +++ b/modules/API/src/main/java/de/Keyle/MyPet/api/Configuration.java @@ -238,6 +238,12 @@ public static class Ghast { public static boolean CAN_GLIDE = true; } + public static class Goat { + public static boolean CAN_GIVE_MILK = true; + public static ConfigItem GROW_UP_ITEM; + + } + public static class Hoglin { public static ConfigItem GROW_UP_ITEM; diff --git a/modules/API/src/main/java/de/Keyle/MyPet/api/entity/MyPetType.java b/modules/API/src/main/java/de/Keyle/MyPet/api/entity/MyPetType.java index 111ca4679a..8109b124f9 100644 --- a/modules/API/src/main/java/de/Keyle/MyPet/api/entity/MyPetType.java +++ b/modules/API/src/main/java/de/Keyle/MyPet/api/entity/MyPetType.java @@ -29,6 +29,9 @@ import java.util.List; public enum MyPetType { + Axolotl("AXOLOTL", "1.17.1", MyAxolotl.class, new Compat<>() + .v("1.17.1", "axolotl") + .search()), Bat("BAT", "1.7.10", MyBat.class, new Compat<>() .v("1.7.10", 65) .v("1.13", "bat") @@ -99,6 +102,9 @@ public enum MyPetType { .v("1.7.10", 56) .v("1.13", "ghast") .search()), + Goat("GOAT", "1.17.1", MyGoat.class, new Compat<>() + .v("1.17.1", "goat") + .search()), Giant("GIANT", "1.7.10", MyGiant.class, new Compat<>() .v("1.7.10", 53) .v("1.13", "giant") diff --git a/modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyAxolotl.java b/modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyAxolotl.java new file mode 100644 index 0000000000..e33323a98b --- /dev/null +++ b/modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyAxolotl.java @@ -0,0 +1,32 @@ +/* + * This file is part of MyPet + * + * Copyright © 2011-2019 Keyle + * MyPet is licensed under the GNU Lesser General Public License. + * + * MyPet is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * MyPet is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.Keyle.MyPet.api.entity.types; + +import de.Keyle.MyPet.api.entity.DefaultInfo; +import de.Keyle.MyPet.api.entity.MyPet; +import de.Keyle.MyPet.api.entity.MyPetBaby; +@DefaultInfo(food = {"bucket"}) +public interface MyAxolotl extends MyPet, MyPetBaby { + + int getVariant(); + + void setVariant(int variant); +} \ No newline at end of file diff --git a/modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyGoat.java b/modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyGoat.java new file mode 100644 index 0000000000..e269fa7be2 --- /dev/null +++ b/modules/API/src/main/java/de/Keyle/MyPet/api/entity/types/MyGoat.java @@ -0,0 +1,31 @@ +/* + * This file is part of MyPet + * + * Copyright © 2011-2019 Keyle + * MyPet is licensed under the GNU Lesser General Public License. + * + * MyPet is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * MyPet is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.Keyle.MyPet.api.entity.types; + +import de.Keyle.MyPet.api.entity.DefaultInfo; +import de.Keyle.MyPet.api.entity.MyPet; +import de.Keyle.MyPet.api.entity.MyPetBaby; + + +@DefaultInfo(food = {"wheat"}) +public interface MyGoat extends MyPet, MyPetBaby { + +} \ No newline at end of file diff --git a/modules/MyPet/pom.xml b/modules/MyPet/pom.xml index aea224a91f..74cba96a27 100644 --- a/modules/MyPet/pom.xml +++ b/modules/MyPet/pom.xml @@ -24,7 +24,7 @@ de.keyle mypet - 3.12-dev4 + 3.12-dev5 jar MyPet https://www.spigotmc.org/resources/mypet.12725/ diff --git a/modules/Plugin/src/main/java/de/Keyle/MyPet/commands/admin/CommandOptionCreate.java b/modules/Plugin/src/main/java/de/Keyle/MyPet/commands/admin/CommandOptionCreate.java index 9bb6b2275b..617e822e75 100644 --- a/modules/Plugin/src/main/java/de/Keyle/MyPet/commands/admin/CommandOptionCreate.java +++ b/modules/Plugin/src/main/java/de/Keyle/MyPet/commands/admin/CommandOptionCreate.java @@ -61,6 +61,11 @@ public class CommandOptionCreate implements CommandOptionTabCompleter { commonTypeOptionList.add("skilltree:"); commonTypeOptionList.add("name:"); + petTypeOptionMap.put("axolotl", new CommandOptionCreator() + .add("baby") + .add("type:") + .get()); + petTypeOptionMap.put("bee", new CommandOptionCreator() .add("baby") .add("angry") @@ -110,6 +115,10 @@ public class CommandOptionCreate implements CommandOptionTabCompleter { .add("type:white") .get()); + petTypeOptionMap.put("goat", new CommandOptionCreator() + .add("baby") + .get()); + petTypeOptionMap.put("guardian", new CommandOptionCreator() .add("1.7.10", "1.11", "elder") .get()); diff --git a/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/MyPetClass.java b/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/MyPetClass.java index 051bc7fc0d..97451a582b 100644 --- a/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/MyPetClass.java +++ b/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/MyPetClass.java @@ -28,6 +28,7 @@ import java.lang.reflect.Constructor; public enum MyPetClass { + Axolotl(MyAxolotl.class), Bat(MyBat.class), Bee(MyBee.class), Blaze(MyBlaze.class), @@ -47,6 +48,7 @@ public enum MyPetClass { Evoker(MyEvoker.class), Fox(MyFox.class), Ghast(MyGhast.class), + Goat(MyGoat.class), Giant(MyGiant.class), Guardian(MyGuardian.class), Hoglin(MyHoglin.class), diff --git a/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyAxolotl.java b/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyAxolotl.java new file mode 100644 index 0000000000..27590a602d --- /dev/null +++ b/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyAxolotl.java @@ -0,0 +1,91 @@ + /* + * This file is part of MyPet + * + * Copyright © 2011-2019 Keyle + * MyPet is licensed under the GNU Lesser General Public License. + * + * MyPet is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * MyPet is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package de.Keyle.MyPet.entity.types; + + import de.Keyle.MyPet.api.entity.MyPetType; + import de.Keyle.MyPet.api.player.MyPetPlayer; + import de.Keyle.MyPet.entity.MyPet; + import de.keyle.knbt.TagByte; + import de.keyle.knbt.TagCompound; + import de.keyle.knbt.TagInt; + import org.bukkit.ChatColor; + +public class MyAxolotl extends MyPet implements de.Keyle.MyPet.api.entity.types.MyAxolotl { + + protected boolean isBaby = false; + protected int axolotlType = 1; + + public MyAxolotl(MyPetPlayer petOwner) { + super(petOwner); + } + @Override + public TagCompound writeExtendedInfo() { + TagCompound info = super.writeExtendedInfo(); + info.getCompoundData().put("Baby", new TagByte(isBaby())); + info.getCompoundData().put("Variant", new TagInt(getVariant())); + return info; + } + + @Override + public void readExtendedInfo(TagCompound info) { + if (info.containsKey("Variant")) { + setVariant(info.getAs("Variant", TagInt.class).getIntData()); + } + if (info.containsKey("Baby")) { + setBaby(info.getAs("Baby", TagByte.class).getBooleanData()); + } + + } + + @Override + public MyPetType getPetType() { + return MyPetType.Axolotl; + } + + @Override + public int getVariant() { + return axolotlType; + } + + @Override + public void setVariant(int variant) { + this.axolotlType = Math.min(4, Math.max(0, variant)); + if (status == PetState.Here) { + getEntity().ifPresent(entity -> entity.getHandle().updateVisuals()); + } + } + + public boolean isBaby() { + return isBaby; + } + + public void setBaby(boolean flag) { + this.isBaby = flag; + if (status == PetState.Here) { + getEntity().ifPresent(entity -> entity.getHandle().updateVisuals()); + } + } + + @Override + public String toString() { + return "MyAxolotl{owner=" + getOwner().getName() + ", name=" + ChatColor.stripColor(petName) + ", exp=" + experience.getExp() + "/" + experience.getRequiredExp() + ", lv=" + experience.getLevel() + ", status=" + status.name() + ", skilltree=" + (skilltree != null ? skilltree.getName() : "-") + ", worldgroup=" + worldGroup + ", baby=" + isBaby() + "}"; + } +} \ No newline at end of file diff --git a/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyGoat.java b/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyGoat.java new file mode 100644 index 0000000000..6d966329a7 --- /dev/null +++ b/modules/Plugin/src/main/java/de/Keyle/MyPet/entity/types/MyGoat.java @@ -0,0 +1,71 @@ +/* + * This file is part of MyPet + * + * Copyright © 2011-2019 Keyle + * MyPet is licensed under the GNU Lesser General Public License. + * + * MyPet is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * MyPet is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.Keyle.MyPet.entity.types; + +import de.Keyle.MyPet.api.entity.MyPetType; +import de.Keyle.MyPet.api.player.MyPetPlayer; +import de.Keyle.MyPet.entity.MyPet; +import de.keyle.knbt.TagByte; +import de.keyle.knbt.TagCompound; +import org.bukkit.ChatColor; + +public class MyGoat extends MyPet implements de.Keyle.MyPet.api.entity.types.MyGoat { + protected boolean isBaby = false; + + public MyGoat(MyPetPlayer petOwner) { + super(petOwner); + } + + @Override + public TagCompound writeExtendedInfo() { + TagCompound info = super.writeExtendedInfo(); + info.getCompoundData().put("Baby", new TagByte(isBaby())); + return info; + } + + @Override + public void readExtendedInfo(TagCompound info) { + if (info.containsKey("Baby")) { + setBaby(info.getAs("Baby", TagByte.class).getBooleanData()); + } + } + + @Override + public MyPetType getPetType() { + return MyPetType.Goat; + } + + public boolean isBaby() { + return isBaby; + } + + public void setBaby(boolean flag) { + this.isBaby = flag; + if (status == PetState.Here) { + getEntity().ifPresent(entity -> entity.getHandle().updateVisuals()); + } + } + + @Override + public String toString() { + return "MyGoat{owner=" + getOwner().getName() + ", name=" + ChatColor.stripColor(petName) + ", exp=" + experience.getExp() + "/" + experience.getRequiredExp() + ", lv=" + experience.getLevel() + ", status=" + status.name() + ", skilltree=" + (skilltree != null ? skilltree.getName() : "-") + ", worldgroup=" + worldGroup + ", baby=" + isBaby() + "}"; + } +} \ No newline at end of file diff --git a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyAxolotl.java b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyAxolotl.java new file mode 100644 index 0000000000..1d709e0505 --- /dev/null +++ b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyAxolotl.java @@ -0,0 +1,79 @@ +/* + * This file is part of MyPet + * + * Copyright © 2011-2020 Keyle + * MyPet is licensed under the GNU Lesser General Public License. + * + * MyPet is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * MyPet is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.Keyle.MyPet.compat.v1_17_R1.entity.types; + +import de.Keyle.MyPet.api.entity.EntitySize; +import de.Keyle.MyPet.api.entity.MyPet; +import de.Keyle.MyPet.api.entity.types.MyAxolotl; +import de.Keyle.MyPet.compat.v1_17_R1.entity.EntityMyPet; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.world.level.Level; + +@EntitySize(width = 0.7F, height = 1.3F) +public class EntityMyAxolotl extends EntityMyPet { + + private static final EntityDataAccessor AGE_WATCHER = SynchedEntityData.defineId(EntityMyAxolotl.class, EntityDataSerializers.BOOLEAN); + private static final EntityDataAccessor VARIANT_WATCHER = SynchedEntityData.defineId(EntityMyAxolotl.class, EntityDataSerializers.INT); + + public EntityMyAxolotl(Level world, MyPet myPet) { + super(world, myPet); + } + + @Override + protected String getMyPetDeathSound() { + return "entity.axolotl.death"; + } + + @Override + protected String getHurtSound() { + return "entity.axolotl.hurt"; + } + + @Override + protected String getLivingSound() { + return "entity.axolotl.idle_air"; + } + + @Override + protected void defineSynchedData() { + super.defineSynchedData(); + getEntityData().define(AGE_WATCHER, false); + getEntityData().define(VARIANT_WATCHER, 0); + } + + @Override + public void updateVisuals() { + this.getEntityData().set(AGE_WATCHER, getMyPet().isBaby()); + this.getEntityData().set(VARIANT_WATCHER, getMyPet().getVariant()); + } + + @Override + public void playPetStepSound() { + makeSound("entity.axolotl.step", 0.15F, 1.0F); + } + + @Override + public MyAxolotl getMyPet() { + return (MyAxolotl) myPet; + } +} diff --git a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyBat.java b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyBat.java index bc223eb48c..994f537ab2 100644 --- a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyBat.java +++ b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyBat.java @@ -20,8 +20,6 @@ package de.Keyle.MyPet.compat.v1_17_R1.entity.types; -import java.util.UUID; - import de.Keyle.MyPet.api.Configuration; import de.Keyle.MyPet.api.entity.EntitySize; import de.Keyle.MyPet.api.entity.MyPet; diff --git a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyGoat.java b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyGoat.java new file mode 100644 index 0000000000..d4391df9e4 --- /dev/null +++ b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyGoat.java @@ -0,0 +1,107 @@ +/* + * This file is part of MyPet + * + * Copyright © 2011-2020 Keyle + * MyPet is licensed under the GNU Lesser General Public License. + * + * MyPet is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * MyPet is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.Keyle.MyPet.compat.v1_17_R1.entity.types; + +import de.Keyle.MyPet.api.Configuration; +import de.Keyle.MyPet.api.entity.EntitySize; +import de.Keyle.MyPet.api.entity.MyPet; +import de.Keyle.MyPet.api.entity.types.MyGoat; +import de.Keyle.MyPet.compat.v1_17_R1.entity.EntityMyPet; +import net.minecraft.network.syncher.EntityDataAccessor; +import net.minecraft.network.syncher.EntityDataSerializers; +import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; + +@EntitySize(width = 0.7F, height = 1.3F) +public class EntityMyGoat extends EntityMyPet { + + private static final EntityDataAccessor AGE_WATCHER = SynchedEntityData.defineId(EntityMyGoat.class, EntityDataSerializers.BOOLEAN); + + public EntityMyGoat(Level world, MyPet myPet) { + super(world, myPet); + } + + @Override + protected String getMyPetDeathSound() { + return "entity.goat.death"; + } + + @Override + protected String getHurtSound() { + return "entity.goat.hurt"; + } + + @Override + protected String getLivingSound() { + return "entity.goat.ambient"; + } + + @Override + public InteractionResult handlePlayerInteraction(Player entityhuman, InteractionHand enumhand, ItemStack itemStack) { + if (super.handlePlayerInteraction(entityhuman, enumhand, itemStack).consumesAction()) { + return InteractionResult.CONSUME; + } + + if (getOwner().equals(entityhuman) && itemStack != null && canUseItem()) { + if (itemStack.getItem() == Items.BUCKET && Configuration.MyPet.Goat.CAN_GIVE_MILK) { + ItemStack milkBucket = new ItemStack(Items.MILK_BUCKET); + + entityhuman.getInventory().setItem(entityhuman.getInventory().selected, milkBucket); + return InteractionResult.CONSUME; + } else if (Configuration.MyPet.Goat.GROW_UP_ITEM.compare(itemStack) && getMyPet().isBaby() && getOwner().getPlayer().isSneaking()) { + if (itemStack != ItemStack.EMPTY && !entityhuman.getAbilities().instabuild) { + itemStack.shrink(1); + if (itemStack.getCount() <= 0) { + entityhuman.getInventory().setItem(entityhuman.getInventory().selected, ItemStack.EMPTY); + } + } + getMyPet().setBaby(false); + return InteractionResult.CONSUME; + } + } + return InteractionResult.PASS; + } + @Override + protected void defineSynchedData() { + super.defineSynchedData(); + getEntityData().define(AGE_WATCHER, false); + } + + @Override + public void updateVisuals() { + this.getEntityData().set(AGE_WATCHER, getMyPet().isBaby()); + } + + @Override + public void playPetStepSound() { + makeSound("entity.goat.step", 0.15F, 1.0F); + } + + @Override + public MyGoat getMyPet() { + return (MyGoat) myPet; + } +} diff --git a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyMooshroom.java b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyMooshroom.java index e801b42371..523ce6cd07 100644 --- a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyMooshroom.java +++ b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyMooshroom.java @@ -116,7 +116,7 @@ protected void defineSynchedData() { @Override public void updateVisuals() { this.getEntityData().set(AGE_WATCHER, getMyPet().isBaby()); - this.getEntityData().set(COLOR_WATCHER, getMyPet().getType().getType()); //TODO + this.getEntityData().set(COLOR_WATCHER, getMyPet().getType().getType()); } @Override diff --git a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/services/EggIconService.java b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/services/EggIconService.java index 33c12008c5..bd262faa31 100644 --- a/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/services/EggIconService.java +++ b/modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/services/EggIconService.java @@ -31,6 +31,9 @@ public class EggIconService extends de.Keyle.MyPet.api.util.service.types.EggIco @Override public void updateIcon(MyPetType type, IconMenuItem icon) { switch (type) { + case Axolotl: + icon.setMaterial(Material.AXOLOTL_SPAWN_EGG); + break; case Bat: icon.setMaterial(Material.BAT_SPAWN_EGG); break; @@ -82,6 +85,9 @@ public void updateIcon(MyPetType type, IconMenuItem icon) { case Giant: icon.setMaterial(Material.ZOMBIE_SPAWN_EGG); break; + case Goat: + icon.setMaterial(Material.GOAT_SPAWN_EGG); + break; case Guardian: icon.setMaterial(Material.GUARDIAN_SPAWN_EGG); break;