forked from GnomeWorks/dungeon-mobs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made some animations for the hissing demons
- Loading branch information
1 parent
3ac01db
commit 4d15798
Showing
4 changed files
with
142 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.gw.dm.ai; | ||
|
||
import com.gw.dm.entity.EntityHissingDemon; | ||
|
||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.entity.ai.EntityAIAttackMelee; | ||
import net.minecraft.util.EnumHand; | ||
|
||
public class AIHissingDemonAttack extends EntityAIAttackMelee { | ||
EntityHissingDemon demon; | ||
|
||
public AIHissingDemonAttack(EntityHissingDemon creature, double speedIn, boolean useLongMemory) { | ||
super(creature, speedIn, useLongMemory); | ||
demon = creature; | ||
} | ||
|
||
// TODO: Archvile-like attack | ||
// TODO: List of extra enemies | ||
// TODO: Re-write to not depend on or extend EntityAIAttackMelee? | ||
|
||
|
||
@Override | ||
protected void checkAndPerformAttack(EntityLivingBase victim, double dist) { | ||
double distance = this.getAttackReachSqr(victim); | ||
|
||
if (dist <= distance && this.attackTick <= 0) | ||
{ | ||
this.attackTick = 4; | ||
this.attacker.swingArm(EnumHand.MAIN_HAND); | ||
this.attacker.attackEntityAsMob(victim); | ||
} | ||
} | ||
|
||
|
||
} |
This file was deleted.
Oops, something went wrong.
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
97 changes: 97 additions & 0 deletions
97
src/main/resources/assets/dungeonmobs/animations/HissingDemon.animation
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,97 @@ | ||
{ | ||
"format_version": "1.8.0", | ||
"animations": { | ||
"animation.hd.swinga1": { | ||
"animation_length": 0.20833, | ||
"bones": { | ||
"ab1": { | ||
"rotation": { | ||
"0.0": {"pre": [0, 0, 0], "post": [0, 0, 0]}, | ||
"0.0417": [60, -7.5, 0], | ||
"0.0833": [97.5, -20, -40], | ||
"0.125": [125.63, 1.25, -40], | ||
"0.1667": [56.25, -14.17, 0], | ||
"0.2083": [0, 0, 0] | ||
} | ||
} | ||
} | ||
}, | ||
"animation.hd.swinga4": { | ||
"animation_length": 0.16667, | ||
"bones": { | ||
"ab4": { | ||
"rotation": { | ||
"0.0": [0, 0, 0], | ||
"0.0417": [70, 27.5, 0], | ||
"0.0833": [100, 50, 0], | ||
"0.125": [147.5, 50, -30], | ||
"0.1667": [247.5, 50, -30] | ||
} | ||
} | ||
} | ||
}, | ||
"animation.hd.swinga2": { | ||
"animation_length": 0.16667, | ||
"bones": { | ||
"ab2": { | ||
"rotation": { | ||
"0.0": [0, 0, 0], | ||
"0.0417": [0, -32.5, -35], | ||
"0.0833": [0, -70, -102.5], | ||
"0.125": [0, -65, -242.5], | ||
"0.1667": [0, -72.5, -275] | ||
} | ||
}, | ||
"ab4": { | ||
"rotation": [0, 0, 0] | ||
} | ||
} | ||
}, | ||
"animation.hd.swinga5": { | ||
"animation_length": 0.20833, | ||
"bones": { | ||
"ab5": { | ||
"rotation": { | ||
"0.0": [0, 0, 0], | ||
"0.0417": [0, 52.5, 45], | ||
"0.0833": [0, 65, 92.5], | ||
"0.125": [0, 65, 147.5], | ||
"0.1667": [0, 57.5, 205], | ||
"0.2083": [0, 60, 322.5] | ||
} | ||
} | ||
} | ||
}, | ||
"animation.hd.swinga3": { | ||
"animation_length": 0.20833, | ||
"bones": { | ||
"ab3": { | ||
"rotation": { | ||
"0.0": [0, 0, 0], | ||
"0.0417": [-27.5, -65, 0], | ||
"0.0833": [-62.5, -95, 0], | ||
"0.125": [-190, -95, 0], | ||
"0.1667": [-300, -95, 0], | ||
"0.2083": [0, 0, 0] | ||
} | ||
} | ||
} | ||
}, | ||
"animation.hd.swinga6": { | ||
"animation_length": 0.20833, | ||
"bones": { | ||
"ab6": { | ||
"rotation": { | ||
"0.0": [0, 0, 0], | ||
"0.0417": [-40, 37.5, 0], | ||
"0.0833": [-62.5, 50, 0], | ||
"0.125": [-150, 50, 0], | ||
"0.1667": [-192.5, 55, 0], | ||
"0.2083": [-360, 0, 0] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"geckolib_format_version": 2 | ||
} |