update: 1.21.11

This commit is contained in:
Axionize committed 2025-12-17 18:19:23 -05:00
1 parent 3a5625508b
commit fec77fba15
10 files changed
+19 -24

No files matched your search

+1 -6
View File
@@ -198,12 +198,7 @@ jobs:
fabric
game-versions: |
1.21.5
1.21.6
1.21.7
1.21.8
1.21.9
1.21.10
1.21.11
dependencies: |
fabric-api
+1 -1
View File
@@ -3,7 +3,7 @@ import java.io.ByteArrayOutputStream
plugins {
id("java")
id("com.gradleup.shadow") version "9.2.2" apply false
id("fabric-loom") version "1.11.8" apply false
id("fabric-loom") version "1.14.6" apply false
}
fun getGitCommitHash(project: Project): String? {
+3 -3
View File
@@ -40,11 +40,11 @@ dependencies {
shadeThisThing(implementation("org.kohsuke:github-api:1.326")!!)
if (shadePE) {
shadeThisThing(implementation("com.github.retrooper:packetevents-spigot:2.10.2+3684f01-SNAPSHOT")!!)
shadeThisThing(implementation("com.github.retrooper:packetevents-spigot:2.11.1+60a2c34-SNAPSHOT")!!)
} else {
compileOnly("com.github.retrooper:packetevents-spigot:2.10.2+3684f01-SNAPSHOT")
compileOnly("com.github.retrooper:packetevents-spigot:2.11.1+60a2c34-SNAPSHOT")
}
shadeThisThing(implementation("org.incendo:cloud-paper:2.0.0-beta.13")!!)
shadeThisThing(implementation("org.incendo:cloud-paper:2.0.0-beta.14")!!)
shadeThisThing(implementation("org.incendo:cloud-core:2.0.0")!!)
// Required for 1.14.4 support because gson is too old to have JosnParser.parseString()
+2 -2
View File
@@ -13,9 +13,9 @@ dependencies {
// Shaded in or bundled by platform-specific code
if (shadePE) {
implementation("com.github.retrooper:packetevents-api:2.10.2+3684f01-SNAPSHOT")
implementation("com.github.retrooper:packetevents-api:2.11.1+60a2c34-SNAPSHOT")
} else {
compileOnly("com.github.retrooper:packetevents-api:2.10.2+3684f01-SNAPSHOT")
compileOnly("com.github.retrooper:packetevents-api:2.11.1+60a2c34-SNAPSHOT")
}
implementation("org.yaml:snakeyaml:2.0")
+2 -2
View File
@@ -38,8 +38,8 @@ dependencies {
modImplementation(fabricApi.module("fabric-events-interaction-v0", "${rootProject.property("fabric_version")}"))
include(modImplementation("me.lucko:fabric-permissions-api:0.3.1")!!)
include(modImplementation("com.github.retrooper:packetevents-fabric:2.10.2+3684f01-SNAPSHOT")!!)
include(modImplementation("org.incendo:cloud-fabric:2.0.0-beta.13")!!)
include(modImplementation("com.github.retrooper:packetevents-fabric:2.11.1+60a2c34-SNAPSHOT")!!)
include(modImplementation("org.incendo:cloud-fabric:2.0.0-beta.15")!!)
include(implementation("org.incendo:cloud-minecraft-extras:2.0.0-beta.10")!!)
include(implementation("org.yaml:snakeyaml:2.0")!!)
@@ -16,19 +16,19 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class PlayerMixin {
@Inject(method = "attack", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/EntityVelocityUpdateS2CPacket;<init>(Lnet/minecraft/entity/Entity;)V"), cancellable = true)
private void onAttack(Entity target, CallbackInfo ci) {
if (target instanceof ServerPlayerEntity serverPlayer && target.velocityModified) {
if (target instanceof ServerPlayerEntity serverPlayer && target.velocityDirty) {
Vec3d velocity = target.getVelocity();
ActionResult result = PlayerVelocityEvent.EVENT.invoker().onVelocityChange(serverPlayer, velocity);
if (result == ActionResult.FAIL) {
target.velocityModified = false;
target.velocityDirty = false;
ci.cancel(); // Prevent sending the velocity packet
} else if (result == ActionResult.SUCCESS) {
// Currently unnecessary since we do this in the handler, will move later
target.setVelocity(velocity);
serverPlayer.networkHandler.sendPacket(new EntityVelocityUpdateS2CPacket(target));
target.velocityModified = false;
target.velocityDirty = false;
ci.cancel(); // Prevent sending the original velocity packet
}
}
@@ -23,13 +23,13 @@ public class ServerEntityMixin {
// Velocity event
@Inject(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/Entity;velocityModified:Z", ordinal = 1), cancellable = true)
private void onSendChanges(CallbackInfo ci) {
if (this.entity.velocityModified && this.entity instanceof ServerPlayerEntity player) {
if (this.entity.velocityDirty && this.entity instanceof ServerPlayerEntity player) {
Vec3d velocity = player.getVelocity();
ActionResult result = PlayerVelocityEvent.EVENT.invoker().onVelocityChange(player, velocity);
if (result == ActionResult.FAIL) {
this.entity.velocityModified = false;
this.entity.velocityDirty = false;
ci.cancel();
} else if (result == ActionResult.SUCCESS) {
// Currently unnecessary since we do this in the handler, will move later
@@ -131,7 +131,7 @@ public class FabricPlayer implements PlatformPlayer {
fabricPlayer.setVelocity(adjustedVelocity.x, adjustedVelocity.y, adjustedVelocity.z);
// TODO
// fix paper-ism? for some reason setVelocity() in paper marks the entity as hurt marked every time its called?
fabricPlayer.velocityModified = true;
fabricPlayer.velocityDirty = true;
}
@Override
+3 -3
View File
@@ -4,8 +4,8 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.10
yarn_mappings=1.21.10+build.2:v2
minecraft_version=1.21.11
yarn_mappings=1.21.11+build.3:v2
loader_version=0.16.13
# Mod Properties
@@ -14,6 +14,6 @@ archives_base_name=knockbacksync
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.138.3+1.21.10
fabric_version=0.140.0+1.21.11
githubRepo=CASELOAD7000/knockback-sync
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME