1.21.8 support

This commit is contained in:
TheLividaProject
2025-07-21 21:57:06 +01:00
parent 8f67ade51c
commit 13c0b45d2a
4 changed files with 8 additions and 18 deletions

4
.idea/workspace.xml generated
View File

@@ -5,8 +5,8 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="ff2e9770-ec88-4715-adeb-b9dbda130e1a" name="Changes" comment=""> <list default="true" id="ff2e9770-ec88-4715-adeb-b9dbda130e1a" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/re/imc/geysermodelengine/managers/model/data/ModelEntityData.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/re/imc/geysermodelengine/managers/model/data/ModelEntityData.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle.kts" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle.kts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/re/imc/geysermodelengine/runnables/EntityTaskRunnable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/re/imc/geysermodelengine/runnables/EntityTaskRunnable.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -20,8 +20,8 @@ repositories {
} }
dependencies { dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT") compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
implementation("dev.jorel:commandapi-bukkit-shade-mojang-mapped:10.1.1") implementation("dev.jorel:commandapi-bukkit-shade-mojang-mapped:10.1.2")
compileOnly("com.ticxo.modelengine:ModelEngine:R4.0.9") compileOnly("com.ticxo.modelengine:ModelEngine:R4.0.9")
@@ -51,7 +51,6 @@ tasks.shadowJar {
relocate("org.reflections", "re.imc.geysermodelengine.libs.reflections") relocate("org.reflections", "re.imc.geysermodelengine.libs.reflections")
} }
tasks.jar { tasks.build {
enabled = false dependsOn("shadowJar")
dependsOn(tasks.shadowJar)
} }

View File

@@ -48,7 +48,6 @@ public class ModelEntityData {
public void runEntityTask() { public void runEntityTask() {
entityTask = new EntityTaskRunnable(plugin, this); entityTask = new EntityTaskRunnable(plugin, this);
entityTask.run();
} }
public PacketEntity getEntity() { public PacketEntity getEntity() {

View File

@@ -41,24 +41,16 @@ public class EntityTaskRunnable {
private final BooleanPacker booleanPacker = new BooleanPacker(); private final BooleanPacker booleanPacker = new BooleanPacker();
private ScheduledFuture scheduledFuture; private final ScheduledFuture scheduledFuture;
public EntityTaskRunnable(GeyserModelEngine plugin, ModelEntityData model) { public EntityTaskRunnable(GeyserModelEngine plugin, ModelEntityData model) {
this.plugin = plugin; this.plugin = plugin;
this.model = model; this.model = model;
}
public void run() {
plugin.getEntityTaskManager().sendHitBoxToAll(model); plugin.getEntityTaskManager().sendHitBoxToAll(model);
Runnable asyncTask = () -> { scheduledFuture = plugin.getSchedulerPool().scheduleAtFixedRate(this::runAsync, 0, 20, TimeUnit.MILLISECONDS);
try {
runAsync();
} catch (Throwable ignored) {}
};
scheduledFuture = plugin.getSchedulerPool().scheduleAtFixedRate(asyncTask, 0, 20, TimeUnit.MILLISECONDS);
} }
public void runAsync() { public void runAsync() {