mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 11:22:01 +01:00
bundle o' patches
This commit is contained in:
parent
294026345e
commit
c972a4898f
@ -25,4 +25,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ if (!new io.papermc.paper.event.block.BellRingEvent(world.getWorld().getBlockAt(MCUtil.toLocation(world, pos)), entity == null ? null : entity.getBukkitEntity()).callEvent()) return false; // Paper - BellRingEvent
|
+ if (!new io.papermc.paper.event.block.BellRingEvent(world.getWorld().getBlockAt(MCUtil.toLocation(world, pos)), entity == null ? null : entity.getBukkitEntity()).callEvent()) return false; // Paper - BellRingEvent
|
||||||
((BellBlockEntity)blockEntity).onHit(direction);
|
((BellBlockEntity)blockEntity).onHit(direction);
|
||||||
world.playSound((Player)null, pos, SoundEvents.BELL_BLOCK, SoundSource.BLOCKS, 2.0F, 1.0F);
|
world.playSound((Player)null, pos, SoundEvents.BELL_BLOCK, SoundSource.BLOCKS, 2.0F, 1.0F);
|
||||||
world.gameEvent(entity, GameEvent.RING_BELL, pos);
|
world.gameEvent(entity, GameEvent.BLOCK_CHANGE, pos);
|
@ -8,23 +8,15 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.nbt.CompoundTag;
|
|
||||||
import net.minecraft.nbt.ListTag;
|
|
||||||
import net.minecraft.nbt.StringTag;
|
|
||||||
import net.minecraft.network.Connection;
|
|
||||||
+import net.minecraft.network.FriendlyByteBuf;
|
|
||||||
import net.minecraft.network.chat.ChatType;
|
|
||||||
import net.minecraft.network.chat.Component;
|
|
||||||
import net.minecraft.network.chat.MutableComponent;
|
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80);
|
|
||||||
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
||||||
|
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
|
||||||
|
|
||||||
+ private String clientBrandName = null; // Paper - Brand name
|
+ private String clientBrandName = null; // Paper - Brand name
|
||||||
+
|
+
|
||||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||||
|
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.connection = connection;
|
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
|
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
|
||||||
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
||||||
@ -41,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start - Brand support
|
+ // Paper start - Brand support
|
||||||
+ if (packet.identifier.equals(MINECRAFT_BRAND)) {
|
+ if (packet.identifier.equals(MINECRAFT_BRAND)) {
|
||||||
+ try {
|
+ try {
|
||||||
+ this.clientBrandName = new FriendlyByteBuf(io.netty.buffer.Unpooled.copiedBuffer(data)).readUtf(256);
|
+ this.clientBrandName = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.copiedBuffer(data)).readUtf(256);
|
||||||
+ } catch (StringIndexOutOfBoundsException ex) {
|
+ } catch (StringIndexOutOfBoundsException ex) {
|
||||||
+ this.clientBrandName = "illegal";
|
+ this.clientBrandName = "illegal";
|
||||||
+ }
|
+ }
|
@ -51,4 +51,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ if (versionKey < minDataFixPrecacheVersion) continue; // Paper
|
+ if (versionKey < minDataFixPrecacheVersion) continue; // Paper
|
||||||
final Schema schema = schemas.get(versionKey);
|
final Schema schema = schemas.get(versionKey);
|
||||||
for (final String typeName : schema.types()) {
|
for (final String typeName : schema.types()) {
|
||||||
CompletableFuture.runAsync(() -> {
|
final CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
|
@ -11,7 +11,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
|
||||||
this.getPlayerList().reloadResources();
|
this.getPlayerList().reloadResources();
|
||||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||||
this.structureManager.onResourceManagerReload(this.resources.resourceManager);
|
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||||
+ org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings, they can be defined by datapacks so refresh it here
|
+ org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings, they can be defined by datapacks so refresh it here
|
||||||
}, this);
|
}, this);
|
||||||
|
|
@ -1135,7 +1135,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ public class RedStoneWireBlock extends Block {
|
@@ -0,0 +0,0 @@ public class RedStoneWireBlock extends Block {
|
||||||
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
if (state.canSurvive(world, pos)) {
|
if (state.canSurvive(world, pos)) {
|
||||||
- this.updatePowerStrength(world, pos, state);
|
- this.updatePowerStrength(world, pos, state);
|
@ -69,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
import net.minecraft.advancements.CriterionTriggerInstance;
|
import net.minecraft.advancements.CriterionTriggerInstance;
|
||||||
+import net.minecraft.advancements.critereon.SimpleCriterionTrigger;
|
+import net.minecraft.advancements.critereon.SimpleCriterionTrigger;
|
||||||
import net.minecraft.network.chat.ChatType;
|
import net.minecraft.network.chat.ChatType;
|
||||||
import net.minecraft.network.chat.TranslatableComponent;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.protocol.game.ClientboundSelectAdvancementsTabPacket;
|
import net.minecraft.network.protocol.game.ClientboundSelectAdvancementsTabPacket;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerAdvancements {
|
@@ -0,0 +0,0 @@ public class PlayerAdvancements {
|
||||||
private Advancement lastSelectedTab;
|
private Advancement lastSelectedTab;
|
@ -1,7 +1,7 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 6 Jul 2020 18:36:41 -0400
|
Date: Mon, 6 Jul 2020 18:36:41 -0400
|
||||||
Subject: [PATCH] Fix Concurrency issue in WeightedList
|
Subject: [PATCH] Fix Concurrency issue in ShufflingList
|
||||||
|
|
||||||
if multiple threads from worldgen sort at same time, it will crash.
|
if multiple threads from worldgen sort at same time, it will crash.
|
||||||
So make a copy of the list for sorting purposes.
|
So make a copy of the list for sorting purposes.
|
||||||
@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
private final GateBehavior.OrderPolicy orderPolicy;
|
private final GateBehavior.OrderPolicy orderPolicy;
|
||||||
private final GateBehavior.RunningPolicy runningPolicy;
|
private final GateBehavior.RunningPolicy runningPolicy;
|
||||||
- private final ShufflingList<Behavior<? super E>> behaviors = new ShufflingList<>();
|
- private final ShufflingList<Behavior<? super E>> behaviors = new ShufflingList<>();
|
||||||
+ private final ShufflingList<Behavior<? super E>> behaviors = new ShufflingList<>(false); // Paper - don't use a clone
|
+ private final ShufflingList<Behavior<? super E>> behaviors = new ShufflingList<>(false); // Paper - don't use a clone
|
||||||
|
|
||||||
public GateBehavior(Map<MemoryModuleType<?>, MemoryStatus> requiredMemoryState, Set<MemoryModuleType<?>> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List<Pair<Behavior<? super E>, Integer>> tasks) {
|
public GateBehavior(Map<MemoryModuleType<?>, MemoryStatus> requiredMemoryState, Set<MemoryModuleType<?>> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List<Pair<Behavior<? super E>, Integer>> tasks) {
|
||||||
super(requiredMemoryState);
|
super(requiredMemoryState);
|
||||||
@ -23,10 +23,10 @@ diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||||
@@ -0,0 +0,0 @@ import java.util.stream.Stream;
|
@@ -0,0 +0,0 @@ import net.minecraft.util.RandomSource;
|
||||||
public class ShufflingList<U> {
|
public class ShufflingList<U> {
|
||||||
protected final List<ShufflingList.WeightedEntry<U>> entries;
|
protected final List<ShufflingList.WeightedEntry<U>> entries;
|
||||||
private final Random random = new Random();
|
private final RandomSource random = RandomSource.create();
|
||||||
+ private final boolean isUnsafe; // Paper
|
+ private final boolean isUnsafe; // Paper
|
||||||
|
|
||||||
public ShufflingList() {
|
public ShufflingList() {
|
@ -13,11 +13,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||||
public void handleAcceptTeleportPacket(ServerboundAcceptTeleportationPacket packet) {
|
return;
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
}
|
||||||
if (packet.getId() == this.awaitingTeleport && this.awaitingPositionFromClient != null) { // CraftBukkit
|
|
||||||
- this.player.absMoveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
|
- this.player.absMoveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
|
||||||
+ this.player.moveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); // Paper - use proper setPositionRotation for teleportation
|
+ this.player.moveTo(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); // Paper - use proper moveTo for teleportation
|
||||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||||
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
this.awaitingTeleportTime = this.tickCount;
|
this.awaitingTeleportTime = this.tickCount;
|
||||||
- this.player.absMoveTo(d0, d1, d2, f, f1);
|
- this.player.absMoveTo(d0, d1, d2, f, f1);
|
||||||
+ this.player.moveTo(d0, d1, d2, f, f1); // Paper - use proper setPositionRotation for teleportation
|
+ this.player.moveTo(d0, d1, d2, f, f1); // Paper - use proper moveTo for teleportation
|
||||||
this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag));
|
this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ entity.preserveMotion = true; // Paper - preserve entity motion from tag
|
+ entity.preserveMotion = true; // Paper - preserve entity motion from tag
|
||||||
entity.moveTo(entity.getX(), entity.getY(), entity.getZ(), world.random.nextFloat() * 360.0F, 0.0F);
|
entity.moveTo(entity.getX(), entity.getY(), entity.getZ(), randomsource.nextFloat() * 360.0F, 0.0F);
|
||||||
if (entity instanceof Mob) {
|
if (entity instanceof Mob) {
|
||||||
Mob entityinsentient = (Mob) entity;
|
Mob entityinsentient = (Mob) entity;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@ -77,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
// entity.setLocation() throws no event, and so cannot be cancelled
|
// entity.setLocation() throws no event, and so cannot be cancelled
|
||||||
- this.entity.absMoveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
- this.entity.absMoveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
+ entity.moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // Paper - use proper setPosition, as per vanilla teleporting
|
+ entity.moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // Paper - use proper moveTo, as per vanilla teleporting
|
||||||
// SPIGOT-619: Force sync head rotation also
|
// SPIGOT-619: Force sync head rotation also
|
||||||
this.entity.setYHeadRot(location.getYaw());
|
this.entity.setYHeadRot(location.getYaw());
|
||||||
|
|
@ -15,4 +15,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ org.spigotmc.SpigotConfig.disabledAdvancements = spigotConfiguration.getStringList("advancements.disabled"); // Paper - fix SPIGOT-5885, must be set early in init
|
+ org.spigotmc.SpigotConfig.disabledAdvancements = spigotConfiguration.getStringList("advancements.disabled"); // Paper - fix SPIGOT-5885, must be set early in init
|
||||||
// Paper start - fix SPIGOT-5824
|
// Paper start - fix SPIGOT-5824
|
||||||
File file;
|
File file;
|
||||||
File userCacheFile = new File("usercache.json");
|
File userCacheFile = new File(Services.USERID_CACHE_FILE);
|
@ -22,6 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
- if (!whitelist.isWhiteListed(entityplayer.getGameProfile())) {
|
- if (!whitelist.isWhiteListed(entityplayer.getGameProfile())) {
|
||||||
+ if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
+ if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
||||||
entityplayer.connection.disconnect(new TranslatableComponent("multiplayer.disconnect.not_whitelisted"));
|
entityplayer.connection.disconnect(Component.translatable("multiplayer.disconnect.not_whitelisted"));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
synchronized (ServerHandshakePacketListenerImpl.throttleTracker) {
|
synchronized (ServerHandshakePacketListenerImpl.throttleTracker) {
|
||||||
if (ServerHandshakePacketListenerImpl.throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - ServerHandshakePacketListenerImpl.throttleTracker.get(address) < connectionThrottle) {
|
if (ServerHandshakePacketListenerImpl.throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - ServerHandshakePacketListenerImpl.throttleTracker.get(address) < connectionThrottle) {
|
||||||
ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
|
ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
|
||||||
- TranslatableComponent chatmessage = new TranslatableComponent(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message
|
- MutableComponent chatmessage = Component.literal(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage); // Paper - Configurable connection throttle kick message
|
||||||
+ Component chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage, true)[0]; // Paper - Configurable connection throttle kick message // Paper - Fix hex colors not working in some kick messages
|
+ Component chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString(com.destroystokyo.paper.PaperConfig.connectionThrottleKickMessage, true)[0]; // Paper - Configurable connection throttle kick message // Paper - Fix hex colors not working in some kick messages
|
||||||
this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
||||||
this.connection.disconnect(chatmessage);
|
this.connection.disconnect(chatmessage);
|
||||||
@ -21,18 +21,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (packet.getProtocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
|
if (packet.getProtocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
|
||||||
- TranslatableComponent chatmessage;
|
- MutableComponent ichatmutablecomponent;
|
||||||
+ Component chatmessage; // Paper - Fix hex colors not working in some kick messages
|
+ Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
|
||||||
|
|
||||||
if (packet.getProtocolVersion() < 754) {
|
if (packet.getProtocolVersion() < 754) {
|
||||||
- chatmessage = new TranslatableComponent( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
|
- ichatmutablecomponent = Component.literal( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
|
||||||
+ chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||||
} else {
|
} else {
|
||||||
- chatmessage = new TranslatableComponent( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
|
- ichatmutablecomponent = Component.literal( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
|
||||||
+ chatmessage = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) , true )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
this.connection.send(new ClientboundLoginDisconnectPacket(ichatmutablecomponent));
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@ -41,15 +41,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void disconnect(String s) {
|
public void disconnect(String s) {
|
||||||
- try {
|
- this.disconnect(Component.literal(s));
|
||||||
- Component ichatbasecomponent = new TextComponent(s);
|
+ this.disconnect(org.bukkit.craftbukkit.util.CraftChatMessage.fromString(s, true)[0]); // Paper - Fix hex colors not working in some kick messages
|
||||||
- ServerLoginPacketListenerImpl.LOGGER.info("Disconnecting {}: {}", this.getUserName(), s);
|
|
||||||
- this.connection.send(new ClientboundLoginDisconnectPacket(ichatbasecomponent));
|
|
||||||
- this.connection.disconnect(ichatbasecomponent);
|
|
||||||
- } catch (Exception exception) {
|
|
||||||
- ServerLoginPacketListenerImpl.LOGGER.error("Error whilst disconnecting player", exception);
|
|
||||||
- }
|
|
||||||
+ disconnect(org.bukkit.craftbukkit.util.CraftChatMessage.fromString(s, true)[0]); // Paper - Fix hex colors not working in some kick messages
|
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl
|
@@ -0,0 +0,0 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl
|
||||||
state = this.updateDir(world, pos, state, true);
|
state = this.updateDir(world, pos, state, true);
|
||||||
if (this.isStraight) {
|
if (this.isStraight) {
|
||||||
state.neighborChanged(world, pos, this, pos, notify);
|
world.neighborChanged(state, pos, this, pos, notify);
|
||||||
+ state = world.getBlockState(pos); // Paper - don't desync, update again
|
+ state = world.getBlockState(pos); // Paper - don't desync, update again
|
||||||
}
|
}
|
||||||
|
|
@ -55,9 +55,9 @@ diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.core.BlockPos;
|
@@ -0,0 +0,0 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.core.Direction;
|
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||||
+import net.minecraft.world.item.context.UseOnContext;
|
+import net.minecraft.world.item.context.UseOnContext;
|
||||||
import net.minecraft.world.level.BlockGetter;
|
import net.minecraft.world.level.BlockGetter;
|
||||||
@ -77,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ world.scheduleTick(blockposition, this, getFireTickDelay(world.random));
|
+ world.scheduleTick(blockposition, this, getFireTickDelay(world.random));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getFireTickDelay(Random random) {
|
private static int getFireTickDelay(RandomSource random) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
Loading…
Reference in New Issue
Block a user