mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
More more more patches
This commit is contained in:
parent
588aa467be
commit
5c61ec8531
@ -34,10 +34,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
ServerLoginPacketListenerImpl.this.gameProfile = ServerLoginPacketListenerImpl.this.createFakeProfile(gameprofile);
|
ServerLoginPacketListenerImpl.this.gameProfile = ServerLoginPacketListenerImpl.this.createFakeProfile(gameprofile);
|
||||||
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
|
ServerLoginPacketListenerImpl.this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
|
||||||
} else {
|
} else {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) {
|
+ if (com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage != null) {
|
||||||
+ ServerLoginPacketListenerImpl.this.disconnect(new TextComponent(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage));
|
+ ServerLoginPacketListenerImpl.this.disconnect(Component.literal(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage));
|
||||||
+ } else // Paper end
|
+ } else // Paper end
|
||||||
ServerLoginPacketListenerImpl.this.disconnect(new TranslatableComponent("multiplayer.disconnect.authservers_down"));
|
ServerLoginPacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.authservers_down"));
|
||||||
ServerLoginPacketListenerImpl.LOGGER.error("Couldn't verify username because servers are unavailable");
|
ServerLoginPacketListenerImpl.LOGGER.error("Couldn't verify username because servers are unavailable");
|
||||||
}
|
}
|
@ -593,11 +593,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
File file = (File) optionset.valueOf("universe"); // CraftBukkit
|
File file = (File) optionset.valueOf("universe"); // CraftBukkit
|
||||||
- YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY);
|
- Services services = Services.create(new YggdrasilAuthenticationService(Proxy.NO_PROXY), file);
|
||||||
+ YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY); // Paper
|
+ Services services = Services.create(new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY), file); // Paper
|
||||||
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
|
// CraftBukkit start
|
||||||
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
|
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
||||||
GameProfileCache usercache = new GameProfileCache(gameprofilerepository, new File(file, MinecraftServer.USERID_CACHE_FILE.getName()));
|
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
|
@ -173,11 +173,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
|
||||||
@@ -0,0 +0,0 @@ public class Turtle extends Animal {
|
@@ -0,0 +0,0 @@ public class Turtle extends Animal {
|
||||||
Random random = this.animal.getRandom();
|
RandomSource randomsource = this.animal.getRandom();
|
||||||
|
|
||||||
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||||
- this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), random.nextInt(7) + 1));
|
- this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1));
|
||||||
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), random.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper;
|
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -0,0 +0,0 @@ public class Main {
|
@@ -0,0 +0,0 @@ public class Main {
|
||||||
Calendar deadline = Calendar.getInstance();
|
Calendar deadline = Calendar.getInstance();
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
- System.err.println("*** Error, this build is outdated ***");
|
- System.err.println("*** Error, this build is outdated ***");
|
||||||
+ // Paper start - This is some stupid bullshit
|
+ // Paper start - This is some stupid bullshit
|
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
|
+ implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation
|
||||||
// Paper end
|
// Paper end
|
||||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||||
implementation("org.ow2.asm:asm:9.2")
|
implementation("org.ow2.asm:asm:9.3")
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
@ -13,11 +13,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.chunkTypeCache = new Long2ByteOpenHashMap();
|
this.chunkTypeCache = new Long2ByteOpenHashMap();
|
||||||
this.chunkSaveCooldowns = new Long2LongOpenHashMap();
|
this.chunkSaveCooldowns = new Long2LongOpenHashMap();
|
||||||
- this.unloadQueue = Queues.newConcurrentLinkedQueue();
|
- this.unloadQueue = Queues.newConcurrentLinkedQueue();
|
||||||
this.structureManager = structureManager;
|
|
||||||
+ this.unloadQueue = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper - need constant-time size()
|
+ this.unloadQueue = new com.destroystokyo.paper.utils.CachedSizeConcurrentLinkedQueue<>(); // Paper - need constant-time size()
|
||||||
|
this.structureTemplateManager = structureTemplateManager;
|
||||||
Path path = session.getDimensionPath(world.dimension());
|
Path path = session.getDimensionPath(world.dimension());
|
||||||
|
|
||||||
this.storageName = path.getFileName().toString();
|
|
||||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
|
||||||
private void processUnloads(BooleanSupplier shouldKeepTicking) {
|
private void processUnloads(BooleanSupplier shouldKeepTicking) {
|
@ -11,13 +11,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
// return chatmessage;
|
// return chatmessage;
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Paper - Adventure
|
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
||||||
- } else if (!this.isWhiteListed(gameprofile)) {
|
- } else if (!this.isWhiteListed(gameprofile)) {
|
||||||
- chatmessage = new TranslatableComponent("multiplayer.disconnect.not_whitelisted");
|
- ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted");
|
||||||
- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure
|
- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure
|
||||||
+ } else if (!this.isWhitelisted(gameprofile, event)) { // Paper
|
+ } else if (!this.isWhiteListed(gameprofile, event)) { // Paper
|
||||||
+ //chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); // Paper
|
+ //ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
|
||||||
+ //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted
|
+ //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted
|
||||||
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public boolean isWhiteListed(GameProfile profile) {
|
public boolean isWhiteListed(GameProfile profile) {
|
||||||
- return !this.doWhiteList || this.ops.contains(profile) || this.whitelist.contains(profile);
|
- return !this.doWhiteList || this.ops.contains(profile) || this.whitelist.contains(profile);
|
||||||
+ return isWhitelisted(profile, null);
|
+ return isWhitelisted(profile, null);
|
||||||
}
|
+ }
|
||||||
+ public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
|
+ public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
|
||||||
+ boolean isOp = this.ops.contains(gameprofile);
|
+ boolean isOp = this.ops.contains(gameprofile);
|
||||||
+ boolean isWhitelisted = !this.doWhiteList || isOp || this.whitelist.contains(gameprofile);
|
+ boolean isWhitelisted = !this.doWhiteList || isOp || this.whitelist.contains(gameprofile);
|
||||||
@ -43,7 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
}
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
public boolean isOp(GameProfile profile) {
|
public boolean isOp(GameProfile profile) {
|
@ -16,9 +16,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||||
- protected final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList();
|
- protected final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList();
|
||||||
+ protected final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList(); public final int getTotalTileEntityTickers() { return this.blockEntityTickers.size(); } // Paper
|
+ protected final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList(); public final int getTotalTileEntityTickers() { return this.blockEntityTickers.size(); } // Paper
|
||||||
|
protected final NeighborUpdater neighborUpdater;
|
||||||
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||||
private boolean tickingBlockEntities;
|
private boolean tickingBlockEntities;
|
||||||
public final Thread thread;
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
@ -39,8 +39,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1")
|
+ runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1")
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper
|
||||||
implementation("org.ow2.asm:asm:9.2")
|
implementation("org.ow2.asm:asm:9.3")
|
||||||
implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation
|
implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||||
@ -119,8 +119,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import com.mojang.serialization.DynamicOps;
|
import com.mojang.serialization.DynamicOps;
|
||||||
import com.mojang.serialization.Lifecycle;
|
import com.mojang.serialization.Lifecycle;
|
||||||
-import jline.console.ConsoleReader;
|
+<<<<<<< HEAD
|
||||||
|
import java.util.Random;
|
||||||
|
import jline.console.ConsoleReader;
|
||||||
|
+=======
|
||||||
+// import jline.console.ConsoleReader; // Paper
|
+// import jline.console.ConsoleReader; // Paper
|
||||||
|
+>>>>>>> Use TerminalConsoleAppender for console improvements
|
||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
import net.minecraft.server.bossevents.CustomBossEvents;
|
import net.minecraft.server.bossevents.CustomBossEvents;
|
||||||
import net.minecraft.server.dedicated.DedicatedServer;
|
import net.minecraft.server.dedicated.DedicatedServer;
|
||||||
@ -164,7 +168,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(Component message, UUID sender) {
|
public void sendSystemMessage(Component message) {
|
||||||
- MinecraftServer.LOGGER.info(message.getString());
|
- MinecraftServer.LOGGER.info(message.getString());
|
||||||
+ MinecraftServer.LOGGER.info(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors
|
+ MinecraftServer.LOGGER.info(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user