diff --git a/Plan/fabric/build.gradle b/Plan/fabric/build.gradle index c86e1f7bf..2f3e7cb2e 100644 --- a/Plan/fabric/build.gradle +++ b/Plan/fabric/build.gradle @@ -8,9 +8,9 @@ dependencies { shadow "net.playeranalytics:platform-abstraction-layer-api:$palVersion" - minecraft "com.mojang:minecraft:1.19.4" - mappings "net.fabricmc:yarn:1.19.4+build.1:v2" - modImplementation "net.fabricmc:fabric-loader:0.14.17" + minecraft "com.mojang:minecraft:1.20-rc1" + mappings "net.fabricmc:yarn:1.20-rc1+build.2:v2" + modImplementation "net.fabricmc:fabric-loader:0.14.21" modImplementation('me.lucko:fabric-permissions-api:0.2-SNAPSHOT') // Fabric API @@ -24,7 +24,7 @@ dependencies { ] apiModules.forEach { - modImplementation(fabricApi.module(it, "0.76.0+1.19.4")) + modImplementation(fabricApi.module(it, "0.83.0+1.20")) } testImplementation project(path: ":common", configuration: 'testArtifacts') diff --git a/Plan/fabric/src/main/java/net/playeranalytics/plan/commands/use/FabricMessageBuilder.java b/Plan/fabric/src/main/java/net/playeranalytics/plan/commands/use/FabricMessageBuilder.java index 8ba2f30eb..3ad147856 100644 --- a/Plan/fabric/src/main/java/net/playeranalytics/plan/commands/use/FabricMessageBuilder.java +++ b/Plan/fabric/src/main/java/net/playeranalytics/plan/commands/use/FabricMessageBuilder.java @@ -103,7 +103,7 @@ public class FabricMessageBuilder implements MessageBuilder { @Override public void send() { if (previous == null) { - sender.sendFeedback(builder, false); + sender.sendFeedback(() -> builder, false); } else { previous.builder.append(builder); previous.send(); diff --git a/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerCommandSourceMixin.java b/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerCommandSourceMixin.java index 1a06a8f44..db9d3dcf7 100644 --- a/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerCommandSourceMixin.java +++ b/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerCommandSourceMixin.java @@ -29,6 +29,7 @@ import org.spongepowered.asm.mixin.Shadow; import java.util.Optional; import java.util.UUID; +import java.util.function.Supplier; @Mixin(ServerCommandSource.class) public abstract class ServerCommandSourceMixin implements CMDSender { @@ -44,7 +45,7 @@ public abstract class ServerCommandSourceMixin implements CMDSender { } @Shadow - public abstract void sendFeedback(Text message, boolean broadcastToOps); + public abstract void sendFeedback(Supplier supplier, boolean broadcastToOps); @Shadow @Nullable @@ -72,7 +73,7 @@ public abstract class ServerCommandSourceMixin implements CMDSender { @Override public void send(String message) { - this.sendFeedback(Text.literal(message), false); + this.sendFeedback(() -> Text.literal(message), false); } @Override diff --git a/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerPlayNetworkHandlerMixin.java b/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerPlayNetworkHandlerMixin.java index 98482ae9b..f7c9485de 100644 --- a/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerPlayNetworkHandlerMixin.java +++ b/Plan/fabric/src/main/java/net/playeranalytics/plan/gathering/listeners/events/mixin/ServerPlayNetworkHandlerMixin.java @@ -33,7 +33,7 @@ public class ServerPlayNetworkHandlerMixin { PlanFabricEvents.ON_COMMAND.invoker().onCommand((ServerPlayNetworkHandler) (Object) this, packet.command()); } - @Inject(method = "onPlayerMove", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;getWorld()Lnet/minecraft/server/world/ServerWorld;")) + @Inject(method = "onPlayerMove", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;getServerWorld()Lnet/minecraft/server/world/ServerWorld;")) public void onPlayerMove(PlayerMoveC2SPacket packet, CallbackInfo ci) { PlanFabricEvents.ON_MOVE.invoker().onMove((ServerPlayNetworkHandler) (Object) this, packet); }