Skip to content

Commit

Permalink
Update to 1.20.6
Browse files Browse the repository at this point in the history
Added Armadillo and changed default Config to Blockminers Config for future Changes.
  • Loading branch information
colaman90 committed Sep 8, 2024
1 parent 528b4d7 commit 5726c09
Show file tree
Hide file tree
Showing 5 changed files with 334 additions and 324 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.minecraftheads</groupId>
<artifactId>EggCatcher</artifactId>
<version>1.6</version>
<version>1.7</version>
<packaging>jar</packaging>

<name>EggCatcher</name>
Expand Down Expand Up @@ -65,7 +65,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<version>1.20.6-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/minecraftheads/EggCatcher/EggCatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public void onEnable() {

public void CheckConfigurationFile() {
double configVersion = this.getConfig().getDouble("ConfigVersion", 0.0D);
if (configVersion < 6.0D) {
if (configVersion < 6.2D) {
this.MigrateConfigFile();
this.saveConfig();
this.reloadConfig();
} else {
if (configVersion == 6.0D) {
if (configVersion == 6.3D) {
this.saveConfig();
} else {
this.saveResource("config.yml", true);
Expand All @@ -61,7 +61,7 @@ public void CheckConfigurationFile() {
public boolean MigrateConfigFile() {
String[] keysWithBoolValue = new String[]{"UsePermissions", "UseCatchChance", "LooseEggOnFail", "UseVaultCost", "UseItemCost", "UseHealthPercentage", "ExplosionEffect", "SmokeEffect", "NonPlayerCatching", "PreventCatchingBabyAnimals", "PreventCatchingTamedAnimals", "PreventCatchingShearedSheeps", "SpawnChickenOnSuccess", "SpawnChickenOnFail", "DeleteVillagerInventoryOnCatch", "LogEggCaptures", "setPersistence"};
String[] keysWithStringValue = new String[]{"VaultTargetBankAccount"};
String[] entitiesInConfig = new String[]{"Axolotl", "Bat", "Bee", "Blaze", "Cat", "CaveSpider", "Chicken", "Cod", "Cow", "Creeper", "Dolphin", "Donkey", "Drowned", "ElderGuardian", "Enderman", "Endermite", "Evoker", "Fox", "Ghast", "GlowSquid", "Goat", "Guardian", "Hoglin", "Horse", "Husk", "Llama", "MagmaCube", "Mule", "MushroomCow", "Ocelot", "Panda", "Parrot", "Phantom", "Pig", "Piglin", "PiglinBrute", "PigZombie", "Pillager", "PolarBear", "Pufferfish", "Rabbit", "Ravager", "Salmon", "Sheep", "Shulker", "Silverfish", "Skeleton", "SkeletonHorse", "Slime", "Spider", "Squid", "Stray", "Strider", "TraderLlama", "TropicalFish", "Turtle", "Vex", "Villager", "Vindicator", "WanderingTrader", "Witch", "WitherSkeleton", "Wolf", "Zoglin", "Zombie", "ZombieHorse", "ZombieVillager", "ZombifiedPiglin"};
String[] entitiesInConfig = new String[]{"Axolotl", "Bat", "Bee", "Blaze", "Cat", "Camel", "CaveSpider", "Chicken", "Cod", "Cow", "Creeper", "Dolphin", "Donkey", "Drowned", "ElderGuardian", "Enderman", "Endermite", "Evoker", "Fox", "Ghast", "GlowSquid", "Goat", "Guardian", "Hoglin", "Horse", "Husk", "Llama", "MagmaCube", "Mule", "MushroomCow", "Ocelot", "Panda", "Parrot", "Phantom", "Pig", "Piglin", "PiglinBrute", "PigZombie", "Pillager", "PolarBear", "Pufferfish", "Rabbit", "Ravager", "Salmon", "Sheep", "Shulker", "Silverfish", "Skeleton", "SkeletonHorse", "Slime", "Sniffer", "Spider", "Squid", "Stray", "Strider", "TraderLlama", "TropicalFish", "Turtle", "Vex", "Villager", "Vindicator", "WanderingTrader", "Witch", "WitherSkeleton", "Wolf", "Zoglin", "Zombie", "ZombieHorse", "ZombieVillager", "ZombifiedPiglin"};
FileConfiguration config = this.getConfig();
HashMap<String, HashMap> entityList = new HashMap();
String[] var6 = keysWithBoolValue;
Expand Down Expand Up @@ -99,7 +99,7 @@ public boolean MigrateConfigFile() {
}

config.set("Entity", entityList);
config.set("ConfigVersion", 6.0D);
config.set("ConfigVersion", 6.3D);
config.set("VaultCost", (Object)null);
config.set("HealthPercentage", (Object)null);
config.set("CatchChance", (Object)null);
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/minecraftheads/EggCatcher/EggType.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public enum EggType {
PIG_ZOMBIE(EntityType.ZOMBIFIED_PIGLIN, "PigZombie", Material.ZOMBIFIED_PIGLIN_SPAWN_EGG),
MAGMA_CUBE(EntityType.MAGMA_CUBE, "MagmaCube", Material.MAGMA_CUBE_SPAWN_EGG),
CAVE_SPIDER(EntityType.CAVE_SPIDER, "CaveSpider", Material.CAVE_SPIDER_SPAWN_EGG),
MUSHROOM_COW(EntityType.MUSHROOM_COW, "MushroomCow", Material.MOOSHROOM_SPAWN_EGG),
MOOSHROOM(EntityType.MOOSHROOM, "Mooshroom", Material.MOOSHROOM_SPAWN_EGG),
CREEPER(EntityType.CREEPER, "Creeper", Material.CREEPER_SPAWN_EGG),
WITHER_SKELETON(EntityType.WITHER_SKELETON, "WitherSkeleton", Material.WITHER_SKELETON_SPAWN_EGG),
STRAY(EntityType.STRAY, "Stray", Material.STRAY_SPAWN_EGG),
Expand Down Expand Up @@ -78,7 +78,8 @@ public enum EggType {
TADPOLE(EntityType.TADPOLE, "Tadpole", Material.TADPOLE_SPAWN_EGG),
WARDEN(EntityType.WARDEN, "Warden", Material.WARDEN_SPAWN_EGG),
CAMEL(EntityType.CAMEL, "Camel", Material.CAMEL_SPAWN_EGG),
SNIFFER(EntityType.SNIFFER, "Sniffer", Material.SNIFFER_SPAWN_EGG);
SNIFFER(EntityType.SNIFFER, "Sniffer", Material.SNIFFER_SPAWN_EGG),
ARMADILLO(EntityType.ARMADILLO, "Armadillo", Material.ARMADILLO_SPAWN_EGG);

private final EntityType entityType;
private final String friendlyName;
Expand Down
Loading

0 comments on commit 5726c09

Please sign in to comment.