Skip to content

Commit

Permalink
Update to 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
emortaldev committed Mar 3, 2024
1 parent ce43582 commit 249e686
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
7 changes: 2 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ repositories {
}

dependencies {
implementation("dev.emortal.minestom:game-sdk:a3bc80a")
implementation("dev.emortal.minestom:game-sdk:8ef77c3")

implementation("dev.hollowcube:polar:1.3.1")
implementation("dev.emortal:rayfast:a4a8041")

implementation("net.kyori:adventure-text-minimessage:4.14.0")
implementation("net.kyori:adventure-text-minimessage:4.16.0")
}

java {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import dev.emortal.minestom.marathon.MarathonGame;
import dev.emortal.minestom.marathon.util.BetterEntity;
import net.minestom.server.MinecraftServer;
import net.minestom.server.ServerFlag;
import net.minestom.server.coordinate.Point;
import net.minestom.server.coordinate.Pos;
import net.minestom.server.coordinate.Vec;
Expand Down Expand Up @@ -49,7 +49,7 @@ public void setBlockAnimated(@NotNull Instance instance, @NotNull Point point, @
finalEntity.remove();
instance.setBlock(point, block);
})
.delay(TaskSchedule.tick((int) (TIME_TO_ANIMATE * MinecraftServer.TICK_PER_SECOND)))
.delay(TaskSchedule.tick((int) (TIME_TO_ANIMATE * ServerFlag.SERVER_TICKS_PER_SECOND)))
.schedule();
// lastEntity.scheduleRemove(Duration.ofMillis((long) (timeToAnimate * 1000)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import dev.emortal.minestom.marathon.MarathonGame;
import dev.emortal.minestom.marathon.util.BetterEntity;
import net.minestom.server.MinecraftServer;
import net.minestom.server.ServerFlag;
import net.minestom.server.coordinate.Point;
import net.minestom.server.coordinate.Vec;
import net.minestom.server.entity.EntityType;
Expand Down Expand Up @@ -43,7 +43,7 @@ public void setBlockAnimated(@NotNull Instance instance, @NotNull Point point, @
Point velocityXZ = displacementXZ.div(time);

Vec combinedVelocity = Vec.fromPoint(velocityXZ.withY(velocityY));
lastEntity.setVelocity(combinedVelocity.mul(MinecraftServer.TICK_PER_SECOND));
lastEntity.setVelocity(combinedVelocity.mul(ServerFlag.SERVER_TICKS_PER_SECOND));

lastEntity.setInstance(instance, realLastPoint);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.emortal.minestom.marathon.util;

import net.minestom.server.MinecraftServer;
import net.minestom.server.ServerFlag;
import net.minestom.server.coordinate.Pos;
import net.minestom.server.coordinate.Vec;
import net.minestom.server.entity.Entity;
Expand Down Expand Up @@ -53,7 +53,7 @@ protected void updateVelocity(boolean wasOnGround, boolean flying, @NotNull Pos
z * finalDrag
))
// Convert from block/tick to block/sec
.mul(MinecraftServer.TICK_PER_SECOND)
.mul(ServerFlag.SERVER_TICKS_PER_SECOND)
// Prevent infinitely decreasing velocity
.apply(Vec.Operator.EPSILON);
}
Expand Down

0 comments on commit 249e686

Please sign in to comment.