Wither boss is now neutral to android players

Fixes #207
This commit is contained in:
DBotThePony 2022-11-24 23:23:19 +07:00
parent 3d77f5c02f
commit e811a66119
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 10 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import net.minecraft.world.Difficulty
import net.minecraft.world.effect.MobEffect import net.minecraft.world.effect.MobEffect
import net.minecraft.world.entity.Entity import net.minecraft.world.entity.Entity
import net.minecraft.world.entity.MobSpawnType 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.monster.Phantom
import net.minecraft.world.entity.player.Inventory import net.minecraft.world.entity.player.Inventory
import net.minecraft.world.entity.player.Player import net.minecraft.world.entity.player.Player
@ -742,6 +743,11 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
@Suppress("unused") @Suppress("unused")
companion object { 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<MobEffect> = TagKey.create(ForgeRegistries.MOB_EFFECTS.registryKey, ResourceLocation(OverdriveThatMatters.MOD_ID, "android_immune_effects")) val ANDROID_IMMUNE_EFFECTS: TagKey<MobEffect> = TagKey.create(ForgeRegistries.MOB_EFFECTS.registryKey, ResourceLocation(OverdriveThatMatters.MOD_ID, "android_immune_effects"))
fun onPlayerTick(event: PlayerTickEvent) { fun onPlayerTick(event: PlayerTickEvent) {

View File

@ -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.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.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