mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 14:51:27 +01:00
Make it compie
This commit is contained in:
parent
365fe29e02
commit
d1727177ba
@ -164,9 +164,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ //noinspection NonStrictComparisonCanBeEquality
|
+ //noinspection NonStrictComparisonCanBeEquality
|
||||||
+ if (version >= com.destroystokyo.paper.proxy.VelocityProxy.MODERN_FORWARDING_WITH_KEY) {
|
+ if (version >= com.destroystokyo.paper.proxy.VelocityProxy.MODERN_FORWARDING_WITH_KEY) {
|
||||||
+ final ProfilePublicKey.Data forwardedKey = com.destroystokyo.paper.proxy.VelocityProxy.readForwardedKey(buf);
|
+ final ProfilePublicKey.Data forwardedKey = com.destroystokyo.paper.proxy.VelocityProxy.readForwardedKey(buf);
|
||||||
+ if (this.playerProfilePublicKey == null) {
|
+ if (this.profilePublicKeyData == null) {
|
||||||
+ try {
|
+ try {
|
||||||
+ this.playerProfilePublicKey = ProfilePublicKey.createValidated(this.server.getServiceSignatureValidator(), forwardedKey);
|
+ ProfilePublicKey.createValidated(this.server.getServiceSignatureValidator(), this.gameProfile.getId(), forwardedKey);
|
||||||
|
+ this.profilePublicKeyData = forwardedKey;
|
||||||
+ } catch (CryptException e) {
|
+ } catch (CryptException e) {
|
||||||
+ this.disconnect("Unable to validate forwarded player key");
|
+ this.disconnect("Unable to validate forwarded player key");
|
||||||
+ }
|
+ }
|
||||||
|
@ -21,7 +21,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ LOGGER.error("Error whilst processing packet {} for connection from {}", packet, playerIP, exception); // Paper
|
+ LOGGER.error("Error whilst processing packet {} for connection from {}", packet, playerIP, exception); // Paper
|
||||||
}
|
}
|
||||||
net.minecraft.network.chat.Component error = net.minecraft.network.chat.Component.literal("Packet processing error");
|
net.minecraft.network.chat.Component error = net.minecraft.network.chat.Component.literal("Packet processing error");
|
||||||
networkmanager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(error), (future) -> {
|
networkmanager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(error), net.minecraft.network.PacketSendListener.thenRun(() -> networkmanager.disconnect(error)));
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java b/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java
|
diff --git a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java b/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java
|
--- a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java
|
||||||
|
@ -182,10 +182,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+ void disconnectPendingPlayer(ServerPlayer entityplayer) {
|
+ void disconnectPendingPlayer(ServerPlayer entityplayer) {
|
||||||
+ Component msg = Component.translatable("multiplayer.disconnect.duplicate_login");
|
+ Component msg = Component.translatable("multiplayer.disconnect.duplicate_login");
|
||||||
+ entityplayer.networkManager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(msg), (future) -> {
|
+ entityplayer.networkManager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(msg), net.minecraft.network.PacketSendListener.thenRun(() -> {
|
||||||
+ entityplayer.networkManager.disconnect(msg);
|
+ entityplayer.networkManager.disconnect(msg);
|
||||||
+ entityplayer.networkManager = null;
|
+ entityplayer.networkManager = null;
|
||||||
+ });
|
+ }));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private void postChunkLoadJoin(ServerPlayer player, ServerLevel worldserver1, Connection networkmanager, ServerGamePacketListenerImpl playerconnection, CompoundTag nbttagcompound, String s1, String s) {
|
+ private void postChunkLoadJoin(ServerPlayer player, ServerLevel worldserver1, Connection networkmanager, ServerGamePacketListenerImpl playerconnection, CompoundTag nbttagcompound, String s1, String s) {
|
||||||
|
@ -60,9 +60,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
-
|
-
|
||||||
- PacketUtils.LOGGER.error("Failed to handle packet {}, suppressing error", packet, exception);
|
- PacketUtils.LOGGER.error("Failed to handle packet {}, suppressing error", packet, exception);
|
||||||
+ net.minecraft.network.chat.Component error = net.minecraft.network.chat.Component.literal("Packet processing error");
|
+ net.minecraft.network.chat.Component error = net.minecraft.network.chat.Component.literal("Packet processing error");
|
||||||
+ networkmanager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(error), (future) -> {
|
+ networkmanager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(error), net.minecraft.network.PacketSendListener.thenRun(() -> networkmanager.disconnect(error)));
|
||||||
+ networkmanager.disconnect(error);
|
|
||||||
+ });
|
|
||||||
+ networkmanager.setReadOnly();
|
+ networkmanager.setReadOnly();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,15 +15,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
ObjectList<JigsawJunction> objectList2 = new ObjectArrayList<>(32);
|
ObjectList<JigsawJunction> objectList2 = new ObjectArrayList<>(32);
|
||||||
- world.startsForStructure(pos, (structure) -> {
|
- world.startsForStructure(pos, (structure) -> {
|
||||||
+ // Paper start - replace for each
|
+ // Paper start - replace for each
|
||||||
+ for (net.minecraft.world.level.levelgen.structure.StructureStart structureStart : structureManager.startsForStructure(pos, (structure) -> {
|
+ for (net.minecraft.world.level.levelgen.structure.StructureStart start : world.startsForStructure(pos, (structure) -> {
|
||||||
return structure.terrainAdaptation() != TerrainAdjustment.NONE;
|
return structure.terrainAdaptation() != TerrainAdjustment.NONE;
|
||||||
- }).forEach((start) -> {
|
- }).forEach((start) -> {
|
||||||
- TerrainAdjustment terrainAdjustment = start.getStructure().terrainAdaptation();
|
|
||||||
+ })) { // Paper end
|
+ })) { // Paper end
|
||||||
+ TerrainAdjustment terrainAdjustment = structureStart.getStructure().terrainAdaptation();
|
TerrainAdjustment terrainAdjustment = start.getStructure().terrainAdaptation();
|
||||||
|
|
||||||
for(StructurePiece structurePiece : start.getPieces()) {
|
for(StructurePiece structurePiece : start.getPieces()) {
|
||||||
if (structurePiece.isCloseToChunk(pos, 12)) {
|
@@ -0,0 +0,0 @@ public class Beardifier implements DensityFunctions.BeardifierOrMarker {
|
||||||
|
}
|
||||||
|
|
||||||
|
for(JigsawJunction jigsawJunction : poolElementStructurePiece.getJunctions()) {
|
||||||
|
- int i = jigsawJunction.getSourceX();
|
||||||
|
- int j = jigsawJunction.getSourceZ();
|
||||||
|
- if (i > i - 12 && j > j - 12 && i < i + 15 + 12 && j < j + 15 + 12) {
|
||||||
|
+ // Paper start - decompile fix
|
||||||
|
+ int i2 = jigsawJunction.getSourceX();
|
||||||
|
+ int j2 = jigsawJunction.getSourceZ();
|
||||||
|
+ if (i2 > i - 12 && j2 > j - 12 && i2 < i + 15 + 12 && j2 < j + 15 + 12) {
|
||||||
|
+ // Paper end
|
||||||
|
objectList2.add(jigsawJunction);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +0,0 @@ public class Beardifier implements DensityFunctions.BeardifierOrMarker {
|
@@ -0,0 +0,0 @@ public class Beardifier implements DensityFunctions.BeardifierOrMarker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user