Skip to content

Commit

Permalink
More boss improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Jan 10, 2025
1 parent 9127237 commit d5cdba0
Show file tree
Hide file tree
Showing 10 changed files with 2,693 additions and 2,605 deletions.
11 changes: 9 additions & 2 deletions src/main/java/twilightforest/entity/EntityTFWinterWolf.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package twilightforest.entity;

import com.bobmowzie.mowziesmobs.server.potion.PotionHandler;
import com.bobmowzie.mowziesmobs.server.sound.MMSounds;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackMelee;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWanderAvoidWater;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.init.MobEffects;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializers;
Expand Down Expand Up @@ -110,7 +112,7 @@ private void spawnBreathParticles() {
}

private void playBreathSound() {
playSound(SoundEvents.ENTITY_GHAST_SHOOT, rand.nextFloat() * 0.5F, rand.nextFloat() * 0.5F);
playSound(MMSounds.ENTITY_FROSTMAW_ICEBREATH_START, rand.nextFloat() * 0.75F, rand.nextFloat() * 1.5F);
}

@Override
Expand All @@ -131,6 +133,11 @@ public void setBreathing(boolean flag) {
@Override
public void doBreathAttack(Entity target) {
target.attackEntityFrom(DamageSource.causeMobDamage(this), BREATH_DAMAGE);

if (target instanceof EntityLivingBase) {
((EntityLivingBase)target).addPotionEffect(new PotionEffect(TFPotions.frosty, 5 * 20, 2)); // 5 seconds
((EntityLivingBase)target).addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 5 * 20, 1)); // 5 seconds
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ public void updateTask() {
this.yeti.destroyBlocksInAABB(this.yeti.getEntityBoundingBox().grow(1, 2, 1).offset(0, 2, 0));

// regular falling blocks
if (this.currentDuration % 20 == 0) {
if (this.currentDuration % 10 == 0) {
this.yeti.makeRandomBlockFall();
}

// blocks target players
if (this.currentDuration % 40 == 0) {
if (this.currentDuration % 20 == 0) {
this.yeti.makeBlockAboveTargetFall();
}

Expand Down
Loading

0 comments on commit d5cdba0

Please sign in to comment.