Skip to content

Commit 0cb3738

Browse files
committed
build: 1.21.6-rc1
1 parent ecfd207 commit 0cb3738

File tree

5 files changed

+23
-20
lines changed

5 files changed

+23
-20
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: ./gradlew build
3737
- name: upload to modrinth and curseforge
3838
run: ./gradlew modrinth curseforge
39-
if: github.ref == 'refs/heads/ver/1.21.5'
39+
if: github.ref == 'refs/heads/ver/1.21.6'
4040
env:
4141
MODRINTH_TOKEN: ${{ secrets.MODRINTH_UPLOAD_TOKEN }}
4242
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_API_TOKEN }}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx2G
33

44
# Fabric Properties
55
# check these on https://fabricmc.net/versions.html
6-
minecraft_version=1.21.5
7-
yarn_mappings=1.21.5+build.1
8-
loader_version=0.16.10
6+
minecraft_version=1.21.6-rc1
7+
yarn_mappings=1.21.6-rc1+build.1
8+
loader_version=0.16.14
99

1010
# Mod Properties
1111
mod_version = 0.2.0+beta.7

src/main/java/com/ishland/vmp/mixins/chunk/loading/async_chunk_on_player_login/MixinServerConfigurationNetworkHandler.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import net.minecraft.server.world.ChunkTicketType;
3333
import net.minecraft.server.world.ServerWorld;
3434
import net.minecraft.text.Text;
35+
import net.minecraft.util.ErrorReporter;
3536
import net.minecraft.util.Unit;
3637
import net.minecraft.util.math.ChunkPos;
3738
import net.minecraft.world.World;
@@ -91,13 +92,13 @@ private void onDisconnect(DisconnectionInfo info, CallbackInfo ci) {
9192
}
9293
}
9394

94-
@WrapOperation(method = "onReady", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/PlayerManager;createPlayer(Lcom/mojang/authlib/GameProfile;Lnet/minecraft/network/packet/c2s/common/SyncedClientOptions;)Lnet/minecraft/server/network/ServerPlayerEntity;"))
95-
private ServerPlayerEntity replacePlayer(PlayerManager instance, GameProfile profile, SyncedClientOptions syncedOptions, Operation<ServerPlayerEntity> original) {
95+
@WrapOperation(method = "onReady", at = @At(value = "NEW", target = "(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/server/world/ServerWorld;Lcom/mojang/authlib/GameProfile;Lnet/minecraft/network/packet/c2s/common/SyncedClientOptions;)Lnet/minecraft/server/network/ServerPlayerEntity;"))
96+
private ServerPlayerEntity replacePlayer(MinecraftServer server, ServerWorld world, GameProfile profile, SyncedClientOptions clientOptions, Operation<ServerPlayerEntity> original) {
9697
if (this.vmp$heldPlayer != null) {
9798
this.vmp$dropTicket();
9899
return this.vmp$heldPlayer;
99100
} else {
100-
return original.call(instance, profile, syncedOptions);
101+
return original.call(server, world, profile, clientOptions);
101102
}
102103
}
103104

@@ -116,19 +117,20 @@ private void delayJoinWorld(ServerPlayerConfigurationTask instance, Consumer<Pac
116117
return;
117118
}
118119

119-
ServerPlayerEntity player = playerManager.createPlayer(this.profile, this.syncedOptions);
120+
ServerPlayerEntity player = new ServerPlayerEntity(this.server, this.server.getOverworld(), this.profile, this.syncedOptions);
120121
this.vmp$heldPlayer = player;
121122

122-
RegistryKey<World> registryKey = playerManager.loadPlayerData(player)
123-
.flatMap(nbt -> DimensionType.worldFromDimensionNbt(new Dynamic<>(NbtOps.INSTANCE, nbt.get("Dimension"))).resultOrPartial(LOGGER::error))
124-
.orElse(World.OVERWORLD);
125-
ServerWorld storedWorld = playerManager.getServer().getWorld(registryKey);
126123
ServerWorld actualWorld;
127-
if (storedWorld == null) {
128-
LOGGER.warn("Unknown respawn dimension {}, defaulting to overworld", registryKey);
129-
actualWorld = playerManager.getServer().getOverworld();
130-
} else {
131-
actualWorld = storedWorld;
124+
try (ErrorReporter.Logging logging = new ErrorReporter.Logging(player.getErrorReporterContext(), LOGGER)) {
125+
RegistryKey<World> registryKey = playerManager.loadPlayerData(player, logging)
126+
.flatMap(view -> view.read("Dimension", World.CODEC)).orElse(World.OVERWORLD);
127+
ServerWorld storedWorld = playerManager.getServer().getWorld(registryKey);
128+
if (storedWorld == null) {
129+
LOGGER.warn("Unknown respawn dimension {}, defaulting to overworld", registryKey);
130+
actualWorld = playerManager.getServer().getOverworld();
131+
} else {
132+
actualWorld = storedWorld;
133+
}
132134
}
133135

134136
ChunkPos chunkPos = new ChunkPos(player.getBlockPos());

src/main/java/com/ishland/vmp/mixins/networking/no_flush/MixinClientConnection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
44
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
55
import io.netty.channel.Channel;
6+
import io.netty.channel.ChannelFutureListener;
67
import io.netty.channel.EventLoop;
78
import io.netty.util.concurrent.AbstractEventExecutor;
89
import net.minecraft.network.ClientConnection;
@@ -22,7 +23,7 @@ private Channel dontFlush(Channel instance) {
2223
}
2324

2425
@WrapOperation(method = "sendImmediately", at = @At(value = "INVOKE", target = "Lio/netty/channel/EventLoop;execute(Ljava/lang/Runnable;)V"))
25-
private void avoidImmediateExecute(EventLoop instance, Runnable runnable, Operation<Void> original, Packet<?> packet, @Nullable PacketCallbacks callbacks, boolean flush) {
26+
private void avoidImmediateExecute(EventLoop instance, Runnable runnable, Operation<Void> original, Packet<?> packet, @Nullable ChannelFutureListener channelFutureListener, boolean flush) {
2627
if (!flush && instance instanceof AbstractEventExecutor executor) {
2728
executor.lazyExecute(runnable);
2829
} else {

src/main/java/com/ishland/vmp/mixins/playerwatching/optimize_nearby_entity_tracking_lookups/MixinServerPlayerEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
@Mixin(ServerPlayerEntity.class)
1515
public abstract class MixinServerPlayerEntity extends PlayerEntity implements ServerPlayerEntityExtension {
1616

17-
public MixinServerPlayerEntity(World world, BlockPos pos, float yaw, GameProfile gameProfile) {
18-
super(world, pos, yaw, gameProfile);
17+
public MixinServerPlayerEntity(World world, GameProfile profile) {
18+
super(world, profile);
1919
}
2020

2121
private double vmpTracking$prevX = Double.NaN;

0 commit comments

Comments
 (0)