Prevent fake players from making advancements (#4438)

This commit is contained in:
Ben Staddon 2017-10-31 18:02:47 +00:00 committed by LexManos
parent 43749d3fd1
commit 48320b315f

View file

@ -0,0 +1,12 @@
--- ../src-base/minecraft/net/minecraft/advancements/PlayerAdvancements.java
+++ ../src-work/minecraft/net/minecraft/advancements/PlayerAdvancements.java
@@ -196,6 +196,9 @@
public boolean func_192750_a(Advancement p_192750_1_, String p_192750_2_)
{
+ // Forge: don't grant advancements for fake players
+ if (this.field_192762_j instanceof net.minecraftforge.common.util.FakePlayer) return false;
+
boolean flag = false;
AdvancementProgress advancementprogress = this.func_192747_a(p_192750_1_);
boolean flag1 = advancementprogress.func_192105_a();