Update fabric to 1.20 (#3047)

* update: 23w17a
* update: 1.20-pre2
* update: 1.20-rc1
This commit is contained in:
Drex 2023-06-11 13:40:19 +02:00 committed by GitHub
parent ab4c7454b1
commit bc2b79654a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View File

@ -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')

View File

@ -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();

View File

@ -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<Text> 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

View File

@ -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);
}