mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 14:59:19 +00:00
custom entity
This commit is contained in:
@@ -66,7 +66,7 @@ public class EntityTask {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (model.getEntity().isDead()) {
|
if (model.getEntity().isDead() && model.getModeledEntity().getBase().isAlive()) {
|
||||||
model.spawnEntity();
|
model.spawnEntity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ public class EntityTask {
|
|||||||
public void run() {
|
public void run() {
|
||||||
entity.remove();
|
entity.remove();
|
||||||
}
|
}
|
||||||
}.runTaskLater(GeyserModelEngine.getInstance(), Math.min(Math.max(playAnimation(animation, 99, 50f) - 1, 0), 200));
|
}.runTaskLater(GeyserModelEngine.getInstance(), Math.min(Math.max(playAnimation(animation, 99, 5f) - 1, 0), 200));
|
||||||
} else {
|
} else {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -234,7 +234,7 @@ public class EntityTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int playAnimation(String animation, int p) {
|
public int playAnimation(String animation, int p) {
|
||||||
return playAnimation(animation, p, 5f);
|
return playAnimation(animation, p, 0f);
|
||||||
}
|
}
|
||||||
public int playAnimation(String animation, int p, float blendTime) {
|
public int playAnimation(String animation, int p, float blendTime) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user