custom entity

This commit is contained in:
zimzaza4
2024-04-20 21:44:53 +08:00
parent 90f3c699cb
commit 2228d2f9e3

View File

@@ -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) {