Skip to content

Commit

Permalink
[#661] Fixed incompatibility with minecolonies 1.20.1-1.1.686-snapsho…
Browse files Browse the repository at this point in the history
…t and newer
  • Loading branch information
SirEndii committed Oct 15, 2024
1 parent 58afe1a commit eee605f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<Skill, Tuple<Integer, Double>> skills) {
public static Object skillsToObject(Map<Skill, CitizenSkillHandler.SkillData> skills) {
Map<String, Object> map = new HashMap<>();
for (Skill skill : skills.keySet()) {
Map<String, Object> 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);
}

Expand Down

0 comments on commit eee605f

Please sign in to comment.