diff --git a/src/main/java/com/dfsek/terra/EventListener.java b/src/main/java/com/dfsek/terra/EventListener.java index 894675acf..7361664a0 100644 --- a/src/main/java/com/dfsek/terra/EventListener.java +++ b/src/main/java/com/dfsek/terra/EventListener.java @@ -6,10 +6,13 @@ import com.dfsek.terra.util.StructureTypeEnum; import org.bukkit.entity.EnderSignal; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Villager; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntitySpawnEvent; +import org.bukkit.event.entity.VillagerAcquireTradeEvent; +import org.bukkit.event.entity.VillagerCareerChangeEvent; import org.polydev.gaea.GaeaPlugin; public class EventListener implements Listener { @@ -36,4 +39,15 @@ public class EventListener implements Listener { } else main.getLogger().warning("No overrides are defined for Strongholds. Ender Signals will not work correctly."); } } + @EventHandler + public void onCartographerChange(VillagerAcquireTradeEvent e) { + if(((Villager) e.getEntity()).getProfession().equals(Villager.Profession.CARTOGRAPHER)) e.setCancelled(true); // Cancel leveling if the villager is a Cartographer, to prevent crashing server. + } + @EventHandler + public void onCartographerLevel(VillagerCareerChangeEvent e) { + if(e.getProfession().equals(Villager.Profession.CARTOGRAPHER)) { + e.getEntity().setProfession(Villager.Profession.NITWIT); // Give villager new profession to prevent server crash. + e.setCancelled(true); + } + } } diff --git a/src/main/java/com/dfsek/terra/config/base/ConfigPack.java b/src/main/java/com/dfsek/terra/config/base/ConfigPack.java index 6a7c1c95e..567c4b8b4 100644 --- a/src/main/java/com/dfsek/terra/config/base/ConfigPack.java +++ b/src/main/java/com/dfsek/terra/config/base/ConfigPack.java @@ -193,7 +193,7 @@ public class ConfigPack extends YamlConfiguration { try { config = new ConfigPack(folder.toFile()); if(configs.containsKey(config.getID())) { - Bukkit.getLogger().severe("Duplicate Config Pack ID: \"" + config.getID() + "\""); + //Bukkit.getLogger().severe("Duplicate Config Pack ID: \"" + config.getID() + "\""); continue; } configs.put(config.getID(), config); diff --git a/src/main/resources/default-config/pack.yml b/src/main/resources/default-config/pack.yml index d127a67a6..d5be6e5e2 100644 --- a/src/main/resources/default-config/pack.yml +++ b/src/main/resources/default-config/pack.yml @@ -1,4 +1,4 @@ -id: OVERWORLD_DEMO +id: DEFAULT grids: - OCEAN_DEEP - OCEAN_DEEP @@ -49,8 +49,8 @@ grids: - MOUNTAIN - MOUNTAIN frequencies: - grid-x: 3072 - grid-z: 2048 + grid-x: 5120 + grid-z: 6144 zone: 4096 blend: enable: true diff --git a/src/main/resources/default-config/structures/single/jungle.yml b/src/main/resources/default-config/structures/single/jungle.yml index 17111a444..5e9277fc3 100644 --- a/src/main/resources/default-config/structures/single/jungle.yml +++ b/src/main/resources/default-config/structures/single/jungle.yml @@ -1,16 +1,15 @@ files: - stronghold: 1 -id: "STRONGHOLD" + jungle1: 1 +id: "JUNGLE" spawn: start: - min: 16 - max: 64 + min: 72 + max: 72 bound: - min: 12 - max: 84 - width: 1000 - padding: 500 + min: 48 + max: 96 + width: 250 + padding: 50 loot: - 1: wood_house - 2: cobble_house - 3: cobble_house \ No newline at end of file + 0: arrows + 1: cobble_house \ No newline at end of file diff --git a/src/main/resources/default-config/structures/single/mansion.yml b/src/main/resources/default-config/structures/single/mansion.yml index ac185df0a..4456f503e 100644 --- a/src/main/resources/default-config/structures/single/mansion.yml +++ b/src/main/resources/default-config/structures/single/mansion.yml @@ -8,7 +8,7 @@ spawn: bound: min: 48 max: 96 - width: 100 - padding: 100 + width: 250 + padding: 500 loot: 1: arrows \ No newline at end of file diff --git a/src/main/resources/default-config/structures/single/stronghold.yml b/src/main/resources/default-config/structures/single/stronghold.yml index 5e9277fc3..17111a444 100644 --- a/src/main/resources/default-config/structures/single/stronghold.yml +++ b/src/main/resources/default-config/structures/single/stronghold.yml @@ -1,15 +1,16 @@ files: - jungle1: 1 -id: "JUNGLE" + stronghold: 1 +id: "STRONGHOLD" spawn: start: - min: 72 - max: 72 + min: 16 + max: 64 bound: - min: 48 - max: 96 - width: 250 - padding: 50 + min: 12 + max: 84 + width: 1000 + padding: 500 loot: - 0: arrows - 1: cobble_house \ No newline at end of file + 1: wood_house + 2: cobble_house + 3: cobble_house \ No newline at end of file