mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 23:09:25 +00:00
fix
This commit is contained in:
@@ -110,7 +110,7 @@ public class EntityTask {
|
||||
spawnAnimationPlayed = true;
|
||||
}
|
||||
|
||||
if (tick > 1 && tick % 5 == 0) {
|
||||
if (tick % 5 == 0) {
|
||||
|
||||
for (Player onlinePlayer : Bukkit.getOnlinePlayers()) {
|
||||
if (FloodgateApi.getInstance().isFloodgatePlayer(onlinePlayer.getUniqueId())) {
|
||||
@@ -134,9 +134,10 @@ public class EntityTask {
|
||||
*/
|
||||
}
|
||||
} else {
|
||||
|
||||
entity.sendEntityDestroyPacket(Collections.singletonList(onlinePlayer));
|
||||
viewers.remove(onlinePlayer);
|
||||
if (viewers.contains(onlinePlayer)) {
|
||||
entity.sendEntityDestroyPacket(Collections.singletonList(onlinePlayer));
|
||||
viewers.remove(onlinePlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,18 +213,16 @@ public class EntityTask {
|
||||
}
|
||||
|
||||
public void sendEntityData(Player player, int delay) {
|
||||
// System.out.println("TYPE: " + "modelengine:" + model.getActiveModel().getBlueprint().getName().toLowerCase());
|
||||
PlayerUtils.setCustomEntity(player, model.getEntity().getEntityId(), "modelengine:" + model.getActiveModel().getBlueprint().getName().toLowerCase());
|
||||
|
||||
model.getEntity().sendSpawnPacket(Collections.singletonList(player));
|
||||
Bukkit.getScheduler().runTaskLaterAsynchronously(GeyserModelEngine.getInstance(), () -> {
|
||||
// PlayerUtils.sendCustomSkin(player, model.getEntity(), model.getActiveModel().getBlueprint().getName());
|
||||
if (looping) {
|
||||
playBedrockAnimation(lastAnimation, Set.of(player), looping, 0f);
|
||||
}
|
||||
sendHitBox(player);
|
||||
sendScale(player, true);
|
||||
model.getEntity().sendSpawnPacket(Collections.singletonList(player));
|
||||
|
||||
Bukkit.getScheduler().runTaskLaterAsynchronously(GeyserModelEngine.getInstance(), () -> {
|
||||
if (looping) {
|
||||
playBedrockAnimation(lastAnimation, Set.of(player), looping, 0f);
|
||||
}
|
||||
sendHitBox(player);
|
||||
sendScale(player, true);
|
||||
updateVisibility(player, true);
|
||||
@@ -411,9 +410,6 @@ public class EntityTask {
|
||||
if (player.isDead()) {
|
||||
return false;
|
||||
}
|
||||
if (player.getWorld() != entity.getWorld()) {
|
||||
return false;
|
||||
}
|
||||
if (GeyserModelEngine.getInstance().getJoinedPlayer() != null && GeyserModelEngine.getInstance().getJoinedPlayer().getIfPresent(player) != null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user