geforkt von Mirrors/Paper
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: cc9aa21a SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities f23325b6 Add API for per-world simulation distances 26e1774e Add API for per-world view distances 0b541e60 Add PlayerLoginEvent#getRealAddress 5f027d2d PR-949: Add Vector#fromJOML() overloads for read-only vector types CraftBukkit Changes: bcf56171a PR-1321: Clean up some stuff which got missed during previous PRs 7f833a2d1 SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst 752aac669 Implement APIs for per world view and simulation distances 57d7ef433 Preserve empty enchantment tags for glow effect 465ec3fb4 Remove connected check on setScoreboard f90ce621e Use one PermissibleBase for all command blocks 5876cca44 SPIGOT-7550: Fix creation of Arrow instances f03fc3aa3 SPIGOT-7549: ServerTickManager#setTickRate incorrect Precondition 9d7f49b01 SPIGOT-7548: Fix wrong spawn location for experience orb and dropped item Spigot Changes: ed9ba9a4 Drop no longer required patch ignoring -o option 86b5dd6a SPIGOT-7546: Fix hardcoded check for outdated client message aa7cde7a Remove obsolete APIs for per world view and simulation distances 6dff577e Remove obsolete patch preserving empty `ench` tags a3bf95b8 Remove obsolete PlayerLoginEvent#getRealAddress 1b02f5d6 Remove obsolete connected check on setScoreboard patch acf717eb Remove obsolete command block PermissibleBase patch 053fa2a9 Remove redundant patch dealing with null tile entities
Dieser Commit ist enthalten in:
Ursprung
f0fe665bb9
Commit
a8c7bd8740
@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -0,0 +0,0 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
int getSimulationDistance();
|
||||
// Spigot end
|
||||
@NotNull
|
||||
public Set<FeatureFlag> getFeatureFlags();
|
||||
|
||||
+ // Paper start - view distance api
|
||||
+ /**
|
||||
@ -71,9 +71,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ void setSendViewDistance(int viewDistance);
|
||||
+ // Paper end - view distance api
|
||||
+
|
||||
// Spigot start
|
||||
public class Spigot {
|
||||
|
||||
/**
|
||||
* Represents various map environment types that a world may be
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
|
@ -3605,14 +3605,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
private final InetAddress address;
|
||||
private final InetAddress realAddress;
|
||||
private final String hostname;
|
||||
private Result result = Result.ALLOWED;
|
||||
- private String message = "";
|
||||
+ private net.kyori.adventure.text.Component message = net.kyori.adventure.text.Component.empty();
|
||||
private final InetAddress realAddress; // Spigot
|
||||
|
||||
/**
|
||||
* This constructor defaults message to an empty string, and result to
|
||||
@@ -0,0 +0,0 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
* @param result The result status for this event
|
||||
* @param message The message to be displayed if result denies login
|
||||
@ -3620,8 +3620,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @deprecated in favour of {@link #PlayerLoginEvent(Player, String, InetAddress, Result, net.kyori.adventure.text.Component, InetAddress)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) { // Spigot
|
||||
this(player, hostname, address, realAddress); // Spigot
|
||||
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) {
|
||||
this(player, hostname, address, realAddress);
|
||||
this.result = result;
|
||||
+ this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper
|
||||
+ }
|
||||
@ -3638,12 +3638,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param message The message to be displayed if result denies login
|
||||
+ * @param realAddress the actual, unspoofed connecting address
|
||||
+ */
|
||||
+ public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) { // Spigot
|
||||
+ public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) {
|
||||
+ this(player, hostname, address, realAddress); // Spigot
|
||||
+ this.result = result;
|
||||
+ this.message = message;
|
||||
+ }
|
||||
+
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Gets the current kick message that will be used if getResult() !=
|
||||
+ * Result.ALLOWED
|
||||
@ -3660,12 +3660,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param message New kick message
|
||||
+ */
|
||||
+ public void kickMessage(net.kyori.adventure.text.@NotNull Component message) {
|
||||
this.message = message;
|
||||
}
|
||||
+ this.message = message;
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
// Spigot start
|
||||
+
|
||||
/**
|
||||
* Gets the current result of the login, as an enum
|
||||
*
|
||||
@@ -0,0 +0,0 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
* Result.ALLOWED
|
||||
*
|
||||
|
@ -615,13 +615,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
// Paper end - view distance api
|
||||
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
|
||||
|
||||
// Spigot start
|
||||
+ /**
|
||||
+ * @deprecated Unsupported api
|
||||
+ */
|
||||
+ @Deprecated // Paper
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public class Spigot {
|
||||
|
||||
/**
|
||||
|
@ -129,5 +129,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper end
|
||||
+
|
||||
// Spigot start
|
||||
/**
|
||||
* Returns the view distance used for this world.
|
||||
@Deprecated(forRemoval = true) // Paper
|
||||
public class Spigot {
|
||||
|
@ -143,23 +143,15 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.ja
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.plugin.Plugin;
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public abstract class ServerCommandSender implements CommandSender {
|
||||
private static PermissibleBase blockPermInst;
|
||||
- private final PermissibleBase perm;
|
||||
+ public final PermissibleBase perm; // Paper
|
||||
private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
|
||||
|
||||
+ // Paper start
|
||||
+ public ServerCommandSender(final PermissibleBase permissibleBase) {
|
||||
+ this.perm = permissibleBase;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public ServerCommandSender() {
|
||||
if (this instanceof CraftBlockCommandSender) {
|
||||
if (ServerCommandSender.blockPermInst == null) {
|
||||
protected ServerCommandSender() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
|
@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start - StructuresLocateEvent
|
||||
+ final org.bukkit.World bukkitWorld = world.getWorld();
|
||||
+ final org.bukkit.Location origin = io.papermc.paper.util.MCUtil.toLocation(world, center);
|
||||
+ final List<org.bukkit.generator.structure.Structure> apiStructures = structures.stream().map(Holder::value).map(nms -> org.bukkit.craftbukkit.generator.structure.CraftStructure.minecraftToBukkit(nms, world.registryAccess())).toList();
|
||||
+ final List<org.bukkit.generator.structure.Structure> apiStructures = structures.stream().map(Holder::value).map(nms -> org.bukkit.craftbukkit.generator.structure.CraftStructure.minecraftToBukkit(nms)).toList();
|
||||
+ if (!apiStructures.isEmpty()) {
|
||||
+ final io.papermc.paper.event.world.StructuresLocateEvent event = new io.papermc.paper.event.world.StructuresLocateEvent(bukkitWorld, origin, apiStructures, radius, skipReferencedStructures);
|
||||
+ if (!event.callEvent()) {
|
||||
|
@ -3854,7 +3854,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
@Override
|
||||
public boolean isOp() {
|
||||
return true;
|
||||
return CraftBlockCommandSender.SHARED_PERM.isOp();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
||||
@ -3926,13 +3926,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
public abstract class ServerCommandSender implements CommandSender {
|
||||
private static PermissibleBase blockPermInst;
|
||||
private final PermissibleBase perm;
|
||||
+ private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
|
||||
|
||||
public ServerCommandSender() {
|
||||
if (this instanceof CraftBlockCommandSender) {
|
||||
protected ServerCommandSender() {
|
||||
this.perm = new PermissibleBase(this);
|
||||
@@ -0,0 +0,0 @@ public abstract class ServerCommandSender implements CommandSender {
|
||||
return this.spigot;
|
||||
}
|
||||
|
@ -18,4 +18,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
||||
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
|
||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
|
||||
// Spigot start
|
||||
// Spigot end
|
||||
|
@ -331,7 +331,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
return item;
|
||||
}));
|
||||
register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
|
||||
- spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.z(), spawnData.z(), 0)
|
||||
- spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), 0)
|
||||
+ spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.z(), spawnData.z(), 0, org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM, null, null) // Paper
|
||||
));
|
||||
register(new EntityTypeData<>(EntityType.AREA_EFFECT_CLOUD, AreaEffectCloud.class, CraftAreaEffectCloud::new, spawnData -> new net.minecraft.world.entity.AreaEffectCloud(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
|
||||
|
@ -17,14 +17,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
|
||||
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
|
||||
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
|
||||
@@ -0,0 +0,0 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (tickingblockentity == null) {
|
||||
this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
|
||||
tilesThisCycle--;
|
||||
- this.blockEntityTickers.remove(this.tileTickPosition--);
|
||||
continue;
|
||||
}
|
||||
// Spigot end
|
||||
@@ -0,0 +0,0 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (tickingblockentity.isRemoved()) {
|
||||
// Spigot start
|
||||
|
@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- MutableComponent ichatmutablecomponent;
|
||||
+ Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
|
||||
|
||||
if (packet.protocolVersion() < 754) {
|
||||
if (packet.protocolVersion() < SharedConstants.getCurrentVersion().getProtocolVersion()) { // Spigot - SPIGOT-7546: Handle version check correctly for outdated client message
|
||||
- ichatmutablecomponent = Component.literal( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) ); // Spigot
|
||||
+ ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||
} else {
|
||||
|
@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: sulu5890 <sulu@sulu.me>
|
||||
Date: Sun, 11 Jul 2021 19:34:03 -0500
|
||||
Subject: [PATCH] Fix incorrect message for outdated client
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
@@ -0,0 +0,0 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||
if (packet.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
|
||||
Component ichatmutablecomponent; // Paper - Fix hex colors not working in some kick messages
|
||||
|
||||
- if (packet.protocolVersion() < 754) {
|
||||
+ if (packet.protocolVersion() < SharedConstants.getCurrentVersion().getProtocolVersion()) { // Paper - Fix incorrect message for outdated clients
|
||||
ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
||||
} else {
|
||||
ichatmutablecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromString( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage.replaceAll("'", "''"), SharedConstants.getCurrentVersion().getName() ) )[0]; // Spigot // Paper - Fix hex colors not working in some kick messages
|
@ -216,7 +216,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
this.blockData = meta.blockData;
|
||||
|
||||
if (meta.enchantments != null) { // Spigot
|
||||
if (meta.enchantments != null) {
|
||||
- this.enchantments = new LinkedHashMap<Enchantment, Integer>(meta.enchantments);
|
||||
+ this.enchantments = new EnchantmentMap(meta.enchantments); // Paper
|
||||
}
|
||||
|
@ -6636,7 +6636,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@@ -0,0 +0,0 @@ public abstract class DistanceManager {
|
||||
final Executor mainThreadExecutor;
|
||||
private long ticketTickCounter;
|
||||
private int simulationDistance = 10;
|
||||
public int simulationDistance = 10;
|
||||
+ private final ChunkMap chunkMap; // Paper
|
||||
|
||||
- protected DistanceManager(Executor workerExecutor, Executor mainThreadExecutor) {
|
||||
|
@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value(), this.getHandle().registryAccess()), CraftLocation.toBukkit(found.getFirst(), this));
|
||||
return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value()), CraftLocation.toBukkit(found.getFirst(), this));
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
|
@ -28,7 +28,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@@ -0,0 +0,0 @@ public final class CraftEntityTypes {
|
||||
net.minecraft.world.item.ItemStack itemStack = new net.minecraft.world.item.ItemStack(Items.STONE);
|
||||
ItemEntity item = new ItemEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.z(), spawnData.z(), itemStack);
|
||||
ItemEntity item = new ItemEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), itemStack);
|
||||
item.setPickUpDelay(10);
|
||||
+ CLEAR_MOVE_IF_NOT_RANDOMIZED.accept(spawnData, item); // Paper - respect randomizeData
|
||||
|
||||
|
@ -17555,7 +17555,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final Queue<Runnable> unloadQueue;
|
||||
private int serverViewDistance;
|
||||
public int serverViewDistance;
|
||||
|
||||
- // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback()
|
||||
- public final CallbackExecutor callbackExecutor = new CallbackExecutor();
|
||||
@ -17577,10 +17577,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- }
|
||||
- };
|
||||
- // CraftBukkit end
|
||||
+ // Paper - rewrite chunk system
|
||||
|
||||
-
|
||||
// Paper start - distance maps
|
||||
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int chunkZ = io.papermc.paper.util.MCUtil.getChunkCoordinate(player.getZ());
|
||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||
@ -18672,7 +18672,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- final LongSet ticketsToRelease = new LongOpenHashSet();
|
||||
- final Executor mainThreadExecutor;
|
||||
- private long ticketTickCounter;
|
||||
- private int simulationDistance = 10;
|
||||
- public int simulationDistance = 10;
|
||||
+ // Paper - rewrite chunk system
|
||||
private final ChunkMap chunkMap; // Paper
|
||||
|
||||
@ -18719,8 +18719,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
-
|
||||
+ this.getChunkHolderManager().tick(); // Paper - rewrite chunk system
|
||||
}
|
||||
|
||||
-
|
||||
private static int getTicketLevelAt(SortedArraySet<Ticket<?>> tickets) {
|
||||
return !tickets.isEmpty() ? ((Ticket) tickets.first()).getTicketLevel() : ChunkLevel.MAX_LEVEL + 1;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class DistanceManager {
|
||||
protected abstract ChunkHolder updateChunkScheduling(long pos, int level, @Nullable ChunkHolder holder, int k);
|
||||
|
||||
@ -18999,8 +19001,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- } catch (Throwable throwable1) {
|
||||
- throwable.addSuppressed(throwable1);
|
||||
- }
|
||||
+ // Paper - rewrite chunk system
|
||||
|
||||
-
|
||||
- throw throwable;
|
||||
- }
|
||||
-
|
||||
@ -19010,7 +19011,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- }
|
||||
-
|
||||
- }
|
||||
-
|
||||
+ // Paper - rewrite chunk system
|
||||
|
||||
- @VisibleForTesting
|
||||
- TickingTracker tickingTracker() {
|
||||
- return this.tickingTicketsTracker;
|
||||
@ -22755,19 +22757,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
SortedArraySet<Ticket<?>> tickets = chunkTickets.getValue();
|
||||
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// Spigot start
|
||||
|
||||
@Override
|
||||
public int getViewDistance() {
|
||||
- return this.world.spigotConfig.viewDistance;
|
||||
- return this.world.getChunkSource().chunkMap.serverViewDistance;
|
||||
+ return this.getHandle().playerChunkLoader.getAPIViewDistance(); // Paper - replace player chunk loader
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSimulationDistance() {
|
||||
- return this.world.spigotConfig.simulationDistance;
|
||||
- return this.world.getChunkSource().chunkMap.getDistanceManager().simulationDistance;
|
||||
+ return this.getHandle().playerChunkLoader.getAPITickDistance(); // Paper - replace player chunk loader
|
||||
}
|
||||
// Spigot end
|
||||
+ }
|
||||
+ // Paper start - view distance api
|
||||
+ @Override
|
||||
+ public void setViewDistance(int viewDistance) {
|
||||
@ -22805,11 +22806,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Override
|
||||
+ public void setSendViewDistance(int viewDistance) {
|
||||
+ this.getHandle().chunkSource.chunkMap.setSendViewDistance(viewDistance); // Paper - replace player chunk loader
|
||||
+ }
|
||||
}
|
||||
+ // Paper end - view distance api
|
||||
|
||||
// Spigot start
|
||||
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
|
||||
public BlockMetadataStore getBlockMetadata() {
|
||||
return this.blockMetadata;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
|
@ -9,14 +9,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftEntityTypes {
|
||||
// We use stone instead of empty, to give the plugin developer a visual clue, that the spawn method is working,
|
||||
// and that the item stack should probably be changed.
|
||||
net.minecraft.world.item.ItemStack itemStack = new net.minecraft.world.item.ItemStack(Items.STONE);
|
||||
- ItemEntity item = new ItemEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.z(), spawnData.z(), itemStack);
|
||||
+ ItemEntity item = new ItemEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), itemStack);
|
||||
item.setPickUpDelay(10);
|
||||
CLEAR_MOVE_IF_NOT_RANDOMIZED.accept(spawnData, item); // Paper - respect randomizeData
|
||||
|
||||
return item;
|
||||
}));
|
||||
register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f29cb8015897da1bca0c93522c5884c4c9f93601
|
||||
Subproject commit cc9aa21a289b9a7d361c4a8f99b56d5300f40d4c
|
@ -1 +1 @@
|
||||
Subproject commit b3b43a6ad21c9f7fc2dd0a1e7e94abae0057770d
|
||||
Subproject commit bcf56171a63d24b21bea341e8f5b3c5234f077c3
|
@ -1 +1 @@
|
||||
Subproject commit 06d602e7c3165ebf32f7419cb5873ec82d54ff7c
|
||||
Subproject commit ed9ba9a42d6c6aca02c474aed4207b7b4fd6f5d6
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren