diff --git a/gradle.properties b/gradle.properties index e1d06d4ee..8bdeaf483 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ jei_mc_version=1.20.2 curios_mc_version=1.20 forge_gradle_version=[6.0,6.2) -forge_version=48.0.13 +forge_version=48.0.19 mixingradle_version=0.7.33 mixin_version=0.8.5 diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt index 34bf066b0..7ad4a8c11 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -545,7 +545,7 @@ object DataGen { trapdoor(MBlocks.TRITANIUM_TRAPDOOR[null]!!, modLocation("block/decorative/tritanium_trapdoor")) - for (color in DyeColor.values()) + for (color in DyeColor.entries) trapdoor(MBlocks.TRITANIUM_TRAPDOOR[color]!!, modLocation("block/decorative/tritanium_trapdoor_${color.name.lowercase()}")) addBlockModels(blockModelProvider) 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 281edcf4a..ad0cc9dfc 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,13 +5,12 @@ 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.minecraftforge.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 { 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 7fe2d7340..b181ada7a 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,14 +6,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.minecraftforge.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 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 } @@ -23,12 +22,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 } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/PillItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/PillItem.kt index 9c50f7654..3fc956300 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/PillItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/PillItem.kt @@ -11,8 +11,6 @@ import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.player.Player import net.minecraft.world.item.* import net.minecraft.world.level.Level -import net.minecraftforge.common.util.FakePlayer -import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.mc.otm.capability.MatteryCapability @@ -92,9 +90,6 @@ class PillItem(val pillType: PillType) : } override fun use(level: Level, ply: Player, hand: InteractionHand): InteractionResultHolder { - if (ply is FakePlayer) - return super.use(level, ply, hand) - val resolver = ply.getCapability(MatteryCapability.MATTERY_PLAYER).resolve() if (resolver.isEmpty) @@ -115,9 +110,6 @@ class PillItem(val pillType: PillType) : } override fun finishUsingItem(stack: ItemStack, level: Level, ent: LivingEntity): ItemStack { - if (ent is FakePlayer) - super.finishUsingItem(stack, level, ent) - if (ent is Player) { val resolver = ent.getCapability(MatteryCapability.MATTERY_PLAYER).resolve()