Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
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: 312281ea PR-742: Make World implement Keyed CraftBukkit Changes: 2ac7fa7a SPIGOT-7014: getLootTable API should not persistently update loot table 7fdd7941 PR-1046: Make World implement Keyed 7bc728a6 PR-1045: Revert changes to persistence required checks Spigot Changes: b6d12d17 Rebuild patches
Dieser Commit ist enthalten in:
Ursprung
268476bba3
Commit
18f0f8d1ca
@ -1131,15 +1131,15 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
|
||||
return warning == null || warning.value();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 81adea0efd380b7452f5f573e7a6ea378b071eab..cf6fe1b5a1531e8d30c0386e36c023d003458b7e 100644
|
||||
index 9fa83c728cf686ef0b9913a86873a3d58492c16b..cc491837d149da716f197577f51a25ec31c03344 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -40,7 +40,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a world, which may contain entities, chunks and blocks
|
||||
*/
|
||||
-public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder {
|
||||
+public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
-public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed {
|
||||
+public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
/**
|
||||
* Gets the {@link Block} at the given coordinates
|
||||
|
@ -7,12 +7,12 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
||||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index bf23ef001fb5177b7aab0b3ed8752f58641bb840..8a2ca11be9ebde91268b20d25a35e1d6842f49de 100644
|
||||
index 8c77eef8e4e6d1ff4ad2fb0712ccfe89ab66acd6..9adbc26b78e64188fc5b3f00980d310f817b43bc 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -42,6 +42,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Wed, 6 Jan 2021 00:34:10 -0800
|
||||
Subject: [PATCH] Implement Keyed on World
|
||||
Subject: [PATCH] Add methods to get world by key
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 26c512e24c7c0370dfe8529c447ba0dc3736c1c6..9f77415577a6ea3f6fda6c3077cdbf123ce47674 100644
|
||||
index 8072924c977e0a23ee743ca8d613b9ea5de885fa..c7fe6865e1a14116b61ae69c26d4af2d8af11955 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -791,6 +791,18 @@ public final class Bukkit {
|
||||
@ -28,7 +28,7 @@ index 26c512e24c7c0370dfe8529c447ba0dc3736c1c6..9f77415577a6ea3f6fda6c3077cdbf12
|
||||
/**
|
||||
* Create a new virtual {@link WorldBorder}.
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index f8226ce49584a9086208037f2c8fe369ae7bfbf0..b0cfe2e72d404aca204a0a1a43e4ba4e0c44ac98 100644
|
||||
index 6deaae052cfee5b2233993f8fbc04f11f11214b7..fcab13ed2e0e1176c969c1a5e7a4e9907218baa6 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -673,6 +673,17 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@ -49,35 +49,6 @@ index f8226ce49584a9086208037f2c8fe369ae7bfbf0..b0cfe2e72d404aca204a0a1a43e4ba4e
|
||||
/**
|
||||
* Create a new virtual {@link WorldBorder}.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index eed79cbb4e8955755bc3969ff70a728f275b4af9..3c74768ebf6690056576e8fceb7f2e2ee2a70492 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -43,7 +43,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a world, which may contain entities, chunks and blocks
|
||||
*/
|
||||
-public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
+public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, net.kyori.adventure.audience.ForwardingAudience, Keyed { // Paper
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
@@ -1528,6 +1528,15 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
|
||||
@NotNull
|
||||
java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent);
|
||||
+
|
||||
+ /**
|
||||
+ * Get the world's key
|
||||
+ *
|
||||
+ * @return the world's key
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ NamespacedKey getKey();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java
|
||||
index cbe6b3a1ba7b04826d97c3558e8eb4e5ba11f92f..9fab6eed92c27ec9dd123171f5c4e1e7cda723e4 100644
|
||||
--- a/src/main/java/org/bukkit/WorldCreator.java
|
@ -5,10 +5,10 @@ Subject: [PATCH] More World API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 3c74768ebf6690056576e8fceb7f2e2ee2a70492..9161b01781aab56611937d021a0cca0736ce782c 100644
|
||||
index c31c58ea83845ef032bc477e33aa94713454f194..7a519e242a6fb2de41fd1e9cd6e7a237f78ef004 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3646,6 +3646,114 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -3637,6 +3637,114 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public Location locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored);
|
||||
|
||||
|
@ -6110,7 +6110,7 @@ index 288fdbef407d11ab430d5d7026dfad148c3c1065..6fefa619299d3202158490630d62c16a
|
||||
@Override
|
||||
public void tell(R runnable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2bebc5cc03ae34cf1d4003d24da42d0bc06f897b..e778f4da8b3e33b6fc9bbe21a7cbc1f185130e69 100644
|
||||
index 7e4e947f2be4d5ef0f6f1b3eb10a5b8d5018e918..e99f7f5eae48e635f167744394ce559ea06971ea 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -311,6 +311,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -6138,10 +6138,10 @@ index 197a27274c9277c41bb7fcda34afa7ef652e1a9b..c94c62e7e32f55d322ddfed930e1aaa6
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index aebf603ed909eb36d02f30391c56c85f8508361e..ee0bf9cd5da91bd5593e4e183084b5db77522cce 100644
|
||||
index 0b4dd7b91faf293d876ee703207a96f7b0987f84..625641be06b7afafec59ce19ecd39c54bf840351 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -238,6 +238,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -237,6 +237,7 @@ public abstract class Mob extends LivingEntity {
|
||||
return this.target;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ Co-authored-by: zml <zml@stellardrift.ca>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 23410c6ee34fcd9c50c2dbf35d8ff4d0c9ca408c..557ab97176944209c55f02dd106131ece2c01119 100644
|
||||
index 80a3d5890aab91e6a48d5734140187851106bde3..c1eb4201ecb0541c606ef0d05b828ae9c87c8a2c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -185,4 +185,13 @@ public class PaperConfig {
|
||||
@ -1777,10 +1777,10 @@ index d29c6d0536619fab5a48fbb52115dac09e7d7ca3..75871f74a25ee34db89a431de584b998
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 7b16529c9b11f6a0ba4f35746f9990e8b9a498b7..886a292dfd45a87be3a0069b7c2eb85437c6e6a4 100644
|
||||
index ee84148faf92daad40adbf90f89c5c19ea36ebcc..b889662e794cc4e00fae8a4ab5174af698fc0da2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -142,6 +142,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -143,6 +143,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
|
||||
private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>();
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
|
||||
@ -1788,7 +1788,7 @@ index 7b16529c9b11f6a0ba4f35746f9990e8b9a498b7..886a292dfd45a87be3a0069b7c2eb854
|
||||
|
||||
private static final Random rand = new Random();
|
||||
|
||||
@@ -1856,4 +1857,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1862,4 +1863,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -2701,10 +2701,10 @@ index 2577a135bb88adc9000ab67477846c6466d973e7..7ff1fcfdc87bcd299da46fe8a7e090c1
|
||||
private final Player.Spigot spigot = new Player.Spigot()
|
||||
{
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 4b0a056a134dd5868438bdd0d46f3dab8751436d..2a3853201a6ccf14b2aab67982de7789e0cbc552 100644
|
||||
index e9349ebcaa86144eefdb053b9eacf7ff37f2c0ec..147368eb3003b6a081389ab81bd5016db15ddba6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -817,9 +817,9 @@ public class CraftEventFactory {
|
||||
@@ -815,9 +815,9 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
@ -2716,7 +2716,7 @@ index 4b0a056a134dd5868438bdd0d46f3dab8751436d..2a3853201a6ccf14b2aab67982de7789
|
||||
event.setKeepInventory(keepInventory);
|
||||
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
|
||||
org.bukkit.World world = entity.getWorld();
|
||||
@@ -844,7 +844,7 @@ public class CraftEventFactory {
|
||||
@@ -842,7 +842,7 @@ public class CraftEventFactory {
|
||||
* Server methods
|
||||
*/
|
||||
public static ServerListPingEvent callServerListPingEvent(Server craftServer, InetAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||
|
@ -19,7 +19,7 @@ index f92f936c4b7e4fea63eef65c4ae8c10eeacb36b0..adb1f1bf96bd37b571fb53419db063d7
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 55ff800e5882841d5512901c883e308c9426e5de..89a0fe6695f70c726b5a39b8990ed7e7ce451a92 100644
|
||||
index 63cbe322c272761e769abaa1e707e50c0acbfd8d..d778209604c71a0728748dac91a5cb993f4357b7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1278,6 +1278,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -31,7 +31,7 @@ index 55ff800e5882841d5512901c883e308c9426e5de..89a0fe6695f70c726b5a39b8990ed7e7
|
||||
return this.isInWater() || this.isInRain() || this.isInBubbleColumn();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index ee0bf9cd5da91bd5593e4e183084b5db77522cce..c180f80a1504ee10e1115d504dac36f4e62f2fb0 100644
|
||||
index 625641be06b7afafec59ce19ecd39c54bf840351..28d0be9c3391a636fdc04c2e081ed462ed512c5d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -105,6 +105,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@ -42,7 +42,7 @@ index ee0bf9cd5da91bd5593e4e183084b5db77522cce..c180f80a1504ee10e1115d504dac36f4
|
||||
public GoalSelector targetSelector;
|
||||
@Nullable
|
||||
private LivingEntity target;
|
||||
@@ -802,7 +803,17 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -801,7 +802,17 @@ public abstract class Mob extends LivingEntity {
|
||||
@Override
|
||||
protected final void serverAiStep() {
|
||||
++this.noActionTime;
|
||||
|
@ -65,10 +65,10 @@ index adb1f1bf96bd37b571fb53419db063d79a041bbf..309fdf93b0a148d00cda58ffd31557f3
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index c180f80a1504ee10e1115d504dac36f4e62f2fb0..fca40a6ec865589392911beaf07092b7d1c61a47 100644
|
||||
index 28d0be9c3391a636fdc04c2e081ed462ed512c5d..57a856cc52db63861d38e1b94c899b47b7572139 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -778,14 +778,14 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -777,14 +777,14 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.distanceToSqr((Entity) this);
|
||||
@ -76,7 +76,7 @@ index c180f80a1504ee10e1115d504dac36f4e62f2fb0..fca40a6ec865589392911beaf07092b7
|
||||
+ int i = this.level.paperConfig.hardDespawnDistances.getInt(this.getType().getCategory()); // Paper - custom despawn distances
|
||||
int j = i * i;
|
||||
|
||||
if (d0 > (double) j) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||
if (d0 > (double) j && this.removeWhenFarAway(d0)) {
|
||||
this.discard();
|
||||
}
|
||||
|
||||
@ -84,4 +84,4 @@ index c180f80a1504ee10e1115d504dac36f4e62f2fb0..fca40a6ec865589392911beaf07092b7
|
||||
+ int k = this.level.paperConfig.softDespawnDistances.getInt(this.getType().getCategory()); // Paper - custom despawn distances
|
||||
int l = k * k;
|
||||
|
||||
if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||
if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l && this.removeWhenFarAway(d0)) {
|
||||
|
@ -21,10 +21,10 @@ index 5c3b11f738c1ea19981cc878aa6c2323497391a0..b91a61be7c4829fce0ff8da290eab580
|
||||
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
|
||||
double d4 = max * max;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index fca40a6ec865589392911beaf07092b7d1c61a47..eb4b21802eefe91753caf509458fd6d9dd901c25 100644
|
||||
index 57a856cc52db63861d38e1b94c899b47b7572139..3d54fa71b2d3532e93fe3636a86150e10fcba31a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -774,7 +774,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -773,7 +773,7 @@ public abstract class Mob extends LivingEntity {
|
||||
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
|
||||
this.discard();
|
||||
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
|
||||
|
@ -25,7 +25,7 @@ index 0750cf27c1b2cac723d68d0e6c2204cbb5795571..0eb0229125fd027025b6b44dfceddf62
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 89a0fe6695f70c726b5a39b8990ed7e7ce451a92..ac540cacc1858697b54950e86e84efbff54e07a1 100644
|
||||
index d778209604c71a0728748dac91a5cb993f4357b7..ae6c1abe1443f3758fce35a20387f0ed93748af5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -300,7 +300,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -72,7 +72,7 @@ index 89a0fe6695f70c726b5a39b8990ed7e7ce451a92..ac540cacc1858697b54950e86e84efbf
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -1952,6 +1981,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1946,6 +1975,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -18,10 +18,10 @@ index 1705a2bb3497546635a1b82dcd8d23cb87c21084..a2227d2b29f2f78d0b7fc8f0650f107b
|
||||
+ public final int getViewDistance() { return this.getLevel().getChunkSource().chunkMap.viewDistance - 1; } // Paper - placeholder
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 886a292dfd45a87be3a0069b7c2eb85437c6e6a4..99ffec8eaa97f3299d81d9fd5711f1b7db96e5c7 100644
|
||||
index b889662e794cc4e00fae8a4ab5174af698fc0da2..c36b862f4019d899c834177f42b1983818ab0138 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1826,6 +1826,37 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1832,6 +1832,37 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return world.spigotConfig.simulationDistance;
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -23,10 +23,10 @@ index 21b1430b9565e87ac052bc75ba013cf94176d6c9..d05dd815900dbdc78d1315eb13212d4e
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e9b8d4add28a8ba11eae057740c0cf057e414da2..d10ae40d5999e3ea24df55465248004a1b98a287 100644
|
||||
index 2f35ce076a468ac260e28ba90ac55f7717ee1b13..4329563bccfefe5d56c12d0fa341f1ffd4ce22a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2917,7 +2917,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2911,7 +2911,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
|
||||
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
|
||||
// CraftBukkit start
|
||||
|
@ -123,10 +123,10 @@ index 922b234865ff5d64049d634d0356f9a068bc8a8c..d923cc91a8f1e71831be8ded1b4818ac
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 8d4efe65baf28760ee68cecd7ef7c8e65a2912ba..b8666d46e85bc7e9e3a05b4ebd65f59138ac55d1 100644
|
||||
index 2d290d2e17517bc39828e05369ca5bc5ce892c27..fee21a585b95448a5edab70002e9c4ea36a5d989 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -289,6 +289,7 @@ public final class NaturalSpawner {
|
||||
@@ -288,6 +288,7 @@ public final class NaturalSpawner {
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
|
||||
@ -134,7 +134,7 @@ index 8d4efe65baf28760ee68cecd7ef7c8e65a2912ba..b8666d46e85bc7e9e3a05b4ebd65f591
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -401,6 +402,7 @@ public final class NaturalSpawner {
|
||||
@@ -400,6 +401,7 @@ public final class NaturalSpawner {
|
||||
entity = biomesettingsmobs_c.type.create(world.getLevel());
|
||||
} catch (Exception exception) {
|
||||
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
|
||||
|
@ -25,10 +25,10 @@ index b0bb68bdbd1a64a639c5fd2173c86f8e52291c20..7bd8c3a02a3024aea72b70366569dc39
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d10ae40d5999e3ea24df55465248004a1b98a287..68a1756e5a259fd1165d51835890127e0416dfd6 100644
|
||||
index 4329563bccfefe5d56c12d0fa341f1ffd4ce22a1..79dddb060d967303be70b690df83c3b2a2b1f67e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2557,6 +2557,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2551,6 +2551,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
@Nullable
|
||||
public Team getTeam() {
|
||||
|
@ -28,10 +28,10 @@ index 819f694e96dd21bbc47f345fcd9c5714ab44040f..32a961075b41cd84b24398b9d1a4d58f
|
||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
|
||||
entitywitch.setNoAi(this.isNoAi());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 2a3853201a6ccf14b2aab67982de7789e0cbc552..b94d6c79adc0858a588778b5ebf9f5e7f97f9050 100644
|
||||
index 147368eb3003b6a081389ab81bd5016db15ddba6..3f71cd6e8ba3e2c1ae978a4522665d7016dd570a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1152,6 +1152,14 @@ public class CraftEventFactory {
|
||||
@@ -1150,6 +1150,14 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@ index dba0bc7dc8fd1993f45716a398b1ccf52d3d868b..b3433ce9c722bdab81848a6c2d121ca5
|
||||
|
||||
--this.count;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index b94d6c79adc0858a588778b5ebf9f5e7f97f9050..20e5da655a76ce2024cbbfa00ce4dc924c6cedd0 100644
|
||||
index 3f71cd6e8ba3e2c1ae978a4522665d7016dd570a..ed3014b2c8d3c182c0011a5d970216b6f4c6afa5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1111,6 +1111,17 @@ public class CraftEventFactory {
|
||||
@@ -1109,6 +1109,17 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,10 @@ index 88181c59e604ba3b132b9e695cef5eaf5b836029..94d09b05737679b133ec462815b010b1
|
||||
|
||||
this.checkInsideBlocks();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 20e5da655a76ce2024cbbfa00ce4dc924c6cedd0..23a53f0c287fea7ddf45f807ae642ba4e5acb7b9 100644
|
||||
index ed3014b2c8d3c182c0011a5d970216b6f4c6afa5..fdf00487c7ff1fb1058a28e63e535165b26fc34a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1255,6 +1255,16 @@ public class CraftEventFactory {
|
||||
@@ -1253,6 +1253,16 @@ public class CraftEventFactory {
|
||||
return CraftItemStack.asNMSCopy(bitem);
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,10 @@ index 567cc347af00eed98fdf8832ef6c9468332b94e4..d22b7edc9ddea765c11e82346afd3942
|
||||
private boolean tickingBlockEntities;
|
||||
public final Thread thread;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 1b16d5d4823086d41f00bf0ccba4e21265f51886..fbb159f1300f4bcd0f85ec348f16de3e80af686f 100644
|
||||
index c36b862f4019d899c834177f42b1983818ab0138..f1df6ac7bc8ceeb87bdee577132c4d07c9786d20 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -144,6 +144,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -145,6 +145,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
|
||||
private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5a6aa26ee937a456ede56a9b18cf3bf58aba892d..081a95e3bb448a44565f6e75ebbc18bbc5fe1b18 100644
|
||||
index 20863d4294ab29c8ad851a50d03200e498843399..74a5b29ee48964aef9587939ecb3a66f52f658b5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2240,6 +2240,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2234,6 +2234,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||
|
@ -143,10 +143,10 @@ index 2ce597f594142d64a239649e1b812b3b7b0af340..7df80e251dbdaff32cdc0f3e7dffc9ea
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
index 884491126f9a0b1436953ea1721746e9690ca250..3d76b91f43fb2d261e270ba52fafe2648ba6abc9 100644
|
||||
index da3a30445f8a011ca6803f8d11641a68c1f6c46c..3f57ad6cbf29ebe1ac3781368c4f57efc9640aa4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
@@ -271,7 +271,7 @@ public abstract class Animal extends AgeableMob {
|
||||
@@ -265,7 +265,7 @@ public abstract class Animal extends AgeableMob {
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index eb4b21802eefe91753caf509458fd6d9dd901c25..c98b28c563faf68e9bc3176f51ed7f50aa9bd6a4 100644
|
||||
index 3d54fa71b2d3532e93fe3636a86150e10fcba31a..09b2ac6b071fd7c55db6c940beab650ddc9d7f7e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -622,6 +622,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -621,6 +621,11 @@ public abstract class Mob extends LivingEntity {
|
||||
ItemEntity entityitem = (ItemEntity) iterator.next();
|
||||
|
||||
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 005c44bbabf706d7f35476219153ed91e32665d2..ed2187ea8e0b30c7bcb473a50dd33781ef4ac8ae 100644
|
||||
index 336f6209089d3f076bfdd332bfc80d69509ca209..5d6ff0810b3939217e8bd54a88815809e8beff76 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -318,6 +318,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -27,7 +27,7 @@ index 005c44bbabf706d7f35476219153ed91e32665d2..ed2187ea8e0b30c7bcb473a50dd33781
|
||||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2014,6 +2019,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2008,6 +2013,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.originWorld = originWorld;
|
||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
}
|
||||
|
@ -5,15 +5,15 @@ Subject: [PATCH] Ocelot despawns should honor nametags and leash
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||
index 32c5dd9e53a0f421166dd3b84eb321b4e3e0c2fd..24d14c3a98453622e9805298c56625311f69e8dd 100644
|
||||
index e77ca38bc6accf5c7a569a7144d02cadbb02d78a..fc2c18a3bfd395882a5f4a08c23b382845d9ccd2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Ocelot.java
|
||||
@@ -133,7 +133,7 @@ public class Ocelot extends Animal {
|
||||
|
||||
@Override
|
||||
public boolean removeWhenFarAway(double distanceSquared) {
|
||||
- return !this.isTrusting() /*&& this.tickCount > 2400*/; // CraftBukkit
|
||||
+ return !this.isTrusting() && !this.hasCustomName() && !this.isLeashed() /*&& this.tickCount > 2400*/; // CraftBukkit // Paper - honor name and leash
|
||||
- return !this.isTrusting() && this.tickCount > 2400;
|
||||
+ return !this.isTrusting() && this.tickCount > 2400 && !this.hasCustomName() && !this.isLeashed(); // Paper - honor name and leash
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
|
@ -98,10 +98,10 @@ index 5bf68b03ddfc7c9554c467e2c0588084a796f6fa..18b1b7c05665ee1fb06670ceded719b1
|
||||
Entity entity = EntityType.loadEntityRecursive(nbttagcompound, world, (entity1) -> {
|
||||
entity1.moveTo(d0, d1, d2, entity1.getYRot(), entity1.getXRot());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index b8666d46e85bc7e9e3a05b4ebd65f59138ac55d1..12cd430e7041fab5c3d8a0aa1fe8b28866067088 100644
|
||||
index fee21a585b95448a5edab70002e9c4ea36a5d989..a62c5f48e54d10eb416111448cd250704ef594a0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -212,7 +212,13 @@ public final class NaturalSpawner {
|
||||
@@ -211,7 +211,13 @@ public final class NaturalSpawner {
|
||||
j1 = biomesettingsmobs_c.minCount + world.random.nextInt(1 + biomesettingsmobs_c.maxCount - biomesettingsmobs_c.minCount);
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ index b8666d46e85bc7e9e3a05b4ebd65f59138ac55d1..12cd430e7041fab5c3d8a0aa1fe8b288
|
||||
Mob entityinsentient = NaturalSpawner.getMobForSpawn(world, biomesettingsmobs_c.type);
|
||||
|
||||
if (entityinsentient == null) {
|
||||
@@ -259,9 +265,25 @@ public final class NaturalSpawner {
|
||||
@@ -258,9 +264,25 @@ public final class NaturalSpawner {
|
||||
return squaredDistance <= 576.0D ? false : (world.getSharedSpawnPos().closerToCenterThan(new Vec3((double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D), 24.0D) ? false : Objects.equals(new ChunkPos(pos), chunk.getPos()) || world.isNaturalSpawningAllowed((BlockPos) pos));
|
||||
}
|
||||
|
||||
|
@ -34,10 +34,10 @@ index eb6981ca27d27946c748047660ced880c4dea01a..3cb4a84a08cbf76e39da5f25fea490c2
|
||||
|
||||
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 2788f7ac36f739629ff3f9252eaf5639079d5f84..5dec3c30b13041c72e8d05ffb5eea8ca17aebc5b 100644
|
||||
index f1df6ac7bc8ceeb87bdee577132c4d07c9786d20..72c3ccc3d326aea029a3d4b5148496c0aa9ca8f9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1806,11 +1806,17 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1812,11 +1812,17 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
|
||||
|
@ -56,10 +56,10 @@ index 04ba5e773e2e1ecd54023370e986c4c85e54cde5..7436cf1b9cce14494bd514cb7f4ed035
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index c98b28c563faf68e9bc3176f51ed7f50aa9bd6a4..0dd63184ffc9a4f25261344600336679c902e2ec 100644
|
||||
index 09b2ac6b071fd7c55db6c940beab650ddc9d7f7e..c9d566750d3dc4660f17d3191637e256720bbe52 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1554,7 +1554,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1553,7 +1553,7 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (flag) {
|
||||
if (f1 > 0.0F && target instanceof LivingEntity) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
|
||||
Add Entity as a Source capability, and add more API choices, and on Location.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6be238a6df674cd46e417459e610afd3f4d672d2..ea8dac5b80a0e8f677d0f50f144ab927aab3ccf4 100644
|
||||
index 72c3ccc3d326aea029a3d4b5148496c0aa9ca8f9..567a1f957d668c509efae001242b1808a3a488b2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -700,6 +700,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -706,6 +706,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
|
||||
return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.BlockInteraction.BREAK : Explosion.BlockInteraction.NONE).wasCanceled;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index ea8dac5b80a0e8f677d0f50f144ab927aab3ccf4..323d78917e23124e150ff427d26624ecbb7f0e4f 100644
|
||||
index 567a1f957d668c509efae001242b1808a3a488b2..264bc6a4765109a16cea6413abe9bf9185b7c041 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1034,6 +1034,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1040,6 +1040,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@ -187,10 +187,10 @@ index 0006c86b4d464832558b52555b50e7833b88a486..cae4169b74b244af27763b3ac2740674
|
||||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 23a53f0c287fea7ddf45f807ae642ba4e5acb7b9..7964fd169c393c4d3e595d6722f8f29658a27490 100644
|
||||
index fdf00487c7ff1fb1058a28e63e535165b26fc34a..63d6e3103ad7decc64c50b0f14b0049c7734b8e7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1224,7 +1224,7 @@ public class CraftEventFactory {
|
||||
@@ -1222,7 +1222,7 @@ public class CraftEventFactory {
|
||||
|
||||
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
|
||||
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
|
||||
@ -199,7 +199,7 @@ index 23a53f0c287fea7ddf45f807ae642ba4e5acb7b9..7964fd169c393c4d3e595d6722f8f296
|
||||
}
|
||||
|
||||
CraftServer server = player.level.getCraftServer();
|
||||
@@ -1390,8 +1390,18 @@ public class CraftEventFactory {
|
||||
@@ -1388,8 +1388,18 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
||||
UUID, ticks lived, valid, dead
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ed2187ea8e0b30c7bcb473a50dd33781ef4ac8ae..c8296a685d67413501128fb5a2d86febc7a50206 100644
|
||||
index 5d6ff0810b3939217e8bd54a88815809e8beff76..0fe90a47a73266e929022d807d6586e2a76dfb0e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2824,7 +2824,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2818,7 +2818,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public String toString() {
|
||||
String s = this.level == null ? "~NULL~" : this.level.toString();
|
||||
|
||||
|
@ -99,10 +99,10 @@ index e80a9a5df0e4722a12c65c57592879621571a13f..67566e5f95f7452d31bea485bdb91a4e
|
||||
public boolean isClientSide() {
|
||||
return this.isClientSide;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 7964fd169c393c4d3e595d6722f8f29658a27490..658c656c32ebab5b84837473930d4f0680fc45ba 100644
|
||||
index 63d6e3103ad7decc64c50b0f14b0049c7734b8e7..8620c065e7709bf8a366760073d58f902215d1c0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1260,6 +1260,14 @@ public class CraftEventFactory {
|
||||
@@ -1258,6 +1258,14 @@ public class CraftEventFactory {
|
||||
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
||||
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
|
||||
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 323d78917e23124e150ff427d26624ecbb7f0e4f..11c9c33e560304c868991e9f6e4dc0040fbe06e9 100644
|
||||
index 264bc6a4765109a16cea6413abe9bf9185b7c041..3bba44d111c366e3740439d0937cad81d843eaf9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -381,7 +381,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -382,7 +382,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@Override
|
||||
public boolean loadChunk(int x, int z, boolean generate) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
|
||||
|
@ -161,7 +161,7 @@ index 0fda52841b5e1643efeda92106124998abc4e0aa..fe79c0add4f7cb18d487c5bb9415c40c
|
||||
|
||||
public static Timing getTickList(ServerLevel worldserver, String timingsType) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 23ddaffadfafc3b23a09fcba2bf708f570415006..0e4cb05e78ff78bce6ca42fd30b6f9ff42f87f7d 100644
|
||||
index 924b890d34c113ce804244dbb6635ff737f974b5..5def23f470c9737884bdf7551e426faf887bca9c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -3562,10 +3562,10 @@ index 4160a35ecfa1c28b88d6ebbfd14a0be1933e3b6d..3e08ff74979c78b27537403bbcaf1345
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 2bae0df4bcde7e278b44c0adf38c7ef80339e92a..0517edc8f42a3c6668f5fd24ac0755332a873571 100644
|
||||
index 3bba44d111c366e3740439d0937cad81d843eaf9..d0e6ea5ec01b89ebb4b1e6d803624e723ece1f9d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1869,6 +1869,34 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1875,6 +1875,34 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public DragonBattle getEnderDragonBattle() {
|
||||
return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight());
|
||||
}
|
||||
|
@ -218,10 +218,10 @@ index f62dd338c5f0618b6235d398bd56cb6737577a0b..bd4230a4e5fc9c1264b390b59ddefbd0
|
||||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 0dd63184ffc9a4f25261344600336679c902e2ec..bcf7c431f90a917d56933370e9f479f25f009dcb 100644
|
||||
index c9d566750d3dc4660f17d3191637e256720bbe52..affa1d906beb49cf599a467d582144d9407b2e0e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1002,7 +1002,13 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1001,7 +1001,13 @@ public abstract class Mob extends LivingEntity {
|
||||
}
|
||||
|
||||
this.spawnAtLocation(itemstack);
|
||||
@ -328,10 +328,10 @@ index 59691ec967f69d0c4dff8894ab8adc9ab23d0652..abc036af7963f63e4614c4fc8315efdf
|
||||
|
||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index a1529301e4abcafa79d04b9819cf40a05febcac4..5ccf7f5d0c748de6ff1f996089f4db99d39d6dfb 100644
|
||||
index 6f9498a7064c41e61f7e50cbe6b4a8d6384f902c..f50e8182f0340119cd06f0b7c96f95727903826e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -817,9 +817,16 @@ public class CraftEventFactory {
|
||||
@@ -815,9 +815,16 @@ public class CraftEventFactory {
|
||||
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
|
||||
@ -348,7 +348,7 @@ index a1529301e4abcafa79d04b9819cf40a05febcac4..5ccf7f5d0c748de6ff1f996089f4db99
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
|
||||
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
||||
@@ -836,8 +843,15 @@ public class CraftEventFactory {
|
||||
@@ -834,8 +841,15 @@ public class CraftEventFactory {
|
||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage, stringDeathMessage); // Paper - Adventure
|
||||
event.setKeepInventory(keepInventory);
|
||||
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
|
||||
@ -364,7 +364,7 @@ index a1529301e4abcafa79d04b9819cf40a05febcac4..5ccf7f5d0c748de6ff1f996089f4db99
|
||||
|
||||
victim.keepLevel = event.getKeepLevel();
|
||||
victim.newLevel = event.getNewLevel();
|
||||
@@ -854,6 +868,31 @@ public class CraftEventFactory {
|
||||
@@ -852,6 +866,31 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks
|
||||
also prevents if out of world border bounds
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 12cd430e7041fab5c3d8a0aa1fe8b28866067088..41f13b52fdaba3c07aeafa17628861dcd7786556 100644
|
||||
index a62c5f48e54d10eb416111448cd250704ef594a0..1603657d75334c0425e737cd661a4ed724333206 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -169,9 +169,9 @@ public final class NaturalSpawner {
|
||||
@@ -168,9 +168,9 @@ public final class NaturalSpawner {
|
||||
StructureFeatureManager structuremanager = world.structureFeatureManager();
|
||||
ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator();
|
||||
int i = pos.getY();
|
||||
@ -21,7 +21,7 @@ index 12cd430e7041fab5c3d8a0aa1fe8b28866067088..41f13b52fdaba3c07aeafa17628861dc
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
int j = 0;
|
||||
int k = 0;
|
||||
@@ -200,7 +200,7 @@ public final class NaturalSpawner {
|
||||
@@ -199,7 +199,7 @@ public final class NaturalSpawner {
|
||||
if (entityhuman != null) {
|
||||
double d2 = entityhuman.distanceToSqr(d0, (double) i, d1);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 68d6f6b9edab370aaaf6a0113aaf7563770db229..b2388c3c2afa324ea21c5fb3265613f48f6ccfd1 100644
|
||||
index d0e6ea5ec01b89ebb4b1e6d803624e723ece1f9d..d9763271118ac44a6465464fb097503b86ce925e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -676,6 +676,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -682,6 +682,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,10 +23,10 @@ index 68d6f6b9edab370aaaf6a0113aaf7563770db229..b2388c3c2afa324ea21c5fb3265613f4
|
||||
public long getGameTime() {
|
||||
return world.levelData.getGameTime();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index b0d348061487110993b6c4c8a7dc7208f27361b3..d7bc601f2cb4e22565eeebb2d8ebe051748de92a 100644
|
||||
index 28d6e31bfdf31d3e56024c731b833c4424313307..881bb11507eafe87522ad4131ea7859f42918b3e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -80,4 +80,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
@@ -76,4 +76,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
public long getSeed() {
|
||||
return this.getHandle().lootTableSeed;
|
||||
}
|
||||
|
@ -41,10 +41,10 @@ index b36388f8a6081e3f2b7f6ac93b71ff40518b7b22..8bd1e1e521a56065b928b5b76b5fcfe1
|
||||
|
||||
if (entity1 != entity && this.connection != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 30fb09933978264df4f476e7668998a5dd95eada..9dcab83c9695c7f606b9bf3ba62d5f8fd807e239 100644
|
||||
index 513331442058ee61a08f4ad69b8912fa3e0d6868..44c53588c54fd275d3f0c7bb5febb67838c939ce 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2236,11 +2236,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2230,11 +2230,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void removeVehicle() {
|
||||
@ -62,7 +62,7 @@ index 30fb09933978264df4f476e7668998a5dd95eada..9dcab83c9695c7f606b9bf3ba62d5f8f
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2303,7 +2308,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2297,7 +2302,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ index 30fb09933978264df4f476e7668998a5dd95eada..9dcab83c9695c7f606b9bf3ba62d5f8f
|
||||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2313,7 +2321,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2307,7 +2315,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) this.getBukkitEntity(),
|
||||
@ -83,7 +83,7 @@ index 30fb09933978264df4f476e7668998a5dd95eada..9dcab83c9695c7f606b9bf3ba62d5f8f
|
||||
);
|
||||
// Suppress during worldgen
|
||||
if (this.valid) {
|
||||
@@ -2327,7 +2335,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2321,7 +2329,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
|
@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners,
|
||||
or DEFAULT since data was not stored.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 98094546bb2867b20f89a1bc0efe911cdb6c9b79..46e16685dfe3b7721692f96d7d7e0af0a1fb9c22 100644
|
||||
index b57b6f411442827ec1222fbf5bf87947e325d470..19dc74ab02744c70a3b2c75c0a62edb1cfca1be3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1191,6 +1191,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -35,7 +35,7 @@ index b494d7fc864a2fa734c73c2c4d433e288bccfb26..840bfcea9347b50b422eb7a325a1be43
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 9dcab83c9695c7f606b9bf3ba62d5f8fd807e239..bf34137b09ed8ba9d7dc3f5e10c0ed73efebf3d7 100644
|
||||
index 44c53588c54fd275d3f0c7bb5febb67838c939ce..30b79e3dfbc50fee70d52367092c102dbad2d304 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -70,6 +70,8 @@ import net.minecraft.world.InteractionHand;
|
||||
@ -65,7 +65,7 @@ index 9dcab83c9695c7f606b9bf3ba62d5f8fd807e239..bf34137b09ed8ba9d7dc3f5e10c0ed73
|
||||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -2023,6 +2029,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2017,6 +2023,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
@ -5,10 +5,10 @@ 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
|
||||
index b2388c3c2afa324ea21c5fb3265613f48f6ccfd1..80fe72b22afcb72fda1398197f1eec8e1c18a161 100644
|
||||
index d9763271118ac44a6465464fb097503b86ce925e..0d3cea84314d4aeddc36266789283695d70f2eb7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -215,6 +215,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -216,6 +216,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING);
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query
|
||||
the chunk status and get a response now, vs having to wait
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 80fe72b22afcb72fda1398197f1eec8e1c18a161..62a3de8f5a7a8a6da0431918f016ebc1a1735f70 100644
|
||||
index 0d3cea84314d4aeddc36266789283695d70f2eb7..536f6ff1d457b84a6f2a593c01f2760c55d59e33 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -286,13 +286,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -287,13 +287,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public boolean isChunkLoaded(int x, int z) {
|
||||
|
@ -217,10 +217,10 @@ index 1fdb4242784e55d5bb6102deb150a57a156aacd3..419e1c4db73631de3d65d8a0e7d5eb08
|
||||
this.maxCount = i * i;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 1e8ec9587560cd22991aeb586224d70c7229bc4f..a87b6fbd3e3da1983003447c9a3f9d3450806ea7 100644
|
||||
index 536f6ff1d457b84a6f2a593c01f2760c55d59e33..a3fab58688c50c5ed325075c0deebd93f33d71d5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1343,15 +1343,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1349,15 +1349,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public void setKeepSpawnInMemory(boolean keepLoaded) {
|
||||
|
@ -188,7 +188,7 @@ index a1bfcdd713c47d8613eb4af7625a64d51161690b..4bc33c31d497aa7d69226ab870fd7890
|
||||
} catch (Throwable throwable) {
|
||||
if (dataoutputstream != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 5aa50b1165d17626bdf2b0ccc654952767f9c539..98ce85ee3d717e921dcbf7e4c4b3a4c5db61b77b 100644
|
||||
index a3fab58688c50c5ed325075c0deebd93f33d71d5..4eb2ef0e5e8f7f1962ef9e3020daa77b7be25309 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -20,6 +20,7 @@ import java.util.Objects;
|
||||
@ -199,7 +199,7 @@ index 5aa50b1165d17626bdf2b0ccc654952767f9c539..98ce85ee3d717e921dcbf7e4c4b3a4c5
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraft.core.BlockPos;
|
||||
@@ -291,8 +292,22 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -292,8 +293,22 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public boolean isChunkGenerated(int x, int z) {
|
||||
@ -223,7 +223,7 @@ index 5aa50b1165d17626bdf2b0ccc654952767f9c539..98ce85ee3d717e921dcbf7e4c4b3a4c5
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
@@ -404,20 +419,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -405,20 +420,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@Override
|
||||
public boolean loadChunk(int x, int z, boolean generate) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
|
||||
|
@ -37,10 +37,10 @@ index bf85efd8ebfafe567c06b54425b9968daab6b2b1..a460aa0c7573e4e8251d902c4394b058
|
||||
}
|
||||
+
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 41f13b52fdaba3c07aeafa17628861dcd7786556..474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b 100644
|
||||
index 1603657d75334c0425e737cd661a4ed724333206..6282d5899fe0b78ecbb6236db178c8231f7cd521 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -87,6 +87,13 @@ public final class NaturalSpawner {
|
||||
@@ -86,6 +86,13 @@ public final class NaturalSpawner {
|
||||
MobCategory enumcreaturetype = entity.getType().getCategory();
|
||||
|
||||
if (enumcreaturetype != MobCategory.MISC) {
|
||||
|
@ -108,7 +108,7 @@ index 9b883af58fd87751bdad909a015cb78ca5647e90..12162ff2dc7c82f50f1d892bc807985e
|
||||
} else {
|
||||
passenger.stopRiding();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index bf34137b09ed8ba9d7dc3f5e10c0ed73efebf3d7..44fb916fafdc4eb9c4c7971b9c53f7f3bc00b431 100644
|
||||
index 30b79e3dfbc50fee70d52367092c102dbad2d304..339031b16c856d29509916e6178151cc0f790dde 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -322,6 +322,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -144,10 +144,10 @@ index bf34137b09ed8ba9d7dc3f5e10c0ed73efebf3d7..44fb916fafdc4eb9c4c7971b9c53f7f3
|
||||
movement = this.maybeBackOffFromEdge(movement, movementType);
|
||||
Vec3 vec3d1 = this.collide(movement);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index bcf7c431f90a917d56933370e9f479f25f009dcb..7b671d833cf717c16761b878d45cf04b79c7dbd1 100644
|
||||
index affa1d906beb49cf599a467d582144d9407b2e0e..78e28d40292ec99ac0a22bd7f834c30c68c00098 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -206,6 +206,19 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -205,6 +205,19 @@ public abstract class Mob extends LivingEntity {
|
||||
return this.lookControl;
|
||||
}
|
||||
|
||||
|
@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
|
||||
heightmap resolves the issue without having to load all spawn chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 44fb916fafdc4eb9c4c7971b9c53f7f3bc00b431..361d8fc7cfbeb8b80b6e99ab61930596710c3bf5 100644
|
||||
index 339031b16c856d29509916e6178151cc0f790dde..55bfca9606770ac8eb0c15ed83c5d3c605c22871 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3031,6 +3031,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3025,6 +3025,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (flag1) {
|
||||
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
||||
} else {
|
||||
|
@ -418,7 +418,7 @@ index fb486997cf61bc155f8171c55369c6cba35591c0..84c3407961f0011f6579498084b11d92
|
||||
|
||||
// Yes, this doesn't match Vanilla, but it's the best we can do for now.
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4ad29dadf 100644
|
||||
index 6282d5899fe0b78ecbb6236db178c8231f7cd521..ce6051531f021bf20851bc5ab763e732ee10427d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -67,7 +67,13 @@ public final class NaturalSpawner {
|
||||
@ -435,7 +435,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
PotentialCalculator spawnercreatureprobabilities = new PotentialCalculator();
|
||||
Object2IntOpenHashMap<MobCategory> object2intopenhashmap = new Object2IntOpenHashMap();
|
||||
Iterator iterator = entities.iterator();
|
||||
@@ -103,11 +109,16 @@ public final class NaturalSpawner {
|
||||
@@ -102,11 +108,16 @@ public final class NaturalSpawner {
|
||||
spawnercreatureprobabilities.addCharge(entity.blockPosition(), biomesettingsmobs_b.getCharge());
|
||||
}
|
||||
|
||||
@ -453,7 +453,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -142,13 +153,37 @@ public final class NaturalSpawner {
|
||||
@@ -141,13 +152,37 @@ public final class NaturalSpawner {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -493,7 +493,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,12 +191,18 @@ public final class NaturalSpawner {
|
||||
@@ -155,12 +190,18 @@ public final class NaturalSpawner {
|
||||
world.getProfiler().pop();
|
||||
}
|
||||
|
||||
@ -513,7 +513,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
}
|
||||
|
||||
@VisibleForDebug
|
||||
@@ -172,15 +213,21 @@ public final class NaturalSpawner {
|
||||
@@ -171,15 +212,21 @@ public final class NaturalSpawner {
|
||||
});
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
int k = 0;
|
||||
|
||||
while (k < 3) {
|
||||
@@ -222,14 +269,14 @@ public final class NaturalSpawner {
|
||||
@@ -221,14 +268,14 @@ public final class NaturalSpawner {
|
||||
// Paper start
|
||||
Boolean doSpawning = isValidSpawnPostitionForType(world, group, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2);
|
||||
if (doSpawning == null) {
|
||||
@ -553,7 +553,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
}
|
||||
|
||||
entityinsentient.moveTo(d0, (double) i, d1, world.random.nextFloat() * 360.0F, 0.0F);
|
||||
@@ -241,10 +288,15 @@ public final class NaturalSpawner {
|
||||
@@ -240,10 +287,15 @@ public final class NaturalSpawner {
|
||||
++j;
|
||||
++k1;
|
||||
runner.run(entityinsentient, chunk);
|
||||
@ -571,7 +571,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
}
|
||||
|
||||
if (entityinsentient.isMaxGroupSizeReached(k1)) {
|
||||
@@ -266,6 +318,7 @@ public final class NaturalSpawner {
|
||||
@@ -265,6 +317,7 @@ public final class NaturalSpawner {
|
||||
}
|
||||
|
||||
}
|
||||
@ -579,7 +579,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
}
|
||||
|
||||
private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel world, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double squaredDistance) {
|
||||
@@ -551,7 +604,7 @@ public final class NaturalSpawner {
|
||||
@@ -550,7 +603,7 @@ public final class NaturalSpawner {
|
||||
MobCategory enumcreaturetype = entitytypes.getCategory();
|
||||
|
||||
this.mobCategoryCounts.addTo(enumcreaturetype, 1);
|
||||
@ -588,7 +588,7 @@ index 474dc6302d2b0f8c629b2e1f6de9d4ba6faf398b..1622450b53e0f0f48c3ca107e4d705b4
|
||||
}
|
||||
|
||||
public int getSpawnableChunkCount() {
|
||||
@@ -567,6 +620,7 @@ public final class NaturalSpawner {
|
||||
@@ -566,6 +619,7 @@ public final class NaturalSpawner {
|
||||
int i = limit * this.spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER;
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -21,7 +21,7 @@ index 2c8feeb15c71277e2daebdba5597b7302f9d7eda..90aad7af5c08968f921c8eba8bba7d67
|
||||
private void lightQueueSize() {
|
||||
lightQueueSize = getInt("light-queue-size", lightQueueSize);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 361d8fc7cfbeb8b80b6e99ab61930596710c3bf5..814ff530067d5abe37782d06d9a05f85733f13d0 100644
|
||||
index 55bfca9606770ac8eb0c15ed83c5d3c605c22871..32e93c0c9c56a00585ede420f488cfe4a1b37ffa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -324,6 +324,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -42,7 +42,7 @@ index 361d8fc7cfbeb8b80b6e99ab61930596710c3bf5..814ff530067d5abe37782d06d9a05f85
|
||||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2040,6 +2044,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2034,6 +2038,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
@ -7,10 +7,10 @@ The code following this has better support for null worlds to move
|
||||
them back to the world spawn.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3df2ea950b5c5cc18e17d08af14b3caf4cac767e..d9606a7f59e79910949350ea15ab321db7dac0e7 100644
|
||||
index 384f4eabb2ebacd459e0f21e268e3dd0cd4b4d20..d387e8cc95f9f54dfbf018d4e52cde5087bfc209 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2017,9 +2017,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2011,9 +2011,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
bworld = server.getWorld(worldName);
|
||||
}
|
||||
|
||||
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
||||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d9606a7f59e79910949350ea15ab321db7dac0e7..34aed5ecacf325b581252998d26324fa87dc4578 100644
|
||||
index d387e8cc95f9f54dfbf018d4e52cde5087bfc209..f69bc9d81750feb108119347f984de6bca24ae44 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2147,11 +2147,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2141,11 +2141,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||
@ -34,7 +34,7 @@ index d9606a7f59e79910949350ea15ab321db7dac0e7..34aed5ecacf325b581252998d26324fa
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@@ -2916,6 +2917,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2910,6 +2911,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@Nullable
|
||||
public Entity teleportTo(ServerLevel worldserver, BlockPos location) {
|
||||
// CraftBukkit end
|
||||
@ -47,7 +47,7 @@ index d9606a7f59e79910949350ea15ab321db7dac0e7..34aed5ecacf325b581252998d26324fa
|
||||
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
||||
this.level.getProfiler().push("changeDimension");
|
||||
// CraftBukkit start
|
||||
@@ -2942,6 +2949,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2936,6 +2943,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit end
|
||||
|
||||
this.level.getProfiler().popPush("reloading");
|
||||
@ -59,7 +59,7 @@ index d9606a7f59e79910949350ea15ab321db7dac0e7..34aed5ecacf325b581252998d26324fa
|
||||
Entity entity = this.getType().create(worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
@@ -2955,10 +2967,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2949,10 +2961,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
this.getBukkitEntity().setHandle(entity);
|
||||
entity.bukkitEntity = this.getBukkitEntity();
|
||||
@ -70,7 +70,7 @@ index d9606a7f59e79910949350ea15ab321db7dac0e7..34aed5ecacf325b581252998d26324fa
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -3080,7 +3088,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3074,7 +3082,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
@ -135,10 +135,10 @@ index a3a900d10440ed5ebe24370a77ccb6cad911cfc9..0d468631b9c260091e732925da43c177
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 550e30bfbdcf1ae0adf2cc68e3ae3d3dd4faad56..d998c0dd9e03b9c0f0a6075e5a52ba50b44ed0c4 100644
|
||||
index 27733f7737945b400d31b432178d792d0b79977d..1e16264b533c2205098c0569fadb8e369a032764 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -820,6 +820,11 @@ public class CraftEventFactory {
|
||||
@@ -818,6 +818,11 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
@ -150,7 +150,7 @@ index 550e30bfbdcf1ae0adf2cc68e3ae3d3dd4faad56..d998c0dd9e03b9c0f0a6075e5a52ba50
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
|
||||
populateFields(victim, event); // Paper - make cancellable
|
||||
@@ -833,11 +838,13 @@ public class CraftEventFactory {
|
||||
@@ -831,11 +836,13 @@ public class CraftEventFactory {
|
||||
playDeathSound(victim, event);
|
||||
// Paper end
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f81bf7d1b0c2f355b71ce2e5f68ec9fb7aad824a..57ec20f963c440051b318bf29b59db965d9d744e 100644
|
||||
index 14b3f14d2489bdbeb89886a115db2ba78cb97ad7..5d51296954dc9e1c3c9576d7afb5287c76ab3afe 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -599,8 +599,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -19,7 +19,7 @@ index f81bf7d1b0c2f355b71ce2e5f68ec9fb7aad824a..57ec20f963c440051b318bf29b59db96
|
||||
}
|
||||
|
||||
protected AABB makeBoundingBox() {
|
||||
@@ -3789,6 +3789,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3783,6 +3783,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public final void setPosRaw(double x, double y, double z) {
|
||||
@ -31,7 +31,7 @@ index f81bf7d1b0c2f355b71ce2e5f68ec9fb7aad824a..57ec20f963c440051b318bf29b59db96
|
||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
this.position = new Vec3(x, y, z);
|
||||
int i = Mth.floor(x);
|
||||
@@ -3811,6 +3816,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3805,6 +3810,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,10 +44,10 @@ index d4d8eee914f71d9a33feda82ef54cb0c40b0e60c..28a04d21801a9bb1e4311e6da28eae26
|
||||
this.printSaveWarning = false;
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb7238a672b7 100644
|
||||
index 4eb2ef0e5e8f7f1962ef9e3020daa77b7be25309..d49a8e22dcee95a6e8a6a7fe45e46feae414515d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -275,8 +275,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -276,8 +276,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public Chunk getChunkAt(int x, int z) {
|
||||
@ -70,7 +70,7 @@ index 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
|
||||
|
||||
@Override
|
||||
public Chunk getChunkAt(Block block) {
|
||||
@@ -343,7 +356,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -344,7 +357,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean unloadChunkRequest(int x, int z) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
|
||||
if (this.isChunkLoaded(x, z)) {
|
||||
@ -79,7 +79,7 @@ index 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -421,9 +434,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -422,9 +435,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
|
||||
// Paper start - Optimize this method
|
||||
ChunkPos chunkPos = new ChunkPos(x, z);
|
||||
@ -93,7 +93,7 @@ index 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
|
||||
if (immediate == null) {
|
||||
immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z);
|
||||
}
|
||||
@@ -431,7 +447,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -432,7 +448,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) {
|
||||
return false; // not full status
|
||||
}
|
||||
@ -102,7 +102,7 @@ index 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
|
||||
world.getChunk(x, z); // make sure we're at ticket level 32 or lower
|
||||
return true;
|
||||
}
|
||||
@@ -457,7 +473,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -458,7 +474,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
// we do this so we do not re-read the chunk data on disk
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ index 249befd851798012e390017b90cd234a17d71718..62078ee1996c671639d00ddce4dabb72
|
||||
world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
|
||||
return true;
|
||||
// Paper end
|
||||
@@ -1972,6 +1988,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1978,6 +1994,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
return this.world.getChunkSource().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> {
|
||||
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);
|
||||
|
@ -94,10 +94,10 @@ index cdebd0cdf6eb901464cf4c16089b10ea0147b54d..221b6ffb426edc034183dbaf37de29c6
|
||||
|
||||
private void setupRecipeList(Container input, ItemStack stack) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index aca2b2596a43927222f9894cc2f907cae2a331c1..d031eb1976cc50c0733cfef98404bc5b3fd152cb 100644
|
||||
index 113e4db1d66b7af5b2ba976d094b4bf548b5800e..9a2f0c109181fc45c7388a2a622c4e6cf63cc771 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1593,19 +1593,44 @@ public class CraftEventFactory {
|
||||
@@ -1591,19 +1591,44 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
|
@ -1135,7 +1135,7 @@ index aa9d32a4c86aade43f91c78ae1179119d12e9a88..d5e5e0a80c1a3dd5823e9975062856b6
|
||||
if (updatingChunk != null) {
|
||||
return updatingChunk.getEntityTickingChunkFuture();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3883c5d97f80a44cb371b69c3b07caa362416666..731cd8167eed50ac066734e97d3670df363a67d7 100644
|
||||
index ba0f9d729a4d4bd35050ab41d6d70ee3ea46beeb..3c3960abd63297bf6c247bc48de3b77a90cee06d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -231,7 +231,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -1177,10 +1177,10 @@ index dc95aaa62220f2042e287c7d0d69753b8e891fba..06577d9cd276e65f2fdf5082b9ee4dc2
|
||||
org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(this.bukkitChunk, this.isUnsaved());
|
||||
server.getPluginManager().callEvent(unloadEvent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 62078ee1996c671639d00ddce4dabb7238a672b7..1223cf6a8d540ad06e4a2b7cba120c8036903930 100644
|
||||
index d49a8e22dcee95a6e8a6a7fe45e46feae414515d..1d2cfef57fd4eb53c707a76f612cee73ddfb3812 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1986,6 +1986,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1992,6 +1992,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return future;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add missing strikeLighting call to
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 1223cf6a8d540ad06e4a2b7cba120c8036903930..7188930d5b36e8a51b8036262745e48baeb24761 100644
|
||||
index 1d2cfef57fd4eb53c707a76f612cee73ddfb3812..37e646bc226d4da54c3b17be101bf50e6b7f362f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2081,6 +2081,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2087,6 +2087,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
lightning.moveTo( loc.getX(), loc.getY(), loc.getZ() );
|
||||
lightning.visualOnly = true;
|
||||
lightning.isSilent = isSilent;
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c77f464b772e72c23fe00e99bc0fee24d46fb16b..b42637a2e9594cc2a30f910ef08399c11607e094 100644
|
||||
index 38af4d10e2e09c0917ae8ff265e5a6c610fa4404..2cb1bad01d48efe0e7474ca8308d0d7e84d691d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1755,6 +1755,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -17,10 +17,10 @@ index c77f464b772e72c23fe00e99bc0fee24d46fb16b..b42637a2e9594cc2a30f910ef08399c1
|
||||
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
|
||||
this.removeTicketsForSpawn(this.paperConfig.keepLoadedRange, prevSpawn);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 4d0eb42a3f9ba213f70d856640beaa9aa42149db..de65baee5ae66c4ba5625701b1646e4129b5e054 100644
|
||||
index 37e646bc226d4da54c3b17be101bf50e6b7f362f..797dfc6b10aab7a84a19cd49854b23bd04341d6b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -256,11 +256,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -257,11 +257,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public boolean setSpawnLocation(int x, int y, int z, float angle) {
|
||||
try {
|
||||
Location previousLocation = this.getSpawnLocation();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add moon phase API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index de65baee5ae66c4ba5625701b1646e4129b5e054..d27a921672a12ad5506c5af080e52cfb2500f7e7 100644
|
||||
index 797dfc6b10aab7a84a19cd49854b23bd04341d6b..2a388f8bbbdfb4dc469bcfce6a6241066a7fe597 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -194,6 +194,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -195,6 +195,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public int getPlayerCount() {
|
||||
return world.players().size();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1412f0dc93a417b41e8f8c615c44a8eeb70dc133..d470f7cbd953af86c57ee83d5f9b149abd270b05 100644
|
||||
index a992153f951d888874971c9bca84963643925c56..e14ee2d556ca7cc28f8ca80b3e097a8146cd00f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3993,4 +3993,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3987,4 +3987,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
void accept(Entity entity, double x, double y, double z);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d470f7cbd953af86c57ee83d5f9b149abd270b05..1de52b5e6a7fde4acaf6942edad163ed94d9e0a7 100644
|
||||
index e14ee2d556ca7cc28f8ca80b3e097a8146cd00f4..f8876446fe73681d0a4ed72759ae4080f85c572a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -56,6 +56,7 @@ import net.minecraft.resources.ResourceKey;
|
||||
@ -16,7 +16,7 @@ index d470f7cbd953af86c57ee83d5f9b149abd270b05..1de52b5e6a7fde4acaf6942edad163ed
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.TicketType;
|
||||
@@ -3998,5 +3999,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3992,5 +3993,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public static int nextEntityId() {
|
||||
return ENTITY_COUNTER.incrementAndGet();
|
||||
}
|
||||
|
@ -18,10 +18,10 @@ index 0b4d5ab836e861ea87bb72185a513bdf341d5921..30f0b20924d6b778e49761a72b50263c
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index d27a921672a12ad5506c5af080e52cfb2500f7e7..d26fd3ff134fcda2cae0e564443039d47cd50856 100644
|
||||
index 2a388f8bbbdfb4dc469bcfce6a6241066a7fe597..9c3e6e42c7906bd9270ec01c4ce8a693d799c0ff 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -247,7 +247,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -248,7 +248,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@Override
|
||||
public Location getSpawnLocation() {
|
||||
BlockPos spawn = this.world.getSharedSpawnPos();
|
||||
|
@ -9,7 +9,7 @@ loss, which forces the server to lose the same precision as the client
|
||||
keeping them in sync.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 7413cbbcf0ab572483adc0ab915978593b8ea658..a0a3cec47c8f9e379a5bc1d43eeda5eb9d81f814 100644
|
||||
index ccc60a5465efa2b71fc2593d75af62c0b64fe66c..1adbceadd5df96e17796561a40eb7b760493440e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -101,6 +101,11 @@ public class PaperConfig {
|
||||
@ -43,10 +43,10 @@ index b30c08bfb8c55161543a4ef09f2e462e0a1fe4ae..ec93f5300cc7d423ec0d292f0f8443f9
|
||||
|
||||
public Vec3 updateEntityPosition(Vec3 orig) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b3719b657ea75c4b80cf21e115b3ba48f775a3c4..dbfe16f904382f3fa3790fc8da0f5c7b5b83a501 100644
|
||||
index 78dbc89bb247b2765bd2d7d81013d18dfe35539f..e53d8fe713a4c9920f40bf91d6453d36520b45f7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3808,6 +3808,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3802,6 +3802,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) {
|
||||
// Paper end
|
||||
|
@ -64,10 +64,10 @@ index 74e10d581f8c1b0b026d8f940194971efbdef434..798afc145c54306fcf0838d8daef2bdf
|
||||
|
||||
public int get() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f1b7215c4bcd68c5497c12736dc43c20d91f7e34..bc15e58ae371b4597914cfc9960ba780358435ec 100644
|
||||
index 9c3e6e42c7906bd9270ec01c4ce8a693d799c0ff..e9b23b3a0b512e8febbd0618c5ae86078deab38c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1791,8 +1791,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1797,8 +1797,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
if (!this.isGameRule(rule)) return false;
|
||||
|
||||
@ -82,7 +82,7 @@ index f1b7215c4bcd68c5497c12736dc43c20d91f7e34..bc15e58ae371b4597914cfc9960ba780
|
||||
handle.onChanged(this.getHandle().getServer());
|
||||
return true;
|
||||
}
|
||||
@@ -1827,8 +1832,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1833,8 +1838,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
if (!this.isGameRule(rule.getName())) return false;
|
||||
|
||||
|
@ -20,7 +20,7 @@ index 7ffbdfb1d192e70ab2259391210d73b8821e4989..07d357b5fcb30ed9ff074a196a19de14
|
||||
ItemStack itemstack = tileentitydispenser.getItem(i);
|
||||
DispenseItemBehavior idispensebehavior = this.getDispenseMethod(itemstack);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/DropperBlock.java b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
|
||||
index 4ae21aa6fc91f527d3dca508588d8257961b8d24..b3203049eade7d11602fa2a12a8104a732d67552 100644
|
||||
index 47258da56363037fba17d92e1518955a5fd4ef3b..234dc491ca30853eefdf86229296cc89fc8d46c2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/DropperBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/DropperBlock.java
|
||||
@@ -44,6 +44,7 @@ public class DropperBlock extends DispenserBlock {
|
||||
@ -32,10 +32,10 @@ index 4ae21aa6fc91f527d3dca508588d8257961b8d24..b3203049eade7d11602fa2a12a8104a7
|
||||
} else {
|
||||
ItemStack itemstack = tileentitydispenser.getItem(i);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 797e27f12a7d446442b35e0814254c4cc74b5907..74aa6f2a1a55b9049f912f3e87b9032565bbc4d3 100644
|
||||
index c5fd069085efa57f99698930640198c6fcaa4bfb..ed5c598a803748bc001f8ee5ca40b8aa6fe72a3a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1867,4 +1867,12 @@ public class CraftEventFactory {
|
||||
@@ -1865,4 +1865,12 @@ public class CraftEventFactory {
|
||||
EntitiesUnloadEvent event = new EntitiesUnloadEvent(new CraftChunk((ServerLevel) world, coords.x, coords.z), bukkitEntities);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
}
|
||||
|
@ -17,10 +17,10 @@ index 07d357b5fcb30ed9ff074a196a19de1481fe3738..83ac86b3c1e7b9233f2db8e5488f97c5
|
||||
tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 6d5d42a40a42b0d1e8e80d802cd629dd2854ae9b..97fd237a4fc31875fa66683c9ea8fed1fa794abf 100644
|
||||
index dbc777a7d872116da0f60953fc6a650df17d9f5c..30bf86f0f22b783273286b4372541f8a2def0eb2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1885,5 +1885,11 @@ public class CraftEventFactory {
|
||||
@@ -1883,5 +1883,11 @@ public class CraftEventFactory {
|
||||
io.papermc.paper.event.block.BlockFailedDispenseEvent event = new io.papermc.paper.event.block.BlockFailedDispenseEvent(block);
|
||||
return event.callEvent();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add dropLeash variable to EntityUnleashEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 7b671d833cf717c16761b878d45cf04b79c7dbd1..ca9d4c5741c76457fbb7d238a9df1ad5268bbb6b 100644
|
||||
index 78e28d40292ec99ac0a22bd7f834c30c68c00098..2f347a0687e592bf00ef7e5a031a5dde5177ba3b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1234,12 +1234,15 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1233,12 +1233,15 @@ public abstract class Mob extends LivingEntity {
|
||||
return InteractionResult.PASS;
|
||||
} else if (this.getLeashHolder() == player) {
|
||||
// CraftBukkit start - fire PlayerUnleashEntityEvent
|
||||
@ -26,7 +26,7 @@ index 7b671d833cf717c16761b878d45cf04b79c7dbd1..ca9d4c5741c76457fbb7d238a9df1ad5
|
||||
return InteractionResult.sidedSuccess(this.level.isClientSide);
|
||||
} else {
|
||||
InteractionResult enuminteractionresult = this.checkAndHandleImportantInteractions(player, hand);
|
||||
@@ -1397,8 +1400,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1396,8 +1399,11 @@ public abstract class Mob extends LivingEntity {
|
||||
|
||||
if (this.leashHolder != null) {
|
||||
if (!this.isAlive() || !this.leashHolder.isAlive()) {
|
||||
@ -40,7 +40,7 @@ index 7b671d833cf717c16761b878d45cf04b79c7dbd1..ca9d4c5741c76457fbb7d238a9df1ad5
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1461,8 +1467,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1460,8 +1466,11 @@ public abstract class Mob extends LivingEntity {
|
||||
boolean flag1 = super.startRiding(entity, force);
|
||||
|
||||
if (flag1 && this.isLeashed()) {
|
||||
@ -54,7 +54,7 @@ index 7b671d833cf717c16761b878d45cf04b79c7dbd1..ca9d4c5741c76457fbb7d238a9df1ad5
|
||||
}
|
||||
|
||||
return flag1;
|
||||
@@ -1634,8 +1643,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1633,8 +1642,11 @@ public abstract class Mob extends LivingEntity {
|
||||
@Override
|
||||
protected void removeAfterChangingDimensions() {
|
||||
super.removeAfterChangingDimensions();
|
||||
@ -122,10 +122,10 @@ index ae277032a8748b13cca6ab7892691732e78b6752..6daee9cc30fef287df81d949b6fa0b91
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 97fd237a4fc31875fa66683c9ea8fed1fa794abf..66415d1e9690f1d644b73115b9873c52ef45e212 100644
|
||||
index 30bf86f0f22b783273286b4372541f8a2def0eb2..dbe2d218aa2561b404519245d3ef09b9a1e234e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1526,8 +1526,10 @@ public class CraftEventFactory {
|
||||
@@ -1524,8 +1524,10 @@ public class CraftEventFactory {
|
||||
return itemInHand;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Wed, 6 Jan 2021 00:34:04 -0800
|
||||
Subject: [PATCH] Implement Keyed on World
|
||||
Subject: [PATCH] Add methods to get world by key
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@ -33,19 +33,3 @@ index f904ce285548a81835b1d3af9c05f00f84d5d3da..3e26f9a4c93f616f4f02edbbd851cf0b
|
||||
public void addWorld(World world) {
|
||||
// Check if a World already exists with the UID.
|
||||
if (this.getWorld(world.getUID()) != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index bc15e58ae371b4597914cfc9960ba780358435ec..344972b485cfd1430a7b8ee6e29c2f116bd5c42b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2014,6 +2014,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return java.util.concurrent.CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk());
|
||||
}, net.minecraft.server.MinecraftServer.getServer());
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public org.bukkit.NamespacedKey getKey() {
|
||||
+ return org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(world.dimension().location());
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
@Override
|
@ -5,10 +5,10 @@ Subject: [PATCH] More World API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 344972b485cfd1430a7b8ee6e29c2f116bd5c42b..42200d93d52e67f64ccfaac3716cb25481bfc672 100644
|
||||
index e9b23b3a0b512e8febbd0618c5ae86078deab38c..938e99d28b28ccd4273c9fddb1fd0d9b4210f28c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1960,6 +1960,65 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1966,6 +1966,65 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return (nearest == null) ? null : new Location(this, nearest.getX(), nearest.getY(), nearest.getZ());
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Mob#lookAt API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index d7bc601f2cb4e22565eeebb2d8ebe051748de92a..0613ab9979a32a005fa2cbf24125022713daca3a 100644
|
||||
index 881bb11507eafe87522ad4131ea7859f42918b3e..d9008049188c1933f2b6b39b9219983ff947b4bf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -86,5 +86,53 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
@@ -82,5 +82,53 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
public boolean isInDaylight() {
|
||||
return getHandle().isSunBurnTick();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 773c7b0fe682fa17363f0a7841a77010b0b38b71..c37934d1319dcd5e9cbba8d4f08550656354cf30 100644
|
||||
index a1df04f14fb149315e73307a81514b805ef3cb0d..958949d972fd7b8ae61041bfe15c21d4d19d9573 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -474,8 +474,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -95,10 +95,10 @@ index 1bd338c7860adf3b846cd6caa33312b3269ac3ef..95635cc7367b757d149bb2c81326a041
|
||||
if (weather.isCancelled()) {
|
||||
return;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 232a5582032108402d4371d95f68f98b2685c8fd..da4aa69b1a0bde186e3d61cdfcd73ca2195c46e0 100644
|
||||
index 938e99d28b28ccd4273c9fddb1fd0d9b4210f28c..5e09816bf1aa9444df4d5480e37516623f8ce26c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1182,7 +1182,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1188,7 +1188,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public void setStorm(boolean hasStorm) {
|
||||
@ -107,7 +107,7 @@ index 232a5582032108402d4371d95f68f98b2685c8fd..da4aa69b1a0bde186e3d61cdfcd73ca2
|
||||
this.setWeatherDuration(0); // Reset weather duration (legacy behaviour)
|
||||
this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
|
||||
}
|
||||
@@ -1204,7 +1204,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1210,7 +1210,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public void setThundering(boolean thundering) {
|
||||
|
@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was
|
||||
designed to happen in the first place.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 162542958a331fd0ff0623266c9c62211152b1a6..337427b4615c918f86a16a899df1d8a7c65351af 100644
|
||||
index c14cbbf7d88d99bf5f24aad5c45fcb1504187a16..468fffe6dbecbf276fbcac92a3345625b5218f34 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -397,6 +397,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -51,7 +51,7 @@ index 162542958a331fd0ff0623266c9c62211152b1a6..337427b4615c918f86a16a899df1d8a7
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -2541,6 +2571,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2535,6 +2565,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
this.processPortalCooldown();
|
||||
|
@ -19,10 +19,10 @@ index fd2d5e274a3bf889b954bed17d286d1157cd208e..709ca3f249a5c4d3a405e94ca353864d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index da4aa69b1a0bde186e3d61cdfcd73ca2195c46e0..aeced758b9c9cae7ae53f44c731293bca54310ba 100644
|
||||
index 5e09816bf1aa9444df4d5480e37516623f8ce26c..8d91f0b8aee459c331ab3777e5e27c9584ff90bd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -199,6 +199,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -200,6 +200,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public io.papermc.paper.world.MoonPhase getMoonPhase() {
|
||||
return io.papermc.paper.world.MoonPhase.getPhase(getFullTime() / 24000L);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] add per world spawn limits
|
||||
Taken from #2982. Credit to Chasewhip8
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index bfd1b59b1bf071c3beedcd6d8db364ed41946033..691e5db143801920a34bc623912c24c9024b97b0 100644
|
||||
index ccbd0bd60cbc1212d9683667ce4744350eda90bb..1f74b1b2fc9ecfbb83710665ef0171886eab0097 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -58,6 +58,11 @@ public class PaperWorldConfig {
|
||||
@ -44,10 +44,10 @@ index bfd1b59b1bf071c3beedcd6d8db364ed41946033..691e5db143801920a34bc623912c24c9
|
||||
private void lightQueueSize() {
|
||||
lightQueueSize = getInt("light-queue-size", lightQueueSize);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 3dac97ce8f744dc289f4a0555db1a95204287a4a..e84f352280fbdbda194f5b151f942d6d6718dc40 100644
|
||||
index 8d91f0b8aee459c331ab3777e5e27c9584ff90bd..abd119d2b018c5df0db6a85dbf4a36de897956e2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -221,6 +221,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -222,6 +222,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
this.biomeProvider = biomeProvider;
|
||||
|
||||
this.environment = env;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 337427b4615c918f86a16a899df1d8a7c65351af..289ff2e1bd18ac48c51523eb492cad3920ff856e 100644
|
||||
index 468fffe6dbecbf276fbcac92a3345625b5218f34..d838e884564e2763a6918a1a778a91c84f498649 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3514,26 +3514,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3508,26 +3508,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
private Stream<Entity> getIndirectPassengersStream() {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make EntityUnleashEvent cancellable
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index ca9d4c5741c76457fbb7d238a9df1ad5268bbb6b..829f5a82467e7106efddf9e367cd402bc0b36c5f 100644
|
||||
index 2f347a0687e592bf00ef7e5a031a5dde5177ba3b..cd6c48bac5c782166de274da6a50629efbc82c4c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1469,7 +1469,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -1468,7 +1468,7 @@ public abstract class Mob extends LivingEntity {
|
||||
if (flag1 && this.isLeashed()) {
|
||||
// Paper start - drop leash variable
|
||||
EntityUnleashEvent event = new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN, true);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 289ff2e1bd18ac48c51523eb492cad3920ff856e..434142b0a1079d924ab0f0d1193482afbb9fda67 100644
|
||||
index d838e884564e2763a6918a1a778a91c84f498649..c2f12edf1045667641579788d8a38706dc1285ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3019,6 +3019,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3013,6 +3013,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
worldserver = shapedetectorshape.world;
|
||||
@ -32,7 +32,7 @@ index 289ff2e1bd18ac48c51523eb492cad3920ff856e..434142b0a1079d924ab0f0d1193482af
|
||||
if (worldserver == this.level) {
|
||||
// SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
|
||||
this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot);
|
||||
@@ -3038,8 +3055,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3032,8 +3049,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
if (entity != null) {
|
||||
entity.restoreFrom(this);
|
||||
|
@ -29,10 +29,10 @@ index 384222f321f1678803d62187b76bf3dee1970c0c..b10c0099ba0691cb167e78b8decafe39
|
||||
blockposition1 = blockposition1.above(2);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index e84f352280fbdbda194f5b151f942d6d6718dc40..eb4c79a902166dd8e89f4de71dcb75c493852af5 100644
|
||||
index abd119d2b018c5df0db6a85dbf4a36de897956e2..125e3b746663f3cfc4212a8b09e490c614320acc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -701,6 +701,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -702,6 +702,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return (LightningStrike) lightning.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Left handed API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index 0613ab9979a32a005fa2cbf24125022713daca3a..cf0be5ef01bddaabbfd11f54b2dacd68c68ad16a 100644
|
||||
index d9008049188c1933f2b6b39b9219983ff947b4bf..d775e19402188e35f79affb4ed636b6533f90ab5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -134,5 +134,15 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
@@ -130,5 +130,15 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
public int getMaxHeadPitch() {
|
||||
return getHandle().getMaxHeadXRot();
|
||||
}
|
||||
|
@ -72,10 +72,10 @@ index b436103957113bff5e553dacb869c775a3f8b059..3d3dcb47720055f550d17d1f106a2c0e
|
||||
int k = entity.getRemainingFireTicks();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 5c2beec59b0382d80bf97317cbbeab43df24ad55..a3c8a0291fa9ae6f3c96d937dd4621edd7c48535 100644
|
||||
index b7e0d588d0fa1253e5f3dbd580de190c53a455ea..ceacb62aef0dd0f73f1542a1898ceb62c3f4c367 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -980,7 +980,7 @@ public class CraftEventFactory {
|
||||
@@ -978,7 +978,7 @@ public class CraftEventFactory {
|
||||
} else {
|
||||
damageCause = DamageCause.ENTITY_EXPLOSION;
|
||||
}
|
||||
@ -84,7 +84,7 @@ index 5c2beec59b0382d80bf97317cbbeab43df24ad55..a3c8a0291fa9ae6f3c96d937dd4621ed
|
||||
}
|
||||
event.setCancelled(cancelled);
|
||||
|
||||
@@ -1007,7 +1007,7 @@ public class CraftEventFactory {
|
||||
@@ -1005,7 +1005,7 @@ public class CraftEventFactory {
|
||||
cause = DamageCause.THORNS;
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ index 5c2beec59b0382d80bf97317cbbeab43df24ad55..a3c8a0291fa9ae6f3c96d937dd4621ed
|
||||
} else if (source == DamageSource.OUT_OF_WORLD) {
|
||||
EntityDamageEvent event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.VOID, modifiers, modifierFunctions);
|
||||
event.setCancelled(cancelled);
|
||||
@@ -1077,7 +1077,7 @@ public class CraftEventFactory {
|
||||
@@ -1075,7 +1075,7 @@ public class CraftEventFactory {
|
||||
} else {
|
||||
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, damager.getHandle(), source.msgId));
|
||||
}
|
||||
@ -102,7 +102,7 @@ index 5c2beec59b0382d80bf97317cbbeab43df24ad55..a3c8a0291fa9ae6f3c96d937dd4621ed
|
||||
event.setCancelled(cancelled);
|
||||
CraftEventFactory.callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@@ -1122,20 +1122,28 @@ public class CraftEventFactory {
|
||||
@@ -1120,20 +1120,28 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
if (cause != null) {
|
||||
|
@ -272,10 +272,10 @@ index 5a30840a2c35d8b721e27e91b4e6816e9b7c1e5a..ddabe0c59a04e6017368c5ba57767b89
|
||||
List<org.bukkit.World> worlds;
|
||||
if (args.length < 2 || args[1].equals("*")) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 1622450b53e0f0f48c3ca107e4d705b4ad29dadf..f6a225eed29eed364b7e2ea6bc85d55d8a325a11 100644
|
||||
index ce6051531f021bf20851bc5ab763e732ee10427d..87d1f5b2717fc82203b5674ac0bf2704117f8f63 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -191,6 +191,16 @@ public final class NaturalSpawner {
|
||||
@@ -190,6 +190,16 @@ public final class NaturalSpawner {
|
||||
world.getProfiler().pop();
|
||||
}
|
||||
|
||||
@ -309,10 +309,10 @@ index 4fb0ad44672e0fed8c5d523d03801df725cc136f..7b1bccfbf44c5b431f52f4ed974f9143
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index eb4c79a902166dd8e89f4de71dcb75c493852af5..6c791db6d010877dcc77acac449720727dda1b57 100644
|
||||
index 125e3b746663f3cfc4212a8b09e490c614320acc..3c75f2a676c21941d21c3683e8ba4f51d880798b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1711,9 +1711,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1717,9 +1717,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
Validate.notNull(spawnCategory, "SpawnCategory cannot be null");
|
||||
Validate.isTrue(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory." + spawnCategory + " are not supported.");
|
||||
|
||||
|
@ -953,7 +953,7 @@ index 8fdda1e5805534d08c0a06b15e89d85b3d9c21e9..a24f605bd033f249a374e83ba0948801
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dbfd97c2ba09ffd6b83c5b2f787e7463ab61e4a6..08e76481ed60c5df64e76edb5b954f008177ca34 100644
|
||||
index 9c33b2259bf741c5f891691836ad19f9200c4308..9a91de63420e5b910e37773362376d500c78ce97 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -428,6 +428,56 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -1013,7 +1013,7 @@ index dbfd97c2ba09ffd6b83c5b2f787e7463ab61e4a6..08e76481ed60c5df64e76edb5b954f00
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
this.passengers = ImmutableList.of();
|
||||
@@ -2278,11 +2328,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2272,11 +2322,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
|
@ -186,10 +186,10 @@ index ef28e0f57ba593265a3eca4d3f21d0b1b51e8740..f4c1316ae1cadc1a7a7fed16e0e99704
|
||||
while (objectbidirectionaliterator.hasNext()) {
|
||||
Entry<ChunkHolder> entry = (Entry) objectbidirectionaliterator.next();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6c791db6d010877dcc77acac449720727dda1b57..6baac7411f975b53cd49c15ac8d73c8df54b12bb 100644
|
||||
index 3c75f2a676c21941d21c3683e8ba4f51d880798b..760149102313626831e3692936c6a984f04d252a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -160,7 +160,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -161,7 +161,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@Override
|
||||
public int getTileEntityCount() {
|
||||
// We don't use the full world tile entity list, so we must iterate chunks
|
||||
@ -198,7 +198,7 @@ index 6c791db6d010877dcc77acac449720727dda1b57..6baac7411f975b53cd49c15ac8d73c8d
|
||||
int size = 0;
|
||||
for (ChunkHolder playerchunk : chunks.values()) {
|
||||
net.minecraft.world.level.chunk.LevelChunk chunk = playerchunk.getTickingChunk();
|
||||
@@ -181,7 +181,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -182,7 +182,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public int getChunkCount() {
|
||||
int ret = 0;
|
||||
|
||||
@ -207,7 +207,7 @@ index 6c791db6d010877dcc77acac449720727dda1b57..6baac7411f975b53cd49c15ac8d73c8d
|
||||
if (chunkHolder.getTickingChunk() != null) {
|
||||
++ret;
|
||||
}
|
||||
@@ -354,7 +354,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -355,7 +355,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public Chunk[] getLoadedChunks() {
|
||||
@ -227,7 +227,7 @@ index 6c791db6d010877dcc77acac449720727dda1b57..6baac7411f975b53cd49c15ac8d73c8d
|
||||
return chunks.values().stream().map(ChunkHolder::getFullChunkNow).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.LevelChunk::getBukkitChunk).toArray(Chunk[]::new);
|
||||
}
|
||||
|
||||
@@ -430,7 +441,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -431,7 +442,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public boolean refreshChunk(int x, int z) {
|
||||
|
@ -123,7 +123,7 @@ index 8fc78a0405359e6031e66e988f3ddbf913ca59bd..32446e874fdad36f9f80d22481a4d990
|
||||
|
||||
private void tickPassenger(Entity vehicle, Entity passenger) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 08e76481ed60c5df64e76edb5b954f008177ca34..2fe2cdb86136fdc7c6b44bf521268f1dcd7491b8 100644
|
||||
index 9a91de63420e5b910e37773362376d500c78ce97..d3b78f536806246d0474a00bd482b69651455ccf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -908,7 +908,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -183,7 +183,7 @@ index 08e76481ed60c5df64e76edb5b954f008177ca34..2fe2cdb86136fdc7c6b44bf521268f1d
|
||||
}
|
||||
|
||||
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
||||
@@ -3866,7 +3908,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3860,7 +3902,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void setDeltaMovement(Vec3 velocity) {
|
||||
@ -193,7 +193,7 @@ index 08e76481ed60c5df64e76edb5b954f008177ca34..2fe2cdb86136fdc7c6b44bf521268f1d
|
||||
}
|
||||
|
||||
public void setDeltaMovement(double x, double y, double z) {
|
||||
@@ -3942,7 +3986,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3936,7 +3980,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// Paper end - fix MC-4
|
||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
|
@ -208,10 +208,10 @@ index 8f135c8a4c4fe7cc1b1b8ae8db6f740227b5df50..6053b7797cc4f6ed1ffbfc35048bab1a
|
||||
|
||||
this.handlingTick = true;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 829f5a82467e7106efddf9e367cd402bc0b36c5f..b1ae9b0d8b229e2a6797a173cb11ecc0f43e2592 100644
|
||||
index cd6c48bac5c782166de274da6a50629efbc82c4c..e3227a806d9e19923783122ea94ae19e7dbe71da 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -792,7 +792,12 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -791,7 +791,12 @@ public abstract class Mob extends LivingEntity {
|
||||
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
|
||||
this.discard();
|
||||
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
|
||||
@ -300,10 +300,10 @@ index 67cb2f94f1f2f2b8ae82d65e19b7f173157076b9..03824f73ecbac8ef6da586feb82f8515
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index f6a225eed29eed364b7e2ea6bc85d55d8a325a11..13eded53a64d0f36f8c9bce2077de4f1c1ed2d56 100644
|
||||
index 87d1f5b2717fc82203b5674ac0bf2704117f8f63..d87900e2a9559a34ee66e3cffab851a578c0278e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -259,7 +259,7 @@ public final class NaturalSpawner {
|
||||
@@ -258,7 +258,7 @@ public final class NaturalSpawner {
|
||||
blockposition_mutableblockposition.set(l, i, i1);
|
||||
double d0 = (double) l + 0.5D;
|
||||
double d1 = (double) i1 + 0.5D;
|
||||
@ -312,7 +312,7 @@ index f6a225eed29eed364b7e2ea6bc85d55d8a325a11..13eded53a64d0f36f8c9bce2077de4f1
|
||||
|
||||
if (entityhuman != null) {
|
||||
double d2 = entityhuman.distanceToSqr(d0, (double) i, d1);
|
||||
@@ -332,7 +332,7 @@ public final class NaturalSpawner {
|
||||
@@ -331,7 +331,7 @@ public final class NaturalSpawner {
|
||||
}
|
||||
|
||||
private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel world, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double squaredDistance) {
|
||||
|
@ -1,32 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 13 Aug 2021 16:38:08 -0700
|
||||
Subject: [PATCH] Mark fish and axolotls from buckets as persistent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java b/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java
|
||||
index 58428eebf24e328b3faf32ca473be8f19d4f6cca..3484defdfd5a487b11917310d7b1d1543291eee1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/AbstractFish.java
|
||||
@@ -81,7 +81,7 @@ public abstract class AbstractFish extends WaterAnimal implements Bucketable {
|
||||
@Override
|
||||
public void setFromBucket(boolean fromBucket) {
|
||||
this.entityData.set(AbstractFish.FROM_BUCKET, fromBucket);
|
||||
- this.setPersistenceRequired(this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence
|
||||
+ this.setPersistenceRequired(fromBucket || this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence // Paper - actually set as persistent
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
index b1f46170fb039a6218292eb5dabe1dc5cc6ccb18..d54fc22639bb67a977c27585aac46e9d3dcafa6d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
@@ -245,7 +245,7 @@ public class Axolotl extends Animal implements LerpingModel, Bucketable {
|
||||
@Override
|
||||
public void setFromBucket(boolean fromBucket) {
|
||||
this.entityData.set(Axolotl.FROM_BUCKET, fromBucket);
|
||||
- this.setPersistenceRequired(this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence
|
||||
+ this.setPersistenceRequired(fromBucket || this.isPersistenceRequired()); // CraftBukkit - SPIGOT-4106 update persistence // Paper - actually set as persistent
|
||||
}
|
||||
|
||||
@Nullable
|
@ -10,7 +10,7 @@ chunk bans via the large amount of NBT created by unstacking the items.
|
||||
Fixes GH-5140 and GH-4748.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 430cb89460c7f13a95a1019b640047e88cd79cfe..67016f8b02be8fc874f6c62e1786c0abe3aee741 100644
|
||||
index 4b84f633e647db439ad9390b963de6af543c8d83..bd3a33e191ff2583ef7a658a0e198e11362b7e38 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -949,6 +949,11 @@ public class PaperWorldConfig {
|
@ -8,7 +8,7 @@ This is because bukkit uses a separate head rotation field for yaw.
|
||||
This issue only applies to players.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2fe2cdb86136fdc7c6b44bf521268f1dcd7491b8..a23ce25a36a5eafa8b68c0bc408fe32717ae304a 100644
|
||||
index d3b78f536806246d0474a00bd482b69651455ccf..ac6e01dbf4fe30b9e8301d995392a9c6581eae7b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1665,6 +1665,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add config option for logging player ip addresses
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 2e02446ea3d0b3aa4673e9686ed62c14527fabcc..e1a6a3ca616fc2119604e6edc3570c3a90466966 100644
|
||||
index 5203a43d707010f6ba43be2d6627d48560b77731..fa912cffb2349914d1a550d3d1c69ba5934658dc 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -91,6 +91,11 @@ public class PaperConfig {
|
@ -19,7 +19,7 @@ index ee72086b2dee2bd6415803e77825b2b1cb83cd3d..309dbf5fce3ce940d5e1b57d267b9d6b
|
||||
}
|
||||
final Object val = config.get(key);
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 67016f8b02be8fc874f6c62e1786c0abe3aee741..d37b43cefeeffdd3bedddb9668fe7e7a4a0de4ab 100644
|
||||
index bd3a33e191ff2583ef7a658a0e198e11362b7e38..01f25f5b87b986075f3100ff930cf492bc28ccd9 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -994,6 +994,55 @@ public class PaperWorldConfig {
|
@ -5,7 +5,7 @@ Subject: [PATCH] don't attempt to teleport dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a23ce25a36a5eafa8b68c0bc408fe32717ae304a..a2988d51d14945397b005c06bbc0b8ba5f9b2308 100644
|
||||
index ac6e01dbf4fe30b9e8301d995392a9c6581eae7b..53588a621fb922112da7c585a09ba331fa03e858 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -716,7 +716,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren