AMD User — Сегодня, в 3:32

Я специально это фиксил
Но спасибо что убрали fakeplayer базу
Теперь я хз как это фиксить
This commit is contained in:
YuRaNnNzZZ 2024-10-08 03:36:40 +03:00
parent 385a00c55b
commit b3bc98b187
Signed by: YuRaNnNzZZ
GPG Key ID: 5F71738C85A6006D

View File

@ -6,6 +6,7 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams
import net.minecraft.world.level.storage.loot.predicates.InvertedLootItemCondition
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition
import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType
import net.neoforged.neoforge.common.util.FakePlayer
import ru.dbotthepony.mc.otm.NULLABLE_MINECRAFT_SERVER
import ru.dbotthepony.mc.otm.data.get
import ru.dbotthepony.mc.otm.registry.MLootItemConditions
@ -22,12 +23,12 @@ object KilledByRealPlayerOrIndirectly : LootItemCondition, LootItemCondition.Bui
if (killer != null) {
val owner = killer.owner
if (owner != null /*&& owner !is FakePlayer*/) {
if (owner != null && owner !is FakePlayer) {
return true
}
val ply = NULLABLE_MINECRAFT_SERVER?.playerList?.getPlayer(killer.ownerUUID ?: return false)
return ply != null //&& ply !is FakePlayer
return ply != null && ply !is FakePlayer
}
}