From 385a00c55b783ef4883b8c768ff2e51237f7d962 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Mon, 7 Oct 2024 15:24:23 +0300 Subject: [PATCH 1/4] do not recreate exopack menu if it's not ready --- .../kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt index 53e3846c3..981f26e04 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayer.kt @@ -418,6 +418,7 @@ class MatteryPlayer(val ply: Player) { val enderSortingSettings = IItemStackSortingSettings.Impl() fun recreateExoPackMenu() { + if (_exoPackMenu == null) return _exoPackMenu = ExopackInventoryMenu(this) } From b3bc98b1871243957045205a59d8ea093ef7f7b5 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 8 Oct 2024 03:36:40 +0300 Subject: [PATCH 2/4] =?UTF-8?q?AMD=20User=20=E2=80=94=20=D0=A1=D0=B5=D0=B3?= =?UTF-8?q?=D0=BE=D0=B4=D0=BD=D1=8F,=20=D0=B2=203:32=20=D0=AF=20=D1=81?= =?UTF-8?q?=D0=BF=D0=B5=D1=86=D0=B8=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=20=D1=8D?= =?UTF-8?q?=D1=82=D0=BE=20=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D0=BB=20=D0=9D?= =?UTF-8?q?=D0=BE=20=D1=81=D0=BF=D0=B0=D1=81=D0=B8=D0=B1=D0=BE=20=D1=87?= =?UTF-8?q?=D1=82=D0=BE=20=D1=83=D0=B1=D1=80=D0=B0=D0=BB=D0=B8=20fakeplaye?= =?UTF-8?q?r=20=D0=B1=D0=B0=D0=B7=D1=83=20=D0=A2=D0=B5=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D1=8C=20=D1=8F=20=D1=85=D0=B7=20=D0=BA=D0=B0=D0=BA=20=D1=8D?= =?UTF-8?q?=D1=82=D0=BE=20=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt index 624ad09fb..ba2834900 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt @@ -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 } } From 358287df9c0e2cbb937e05d2b9a40aa8431607e2 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 8 Oct 2024 03:45:42 +0300 Subject: [PATCH 3/4] real player --- .../ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayer.kt index ad0cc9dfc..b424d51e8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayer.kt @@ -5,12 +5,13 @@ 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.data.get import ru.dbotthepony.mc.otm.registry.MLootItemConditions object KilledByRealPlayer : LootItemCondition, LootItemCondition.Builder { override fun test(t: LootContext): Boolean { - return t.hasParam(LootContextParams.LAST_DAMAGE_PLAYER) //&& t[LootContextParams.LAST_DAMAGE_PLAYER] !is FakePlayer + return t.hasParam(LootContextParams.LAST_DAMAGE_PLAYER) && t[LootContextParams.LAST_DAMAGE_PLAYER] !is FakePlayer } override fun getType(): LootItemConditionType { From 0049cd4d066e73699a1639801afcdce7096201df Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 8 Oct 2024 04:55:05 +0300 Subject: [PATCH 4/4] real player [REAL] --- .../mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt index ba2834900..d7c8e4a36 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/data/condition/KilledByRealPlayerOrIndirectly.kt @@ -13,7 +13,7 @@ import ru.dbotthepony.mc.otm.registry.MLootItemConditions object KilledByRealPlayerOrIndirectly : LootItemCondition, LootItemCondition.Builder { override fun test(t: LootContext): Boolean { - if (t.hasParam(LootContextParams.LAST_DAMAGE_PLAYER) /*&& t[LootContextParams.LAST_DAMAGE_PLAYER] !is FakePlayer*/) { + if (t.hasParam(LootContextParams.LAST_DAMAGE_PLAYER) && t[LootContextParams.LAST_DAMAGE_PLAYER] !is FakePlayer) { return true }