diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt index bb104b34d..d6b47c6c7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/capability/MatteryPlayerCapability.kt @@ -14,6 +14,7 @@ import net.minecraft.world.Difficulty import net.minecraft.world.effect.MobEffect import net.minecraft.world.entity.Entity import net.minecraft.world.entity.MobSpawnType +import net.minecraft.world.entity.boss.wither.WitherBoss import net.minecraft.world.entity.monster.Phantom import net.minecraft.world.entity.player.Inventory import net.minecraft.world.entity.player.Player @@ -742,6 +743,11 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial @Suppress("unused") companion object { + init { + WitherBoss.TARGETING_CONDITIONS.selector(WitherBoss.TARGETING_CONDITIONS.selector!!.and { it.matteryPlayer?.isAndroid != true }) + WitherBoss.LIVING_ENTITY_SELECTOR = WitherBoss.LIVING_ENTITY_SELECTOR.and { it.matteryPlayer?.isAndroid != true } + } + val ANDROID_IMMUNE_EFFECTS: TagKey = TagKey.create(ForgeRegistries.MOB_EFFECTS.registryKey, ResourceLocation(OverdriveThatMatters.MOD_ID, "android_immune_effects")) fun onPlayerTick(event: PlayerTickEvent) { diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 88351643a..87431a1a8 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -180,3 +180,7 @@ public net.minecraft.client.renderer.FogRenderer f_109011_ # fogGreen public net.minecraft.client.renderer.FogRenderer f_109010_ # fogRed public net.minecraft.world.item.crafting.RecipeManager m_44054_(Lnet/minecraft/world/item/crafting/RecipeType;)Ljava/util/Map; # byType + +public net.minecraft.world.entity.boss.wither.WitherBoss f_31432_ # TARGETING_CONDITIONS +public-f net.minecraft.world.entity.boss.wither.WitherBoss f_31431_ # LIVING_ENTITY_SELECTOR +public net.minecraft.world.entity.ai.targeting.TargetingConditions f_26879_ # selector