respect fake player fix option

This commit is contained in:
alterNERDtive 2023-06-19 17:05:08 +02:00
parent e51c31c779
commit dfdd231bc1
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1

View file

@ -12,6 +12,7 @@ import iskallia.vault.init.ModConfigs;
import iskallia.vault.research.ResearchTree; import iskallia.vault.research.ResearchTree;
import iskallia.vault.research.type.Research; import iskallia.vault.research.type.Research;
import iskallia.vault.world.data.PlayerResearchesData; import iskallia.vault.world.data.PlayerResearchesData;
import tv.alterNERD.VaultModTweaks.Configuration;
@Mixin(PlayerResearchesData.class) @Mixin(PlayerResearchesData.class)
public class MixinPlayerResearchesData { public class MixinPlayerResearchesData {
@ -22,7 +23,7 @@ public class MixinPlayerResearchesData {
public ResearchTree getResearches(UUID uuid) { public ResearchTree getResearches(UUID uuid) {
return this.playerMap.computeIfAbsent(uuid, id -> { return this.playerMap.computeIfAbsent(uuid, id -> {
ResearchTree tree = ResearchTree.empty(); ResearchTree tree = ResearchTree.empty();
if (id.equals(UUID.fromString("41c82c87-7afb-4024-ba57-13d2c99cae77"))) { if (Configuration.FAKE_PLAYER_FIX.get() && id.equals(UUID.fromString("41c82c87-7afb-4024-ba57-13d2c99cae77"))) {
for (Research research : ModConfigs.RESEARCHES.getAll()) { for (Research research : ModConfigs.RESEARCHES.getAll()) {
tree.research(research); tree.research(research);
} }