From eee605fb7f58864907cbc1c7ad865d18b46501f3 Mon Sep 17 00:00:00 2001 From: endi Date: Tue, 15 Oct 2024 22:09:46 +0200 Subject: [PATCH] [#661] Fixed incompatibility with minecolonies 1.20.1-1.1.686-snapshot and newer --- gradle.properties | 2 +- .../common/addons/minecolonies/MineColonies.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index a175320b3..2d0b438c6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,7 +24,7 @@ ttoolkit_version=0.1.3 # Mod dependencies cc_version=1.110.0 curios_version=5.2.0+1.20.1 -minecolonies_version=1.20.1-1.1.684-snapshot +minecolonies_version=1.20.1-1.1.686-snapshot appliedenergistics_version=15.0.9-beta patchouli_version=1.20.1-84 refinedstorage_version=1.12.3 diff --git a/src/main/java/de/srendi/advancedperipherals/common/addons/minecolonies/MineColonies.java b/src/main/java/de/srendi/advancedperipherals/common/addons/minecolonies/MineColonies.java index b6dd3c2a1..3d6d0fdd3 100644 --- a/src/main/java/de/srendi/advancedperipherals/common/addons/minecolonies/MineColonies.java +++ b/src/main/java/de/srendi/advancedperipherals/common/addons/minecolonies/MineColonies.java @@ -15,6 +15,7 @@ import com.minecolonies.api.research.util.ResearchState; import com.minecolonies.core.colony.buildings.AbstractBuildingStructureBuilder; import com.minecolonies.core.colony.buildings.utils.BuildingBuilderResource; +import com.minecolonies.core.entity.citizen.citizenhandlers.CitizenSkillHandler; import com.minecolonies.core.research.BuildingResearchRequirement; import com.mojang.brigadier.exceptions.CommandSyntaxException; import de.srendi.advancedperipherals.common.util.LuaConverter; @@ -151,12 +152,12 @@ public static Object homeToObject(IBuilding home) { * @param skills skills as list. Can be obtained via {@link ICitizenData#getCitizenSkillHandler} * @return a map with information about the skill */ - public static Object skillsToObject(Map> skills) { + public static Object skillsToObject(Map skills) { Map map = new HashMap<>(); for (Skill skill : skills.keySet()) { Map skillData = new HashMap<>(); - skillData.put("level", skills.get(skill).getA()); - skillData.put("xp", skills.get(skill).getB()); + skillData.put("level", skills.get(skill).getLevel()); + skillData.put("xp", skills.get(skill).getExperience()); map.put(skill.name(), skillData); }