|
4 | 4 | import com.mojang.authlib.GameProfile;
|
5 | 5 | import net.minecraft.core.BlockPos;
|
6 | 6 | import net.minecraft.core.UUIDUtil;
|
| 7 | +import net.minecraft.network.DisconnectionDetails; |
7 | 8 | import net.minecraft.network.chat.Component;
|
8 | 9 | import net.minecraft.network.chat.contents.TranslatableContents;
|
9 | 10 | import net.minecraft.network.protocol.PacketFlow;
|
|
30 | 31 | import net.minecraft.world.level.Level;
|
31 | 32 | import net.minecraft.world.level.block.entity.SkullBlockEntity;
|
32 | 33 | import net.minecraft.world.level.block.state.BlockState;
|
| 34 | +import net.minecraft.world.level.portal.DimensionTransition; |
33 | 35 | import net.minecraft.world.phys.Vec3;
|
34 | 36 | import carpet.fakes.ServerPlayerInterface;
|
35 | 37 | import carpet.utils.Messenger;
|
@@ -147,10 +149,10 @@ public void kill(Component reason)
|
147 | 149 | shakeOff();
|
148 | 150 |
|
149 | 151 | if (reason.getContents() instanceof TranslatableContents text && text.getKey().equals("multiplayer.disconnect.duplicate_login")) {
|
150 |
| - this.connection.onDisconnect(reason); |
| 152 | + this.connection.onDisconnect(new DisconnectionDetails(reason)); |
151 | 153 | } else {
|
152 | 154 | this.server.tell(new TickTask(this.server.getTickCount(), () -> {
|
153 |
| - this.connection.onDisconnect(reason); |
| 155 | + this.connection.onDisconnect(new DisconnectionDetails(reason)); |
154 | 156 | }));
|
155 | 157 | }
|
156 | 158 | }
|
@@ -213,7 +215,7 @@ protected void checkFallDamage(double y, boolean onGround, BlockState state, Blo
|
213 | 215 | }
|
214 | 216 |
|
215 | 217 | @Override
|
216 |
| - public Entity changeDimension(DimensionTransitionSupplier serverLevel) |
| 218 | + public Entity changeDimension(DimensionTransition serverLevel) |
217 | 219 | {
|
218 | 220 | super.changeDimension(serverLevel);
|
219 | 221 | if (wonGame) {
|
|
0 commit comments