3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-14 18:40:10 +01:00

[ci skip] Minor cleanup and patch merges

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-01-16 19:27:39 +01:00
Ursprung ebf97bdfdd
Commit 94807a1d2e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
837 geänderte Dateien mit 369 neuen und 439 gelöschten Zeilen

Datei anzeigen

@ -2097,7 +2097,7 @@ index 6d634b0ea813ccb19f1562a7d0e5a59cea4eab21..653135352c104a6ddeb74a1b6d4916c6
} }
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8e6153100 100644 index 64a294aeb6fb548794708b38c3707f9dd882b2ff..58d20eff7e0da2d7fcb1609d55e4284715355634 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -31,7 +31,8 @@ import org.jetbrains.annotations.Nullable; @@ -31,7 +31,8 @@ import org.jetbrains.annotations.Nullable;
@ -2124,7 +2124,7 @@ index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8
- PluginClassLoader(@NotNull final JavaPluginLoader loader, @Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader) throws IOException, InvalidPluginException, MalformedURLException { - PluginClassLoader(@NotNull final JavaPluginLoader loader, @Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader) throws IOException, InvalidPluginException, MalformedURLException {
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper + @org.jetbrains.annotations.ApiStatus.Internal // Paper
+ public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper // Paper - use JarFile provided by SpigotPluginProvider + public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper - use JarFile provided by SpigotPluginProvider
super(new URL[] {file.toURI().toURL()}, parent); super(new URL[] {file.toURI().toURL()}, parent);
- Preconditions.checkArgument(loader != null, "Loader cannot be null"); - Preconditions.checkArgument(loader != null, "Loader cannot be null");
+ this.loader = null; // Paper - pass null into loader field + this.loader = null; // Paper - pass null into loader field

Datei anzeigen

@ -5,13 +5,13 @@ Subject: [PATCH] Rewrite LogEvents to contain the source jars in stack traces
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index d6d3e1332e51adc5611543b2a6689efa5921a9f2..877bfe10b858145278133acbc7049f700d2b4f8a 100644 index 8c5597e02d71c8db66e9cd11f0a41776eb471c46..de017d10db19ca7ca7f73ff0ac08fe6e1773d7dc 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -56,7 +56,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm @@ -56,7 +56,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
@org.jetbrains.annotations.ApiStatus.Internal // Paper @org.jetbrains.annotations.ApiStatus.Internal // Paper
public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper // Paper - use JarFile provided by SpigotPluginProvider public PluginClassLoader(@Nullable final ClassLoader parent, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file, @Nullable ClassLoader libraryLoader, JarFile jarFile, io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext) throws IOException, InvalidPluginException, MalformedURLException { // Paper - use JarFile provided by SpigotPluginProvider
- super(new URL[] {file.toURI().toURL()}, parent); - super(new URL[] {file.toURI().toURL()}, parent);
+ super(file.getName(), new URL[] {file.toURI().toURL()}, parent); + super(file.getName(), new URL[] {file.toURI().toURL()}, parent);
this.loader = null; // Paper - pass null into loader field this.loader = null; // Paper - pass null into loader field

Datei anzeigen

@ -1,23 +1,48 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com> From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Mon, 13 Dec 2021 14:35:27 -0800 Date: Mon, 13 Dec 2021 14:35:27 -0800
Subject: [PATCH] Move VehicleCollisionEvent HandlerList up Subject: [PATCH] Extend VehicleCollisionEvent, move HandlerList up
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java
index 316f625aa595d2ada16529b16d09f013fc4daeac..7ff9aec7ed341c01feddb8d71170b177e1fde47b 100644 index 316f625aa595d2ada16529b16d09f013fc4daeac..d0a437bd8aeec18f800893f51ece06deb0c8972c 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java --- a/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull; @@ -9,13 +9,31 @@ import org.jetbrains.annotations.NotNull;
* Raised when a vehicle collides with a block. * Raised when a vehicle collides with a block.
*/ */
public class VehicleBlockCollisionEvent extends VehicleCollisionEvent { public class VehicleBlockCollisionEvent extends VehicleCollisionEvent {
- private static final HandlerList handlers = new HandlerList(); - private static final HandlerList handlers = new HandlerList();
+ // private static final HandlerList handlers = new HandlerList(); // Paper - move HandlerList to VehicleCollisionEvent
private final Block block; private final Block block;
+ private final org.bukkit.util.Vector velocity; // Paper
+ // Paper start - Add pre-collision velocity
+ @Deprecated
public VehicleBlockCollisionEvent(@NotNull final Vehicle vehicle, @NotNull final Block block) { public VehicleBlockCollisionEvent(@NotNull final Vehicle vehicle, @NotNull final Block block) {
@@ -26,15 +26,4 @@ public class VehicleBlockCollisionEvent extends VehicleCollisionEvent { + this(vehicle, block, vehicle.getVelocity());
+ }
+
+ public VehicleBlockCollisionEvent(@NotNull final Vehicle vehicle, @NotNull final Block block, @NotNull final org.bukkit.util.Vector velocity) { // Paper - Added velocity
super(vehicle);
this.block = block;
+ this.velocity = velocity;
+ }
+
+ /**
+ * Gets velocity at which the vehicle collided with the block
+ *
+ * @return pre-collision moving velocity
+ */
+ @NotNull
+ public org.bukkit.util.Vector getVelocity() {
+ return velocity;
}
+ // Paper end
/**
* Gets the block the vehicle collided with
@@ -26,15 +44,4 @@ public class VehicleBlockCollisionEvent extends VehicleCollisionEvent {
public Block getBlock() { public Block getBlock() {
return block; return block;
} }
@ -57,19 +82,18 @@ index 9d493c155ad5c26430c1e404fcf0db5f734679e4..aa1d74eade479195bde8095aafcc91a8
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java
index 50c762d777ac90a05772501a28cacff8fd3f5126..f7f8d6274d49895f0b7db92a84bc224d936022ba 100644 index 50c762d777ac90a05772501a28cacff8fd3f5126..77fb04bdf5b1a6d94693a7374a750e020131dc3d 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java --- a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull; @@ -10,7 +10,6 @@ import org.jetbrains.annotations.NotNull;
* Raised when a vehicle collides with an entity. * Raised when a vehicle collides with an entity.
*/ */
public class VehicleEntityCollisionEvent extends VehicleCollisionEvent implements Cancellable { public class VehicleEntityCollisionEvent extends VehicleCollisionEvent implements Cancellable {
- private static final HandlerList handlers = new HandlerList(); - private static final HandlerList handlers = new HandlerList();
+ // private static final HandlerList handlers = new HandlerList(); // Paper - move HandlerList to VehicleCollisionEvent
private final Entity entity; private final Entity entity;
private boolean cancelled = false; private boolean cancelled = false;
private boolean cancelledPickup = false; private boolean cancelledPickup = false;
@@ -55,15 +55,4 @@ public class VehicleEntityCollisionEvent extends VehicleCollisionEvent implement @@ -55,15 +54,4 @@ public class VehicleEntityCollisionEvent extends VehicleCollisionEvent implement
public void setCollisionCancelled(boolean cancel) { public void setCollisionCancelled(boolean cancel) {
cancelledCollision = cancel; cancelledCollision = cancel;
} }

Datei anzeigen

@ -1,49 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: SoSeDiK <mrsosedik@gmail.com>
Date: Tue, 11 Oct 2022 23:30:32 +0300
Subject: [PATCH] Expose pre-collision moving velocity to
VehicleBlockCollisionEvent
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java
index 7ff9aec7ed341c01feddb8d71170b177e1fde47b..d2b33f4105ae32a884e714a8936e3d91e23a00a0 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java
@@ -11,11 +11,20 @@ import org.jetbrains.annotations.NotNull;
public class VehicleBlockCollisionEvent extends VehicleCollisionEvent {
// private static final HandlerList handlers = new HandlerList(); // Paper - move HandlerList to VehicleCollisionEvent
private final Block block;
+ private final org.bukkit.util.Vector velocity; // Paper
+ // Paper start - Add pre-collision velocity
+ @Deprecated
public VehicleBlockCollisionEvent(@NotNull final Vehicle vehicle, @NotNull final Block block) {
+ this(vehicle, block, vehicle.getVelocity());
+ }
+
+ public VehicleBlockCollisionEvent(@NotNull final Vehicle vehicle, @NotNull final Block block, @NotNull final org.bukkit.util.Vector velocity) { // Paper - Added velocity
super(vehicle);
this.block = block;
+ this.velocity = velocity;
}
+ // Paper end
/**
* Gets the block the vehicle collided with
@@ -26,4 +35,16 @@ public class VehicleBlockCollisionEvent extends VehicleCollisionEvent {
public Block getBlock() {
return block;
}
+
+ // Paper start
+ /**
+ * Gets velocity at which the vehicle collided with the block
+ *
+ * @return pre-collision moving velocity
+ */
+ @NotNull
+ public org.bukkit.util.Vector getVelocity() {
+ return velocity;
+ }
+ // Paper end
}

Datei anzeigen

@ -234,7 +234,7 @@ index 06e4d3a02e0d1326b7029157856476db4ef3575e..f581a9f79b2357118d912a15344ff94d
int newLevel = getTicketLevelAt(arraysetsorted); int newLevel = getTicketLevelAt(arraysetsorted);
if (newLevel > oldLevel) { if (newLevel > oldLevel) {
- this.ticketTracker.update(i, newLevel, false); - this.ticketTracker.update(i, newLevel, false);
+ this.updateTicketLevel(i, newLevel); // Paper // Paper - replace ticket level propagator + this.updateTicketLevel(i, newLevel); // Paper - replace ticket level propagator
} }
// Paper end // Paper end
return removed; // CraftBukkit return removed; // CraftBukkit

Datei anzeigen

@ -1,40 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 10 Sep 2018 23:56:36 -0400
Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
index e3d070d46729c023d594699619a4b3f8658edbce..509317a26c79f453335df1c19dc4c9ec570046af 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
@@ -126,7 +126,9 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
@Nullable
private BlockPos getPosWithBlock(BlockPos pos, BlockGetter world) {
- if (world.getBlockState(pos).is(this.blockToRemove)) {
+ net.minecraft.world.level.block.state.BlockState block = world.getBlockStateIfLoaded(pos); // Paper
+ if (block == null) return null; // Paper
+ if (block.is(this.blockToRemove)) { // Paper
return pos;
} else {
BlockPos[] ablockposition = new BlockPos[]{pos.below(), pos.west(), pos.east(), pos.north(), pos.south(), pos.below().below()};
@@ -136,7 +138,8 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
for (int j = 0; j < i; ++j) {
BlockPos blockposition1 = ablockposition1[j];
- if (world.getBlockState(blockposition1).is(this.blockToRemove)) {
+ net.minecraft.world.level.block.state.BlockState block2 = world.getBlockStateIfLoaded(blockposition1); // Paper
+ if (block2 != null && block2.is(this.blockToRemove)) { // Paper
return blockposition1;
}
}
@@ -147,7 +150,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
@Override
protected boolean isValidTarget(LevelReader world, BlockPos pos) {
- ChunkAccess ichunkaccess = world.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ()), ChunkStatus.FULL, false);
+ ChunkAccess ichunkaccess = world.getChunkIfLoadedImmediately(pos.getX() >> 4, pos.getZ() >> 4); // Paper
return ichunkaccess == null ? false : ichunkaccess.getBlockState(pos).is(this.blockToRemove) && ichunkaccess.getBlockState(pos.above()).isAir() && ichunkaccess.getBlockState(pos.above(2)).isAir();
}

Datei anzeigen

@ -0,0 +1,99 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 10 Sep 2018 23:56:36 -0400
Subject: [PATCH] Prevent various interactions from causing chunk loads
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
index e3d070d46729c023d594699619a4b3f8658edbce..5580a396a56c6e0f364a5368985ee99b9e2be0a8 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
@@ -126,7 +126,9 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
@Nullable
private BlockPos getPosWithBlock(BlockPos pos, BlockGetter world) {
- if (world.getBlockState(pos).is(this.blockToRemove)) {
+ net.minecraft.world.level.block.state.BlockState block = world.getBlockStateIfLoaded(pos); // Paper - Prevent AI rules from loading chunks
+ if (block == null) return null; // Paper - Prevent AI rules from loading chunks
+ if (block.is(this.blockToRemove)) { // Paper - Prevent AI rules from loading chunks
return pos;
} else {
BlockPos[] ablockposition = new BlockPos[]{pos.below(), pos.west(), pos.east(), pos.north(), pos.south(), pos.below().below()};
@@ -136,7 +138,8 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
for (int j = 0; j < i; ++j) {
BlockPos blockposition1 = ablockposition1[j];
- if (world.getBlockState(blockposition1).is(this.blockToRemove)) {
+ net.minecraft.world.level.block.state.BlockState block2 = world.getBlockStateIfLoaded(blockposition1); // Paper - Prevent AI rules from loading chunks
+ if (block2 != null && block2.is(this.blockToRemove)) { // Paper - Prevent AI rules from loading chunks
return blockposition1;
}
}
@@ -147,7 +150,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
@Override
protected boolean isValidTarget(LevelReader world, BlockPos pos) {
- ChunkAccess ichunkaccess = world.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ()), ChunkStatus.FULL, false);
+ ChunkAccess ichunkaccess = world.getChunkIfLoadedImmediately(pos.getX() >> 4, pos.getZ() >> 4); // Paper - Prevent AI rules from loading chunks
return ichunkaccess == null ? false : ichunkaccess.getBlockState(pos).is(this.blockToRemove) && ichunkaccess.getBlockState(pos.above()).isAir() && ichunkaccess.getBlockState(pos.above(2)).isAir();
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index 5c620989acaff4fdb842944ea2d8ae331699a2b4..a859f02074c698c68713568ed99089e33f38ccca 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -517,7 +517,8 @@ public class EnderMan extends Monster implements NeutralMob {
int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 2.0D);
int k = Mth.floor(this.enderman.getZ() - 1.0D + randomsource.nextDouble() * 2.0D);
BlockPos blockposition = new BlockPos(i, j, k);
- BlockState iblockdata = world.getBlockState(blockposition);
+ BlockState iblockdata = world.getBlockStateIfLoaded(blockposition); // Paper - Prevent endermen from loading chunks
+ if (iblockdata == null) return; // Paper - Prevent endermen from loading chunks
BlockPos blockposition1 = blockposition.below();
BlockState iblockdata1 = world.getBlockState(blockposition1);
BlockState iblockdata2 = this.enderman.getCarriedBlock();
@@ -561,7 +562,8 @@ public class EnderMan extends Monster implements NeutralMob {
int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 3.0D);
int k = Mth.floor(this.enderman.getZ() - 2.0D + randomsource.nextDouble() * 4.0D);
BlockPos blockposition = new BlockPos(i, j, k);
- BlockState iblockdata = world.getBlockState(blockposition);
+ BlockState iblockdata = world.getBlockStateIfLoaded(blockposition); // Paper - Prevent endermen from loading chunks
+ if (iblockdata == null) return; // Paper - Prevent endermen from loading chunks
Vec3 vec3d = new Vec3((double) this.enderman.getBlockX() + 0.5D, (double) j + 0.5D, (double) this.enderman.getBlockZ() + 0.5D);
Vec3 vec3d1 = new Vec3((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D);
BlockHitResult movingobjectpositionblock = world.clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.enderman));
diff --git a/src/main/java/net/minecraft/world/item/CompassItem.java b/src/main/java/net/minecraft/world/item/CompassItem.java
index 5d3047a420efe59063e90bfc7b42392127e0ad7d..b3c67c954acf7e518d89d6af65a55d6f22dac059 100644
--- a/src/main/java/net/minecraft/world/item/CompassItem.java
+++ b/src/main/java/net/minecraft/world/item/CompassItem.java
@@ -77,7 +77,7 @@ public class CompassItem extends Item implements Vanishable {
Optional<ResourceKey<Level>> optional = getLodestoneDimension(compoundTag);
if (optional.isPresent() && optional.get() == world.dimension() && compoundTag.contains("LodestonePos")) {
BlockPos blockPos = NbtUtils.readBlockPos(compoundTag.getCompound("LodestonePos"));
- if (!world.isInWorldBounds(blockPos) || !((ServerLevel)world).getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos)) {
+ if (!world.isInWorldBounds(blockPos) || (world.hasChunkAt(blockPos) && !((ServerLevel)world).getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos))) { // Paper - Prevent compass from loading chunks
compoundTag.remove("LodestonePos");
}
}
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
index 3b31a1927aaed7fffc1b4f4bcefc12120d66af3d..618d6a94d695a3bf114307f85f0f151ee24f1879 100644
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
@@ -83,7 +83,15 @@ public interface BlockGetter extends LevelHeightAccessor {
// CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
- BlockState iblockdata = this.getBlockState(blockposition);
+ // Paper start - Prevent raytrace from loading chunks
+ BlockState iblockdata = this.getBlockStateIfLoaded(blockposition);
+ if (iblockdata == null) {
+ // copied the last function parameter (listed below)
+ Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo());
+
+ return BlockHitResult.miss(raytrace1.getTo(), Direction.getNearest(vec3d.x, vec3d.y, vec3d.z), BlockPos.containing(raytrace1.getTo()));
+ }
+ // Paper end - Prevent raytrace from loading chunks
FluidState fluid = this.getFluidState(blockposition);
Vec3 vec3d = raytrace1.getFrom();
Vec3 vec3d1 = raytrace1.getTo();

Datei anzeigen

@ -34,7 +34,7 @@ index df5da9398c903d073485aaa0dce8e70947137cb9..6fcbf8205e1852d5193a42bfe1154f62
Connection.LOGGER.debug("Skipping packet due to errors", throwable.getCause()); Connection.LOGGER.debug("Skipping packet due to errors", throwable.getCause());
} else { } else {
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
index 3d359f80f52bff6f19fcb484f491a874f9dcff27..45b4f1c295eda2fcc5067a4b21de247218ef117f 100644 index 7070d093c80033b61a9c8495bc56153d986b6b03..2907536f8f9b4b9dccb96f8b4f19d75fa3c5b864 100644
--- a/src/main/java/net/minecraft/network/PacketEncoder.java --- a/src/main/java/net/minecraft/network/PacketEncoder.java
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java +++ b/src/main/java/net/minecraft/network/PacketEncoder.java
@@ -41,7 +41,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> { @@ -41,7 +41,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {

Datei anzeigen

@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 26 Nov 2018 19:21:58 -0500
Subject: [PATCH] Prevent rayTrace from loading chunks
ray tracing into an unloaded chunk should be treated as a miss
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
index 3b31a1927aaed7fffc1b4f4bcefc12120d66af3d..24073d4d7c45d501c2baec2d8c8b49f60fb76e65 100644
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
@@ -83,7 +83,15 @@ public interface BlockGetter extends LevelHeightAccessor {
// CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
- BlockState iblockdata = this.getBlockState(blockposition);
+ // Paper start - Prevent raytrace from loading chunks
+ BlockState iblockdata = this.getBlockStateIfLoaded(blockposition);
+ if (iblockdata == null) {
+ // copied the last function parameter (listed below)
+ Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo());
+
+ return BlockHitResult.miss(raytrace1.getTo(), Direction.getNearest(vec3d.x, vec3d.y, vec3d.z), BlockPos.containing(raytrace1.getTo()));
+ }
+ // Paper end
FluidState fluid = this.getFluidState(blockposition);
Vec3 vec3d = raytrace1.getFrom();
Vec3 vec3d1 = raytrace1.getTo();

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books. Puts some limits on the size of books.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 20b8fe97ee0b73e3b1a71b8366267d7c5de5da2e..f4c58330cc1f65231fa48a7dd4a199fbfc696f26 100644 index e0954ab93e4b528595fc3be40a30e2e6775bc4a2..564cc26f8201bd864f5f58c740c9de942d384394 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
@@ -1026,6 +1026,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1026,6 +1026,45 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Datei anzeigen

@ -69,7 +69,7 @@ index 6fcbf8205e1852d5193a42bfe1154f62ab01e7ad..25881c890c643ce90bdcda6b094d912b
} }
} }
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 96ae1fd95956f5e5a1542dcce3fbd9d4b83d49ba..615fb00e50f3c434809f8e1b201d457b9beae8fd 100644 index dd4e97ff4c8fb2d2f251713271f5ac493574fcd9..e9d94abb77693a845ea6318b7045bd61a7a46feb 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -60,7 +60,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -60,7 +60,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,

Datei anzeigen

@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose. documented as to their purpose.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 577035b401472d8b3c5966fe908ddf029ee54f46..ccde243c370ff670675b66b19d559461a0e9f111 100644 index 54297045b5da66827426ae354883a9709d9cdefc..7a5977aa72a0a198144d7b490abe0685326de260 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -248,6 +248,7 @@ public class ServerPlayer extends Player { @@ -248,6 +248,7 @@ public class ServerPlayer extends Player {
@ -28,7 +28,7 @@ index 577035b401472d8b3c5966fe908ddf029ee54f46..ccde243c370ff670675b66b19d559461
public boolean queueHealthUpdatePacket = false; public boolean queueHealthUpdatePacket = false;
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 27bfddd847175717697fb589b820ec5a81e08578..4221a45fda5c3b40a1f6342aebe8d7b2e190fb9c 100644 index 6a3961350030e63b27512261402f675c3cd78485..d3f57dfd5156a5df17a5a7a6e5fe51d8804fd38f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -179,6 +179,7 @@ public abstract class PlayerList { @@ -179,6 +179,7 @@ public abstract class PlayerList {
@ -106,7 +106,7 @@ index e8490a58dd4d9bc39a5bb2f9fc109526e031b971..5f590575f95eff8bf0cdcafde7dee0e3
public Location getLastDeathLocation() { public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) { if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index baba4105ccd1fe769cbbbd222e9315277394f5c6..108229bb7e6487e84607a918b3ede335a955b869 100644 index ce73a8c652cf95bae62808fc27db2ab852691fd8..9df9b465df75dd41eabd789e85ee841ed4be092c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -191,6 +191,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -191,6 +191,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -1,30 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 18 Dec 2018 02:15:08 +0000
Subject: [PATCH] Prevent Enderman from loading chunks
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index 5c620989acaff4fdb842944ea2d8ae331699a2b4..8e72958dec9d4eb35330b72e057733a268e83745 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -517,7 +517,8 @@ public class EnderMan extends Monster implements NeutralMob {
int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 2.0D);
int k = Mth.floor(this.enderman.getZ() - 1.0D + randomsource.nextDouble() * 2.0D);
BlockPos blockposition = new BlockPos(i, j, k);
- BlockState iblockdata = world.getBlockState(blockposition);
+ BlockState iblockdata = world.getBlockStateIfLoaded(blockposition); // Paper
+ if (iblockdata == null) return; // Paper
BlockPos blockposition1 = blockposition.below();
BlockState iblockdata1 = world.getBlockState(blockposition1);
BlockState iblockdata2 = this.enderman.getCarriedBlock();
@@ -561,7 +562,8 @@ public class EnderMan extends Monster implements NeutralMob {
int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 3.0D);
int k = Mth.floor(this.enderman.getZ() - 2.0D + randomsource.nextDouble() * 4.0D);
BlockPos blockposition = new BlockPos(i, j, k);
- BlockState iblockdata = world.getBlockState(blockposition);
+ BlockState iblockdata = world.getBlockStateIfLoaded(blockposition); // Paper
+ if (iblockdata == null) return; // Paper
Vec3 vec3d = new Vec3((double) this.enderman.getBlockX() + 0.5D, (double) j + 0.5D, (double) this.enderman.getBlockZ() + 0.5D);
Vec3 vec3d1 = new Vec3((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D);
BlockHitResult movingobjectpositionblock = world.clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.enderman));

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index cf1d636660e0e1e8bfec915e0c82525822beba49..a99e06b7507b3490ac8869dd626bdb1cee5b1690 100644 index 7a5977aa72a0a198144d7b490abe0685326de260..8cc33c1b14668c085dbad1f3feabf7b602812471 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1749,6 +1749,13 @@ public class ServerPlayer extends Player { @@ -1749,6 +1749,13 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -8,7 +8,7 @@ We just add a check to ensure that the CraftPlayer's handle
is a ServerPlayer is a ServerPlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index bfa59fc123af9189306d8482bac1ae478babab0a..64380c3db88cf5a17a18d166d3869b9a75b1579f 100644 index 9df9b465df75dd41eabd789e85ee841ed4be092c..9cae7d8a77af303cb509c23efd5541a5e04f54a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -247,8 +247,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -247,8 +247,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -11,7 +11,7 @@ floating in the air.
This can replace many uses of BlockPhysicsEvent This can replace many uses of BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b4f7e73fa673006ad0f8ea5a8de5a825aa75e41c..41b8b7890919e2a7a349d701123422e3d27ddc37 100644 index 14c963d507173dae6015a0c81e3a690768012bed..b10c93cbcf264a3e13d48f30a2c09ae5568a510e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -31,6 +31,7 @@ import net.minecraft.nbt.CompoundTag; @@ -31,6 +31,7 @@ import net.minecraft.nbt.CompoundTag;

Datei anzeigen

@ -53,7 +53,7 @@ index 5a1accff1a7dc2ab40224ec0952a287cd6099aee..2a88cf008c98284954108f2362f46ac1
event.getPlayer().getServer().getPluginManager().callEvent(event); event.getPlayer().getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ab6402fbe9da82c13d3eb56d22d82d10825105e6..fc0ab6d0436aa6f79b13e0b755d445403fb81330 100644 index 420201b60be7d07fbbb75192f14e4222f4b386aa..ce370cb1ed9ef67044c5ab448c52367779e5105f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -926,6 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -926,6 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

Datei anzeigen

@ -10,7 +10,7 @@ Adds CommandRegisteredEvent
- Allows manipulating the CommandNode to add more children/metadata for the client - Allows manipulating the CommandNode to add more children/metadata for the client
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index b2db0b51895200fc870e536ea97886db3d7a763c..6acb1f37f4c5cb1addd835626041cd3c28eb842f 100644 index 30edfbf16e7bed29b3261b51d9e4f3124beef026..eaaf9a9779f57ee048245899750bf7a1599b716f 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -14,6 +14,7 @@ val alsoShade: Configuration by configurations.creating @@ -14,6 +14,7 @@ val alsoShade: Configuration by configurations.creating
@ -59,7 +59,7 @@ index da6250df1c5f3385b683cffde47754bca4606f5e..3384501f83d445f45aa8233e98c7597d
public void removeCommand(String name) { public void removeCommand(String name) {
this.children.remove(name); this.children.remove(name);
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index ae7be8678ab2859b8eb5e04bc31d76271a74c66b..75b7b3cf90d1d67203ae19dc3302f06a57470f92 100644 index 5cca4fcdc97d803460e95c534022186a5aad526f..c772fa3b7a1276b0b41c45c6e0f5584b9c3a90cd 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -45,7 +45,7 @@ import net.minecraft.world.phys.Vec2; @@ -45,7 +45,7 @@ import net.minecraft.world.phys.Vec2;
@ -131,7 +131,7 @@ index 2a88cf008c98284954108f2362f46ac14c84200a..b27256d251e5db5781197319f79f89cc
if (commandnode2.canUse(source)) { if (commandnode2.canUse(source)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f4c58330cc1f65231fa48a7dd4a199fbfc696f26..b0eb46e60fa51386999cda8ecc31ccf2d3e05b99 100644 index 564cc26f8201bd864f5f58c740c9de942d384394..833fb2f340065a72903620f974e6ac71cc86f3f9 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
@@ -740,8 +740,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -740,8 +740,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Datei anzeigen

@ -22,7 +22,7 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4c4e1631832adb8d6cd8b90e68a4720b10591db8..199d75d5f4832c0cdc5a4e335f92c21f1ee55e18 100644 index 833fb2f340065a72903620f974e6ac71cc86f3f9..00fa6126ca51b6ffdb46b59f07725ffdcca9f20a 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
@@ -291,6 +291,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -291,6 +291,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 1be04d937efaae86e6d0f65b4ec8475294091054..6ee2cdd2bda2aba32661bc93cef00adcd6a83be3 100644 index d3f57dfd5156a5df17a5a7a6e5fe51d8804fd38f..18dc5ef7892c24f4071c8c0621ac412a5d8767bd 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1157,6 +1157,7 @@ public abstract class PlayerList { @@ -1157,6 +1157,7 @@ public abstract class PlayerList {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f86dd0b58a13c7908961533c75e20ea73c0cb658..b6bebb1eee1ee552b18860c8414f4866897c2bbd 100644 index c98e4469fa8940762c26a8d787bfabe4b2719fb5..109cefef2a39aaae50ca745d907729d066aa9033 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -751,9 +751,14 @@ public abstract class PlayerList { @@ -751,9 +751,14 @@ public abstract class PlayerList {

Datei anzeigen

@ -11,7 +11,7 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
public net.minecraft.world.entity.player.Inventory compartments public net.minecraft.world.entity.player.Inventory compartments
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a99e06b7507b3490ac8869dd626bdb1cee5b1690..602172f376edbecff94745f88d6a82aa8016c99d 100644 index 8cc33c1b14668c085dbad1f3feabf7b602812471..91053c2b19751aa3ff219b615b595b730ffa134f 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -857,6 +857,46 @@ public class ServerPlayer extends Player { @@ -857,6 +857,46 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -10,7 +10,7 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null. just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index be016a6fb0fcf1dfbce3fe6aca1085fbe883abdb..fdcc6666aa9100ddcf0d23a19bcd1dda29510d3e 100644 index b10c93cbcf264a3e13d48f30a2c09ae5568a510e..3fdec0ff323ac94517f1ab9a13764a8959148127 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -998,9 +998,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -998,9 +998,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add Heightmap API
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 fbbad4c209618d1e5994cb5609d29f4bc9c9905c..1b9f52393edcaeafccb290d6a6db9e2407d1a101 100644 index 620a10f404f44ebaf81fc3fcd8adc77540cd5ba1..cb8bb8b8730b43d02613c7e2ba240017e279a904 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -222,6 +222,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -222,6 +222,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index cf81671a32874d89588a829e6ad6696e41e1cfa4..77b9a4899f708f41a4e4049e3c946be100f13c6c 100644 index ca7e4d23f40db5d9404f7aab15e05b9af675e503..44aa178968c87fa72023a2c0f33c1a8123f3db72 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -310,7 +310,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -310,7 +310,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack

Datei anzeigen

@ -50,7 +50,7 @@ index 0000000000000000000000000000000000000000..3913c407a3bfa7dfa4a5e374a5e79296
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 29bbd44a0d15d78e13d91003fea1460efdf19e88..7f2e4fd1d81d6439475f30e62f0348f38bbc985d 100644 index 013298c424025cd88f15d61e50d196f70fa4c58b..d4e14ac1514e2d8b87b4667a91c90eded3ba6636 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -622,4 +622,16 @@ public class CraftBlock implements Block { @@ -622,4 +622,16 @@ public class CraftBlock implements Block {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
This lets you disable it for some worlds and lower it for others. This lets you disable it for some worlds and lower it for others.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index af90bb579429336cc4e99386fd620c898c23d274..96fd66ed2742a79064852af6e936830ddaf14f4c 100644 index cdff8dfc675328e559b7063c67dfe6300f458eb6..6024a9e0dca38b1c21332f5c131d824190a2be90 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -768,30 +768,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -768,30 +768,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -63,7 +63,7 @@ index af90bb579429336cc4e99386fd620c898c23d274..96fd66ed2742a79064852af6e936830d
// this.updateMobSpawningFlags(); // this.updateMobSpawningFlags();
worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals()); worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9634efd5e5ef45c905de4af05ee341b6c88a879b..5faaa29ea1e594c9e42e2a0c396ca0a40137119e 100644 index 43424a9d8e985f4965b4d101f7fee398e3d1f52c..978f0f20c3aceb1c6f967c2bec3d010e344aad0c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1897,12 +1897,84 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1897,12 +1897,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -191,7 +191,7 @@ index 4d2348df25410a0b5364eec066880326d6667dad..286aad3205ef8a9e21a47ef07893844f
this.maxCount = i * i; this.maxCount = i * i;
} }
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 5fc33643ad6c5ebd7ebb8ad57d5ef9df2fdba4bd..8bf52e9b92aecb7426e7ee6104166b7df84d5bcc 100644 index cb8bb8b8730b43d02613c7e2ba240017e279a904..af027128cc06f877f745296b2320e1bca29fd02b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1407,15 +1407,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1407,15 +1407,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 04ff773b84eb8870d77b09e25ab72e5a887774d4..4b57573660f5d806973edb5a66a0ac183c40c19e 100644 index 25d059f802a4bdcb7076bca8fa8a587e5de065bd..01fa200bc6911388ee3b0e700e82ad681e02fe4a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2853,5 +2853,10 @@ public final class CraftServer implements Server { @@ -2853,5 +2853,10 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -144,7 +144,7 @@ index 72dacdc271325c814fb43cd6daaf3a209801ffda..647ce340c81606ab86d33e1f9dec1fb0
this.padToFullSector(); this.padToFullSector();
} finally { } finally {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 42dc999d820e62c6a222afbd9239cc671fc7de53..b850dba2b0fa5bc762b170ed7083cf8904761f17 100644 index c46320794e9673d7ff24aae5e9086cc90988791c..deed4d50e0e4d810647a0745ef328c20dfe51093 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -289,6 +289,7 @@ public class RegionFileStorage implements AutoCloseable { @@ -289,6 +289,7 @@ public class RegionFileStorage implements AutoCloseable {
@ -156,7 +156,7 @@ index 42dc999d820e62c6a222afbd9239cc671fc7de53..b850dba2b0fa5bc762b170ed7083cf89
} catch (Throwable throwable) { } catch (Throwable throwable) {
if (dataoutputstream != null) { if (dataoutputstream != null) {
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 9814ce8c4f12c82f493ffdd6e44ed2fdfb4e893b..f88a88682862c714db04cfabd1eed501f60d7edc 100644 index af027128cc06f877f745296b2320e1bca29fd02b..bcd782f9b13c71f1a5bce4836463d0b57e5ada72 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -310,9 +310,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -310,9 +310,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen