generated from Turnip-Labs/bta-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rin
committed
Aug 31, 2024
1 parent
19f938d
commit e5be845
Showing
10 changed files
with
102 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package mizurin.shieldmod; | ||
|
||
import mizurin.shieldmod.item.Shields; | ||
import net.minecraft.core.entity.Entity; | ||
import net.minecraft.core.entity.EntityLiving; | ||
import net.minecraft.core.entity.monster.EntityArmoredZombie; | ||
import net.minecraft.core.item.ItemStack; | ||
import net.minecraft.core.util.helper.DamageType; | ||
import net.minecraft.core.world.World; | ||
|
||
public class ShieldZombie extends EntityArmoredZombie { | ||
public ShieldZombie(World world) { | ||
super(world); | ||
this.attackStrength += 1; | ||
} | ||
|
||
@Override | ||
public int getMaxHealth() { | ||
return 80; | ||
} | ||
|
||
@Override | ||
public ItemStack getHeldItem() { | ||
return new ItemStack(Shields.ironShield); | ||
} | ||
|
||
@Override | ||
protected void attackEntity(Entity entity, float distance) { | ||
if (this.attackTime <= 0 && distance < 2.0F && entity.bb.maxY > this.bb.minY && entity.bb.minY < this.bb.maxY) { | ||
this.attackTime = 20; | ||
entity.hurt(this, this.attackStrength, DamageType.COMBAT); | ||
entity.push(entity.xd, entity.yd, entity.zd); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package mizurin.shieldmod.mixins; | ||
|
||
public class PaintingMixin { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters