fixed missing config check for fake player fix

This commit is contained in:
alterNERDtive 2023-06-19 06:46:52 +02:00
parent cc8c142a2b
commit a431939dbf
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1

View file

@ -10,6 +10,8 @@ import iskallia.vault.research.StageManager;
import iskallia.vault.world.data.PlayerResearchesData; import iskallia.vault.world.data.PlayerResearchesData;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraftforge.common.util.FakePlayer;
import tv.alterNERD.VaultModTweaks.Configuration;
@Mixin(StageManager.class) @Mixin(StageManager.class)
public abstract class MixinStageManager { public abstract class MixinStageManager {
@ -69,6 +71,9 @@ public abstract class MixinStageManager {
} }
private static ResearchTree overrideGetResearchTree(Player player) { private static ResearchTree overrideGetResearchTree(Player player) {
if (!Configuration.FAKE_PLAYER_FIX.get() && player instanceof FakePlayer) {
return ResearchTree.empty();
}
if (player.level.isClientSide) { if (player.level.isClientSide) {
return RESEARCH_TREE; return RESEARCH_TREE;
} }