Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6457)

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:
c9a46ebf #653: Add World#spawn with randomizeData parameter
e49c2e3a Damageable should extend ItemMeta
01ff04f4 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
ca5b4b1a SPIGOT-6697: Deprecate generateTree with BlockChangeDelegate as it does not handle tiles

CraftBukkit Changes:
7c8bbcbe SPIGOT-6716: Preserve the order of stored enchantments of enchanted books.
18027d02 #914: Add World#spawn with randomizeData parameter
3cad0316 SPIGOT-6714: Don't fire PlayerBucketEvent when empty
8c6d60cf Fix server crash with BlockPopulator when entities are at a negative chunk border
4f6bcc84 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
78d5b35b SPIGOT-6697: Restore generateTree with BlockChangeDelegate behaviour
15792f0d Rebuild patch
c949675e SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn
a955f15c Fix issues with new ChunkGenerator API
a0a37f41 SPIGOT-6630: Replacing an enchantment on an item creates a conflict error

Spigot Changes:
b166a49b Rebuild patches
3c1fc60a SPIGOT-6693: Composters only take in one item at custom hopper speeds
This commit is contained in:
Nassim Jahnke 2021-08-25 09:59:26 +02:00 committed by GitHub
parent 61a09c5102
commit 789bc79280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
203 changed files with 766 additions and 822 deletions

View File

@ -7,7 +7,7 @@ Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/build.gradle.kts b/build.gradle.kts
index 17fd7162ab32785252bf2579daae8d47aec21684..f3018c133440e2f6d1bcdf1adb060dfc6db1a866 100644
index ccf5b30fa48e641fc8d04f185f9ffca55d4e2154..0ed6d9e6619db7559dc5b65a8da6e54e6e15d31c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -10,6 +10,19 @@ java {
@ -1076,19 +1076,19 @@ 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 bc4417d8ffa92a78f690bfa5705d3e42cdc11fd2..d3519fa5b99e2888a194c6382415537785fbeef0 100644
index dd0fef9155077ce6df7bdadc9e4152008f700a3b..92e8b0b1ccebdc2646337114793ea9f3e7759d25 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -38,7 +38,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a world, which may contain entities, chunks and blocks
*/
-public interface World extends PluginMessageRecipient, Metadatable {
+public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
-public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable {
+public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
/**
* Gets the {@link Block} at the given coordinates
@@ -640,6 +640,14 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -633,6 +633,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public List<Player> getPlayers();

View File

@ -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 d3519fa5b99e2888a194c6382415537785fbeef0..8804be419520859355b69660e6f3166d1aa8b1ea 100644
index 864fd2f67820e60e74443c135f8f5e5c62a077bb..370a7a078eeaeac70cd5032264e6dd21fb444bd1 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable;
*/
public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
+ // Paper start
+ /**

View File

@ -27,10 +27,10 @@ index 7cb2fd3adcbf425857ec3de03d009d4c0bd81dc3..689d470ebe2c7e25e4c87f6127978d1d
implementation("org.ow2.asm:asm:9.1")
implementation("org.ow2.asm:asm-commons:9.1")
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
index febfec6efafd76bb59b4b43aa223af16f73339b4..e1174ed0b0f9b77068117712a867aa28bfaa64b5 100644
index 03ca87a1cbace2459174bb7bb8847bda766e80c5..c25fc646be750d3a3b2f4fb3f1c53daee5254107 100644
--- a/src/main/java/org/bukkit/plugin/Plugin.java
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
@@ -166,6 +166,18 @@ public interface Plugin extends TabExecutor {
@@ -179,6 +179,18 @@ public interface Plugin extends TabExecutor {
@NotNull
public Logger getLogger();

View File

@ -17,10 +17,10 @@ The implementation should handle plugin prefixes by displaying
logger names when appropriate.
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
index 2231900549607a0917dd04e8b433c027b846cef9..bb2e55e97bf887a28cac7d4f9a0a23960d22cf56 100644
index 50a479488917b4ce019fa71a496c41e843e9c5c4..f99d60ae4003f953b5680a997e9e43e63c035b0c 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
@@ -42,7 +42,7 @@ public abstract class JavaPlugin extends PluginBase {
@@ -43,7 +43,7 @@ public abstract class JavaPlugin extends PluginBase {
private boolean naggable = true;
private FileConfiguration newConfig = null;
private File configFile = null;
@ -29,7 +29,7 @@ index 2231900549607a0917dd04e8b433c027b846cef9..bb2e55e97bf887a28cac7d4f9a0a2396
public JavaPlugin() {
final ClassLoader classLoader = this.getClass().getClassLoader();
@@ -276,7 +276,8 @@ public abstract class JavaPlugin extends PluginBase {
@@ -277,7 +277,8 @@ public abstract class JavaPlugin extends PluginBase {
this.dataFolder = dataFolder;
this.classLoader = classLoader;
this.configFile = new File(dataFolder, "config.yml");

View File

@ -60,10 +60,10 @@ index 0000000000000000000000000000000000000000..76f2cb9cd99cad2a9484eab2becd8c36
+
+}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
index bb2e55e97bf887a28cac7d4f9a0a23960d22cf56..04fa3991f6ce4e9dad804f28fc6c947695857089 100644
index f99d60ae4003f953b5680a997e9e43e63c035b0c..c943bd801b54519ba6cf5d45aec593d7b7438f99 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
@@ -42,7 +42,7 @@ public abstract class JavaPlugin extends PluginBase {
@@ -43,7 +43,7 @@ public abstract class JavaPlugin extends PluginBase {
private boolean naggable = true;
private FileConfiguration newConfig = null;
private File configFile = null;
@ -72,7 +72,7 @@ index bb2e55e97bf887a28cac7d4f9a0a23960d22cf56..04fa3991f6ce4e9dad804f28fc6c9476
public JavaPlugin() {
final ClassLoader classLoader = this.getClass().getClassLoader();
@@ -276,8 +276,11 @@ public abstract class JavaPlugin extends PluginBase {
@@ -277,8 +277,11 @@ public abstract class JavaPlugin extends PluginBase {
this.dataFolder = dataFolder;
this.classLoader = classLoader;
this.configFile = new File(dataFolder, "config.yml");

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 8804be419520859355b69660e6f3166d1aa8b1ea..6cc9c7fc913f229c4869a976e73253acb74fcda3 100644
index 6b3dc349e5bf8f092e4d2bbbd4747d7d527b0949..9945fe0ee354603490cc0b759264f91e8a7a0f6b 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1,6 +1,9 @@
@ -19,7 +19,7 @@ index 8804be419520859355b69660e6f3166d1aa8b1ea..6cc9c7fc913f229c4869a976e73253ac
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@@ -659,6 +662,256 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -652,6 +655,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);

View File

@ -522,10 +522,10 @@ index c5315ee1ed435c39a3ae298e248b67c5dc291497..687a62707c8021f87e03d6bc358b3b4e
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0d1e026934b45d7d7419efe3365561f5f19f3823..2ca5f2715e8827b9b1041e7e62807216d9608bf8 100644
index 9945fe0ee354603490cc0b759264f91e8a7a0f6b..8b71809fd13c267ef6c84552c6d0a263670ad62f 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2674,7 +2674,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -2573,7 +2573,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
*/

View File

@ -106,10 +106,10 @@ index bbc636baef2e2b0586c7d517be428438ca26ab66..a8d4f7972d07ddde171b4a1ec470a4c6
* Returns a list of entities within a bounding box centered around a Location.
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index ca2b1cbff153c53ec9182e44a1979350bacd695b..53407b999258967a116241ab7d791ac52a344b80 100644
index 8b71809fd13c267ef6c84552c6d0a263670ad62f..d5793644cf51f6e864897893961f367c8d0dc6e8 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1442,6 +1442,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -1419,6 +1419,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*/
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 53407b999258967a116241ab7d791ac52a344b80..a7bd869fb5b8e35274eee0d8dae9dd6fe3c1c540 100644
index d5793644cf51f6e864897893961f367c8d0dc6e8..fef5a98a5c84b018f30a59faac613a60257f3a44 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -946,6 +946,17 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -939,6 +939,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);
@ -20,7 +20,7 @@ index 53407b999258967a116241ab7d791ac52a344b80..a7bd869fb5b8e35274eee0d8dae9dd6f
+ * @return the entity with the given UUID, or null if it isn't found
+ */
+ @Nullable
+ public Entity getEntity(@NotNull UUID uuid);
+ public Entity getEntity(@NotNull java.util.UUID uuid);
+ // Paper end
+
/**

View File

@ -44,10 +44,10 @@ index beac1439c71fb28f1a3baecf56157237e12ccfd5..fa576096e908f8fbdbef53e1bd91215a
* Gets the world containing this chunk
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index a7bd869fb5b8e35274eee0d8dae9dd6fe3c1c540..85c9ea1241d580386be00fb85ea1446addd376c4 100644
index 5846d085b770b3c89cadcd9e2e57ded776babc9e..49e07ff7a3d8a2d9994205c8b29bd7295bc6acc0 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -207,6 +207,22 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -207,6 +207,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Chunk getChunkAt(@NotNull Block block);

View File

@ -48,10 +48,10 @@ index 36ed248f0716f2cc465c08ab851b7d83d4c7c0a7..58728a0f0722b378efa129e26f0c822b
* @return A new location where X/Y/Z are the center of the block
*/
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 85c9ea1241d580386be00fb85ea1446addd376c4..4f563c6afc3568a5a45594bcc87790eeefc4148d 100644
index 49e07ff7a3d8a2d9994205c8b29bd7295bc6acc0..28bcf496d658ba305a6bf459cdd710502399ff04 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -90,6 +90,38 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -90,6 +90,38 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Block getBlockAt(@NotNull Location location);

View File

@ -34,10 +34,10 @@ index 58728a0f0722b378efa129e26f0c822b63d1af36..88b3e0323dbc4f0fce31b147c7aaa08d
/**
* Sets the position of this Location and returns itself
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 4f563c6afc3568a5a45594bcc87790eeefc4148d..868e34482a3a5773dfbdc80b36adcee25239614a 100644
index 28bcf496d658ba305a6bf459cdd710502399ff04..e4bf314c954d8cca6bdb52f0b88137cac4d83f24 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -253,6 +253,17 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -253,6 +253,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
public default Chunk getChunkAt(long chunkKey) {
return getChunkAt((int) chunkKey, (int) (chunkKey >> 32));
}

View File

@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously.
Also adds utility methods to Entity to teleport asynchronously.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 868e34482a3a5773dfbdc80b36adcee25239614a..1264c65235e622f648d71ef10d804ef5193da973 100644
index 891eaf0d1ed600e8e81a7bbdaf9e8f34e2ca50b9..2a371a93c99cb034df897fa82d816ee852a2c4e7 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -969,6 +969,482 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -962,6 +962,482 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
}
return nearby;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 1264c65235e622f648d71ef10d804ef5193da973..b80a2fe9eb6824d986126e451900a62244d3a8e7 100644
index 2a371a93c99cb034df897fa82d816ee852a2c4e7..f2dc2c9138c3e2e3431837cb24307be894da3ee0 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1812,6 +1812,16 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -1789,6 +1789,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*/
public void setFullTime(long time);

View File

@ -51,7 +51,7 @@ index 0000000000000000000000000000000000000000..709e44ea1b14ab6917501c928e689cc6
+ SOLID_OR_LIQUID_NO_LEAVES;
+}
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 1835d39f6259732e56d51fa746faf1e4c65eaf07..c9b953aa55eeee87e81b9b712c0f501a58e641fb 100644
index 23ca89dde7f6ac9082d4b97fce2959425f3680cb..8321441b8f528a05e297f485672f928e76fe017d 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -638,6 +638,47 @@ public class Location implements Cloneable, ConfigurationSerializable {
@ -103,10 +103,10 @@ index 1835d39f6259732e56d51fa746faf1e4c65eaf07..c9b953aa55eeee87e81b9b712c0f501a
* Creates explosion at this location with given power
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index b80a2fe9eb6824d986126e451900a62244d3a8e7..6fe2875f95bb600606d66e2f7113d325d10a9b9c 100644
index ef17e3caf6a899fc19ed5b1df1446d42322fb098..57b4b3056d6408b67f070be5fe29e58c4699b486 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -160,6 +160,87 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -160,6 +160,87 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
public Block getHighestBlockAt(@NotNull Location location);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] World view distance api
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index b4bef2b62cd78cf51d1fc2fd5b85a0ad9dae7a3d..a02d9d7851431211822e1d4157b218db9d404ab7 100644
index d4912e83ed9e3166501458035269d480469b6c5d..157f4d6b587c382e1f5c558e0a0f8c1b486be7a4 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3529,6 +3529,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -3428,6 +3428,34 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
int getViewDistance();
// Spigot end

View File

@ -4,53 +4,45 @@ Date: Thu, 10 Apr 2014 23:18:28 -0400
Subject: [PATCH] Spawn Reason API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index cd96c851d00185e7ee3ec6682b166fc1d06b6a73..10c22809535b6151b45aa18a02b80b8f2e3e6dff 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1,6 +1,8 @@
package org.bukkit;
import java.io.File;
+
diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java
index e285d54450471ed22e12e77c7b829fde6b564ede..35e407ec7bd8d5cd38069fe7f2cf3d9d3bc94cbe 100644
--- a/src/main/java/org/bukkit/RegionAccessor.java
+++ b/src/main/java/org/bukkit/RegionAccessor.java
@@ -9,6 +9,7 @@ import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
+import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.generator.ChunkGenerator;
import java.util.ArrayList;
@@ -2249,6 +2251,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@NotNull
public <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz) throws IllegalArgumentException;
+ // Paper start
+ @NotNull
+ public default <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, @NotNull CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException {
+ return spawn(location, clazz, reason, null);
+ }
+
/**
* Spawn an entity of a specific class at the given {@link Location}, with
* the supplied function run before the entity is added to the world.
@@ -2266,7 +2274,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
import org.bukkit.util.Consumer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -288,7 +289,34 @@ public interface RegionAccessor {
* {@link Entity} requested cannot be spawned
*/
@NotNull
- public <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<T> function) throws IllegalArgumentException;
- <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<T> function) throws IllegalArgumentException;
+ // Paper start
+ public default <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<T> function) throws IllegalArgumentException {
+ return spawn(location, clazz, CreatureSpawnEvent.SpawnReason.CUSTOM, function);
+ }
+
+ @NotNull
+ public default <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, @NotNull CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException {
+ return spawn(location, clazz, reason, null);
+ }
+
+ @NotNull
+ public default <T extends Entity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, @NotNull CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<T> function) throws IllegalArgumentException {
+ return spawn(location, clazz, function, reason);
+ }
+
+ @NotNull
+ public default Entity spawnEntity(@NotNull Location loc, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason) {
+ public default Entity spawnEntity(@NotNull Location loc, @NotNull org.bukkit.entity.EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason) {
+ return spawn(loc, (Class<Entity>) type.getEntityClass(), reason, null);
+ }
+
+ @NotNull
+ public default Entity spawnEntity(@NotNull Location loc, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<Entity> function) {
+ public default Entity spawnEntity(@NotNull Location loc, @NotNull org.bukkit.entity.EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason, @Nullable Consumer<Entity> function) {
+ return spawn(loc, (Class<Entity>) type.getEntityClass(), reason, function);
+ }
+
@ -59,4 +51,4 @@ index cd96c851d00185e7ee3ec6682b166fc1d06b6a73..10c22809535b6151b45aa18a02b80b8f
+ // Paper end
/**
* Spawn a {@link FallingBlock} entity at the given {@link Location} of
* Creates a new entity at the given {@link Location} with the supplied

View File

@ -57,10 +57,10 @@ index 2b21ffb60312cdd2033096b52155610b689f3294..a0695411d3a55babd3cb5f926c349698
* Creates a boss bar instance to display to players. The progress
* defaults to 1.0
diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java
index 9d7592988a2fbcc70f889b0622adbef014054d00..244a8a93c35d5a84e17672ff745051587bca384c 100644
index 80fcd02e9cb5f432f21b1f68fd8266f296becaa0..0667315e2bd10254aef59c2a6bcceee9d927b6d5 100644
--- a/src/main/java/org/bukkit/generator/ChunkGenerator.java
+++ b/src/main/java/org/bukkit/generator/ChunkGenerator.java
@@ -227,6 +227,22 @@ public abstract class ChunkGenerator {
@@ -454,6 +454,22 @@ public abstract class ChunkGenerator {
return false;
}

View File

@ -47,10 +47,10 @@ index 0000000000000000000000000000000000000000..df05153397b42930cd53d37b30824c7e
+ }
+}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 10c22809535b6151b45aa18a02b80b8f2e3e6dff..27d97cde0fb5f6d727656c291e34dc468200f0c0 100644
index 823ac73c8bb30b142a51ed25858b7f3449bf8c83..a805cb95e0695a0729e083ea0995a1ef02b3724f 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -70,6 +70,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -68,6 +68,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @return The amount of Players in this world
*/
int getPlayerCount();

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Implement Keyed on World
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index cf7138a9251e92065fef8b0090eaaf779064e2fc..4bd7fee100800d0ede600afcde2277b1de9e52f2 100644
index 9cd632751c7e15c79b65209d69c76e8ae1916deb..fa99f414c2ce515bbdb6d8ca7bb94aa2ad1f640a 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -663,6 +663,18 @@ public final class Bukkit {
@ -28,7 +28,7 @@ index cf7138a9251e92065fef8b0090eaaf779064e2fc..4bd7fee100800d0ede600afcde2277b1
/**
* Gets the map from the given item ID.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 724a32e4a4861f9f9a8ffc5b5a497b458efffc0f..dcdd0c3f3d03e4a3043909cf051faeb665115c34 100644
index 3e77a6a294afa41e3dd0e5288b4a761d77ee18ff..14dc56c8e7702e63875f6d2f8aa804a109107456 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -561,6 +561,17 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@ -50,19 +50,19 @@ index 724a32e4a4861f9f9a8ffc5b5a497b458efffc0f..dcdd0c3f3d03e4a3043909cf051faeb6
* Gets the map from the given item ID.
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 27d97cde0fb5f6d727656c291e34dc468200f0c0..178a0853bd8136c6a7408f5d49604ceb2479f138 100644
index 61403e0d86ef3ab799dfcf490830e515f064bd73..00fc240c2da96d937ade789a1110190d6cd79254 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;
@@ -41,7 +41,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a world, which may contain entities, chunks and blocks
*/
-public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
+public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience, Keyed { // Paper
-public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
+public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience, Keyed { // Paper
// Paper start
/**
@@ -1534,6 +1534,15 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -1525,6 +1525,15 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@NotNull
java.util.concurrent.CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent);
@ -79,10 +79,10 @@ index 27d97cde0fb5f6d727656c291e34dc468200f0c0..178a0853bd8136c6a7408f5d49604ceb
/**
diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java
index 6774c8176c44dea9cbff69aaf0f27c0a53a2bbb4..c0454d977119b28115b7698a2c4287f0f56efa55 100644
index 60bed20c2845f9dc15ecbed81157a63d75a4c4f4..14986911b4d0099ea2c91ab2196a771b7dee4c50 100644
--- a/src/main/java/org/bukkit/WorldCreator.java
+++ b/src/main/java/org/bukkit/WorldCreator.java
@@ -11,6 +11,7 @@ import org.jetbrains.annotations.Nullable;
@@ -12,6 +12,7 @@ import org.jetbrains.annotations.Nullable;
* Represents various types of options that may be used to create a world.
*/
public class WorldCreator {
@ -90,7 +90,7 @@ index 6774c8176c44dea9cbff69aaf0f27c0a53a2bbb4..c0454d977119b28115b7698a2c4287f0
private final String name;
private long seed;
private World.Environment environment = World.Environment.NORMAL;
@@ -26,13 +27,67 @@ public class WorldCreator {
@@ -28,13 +29,67 @@ public class WorldCreator {
* @param name Name of the world that will be created
*/
public WorldCreator(@NotNull String name) {

View File

@ -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 e149ab9b4ccd1b98791c3ebe5e9c7eb97de853af..4d8be6f200dbe2bd534a7f62152074dca59f9db4 100644
index 00fc240c2da96d937ade789a1110190d6cd79254..59f11b9f36a7fdf7240daf93ea3f2af99d7ec255 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3564,6 +3564,114 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -3434,6 +3434,114 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
public Location locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add more line of sight methods
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 244bb359492ae486f0610f5aea6b75997dbc4bdc..8ae9198ba7fdb006dc420504a984627add20dbb5 100644
index 4834a48100922c6452448d4ef2a75377c7a5afa2..3d06947726ee7072ab8b62722e690f189f3935ab 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -76,6 +76,14 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -74,6 +74,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
*/
@NotNull
io.papermc.paper.world.MoonPhase getMoonPhase();

View File

@ -324,10 +324,10 @@ index 0000000000000000000000000000000000000000..f3b465d3883547d53e55183c2a4e22c6
+ @NotNull <T extends Entity> T spawn(@NotNull Vector location, @NotNull Class<T> clazz, @Nullable Consumer<T> function, @NotNull CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException;
+}
diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java
index 244a8a93c35d5a84e17672ff745051587bca384c..e547f324790ca27dfb85b030988fc03bfc6107f1 100644
index 0667315e2bd10254aef59c2a6bcceee9d927b6d5..5cf3f8875753b0293ea56b65a64f0075b03257c3 100644
--- a/src/main/java/org/bukkit/generator/ChunkGenerator.java
+++ b/src/main/java/org/bukkit/generator/ChunkGenerator.java
@@ -161,6 +161,19 @@ public abstract class ChunkGenerator {
@@ -343,6 +343,19 @@ public abstract class ChunkGenerator {
return new ArrayList<BlockPopulator>();
}

View File

@ -660,7 +660,7 @@ index 067216078c7b50390957d1fcfbfbaaeb81cfba21..7f3d83d3d071f6b441ad119b1c93be03
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 7f81dd05ec8945a851b6501854dc894cad240a66..d6b2e7d643f907ddd81d394d9b613e9ce93a786e 100644
index ae26cf65169fd25520263a3edb93424383fa7bb0..5de52a4c33fd136b43b150b7ed0df7703f4b2817 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -147,6 +147,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -674,17 +674,17 @@ index 7f81dd05ec8945a851b6501854dc894cad240a66..d6b2e7d643f907ddd81d394d9b613e9c
private org.spigotmc.TickLimiter entityLimiter;
@@ -167,6 +169,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, final DimensionType dimensionmanager, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, final DimensionType dimensionmanager, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
+ this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), this.spigotConfig); // Paper
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, env);
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
this.ticksPerAnimalSpawns = this.getCraftServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ace054af2d4f1ab026ee6a5d96e35e7cc7fd53f8..7964acaef50a1786c0510e04723e1ec8dc682757 100644
index 289838b07b027dad54789c977db87fd7637577a0..127386a7d436d9e6a54ee66e7a40a20b73be6481 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -814,6 +814,7 @@ public final class CraftServer implements Server {
@@ -820,6 +820,7 @@ public final class CraftServer implements Server {
}
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
@ -692,7 +692,7 @@ index ace054af2d4f1ab026ee6a5d96e35e7cc7fd53f8..7964acaef50a1786c0510e04723e1ec8
for (ServerLevel world : this.console.getAllLevels()) {
world.serverLevelData.setDifficulty(config.difficulty);
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
@@ -847,12 +848,14 @@ public final class CraftServer implements Server {
@@ -853,12 +854,14 @@ public final class CraftServer implements Server {
world.ticksPerAmbientSpawns = this.getTicksPerAmbientSpawns();
}
world.spigotConfig.init(); // Spigot
@ -707,7 +707,7 @@ index ace054af2d4f1ab026ee6a5d96e35e7cc7fd53f8..7964acaef50a1786c0510e04723e1ec8
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2188,4 +2191,35 @@ public final class CraftServer implements Server {
@@ -2247,4 +2250,35 @@ public final class CraftServer implements Server {
return this.spigot;
}
// Spigot end
@ -744,7 +744,7 @@ index ace054af2d4f1ab026ee6a5d96e35e7cc7fd53f8..7964acaef50a1786c0510e04723e1ec8
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 7f818c6bed25e0b793cca268b786f61440c429ef..1ac3243555c2c61d6b6717e6826539d9d6a3248b 100644
index 90af1b123722bac1c4c5956465a153ec1ea998ff..11d1bc56439ff867224ef1c2058aee67ba0ee332 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -129,6 +129,14 @@ public class Main {

View File

@ -157,10 +157,10 @@ index 3db1f50262df75dc99fd5a1224985cd9f5f14c9f..6611aebafb14b83bce3eeb87701e2edc
private static final int MIN_PROTOCOL_ID = -1;
private static final int MAX_PROTOCOL_ID = 2;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index bae8c5ccfc32c2a36a1f7e03ab4fb762dc3ff2c8..b5f3bf8ff585c518326b0dcb5b793f181d52505f 100644
index 4e8e28b0224aab1d40cae17d330488c09d5497a8..6f56df5b0550735e3da122729080125c3dff5d06 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1768,7 +1768,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1783,7 +1783,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
PackRepository resourcepackrepository = this.packRepository;
Objects.requireNonNull(this.packRepository);

View File

@ -2830,10 +2830,10 @@ index 0000000000000000000000000000000000000000..80f8d6ce6dd717d4b37b78539c65b6ac
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b5f3bf8ff585c518326b0dcb5b793f181d52505f..571e57affcf81151550184b45934ae810885145f 100644
index 6f56df5b0550735e3da122729080125c3dff5d06..dc7779b722cfa5337717b92896c168d839c14946 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -949,6 +949,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -964,6 +964,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
}
// Spigot start
@ -3309,7 +3309,7 @@ index 9591f50922343283597bad6d9ac17c175d8ae230..8513490230f5fae0042f536b69b401ef
Objects.requireNonNull(playerchunk);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 67c59c4b2b9dbe911d5b04b8cebec362af4ef7a9..912c9b0c010436854fab7540b0c9cc63115e39a4 100644
index 7cf9c202f126696fc37860d4121fb47456b0435a..f9fde3155944bb44ecb14524c585ed8eb9eac78c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -9,6 +9,7 @@ import it.unimi.dsi.fastutil.longs.LongSet;
@ -3321,7 +3321,7 @@ index 67c59c4b2b9dbe911d5b04b8cebec362af4ef7a9..912c9b0c010436854fab7540b0c9cc63
import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 76a07bfb7aef66efb461f82c2a1d4651b6513248..504862eae87d4b58d9588b383993a44919d66759 100644
index 725dcd9dfdf27aff70c5c56277ff29bb6eee612b..b3ce71df7ed67583925b21b59d8f1ccf9ed5beda 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -229,6 +229,8 @@ public class ServerPlayer extends Player {
@ -3421,7 +3421,7 @@ index a4c5edee297af6d68d518b77f706732b5ccbe4de..7bf4bf5cb2c1b54a7e2733091f48f3a8
@Override
public void tell(R runnable) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e6d003701426a823768966d944384c69b9701967..3b09f76805053802bb779e227749d81482636407 100644
index e01a7a18d026a8b794a575dd2f5dc907c510fda4..2473816c70c05662d75f6b875b46a4e53d7b76fa 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity {
@ -3608,7 +3608,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..c7d499bfc22152e0a49f50a2a8133f31
public BlockState getBlockState(BlockPos pos) {
return Blocks.AIR.defaultBlockState();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d6b2e7d643f907ddd81d394d9b613e9ce93a786e..3286beed6bf79f5f6b91227f596fcc43200e8bda 100644
index 5de52a4c33fd136b43b150b7ed0df7703f4b2817..03b87448628f41699336245cbf0f882d3fe20f7e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -84,6 +84,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -4101,10 +4101,10 @@ index 592a2a513ebf0002abf1255e11012ecc66adecf0..b89846e0f645c79afec018dae1d64a1b
this.plugin = plugin;
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
new file mode 100644
index 0000000000000000000000000000000000000000..49dc0c441b9dd7e7745cf15ced67f383ebee1f99
index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792ffafb744
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/MinecraftInternalPlugin.java
@@ -0,0 +1,132 @@
@@ -0,0 +1,140 @@
+package org.bukkit.craftbukkit.scheduler;
+
+
@ -4112,11 +4112,14 @@ index 0000000000000000000000000000000000000000..49dc0c441b9dd7e7745cf15ced67f383
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+import org.bukkit.configuration.file.FileConfiguration;
+import org.bukkit.generator.BiomeProvider;
+import org.bukkit.generator.ChunkGenerator;
+import org.bukkit.plugin.PluginBase;
+import org.bukkit.plugin.PluginDescriptionFile;
+import org.bukkit.plugin.PluginLoader;
+import org.bukkit.plugin.PluginLogger;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.io.File;
+import java.io.InputStream;
@ -4228,6 +4231,11 @@ index 0000000000000000000000000000000000000000..49dc0c441b9dd7e7745cf15ced67f383
+ }
+
+ @Override
+ public @Nullable BiomeProvider getDefaultBiomeProvider(@NotNull String worldName, @Nullable String id) {
+ throw new UnsupportedOperationException("Not supported.");
+ }
+
+ @Override
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
+ throw new UnsupportedOperationException("Not supported.");
+ }
@ -4238,10 +4246,10 @@ index 0000000000000000000000000000000000000000..49dc0c441b9dd7e7745cf15ced67f383
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index f43fde089bf7bbe5c982a75ccbc4017b0422a32c..08634e060b35d653c5677b7c1012cfda266bf002 100644
index 93d356ef2aa4d66126312fa7f2b49cb7d3b0c835..c5d132dcf70a55de041c0187ff8fb889248bdfee 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -189,7 +189,23 @@ public class DummyGeneratorAccess implements LevelAccessor {
@@ -198,7 +198,23 @@ public class DummyGeneratorAccess implements WorldGenLevel {
public FluidState getFluidState(BlockPos pos) {
return Fluids.EMPTY.defaultFluidState(); // SPIGOT-6634
}
@ -4266,7 +4274,7 @@ index f43fde089bf7bbe5c982a75ccbc4017b0422a32c..08634e060b35d653c5677b7c1012cfda
public WorldBorder getWorldBorder() {
throw new UnsupportedOperationException("Not supported yet.");
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 87f4d952843654927779a16047da9d601d994fc2..e38b5957b015be3c835ca28a9fe6ee75d7954393 100644
index acf13887957c899b986a9aabe859bf2405e464ac..58c9ab2f6db97bfbf280efc56f9c9be791604a75 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -118,7 +118,11 @@ public class SpigotConfig

View File

@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..d02bd109399d6b32cbbb5e6f9ec7e650
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0443353c7be86952b83a089b0bd591d37989a459..0b13a1464a9e6c4912e737879b00ae14da99fbf5 100644
index c57bde6b2042c0a68cb02f43c28cae0070f38111..89ed84d2e3ac8f25785a2d39b4fd37e50497e49e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -146,7 +146,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
@ -49,7 +49,7 @@ index 0443353c7be86952b83a089b0bd591d37989a459..0b13a1464a9e6c4912e737879b00ae14
// CraftBukkit start
private static final int CURRENT_LEVEL = 2;
@@ -1954,12 +1954,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1955,12 +1955,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return true;
}

View File

@ -772,10 +772,10 @@ index b3a6aeba2363d283f03982cf749f25cfa11a5052..449f1b2f5dca350dc0912e14c8c2bf3e
PacketUtils.LOGGER.debug("Ignoring packet due to disconnection: {}", packet);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70e591c77e 100644
index dc7779b722cfa5337717b92896c168d839c14946..b3707d09bd73c306ea5e87785e6754ede9fc2846 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -180,7 +180,7 @@ import org.bukkit.craftbukkit.Main;
@@ -182,7 +182,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
@ -784,7 +784,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements SnooperPopulator, CommandSource, AutoCloseable {
@@ -895,6 +895,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -910,6 +910,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -792,7 +792,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -1097,9 +1098,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1112,9 +1113,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean haveTime() {
// CraftBukkit start
@ -814,7 +814,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
private void executeModerately() {
this.runAllTasks();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
@@ -1107,9 +1120,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1122,9 +1135,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
protected void waitUntilNextTick() {
@ -826,7 +826,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
});
}
@@ -1195,10 +1208,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1210,10 +1223,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void onServerExit() {}
public void tickServer(BooleanSupplier shouldKeepTicking) {
@ -846,7 +846,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
++this.tickCount;
this.tickChildren(shouldKeepTicking);
if (i - this.lastServerStatus >= 5000000000L) {
@@ -1216,14 +1237,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1231,14 +1252,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
@ -861,7 +861,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
}
this.profiler.push("snooper");
@@ -1236,6 +1255,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1251,6 +1270,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.profiler.pop();
@ -875,7 +875,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
this.profiler.push("tallying");
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
@@ -1246,30 +1272,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1261,30 +1287,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
@ -914,7 +914,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.tickCount % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1277,7 +1302,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1292,7 +1317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
}
}
@ -923,7 +923,7 @@ index 571e57affcf81151550184b45934ae810885145f..fcc775723bcef7c6b740ee332c21ef70
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@@ -1318,24 +1343,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1333,24 +1358,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.profiler.popPush("connection");
@ -1240,7 +1240,7 @@ index 8513490230f5fae0042f536b69b401efca995293..c5bffd1b40ca9ae3c973044c1ad4947b
private void getFullChunk(long pos, Consumer<LevelChunk> chunkConsumer) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 912c9b0c010436854fab7540b0c9cc63115e39a4..253d62b0da6bd59363a85139a5a5d5f11169466a 100644
index f9fde3155944bb44ecb14524c585ed8eb9eac78c..0db1607dc6bbf0def58bdc14fca33dbaa48a8e40 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,6 +1,8 @@
@ -1450,7 +1450,7 @@ index 8c4744b3a3ebf73d31f59d1566320031550aa3bb..c731f22390773bcd43d392b86ae5b42b
public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 01a5c95c40b39ba71add80f65359e390b9079f4e..11f9be795dc622f84866acf461cf3b3190b3d62c 100644
index 89ed84d2e3ac8f25785a2d39b4fd37e50497e49e..96f8a886f348c1e18b4b1b97579ea44d43a05a44 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -126,7 +126,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@ -1461,7 +1461,7 @@ index 01a5c95c40b39ba71add80f65359e390b9079f4e..11f9be795dc622f84866acf461cf3b31
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
@@ -281,7 +280,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -282,7 +281,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949
public boolean persistentInvisibility = false;
@ -1469,7 +1469,7 @@ index 01a5c95c40b39ba71add80f65359e390b9079f4e..11f9be795dc622f84866acf461cf3b31
// Spigot start
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -716,7 +714,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -717,7 +715,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
public void move(MoverType movementType, Vec3 movement) {
@ -1477,7 +1477,7 @@ index 01a5c95c40b39ba71add80f65359e390b9079f4e..11f9be795dc622f84866acf461cf3b31
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
@@ -863,7 +860,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -864,7 +861,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
this.level.getProfiler().pop();
}
}
@ -1549,7 +1549,7 @@ index 7f3d83d3d071f6b441ad119b1c93be035e911e70..8d5c61a77bea2f2f5dbff26cb479f855
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 3b09f76805053802bb779e227749d81482636407..759cd74cda7f0d1f3c0f3bc0a2a941e16258a1c0 100644
index 2473816c70c05662d75f6b875b46a4e53d7b76fa..914f69157ac5e5e9e77de968c4e328d8f44b9465 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -140,7 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1627,7 +1627,7 @@ index 3b09f76805053802bb779e227749d81482636407..759cd74cda7f0d1f3c0f3bc0a2a941e1
if (!this.level.isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
this.hurt(DamageSource.DROWN, 1.0F);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 3286beed6bf79f5f6b91227f596fcc43200e8bda..e38cd4df0924cce7fee4fd98967990945a62ecf4 100644
index 03b87448628f41699336245cbf0f882d3fe20f7e..64bf654a622e2b5e79c45d288c812e32518769c6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -82,7 +82,6 @@ import org.bukkit.Bukkit;
@ -1823,10 +1823,10 @@ index b645a2fc839dbf922ce73b23b7d53e9a5fe1a2ee..1b478ebfe6792a157772a5812d0daa1a
private static CompoundTag packStructureData(ServerLevel world, ChunkPos chunkcoordintpair, Map<StructureFeature<?>, StructureStart<?>> map, Map<StructureFeature<?>, LongSet> map1) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7964acaef50a1786c0510e04723e1ec8dc682757..02d8cfeaea105d42a437b08c3ba59c50eda5a452 100644
index 127386a7d436d9e6a54ee66e7a40a20b73be6481..5749657a70191d52932a45d810bb07d8efd29531 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2160,12 +2160,31 @@ public final class CraftServer implements Server {
@@ -2219,12 +2219,31 @@ public final class CraftServer implements Server {
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{

View File

@ -1702,10 +1702,10 @@ index 7a0e7961df1e62b311ea2ecc76d7343a8646723b..6859fafa42527d45366018f737c19e6c
}
collection = icons;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e8118744027 100644
index 5749657a70191d52932a45d810bb07d8efd29531..70d1ac0c352f16ee2dc394e5df31eea02d7c3ad9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -573,8 +573,10 @@ public final class CraftServer implements Server {
@@ -579,8 +579,10 @@ public final class CraftServer implements Server {
}
@Override
@ -1716,7 +1716,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
}
@Override
@@ -1382,7 +1384,15 @@ public final class CraftServer implements Server {
@@ -1405,7 +1407,15 @@ public final class CraftServer implements Server {
return this.configuration.getInt("settings.spawn-radius", -1);
}
@ -1732,7 +1732,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
public String getShutdownMessage() {
return this.configuration.getString("settings.shutdown-message");
}
@@ -1499,7 +1509,20 @@ public final class CraftServer implements Server {
@@ -1558,7 +1568,20 @@ public final class CraftServer implements Server {
}
@Override
@ -1753,7 +1753,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
@@ -1507,14 +1530,14 @@ public final class CraftServer implements Server {
@@ -1566,14 +1589,14 @@ public final class CraftServer implements Server {
}
}
@ -1770,7 +1770,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
for (CommandSender recipient : recipients) {
recipient.sendMessage(message);
@@ -1750,6 +1773,14 @@ public final class CraftServer implements Server {
@@ -1809,6 +1832,14 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
}
@ -1785,7 +1785,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
@Override
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type);
@@ -1762,13 +1793,28 @@ public final class CraftServer implements Server {
@@ -1821,13 +1852,28 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
}
@ -1814,7 +1814,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
public Merchant createMerchant(String title) {
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
}
@@ -1812,6 +1858,12 @@ public final class CraftServer implements Server {
@@ -1871,6 +1917,12 @@ public final class CraftServer implements Server {
return Thread.currentThread().equals(console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
}
@ -1827,7 +1827,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
@Override
public String getMotd() {
return this.console.getMotd();
@@ -2240,5 +2292,15 @@ public final class CraftServer implements Server {
@@ -2299,5 +2351,15 @@ public final class CraftServer implements Server {
return null;
}
}
@ -1844,7 +1844,7 @@ index 02d8cfeaea105d42a437b08c3ba59c50eda5a452..6ba6e88174644cfea81445f1e8483e81
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 5944e75b9501a3f9f25be5efe11351dd337158c5..e4cd36cf6626ad702ee654587b2f8c5442e4fe2b 100644
index 11d1bc56439ff867224ef1c2058aee67ba0ee332..52f78b8a3d4588f9aba10c8aea4d36cb02f1f54f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -19,6 +19,12 @@ public class Main {
@ -1861,10 +1861,10 @@ index 5944e75b9501a3f9f25be5efe11351dd337158c5..e4cd36cf6626ad702ee654587b2f8c54
OptionParser parser = new OptionParser() {
{
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
index 95b8d32adedf579172187c594e18177f3a84850e..5abf219e86c6b4cf0c6b2e8ea72d7ed7b4f612e3 100644
index 449f42b324e31e1a28562b1fe99416f8925f5204..c35e1964a295032623cf9cb6ade84e69ed92194f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
@@ -70,6 +70,19 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
@@ -73,6 +73,19 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
this.getSnapshot().secondaryPower = (effect != null) ? MobEffect.byId(effect.getId()) : null;
}
@ -2083,10 +2083,10 @@ index cf69a45f038c2b8336010f5fe277313fd0513b5b..eb99e0c2462a2d1ab4508a5c3f1580b6
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
return this.target;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 3aecaf187b0360eb0e5dc9a8948c834cf3401ad8..8d7d256fa33635807d187d493e71b6b4e17fa2e8 100644
index f13410c3376c7c5b666c803666ba23a40fbea8a0..3f7e976d5490768d71e8ce5344d3d150039cdc21 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -810,6 +810,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -815,6 +815,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.getHandle().getVehicle().getBukkitEntity();
}

View File

@ -19,10 +19,10 @@ index 78948c42b13194005bdbbbc69c2b7ae0732a78c5..b41e7922dd96c3358eb849ab39982a75
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 11f9be795dc622f84866acf461cf3b3190b3d62c..8369238dd8042310b8e2aa10e463a3a9f9f7ec64 100644
index 96f8a886f348c1e18b4b1b97579ea44d43a05a44..f1230adeaf399424630412975310cb3e31ed001f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1264,6 +1264,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -1265,6 +1265,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
return this.isInWater() || this.isInRain();
}
@ -31,7 +31,7 @@ index 11f9be795dc622f84866acf461cf3b3190b3d62c..8369238dd8042310b8e2aa10e463a3a9
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 9d9d7990c49fd37c660efcb2c87a6c3495d648a6..5c01a30ccdcf05f516700fb95a46606f2c4cfc6b 100644
index d0047fc5156f13c831ab4f23a429d567ed6a39ac..abaa57d9a4d222753d28801c6ab86b11c71aca6b 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -104,6 +104,7 @@ public abstract class Mob extends LivingEntity {

View File

@ -19,10 +19,10 @@ index 2c53a400611c78236c5a1c1270d27c02e94251bf..a1d5c0f8fe2adb2ee56f3217e089211e
if (outputStream != null) {
try {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fcc775723bcef7c6b740ee332c21ef70e591c77e..0ee92562ef7c6ac99f5bea0b6d0751d0add50f16 100644
index b3707d09bd73c306ea5e87785e6754ede9fc2846..cb1caae296d8d27d65f6f63f0f86aee53d363664 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1420,7 +1420,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1435,7 +1435,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@ -32,10 +32,10 @@ index fcc775723bcef7c6b740ee332c21ef70e591c77e..0ee92562ef7c6ac99f5bea0b6d0751d0
public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6ba6e88174644cfea81445f1e8483e8118744027..fdf877a717f07187eeee98f0203e70d71e1706c4 100644
index 70d1ac0c352f16ee2dc394e5df31eea02d7c3ad9..2092bd94bc151264e1e5d0efd687ee92c3ac8c3c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -236,7 +236,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -242,7 +242,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
public final class CraftServer implements Server {
@ -45,7 +45,7 @@ index 6ba6e88174644cfea81445f1e8483e8118744027..fdf877a717f07187eeee98f0203e70d7
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e4cd36cf6626ad702ee654587b2f8c5442e4fe2b..5a4da412a38b24bf5bc5022e76ac7d638ca82995 100644
index 52f78b8a3d4588f9aba10c8aea4d36cb02f1f54f..2da0896ca3b15deded3556c6298a41f18324db58 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -210,12 +210,25 @@ public class Main {

View File

@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0ee92562ef7c6ac99f5bea0b6d0751d0add50f16..6225e9391ddff28d8f71a9f643ef2c41f69e6fe7 100644
index cb1caae296d8d27d65f6f63f0f86aee53d363664..5756f151de059f6b0de811498fe9e6e07d40063f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -281,7 +281,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -24,7 +24,7 @@ index 0ee92562ef7c6ac99f5bea0b6d0751d0add50f16..6225e9391ddff28d8f71a9f643ef2c41
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
@@ -290,7 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -292,7 +292,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
@ -33,7 +33,7 @@ index 0ee92562ef7c6ac99f5bea0b6d0751d0add50f16..6225e9391ddff28d8f71a9f643ef2c41
public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -990,6 +990,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1005,6 +1005,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index 0ee92562ef7c6ac99f5bea0b6d0751d0add50f16..6225e9391ddff28d8f71a9f643ef2c41
// Spigot End
protected void runServer() {
@@ -1002,25 +1053,32 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1017,25 +1068,32 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
@ -132,7 +132,7 @@ index 0ee92562ef7c6ac99f5bea0b6d0751d0add50f16..6225e9391ddff28d8f71a9f643ef2c41
tickSection = curTime;
}
// Spigot end
@@ -1030,7 +1088,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1045,7 +1103,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}
@ -143,10 +143,10 @@ index 0ee92562ef7c6ac99f5bea0b6d0751d0add50f16..6225e9391ddff28d8f71a9f643ef2c41
this.startMetricsRecordingTick();
this.profiler.push("tick");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fdf877a717f07187eeee98f0203e70d71e1706c4..5e5163d180742c33fc6f045530906d76df758c96 100644
index 2092bd94bc151264e1e5d0efd687ee92c3ac8c3c..167558990f82c9b463377bbc64e18baa956871db 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2208,6 +2208,17 @@ public final class CraftServer implements Server {
@@ -2267,6 +2267,17 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 253d62b0da6bd59363a85139a5a5d5f11169466a..d721d05841d9557583045ab3adc347c24a6d751d 100644
index 0db1607dc6bbf0def58bdc14fca33dbaa48a8e40..491bbaac18d006f9476c6aa2c584ec6efab23296 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1855,6 +1855,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -25,10 +25,10 @@ index 253d62b0da6bd59363a85139a5a5d5f11169466a..d721d05841d9557583045ab3adc347c2
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 04f2cee8045ba74993e10230c3ad7ca80fb048d6..fe08d13e0d25119c48a8872fac6fd2a6ce0170be 100644
index f1230adeaf399424630412975310cb3e31ed001f..628ac6ab6b5b12c4baf451e4cecac5ce4a62b964 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -280,6 +280,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -281,6 +281,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
public boolean forceExplosionKnockback; // SPIGOT-949
public boolean persistentInvisibility = false;
@ -56,7 +56,7 @@ index 04f2cee8045ba74993e10230c3ad7ca80fb048d6..fe08d13e0d25119c48a8872fac6fd2a6
// Spigot start
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -1812,6 +1833,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -1813,6 +1834,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
this.bukkitEntity.storeBukkitValues(nbt);
}
// CraftBukkit end
@ -72,7 +72,7 @@ index 04f2cee8045ba74993e10230c3ad7ca80fb048d6..fe08d13e0d25119c48a8872fac6fd2a6
return nbt;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -1938,6 +1968,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -1939,6 +1969,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
// CraftBukkit end
@ -132,10 +132,10 @@ index 394164f50256ad9a167e15531a9202875abb6cb6..8ad1b3cb16533d62deda643ce0cdda30
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index ee7c920a5a3154927c675b2e1cd0c16f99d0e9a2..1c6473b496ca05e9e0fcd505caaa18b5546d1d3c 100644
index 3f7e976d5490768d71e8ce5344d3d150039cdc21..118ba56a539471bded0cb42334576d5394aee4ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1116,4 +1116,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1121,4 +1121,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.spigot;
}
// Spigot end

View File

@ -29,10 +29,10 @@ index d16ae924bcbe31c964f7fb448757c748e5c4418c..4bba6977a0287837b8927718c040ac61
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index fe08d13e0d25119c48a8872fac6fd2a6ce0170be..2abaa7cac274d30319dd39170000eec9e7330e4d 100644
index 628ac6ab6b5b12c4baf451e4cecac5ce4a62b964..1a3b67fba88c6cea96a08f8d3085a6fb342ada48 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -622,7 +622,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -623,7 +623,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
public void checkOutOfWorld() {

View File

@ -25,10 +25,10 @@ index e6e18f309dc09ea9416ea37dcc697ddc2b571a96..4881b03d470646843bad1bc343eb6a6a
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6225e9391ddff28d8f71a9f643ef2c41f69e6fe7..d1267242746fe2aee0fd12ed01900e4e72df3f89 100644
index 5756f151de059f6b0de811498fe9e6e07d40063f..36305b91d6e529900074040b8448bc57b9ef85bd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1399,6 +1399,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1414,6 +1414,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
this.profiler.pop();
@ -135,7 +135,7 @@ index 83f542bc7c5cb9a309202bb37affac3432bb0535..f833041bb004203f327d33dc7aaade8e
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index cb8512221e17e1a5066aa6610564c2f24ef02da8..cd40ec40a09c87e3a2e35b121970d1518f43a8f8 100644
index bbf3135e71a798536641c279eb6b84132e338629..ef1422963d13837afaccbddde3a9eb0e36167848 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -154,6 +154,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View File

@ -48,10 +48,10 @@ index da9f4b3337b49597c17b50964656457cd629a0b7..22c2c121bbcc7b0e15d73d20c9cc83d5
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5e5163d180742c33fc6f045530906d76df758c96..747cdfbbd5d22094dcc43208036accff70356c7e 100644
index 167558990f82c9b463377bbc64e18baa956871db..d8f5476067cb41d04ebccd690b83756b95396500 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -767,6 +767,28 @@ public final class CraftServer implements Server {
@@ -773,6 +773,28 @@ public final class CraftServer implements Server {
Validate.notNull(commandLine, "CommandLine cannot be null");
org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot

View File

@ -19,10 +19,10 @@ index 70e074cdf2087e638af8e0f3878d0ef8eb7305cc..416a6760883cb40367535c7c5acd7797
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
index 26ed13505c5bcb03fd87bccf29cfdfbe0d1d6d87..2dbdc97bbc0f0960896528cfade12919fde137c4 100644
index 188485bbf9ff679578f7e1b004637df7ea29e677..f1b0e8f3de0b54837770a49d2c663ebf6915d8be 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
@@ -322,7 +322,7 @@ public class Slime extends Mob implements Enemy {
@@ -323,7 +323,7 @@ public class Slime extends Mob implements Enemy {
}
ChunkPos chunkcoordintpair = new ChunkPos(pos);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 747cdfbbd5d22094dcc43208036accff70356c7e..a493f3ae60f2b2f4397a0b81f25a014d9edc805d 100644
index d8f5476067cb41d04ebccd690b83756b95396500..461251cc096e3e2efc52f7b5cc4de90dc5334a34 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1846,6 +1846,7 @@ public final class CraftServer implements Server {
@@ -1905,6 +1905,7 @@ public final class CraftServer implements Server {
return this.helpMap;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index b7ca7c5c727f347ca1290176bae652387dffda6d..97dc4aa5dc3cb5cb21e9a2e316a3f729d6896b85 100644
index 6c4cb5a8878f2738048d9dc8386cbb985843cf50..8e97b3985056caa2aa692ec6250022e095d0b3a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -99,7 +99,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -19,4 +19,4 @@ index b7ca7c5c727f347ca1290176bae652387dffda6d..97dc4aa5dc3cb5cb21e9a2e316a3f729
+ + (this instanceof CraftPlayer ? ", player: " + this.getName() + ')' : ')'));
}
this.getHandle().setHealth((float) health);
// during world generation, we don't want to run logic for dropping items and xp

View File

@ -23,10 +23,10 @@ index 416a6760883cb40367535c7c5acd779742bb8af5..670efbe53241a0ae32d618c83da601cc
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2abaa7cac274d30319dd39170000eec9e7330e4d..df636b5510693821d9e159624b5ae2c6451d2299 100644
index 1a3b67fba88c6cea96a08f8d3085a6fb342ada48..db2933ed070a75bf4f46e37b52a8dbb7e9afb364 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2900,7 +2900,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2901,7 +2901,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
double d4 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType());
BlockPos blockposition = new BlockPos(Mth.clamp(this.getX() * d4, d0, d2), this.getY(), Mth.clamp(this.getZ() * d4, d1, d3));
// CraftBukkit start

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a493f3ae60f2b2f4397a0b81f25a014d9edc805d..ea8ed9c3d83e7038c334779b7bd3739286101f73 100644
index 461251cc096e3e2efc52f7b5cc4de90dc5334a34..7c9e42e85e2ccc220d30d72f3f1c2c139e195bbb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -272,6 +272,7 @@ public final class CraftServer implements Server {
@@ -278,6 +278,7 @@ public final class CraftServer implements Server {
public boolean ignoreVanillaPermissions = false;
private final List<CraftPlayer> playerView;
public int reloadCount;
@ -17,7 +17,7 @@ index a493f3ae60f2b2f4397a0b81f25a014d9edc805d..ea8ed9c3d83e7038c334779b7bd37392
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 3510448dd6964981cd9aa64c24c85c310eb75971..99bd0df1351c356b0ff9f5d864ba5dad89c90acf 100644
index 118ba56a539471bded0cb42334576d5394aee4ab..7e50d589724c15ce30424cf1d82eb56e84acd28b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -435,10 +435,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

View File

@ -25,10 +25,10 @@ index abbbe1786eb68af02f9d39650aad730ac44aac8a..3ac2ac3db9b1c271b3c21930bb137166
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index df636b5510693821d9e159624b5ae2c6451d2299..edb75ce3fe60bc0730b99edca3a6e03ee15714c0 100644
index db2933ed070a75bf4f46e37b52a8dbb7e9afb364..76304c6bd6b9509cf83e4a580ebdecdc10b64354 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2549,6 +2549,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2550,6 +2550,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@Nullable
public Team getTeam() {
@ -37,7 +37,7 @@ index df636b5510693821d9e159624b5ae2c6451d2299..edb75ce3fe60bc0730b99edca3a6e03e
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 5b285714ce231d45d879be83ae36d94eaa8310c0..6c2adddb3d55e5384d1386788bce13ee4c7a6bbe 100644
index 0f1a9e7561f6df4844545ff4565e996bb21eb9dc..200aca8237dd7fbb0e4959831bda877c58ec37fb 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -803,6 +803,7 @@ public abstract class LivingEntity extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 97dc4aa5dc3cb5cb21e9a2e316a3f729d6896b85..9e98e854b6b3f8dac3990abaa1c9f60fd1ff3836 100644
index 8e97b3985056caa2aa692ec6250022e095d0b3a6..e955126fc82dfcdadb824c8d2d15e8b1f33bc67f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -690,4 +690,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -713,4 +713,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible);
}

View File

@ -30,10 +30,10 @@ index 8330f57d57181002dab4599e2c1f477cf9e51784..e3ca633a99d30ebf9dc35fd9236836b5
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ea8ed9c3d83e7038c334779b7bd3739286101f73..14d50ebcf9b229bf0664d200117d027983cbf1a2 100644
index 7c9e42e85e2ccc220d30d72f3f1c2c139e195bbb..f3e50cebfbac08d9cf997faf99e63f750fff8a5c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -409,6 +409,7 @@ public final class CraftServer implements Server {
@@ -415,6 +415,7 @@ public final class CraftServer implements Server {
if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear();
this.helpMap.initializeGeneralTopics();
@ -41,7 +41,7 @@ index ea8ed9c3d83e7038c334779b7bd3739286101f73..14d50ebcf9b229bf0664d200117d0279
}
Plugin[] plugins = this.pluginManager.getPlugins();
@@ -428,7 +429,7 @@ public final class CraftServer implements Server {
@@ -434,7 +435,7 @@ public final class CraftServer implements Server {
this.commandMap.registerServerAliases();
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 14d50ebcf9b229bf0664d200117d027983cbf1a2..71e5640c9416d95412638f2bceeb901b9188ac58 100644
index f3e50cebfbac08d9cf997faf99e63f750fff8a5c..d9196e8268ffcdd5e696b98b4a384baa03d8bb21 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2338,5 +2338,23 @@ public final class CraftServer implements Server {
@@ -2397,5 +2397,23 @@ public final class CraftServer implements Server {
}
return this.adventure$audiences;
}

View File

@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 71e5640c9416d95412638f2bceeb901b9188ac58..0f30b58e047c1bc034b2e34ed8fc3823cddaaf7f 100644
index d9196e8268ffcdd5e696b98b4a384baa03d8bb21..d4c1b181ac1d1f4aaedf2c2ace8aff632439c8d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -877,8 +877,16 @@ public final class CraftServer implements Server {
@@ -883,8 +883,16 @@ public final class CraftServer implements Server {
world.paperConfig.init(); // Paper
}

View File

@ -79,7 +79,7 @@ index ddf0889b20b42c17edc2678d809bddf3dacf4c8f..7f44e9e382aa87ad9be94394d05bbcac
public boolean isEnchanted() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index b89292f10e254616bfe3da4700eb12a9fd41f25d..45d61dbe785155501d9fa23e33b1954c5ad1c0e4 100644
index d6467a42d54954dffe919482294cb9355f217f21..84f11780a22b3369519fc8f80d6c274360045df7 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -6,7 +6,6 @@ import java.util.Map;
@ -89,8 +89,8 @@ index b89292f10e254616bfe3da4700eb12a9fd41f25d..45d61dbe785155501d9fa23e33b1954c
-import net.minecraft.world.item.enchantment.EnchantmentHelper;
import org.apache.commons.lang.Validate;
import org.bukkit.Material;
import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -177,28 +176,11 @@ public final class CraftItemStack extends ItemStack {
import org.bukkit.NamespacedKey;
@@ -178,28 +177,11 @@ public final class CraftItemStack extends ItemStack {
public void addUnsafeEnchantment(Enchantment ench, int level) {
Validate.notNull(ench, "Cannot add null enchantment");
@ -107,7 +107,7 @@ index b89292f10e254616bfe3da4700eb12a9fd41f25d..45d61dbe785155501d9fa23e33b1954c
- for (int i = 0; i < size; i++) {
- CompoundTag tag = (CompoundTag) list.get(i);
- String id = tag.getString(ENCHANTMENTS_ID.NBT);
- if (id.equals(ench.getKey().toString())) {
- if (ench.getKey().equals(NamespacedKey.fromString(id))) {
- tag.putShort(ENCHANTMENTS_LVL.NBT, (short) level);
- return;
- }
@ -124,7 +124,7 @@ index b89292f10e254616bfe3da4700eb12a9fd41f25d..45d61dbe785155501d9fa23e33b1954c
}
static boolean makeTag(net.minecraft.world.item.ItemStack item) {
@@ -215,66 +197,34 @@ public final class CraftItemStack extends ItemStack {
@@ -216,66 +198,34 @@ public final class CraftItemStack extends ItemStack {
@Override
public boolean containsEnchantment(Enchantment ench) {
@ -157,7 +157,7 @@ index b89292f10e254616bfe3da4700eb12a9fd41f25d..45d61dbe785155501d9fa23e33b1954c
- for (int i = 0; i < size; i++) {
- CompoundTag enchantment = (CompoundTag) list.get(i);
- String id = enchantment.getString(ENCHANTMENTS_ID.NBT);
- if (id.equals(ench.getKey().toString())) {
- if (ench.getKey().equals(NamespacedKey.fromString(id))) {
- index = i;
- level = 0xffff & enchantment.getShort(ENCHANTMENTS_LVL.NBT);
- break;

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index edb75ce3fe60bc0730b99edca3a6e03ee15714c0..8d667633a01b33d9dd1fd3314f367e0ea8733735 100644
index 76304c6bd6b9509cf83e4a580ebdecdc10b64354..48ecf563e32315894fe363d95505c5899e6294c1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -153,6 +153,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -31,7 +31,7 @@ index edb75ce3fe60bc0730b99edca3a6e03ee15714c0..8d667633a01b33d9dd1fd3314f367e0e
private CraftEntity bukkitEntity;
public CraftEntity getBukkitEntity() {
@@ -324,7 +339,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -325,7 +340,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
this.bb = Entity.INITIAL_AABB;
this.stuckSpeedMultiplier = Vec3.ZERO;
this.nextStep = 1.0F;

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d1267242746fe2aee0fd12ed01900e4e72df3f89..4ed4744c887ca52fa3f85ad4ea41e79543cc13ce 100644
index 36305b91d6e529900074040b8448bc57b9ef85bd..597b8d4c79714484e7c8be6e4f90294a96259e4e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1365,6 +1365,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1380,6 +1380,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@ -18,7 +18,7 @@ index d1267242746fe2aee0fd12ed01900e4e72df3f89..4ed4744c887ca52fa3f85ad4ea41e795
this.profiler.push(() -> {
return worldserver + " " + worldserver.dimension().location();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 7251c939dabb4591f1c30bd1b33b6e707615b6e9..ba964bc8b2d86b86be2d527fdc8d8aa342ac0e5e 100644
index c19276ce8a2f4045ca7fe7b7600bd952b8bd5777..b178f93d38a865ae2841d044326370623065b112 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -197,6 +197,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -30,7 +30,7 @@ index 7251c939dabb4591f1c30bd1b33b6e707615b6e9..ba964bc8b2d86b86be2d527fdc8d8aa3
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
return this.chunkSource.getChunk(x, z, false);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c6dbace64d19de52112c64c824640cf48db216e3..5c395ffa57372dee3fc29e9bd4b5545211aec29c 100644
index be2b000c899e52cc6a97b87c854f10cec44d8ea1..f05dcb3c9f17a0aa991fcbd3b3f58f507059a8cd 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -471,7 +471,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View File

@ -32,10 +32,10 @@ index 8885220e4813b34627b42523834bbec995d8950d..4c9660176e783999301565790b8cf6f4
buf.writeComponent(this.playerPrefix);
buf.writeComponent(this.playerSuffix);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4ed4744c887ca52fa3f85ad4ea41e79543cc13ce..275e7503ec6a0ceec9839c7d11fb3710cf9f15d2 100644
index 597b8d4c79714484e7c8be6e4f90294a96259e4e..5ef6d6cafbd39cf15189bc65cc4dea1f99ef37a0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -160,6 +160,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
@@ -161,6 +161,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
import net.minecraft.world.level.storage.loot.PredicateManager;
import net.minecraft.world.phys.Vec2;
import net.minecraft.world.phys.Vec3;
@ -43,7 +43,7 @@ index 4ed4744c887ca52fa3f85ad4ea41e79543cc13ce..275e7503ec6a0ceec9839c7d11fb3710
import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -599,6 +600,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -614,6 +615,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 275e7503ec6a0ceec9839c7d11fb3710cf9f15d2..4d5f3509d7be914658014d07c72ec12762a76da3 100644
index 5ef6d6cafbd39cf15189bc65cc4dea1f99ef37a0..7cabb48a2b82fd0ce1522d5fbca6841613159329 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -186,6 +186,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@@ -188,6 +188,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements SnooperPopulator, CommandSource, AutoCloseable {
@ -17,7 +17,7 @@ index 275e7503ec6a0ceec9839c7d11fb3710cf9f15d2..4d5f3509d7be914658014d07c72ec127
public static final Logger LOGGER = LogManager.getLogger();
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
private static final int TICK_STATS_SPAN = 100;
@@ -314,6 +315,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -316,6 +317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, Thread thread, RegistryAccess.RegistryHolder iregistrycustom_dimension, LevelStorageSource.LevelStorageAccess convertable_conversionsession, WorldData savedata, PackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, ServerResources datapackresources, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server");
@ -25,7 +25,7 @@ index 275e7503ec6a0ceec9839c7d11fb3710cf9f15d2..4d5f3509d7be914658014d07c72ec127
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
this.profiler = this.metricsRecorder.getProfiler();
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
@@ -2235,7 +2237,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2250,7 +2252,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Deprecated
public static MinecraftServer getServer() {

View File

@ -515,7 +515,7 @@ index 0000000000000000000000000000000000000000..3377b86c337d0234bbb9b0349e4034a7
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8d667633a01b33d9dd1fd3314f367e0ea8733735..8ccbaaed364bfbc0becc72f845bbb284b9f976ce 100644
index 48ecf563e32315894fe363d95505c5899e6294c1..877e8093be0d97ee4479b0ba0c95713362498766 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -168,6 +168,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -642,10 +642,10 @@ index b79d9d26a8e60f9c0ecd69e9c2f9cfd087e21d23..f23fff80d07ac7d06715efe67cb49ebb
if (player != null) {
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
index 9c97a663f37c8a12d5b28e98688de59d62762b3f..79edaefe8f6c027b5ad67c6bdcc0bb84a0582887 100644
index bbe1ddca74a174a3da38475f586b5b61ae3abad3..4d84bcdfb17a3d1bc79e5ec2b201739fa0db1bd3 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
@@ -13,8 +13,9 @@ import org.bukkit.craftbukkit.CraftWorld;
@@ -14,8 +14,9 @@ import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.inventory.CraftInventory;
import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest;
import org.bukkit.inventory.Inventory;

View File

@ -12,10 +12,10 @@ the user never changed the default setting for Spigot's save on stop only.
1.17: TODO does this need the synchronized blocks anymore?
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4d5f3509d7be914658014d07c72ec12762a76da3..feab424cbfcb4c8f7ce38cdeeb42dce3fe1ce7aa 100644
index 7cabb48a2b82fd0ce1522d5fbca6841613159329..6f46c66890429e438c484e3a5f425936bd7d4130 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -972,7 +972,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -987,7 +987,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json");

View File

@ -67,10 +67,10 @@ index f6cb864c45f960811acc02829d1f7883b916de29..8703f97dc2f392b136c6851aa09b607c
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0f30b58e047c1bc034b2e34ed8fc3823cddaaf7f..e83a8e5c190d3d9906c343b14d44af47f23b3414 100644
index d4c1b181ac1d1f4aaedf2c2ace8aff632439c8d7..1d3eebbd525cea270f74c651725ecb1704cd14d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1589,7 +1589,7 @@ public final class CraftServer implements Server {
@@ -1648,7 +1648,7 @@ public final class CraftServer implements Server {
// Spigot Start
GameProfile profile = null;
// Only fetch an online UUID in online mode

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e83a8e5c190d3d9906c343b14d44af47f23b3414..98622d2bb3a491e973bac914604124f7133a62e9 100644
index 1d3eebbd525cea270f74c651725ecb1704cd14d6..36008512f847510c03e6165904dbe9a562c06d25 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2364,5 +2364,24 @@ public final class CraftServer implements Server {
@@ -2423,5 +2423,24 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
}

View File

@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 05f94017546f3bb326f445d06add401498524d4d..43febeede5fcc9d52e6682f94afb26c18b61648e 100644
index 98c205efbe7f31fb35eefedf083b366dd5dbb8f8..d6e6b5a29ddf980e179471059372dfda8e0d7b1b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -110,7 +110,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -20,10 +20,10 @@ index 05f94017546f3bb326f445d06add401498524d4d..43febeede5fcc9d52e6682f94afb26c1
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 2889ac5f94787b1af65c8a691c227fbddb638c2e..e228a59166c6e492d96ebf72890f8925e96c4575 100644
index b628a66c37d4de732876d9dd428b77e1c04c0da4..f5cc3134edfc56885b53fa2efbbff1ab24955f0f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -273,6 +273,57 @@ public class CraftWorld implements World {
@@ -131,6 +131,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {
private int waterAmbientSpawn = -1;
private int ambientSpawn = -1;
@ -80,4 +80,4 @@ index 2889ac5f94787b1af65c8a691c227fbddb638c2e..e228a59166c6e492d96ebf72890f8925
+
private static final Random rand = new Random();
public CraftWorld(ServerLevel world, ChunkGenerator gen, Environment env) {
public CraftWorld(ServerLevel world, ChunkGenerator gen, BiomeProvider biomeProvider, Environment env) {

View File

@ -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 8ccbaaed364bfbc0becc72f845bbb284b9f976ce..5acc5d9150961223904b8d0bb9ea880feb60ebf5 100644
index 877e8093be0d97ee4479b0ba0c95713362498766..d8ca908b18f42c57bc96097ba537b0fc7c2915d0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2244,6 +2244,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2245,6 +2245,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
protected boolean addPassenger(Entity entity) { // CraftBukkit

View File

@ -129,7 +129,7 @@ index 4000480a14d2ba52149f4fa47f824abfa2e0e5f8..ea01f84448693ca740b5f3381a9c500e
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index fe74e130309fbef3f763d875310cbd7a5d9b74fd..9fb669c0199a73136bf5b5a86fa60036dc67bd3e 100644
index a5e47e581a79546e10ad2f5bdabcd92607384867..a69b8ef71b2ee216cb22f4079352d41ab1417e1f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1703,7 +1703,8 @@ public abstract class LivingEntity extends Entity {
@ -143,7 +143,7 @@ index fe74e130309fbef3f763d875310cbd7a5d9b74fd..9fb669c0199a73136bf5b5a86fa60036
}
// 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 b8163a04f5aad326e78416b270dc64ffc913ccc5..5a503a255b4e7e684a8f42d8190430397ca81683 100644
index c955f34e9c92f3310d2ead4eb887b5fe94180619..43841b5c77beb73169e2ff1645afe1234d8f74c7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
@@ -264,7 +264,7 @@ public abstract class Animal extends AgeableMob {
@ -300,19 +300,19 @@ index 61ab07be21759df7b92ba71e31c537860f4e5dc2..265fa3cb96b7d39194a7e83b8b77b811
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e228a59166c6e492d96ebf72890f8925e96c4575..49ef818c6601855924472e655d3419d82c28e339 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1839,7 +1839,7 @@ public class CraftWorld implements World {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 38d2da5e39aeb27904702fc4035e456c1f7bb704..eca9a9eb3d8dcd51ee9e96f2f4050bf51bc58b48 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -867,7 +867,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new PrimedTnt(this.world, x, y, z, null);
entity = new PrimedTnt(world, x, y, z, null);
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) {
- entity = new net.minecraft.world.entity.ExperienceOrb(this.world, x, y, z, 0);
+ entity = new net.minecraft.world.entity.ExperienceOrb(this.world, x, y, z, 0, org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM, null, null); // Paper
- entity = new net.minecraft.world.entity.ExperienceOrb(world, x, y, z, 0);
+ entity = new net.minecraft.world.entity.ExperienceOrb(world, x, y, z, 0, org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM, null, null); // Paper
} else if (LightningStrike.class.isAssignableFrom(clazz)) {
entity = net.minecraft.world.entity.EntityType.LIGHTNING_BOLT.create(world);
} else if (AreaEffectCloud.class.isAssignableFrom(clazz)) {
entity.moveTo(location.getX(), location.getY(), location.getZ());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 40713228b149b4532fcee3a54bbe63e161318258..84899284703baeb04bfc79251941265d52ac07e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java

View File

@ -27,10 +27,10 @@ index 2dc58b9f769ea43b737804456aafab47ecc143b8..c611b5a63498f5ad1f50a75ccd5d7299
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5acc5d9150961223904b8d0bb9ea880feb60ebf5..01cfa488e7b25b7c65e71908bb6f5e6b7b61ca89 100644
index d8ca908b18f42c57bc96097ba537b0fc7c2915d0..a251c60a150a4471f676fb2cadda3e186b9ba6ee 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -321,6 +321,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -322,6 +322,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
public long activatedTick = Integer.MIN_VALUE;
@ -39,7 +39,7 @@ index 5acc5d9150961223904b8d0bb9ea880feb60ebf5..01cfa488e7b25b7c65e71908bb6f5e6b
// Spigot end
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9fb669c0199a73136bf5b5a86fa60036dc67bd3e..966f2217a0b20f594d40a7a1f69d324d808a098c 100644
index a69b8ef71b2ee216cb22f4079352d41ab1417e1f..d9503597b2c2707bf28b31db9c1099fd326d2451 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3227,8 +3227,11 @@ public abstract class LivingEntity extends Entity {

View File

@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index feab424cbfcb4c8f7ce38cdeeb42dce3fe1ce7aa..14d94990ca8160b0a28b40ae6b8261f50798d7a2 100644
index 6f46c66890429e438c484e3a5f425936bd7d4130..2a064d7d6b0ee97c9e192ea8b4b601fac66a8574 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -230,6 +230,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -232,6 +232,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final Map<ResourceKey<Level>, ServerLevel> levels;
private PlayerList playerList;
private volatile boolean running;
@ -41,7 +41,7 @@ index feab424cbfcb4c8f7ce38cdeeb42dce3fe1ce7aa..14d94990ca8160b0a28b40ae6b8261f5
private boolean stopped;
private int tickCount;
protected final Proxy proxy;
@@ -925,7 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -940,7 +941,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.saveAll();
@ -50,7 +50,7 @@ index feab424cbfcb4c8f7ce38cdeeb42dce3fe1ce7aa..14d94990ca8160b0a28b40ae6b8261f5
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -991,6 +992,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1006,6 +1007,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void halt(boolean flag) {

View File

@ -20,10 +20,10 @@ index 8af8e5f28b5205e3e4ef68ba870f610facc389bd..546daac72e4829a22ed3c3eb4093b0d8
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 98622d2bb3a491e973bac914604124f7133a62e9..98b8027f57c8c68621957652823e0994c2a19219 100644
index 36008512f847510c03e6165904dbe9a562c06d25..66be5160113dfa7833dd5015313e7e7dea0bc1ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2383,5 +2383,10 @@ public final class CraftServer implements Server {
@@ -2442,5 +2442,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}

View File

@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/build.gradle.kts b/build.gradle.kts
index 1ed07304bdf4288608dade345997802cb7753159..ae52e2445cd12fd38d2155b8bdc5c53d86d71b30 100644
index bacfd25d2fa07d2b0441494a39fe3830b7e4d1f0..6557e1556c54df6581b61419a2b9e040dd6e0196 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -17,7 +17,17 @@ repositories {
@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 14d94990ca8160b0a28b40ae6b8261f50798d7a2..34e801e225173246ba6f4c2ab68ef3f5f2278d78 100644
index 2a064d7d6b0ee97c9e192ea8b4b601fac66a8574..d7ec805b7922b19e4d67288bb4eb4fc10af5166f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -9,6 +9,7 @@ import com.mojang.authlib.GameProfile;
@ -123,7 +123,7 @@ index 14d94990ca8160b0a28b40ae6b8261f50798d7a2..34e801e225173246ba6f4c2ab68ef3f5
import it.unimi.dsi.fastutil.longs.LongIterator;
import java.awt.GraphicsEnvironment;
import java.awt.image.BufferedImage;
@@ -169,7 +170,7 @@ import org.apache.logging.log4j.Logger;
@@ -170,7 +171,7 @@ import org.apache.logging.log4j.Logger;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
import com.google.common.collect.ImmutableSet;
@ -132,7 +132,7 @@ index 14d94990ca8160b0a28b40ae6b8261f50798d7a2..34e801e225173246ba6f4c2ab68ef3f5
import joptsimple.OptionSet;
import net.minecraft.resources.RegistryReadOps;
import net.minecraft.server.bossevents.CustomBossEvents;
@@ -283,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -285,7 +286,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
@ -141,7 +141,7 @@ index 14d94990ca8160b0a28b40ae6b8261f50798d7a2..34e801e225173246ba6f4c2ab68ef3f5
public static int currentTick = 0; // Paper - Further improve tick loop
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
@@ -361,7 +362,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -363,7 +364,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.options = options;
this.datapackconfiguration = datapackconfiguration;
this.vanillaCommandDispatcher = datapackresources.commands; // CraftBukkit
@ -151,7 +151,7 @@ index 14d94990ca8160b0a28b40ae6b8261f50798d7a2..34e801e225173246ba6f4c2ab68ef3f5
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
@@ -382,6 +385,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -384,6 +387,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.warn((String) null, ex);
}
}
@ -160,7 +160,7 @@ index 14d94990ca8160b0a28b40ae6b8261f50798d7a2..34e801e225173246ba6f4c2ab68ef3f5
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
@@ -1168,7 +1173,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1183,7 +1188,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings
try {
@ -169,7 +169,7 @@ index 14d94990ca8160b0a28b40ae6b8261f50798d7a2..34e801e225173246ba6f4c2ab68ef3f5
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1551,7 +1556,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1566,7 +1571,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void sendMessage(Component message, UUID sender) {
@ -244,7 +244,7 @@ index 24add1cd1f865012c5382548e415218d481ecefe..31dccb0b4ab60d6cedf236fc7d51a363
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 98b8027f57c8c68621957652823e0994c2a19219..d516f012ffbb5d12f698101efe91baff78c4a57e 100644
index 66be5160113dfa7833dd5015313e7e7dea0bc1ae..1fff5dfe44ec37c22df3fe257e02f4270564ad5c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -47,7 +47,6 @@ import java.util.function.Consumer;
@ -263,7 +263,7 @@ index 98b8027f57c8c68621957652823e0994c2a19219..d516f012ffbb5d12f698101efe91baff
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.bossevents.CustomBossEvent;
import net.minecraft.server.commands.ReloadCommand;
@@ -1209,9 +1209,13 @@ public final class CraftServer implements Server {
@@ -1232,9 +1232,13 @@ public final class CraftServer implements Server {
return this.logger;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d516f012ffbb5d12f698101efe91baff78c4a57e..01c10ee7f4a1568a35101dd73c0049e24bfb3e00 100644
index 1fff5dfe44ec37c22df3fe257e02f4270564ad5c..6c5ebee1ebbc8fdb579f2f4f05ff8ae859206c2a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -797,7 +797,13 @@ public final class CraftServer implements Server {
@@ -803,7 +803,13 @@ public final class CraftServer implements Server {
// Spigot start
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {

View File

@ -491,10 +491,10 @@ index 6e1b7d5b20e9f6ed1b650eb9d6ac9f8c4867b4b7..61405c2b53e03a4b83e2c70c6e4d3739
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 01c10ee7f4a1568a35101dd73c0049e24bfb3e00..472c466c8257bcd696184ac71019acd491eca714 100644
index 6c5ebee1ebbc8fdb579f2f4f05ff8ae859206c2a..eb46de0cff9dbedf19a3826ca2a876f22284f210 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -235,6 +235,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -241,6 +241,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
@ -504,7 +504,7 @@ index 01c10ee7f4a1568a35101dd73c0049e24bfb3e00..472c466c8257bcd696184ac71019acd4
public final class CraftServer implements Server {
private final String serverName = "Paper"; // Paper
private final String serverVersion;
@@ -2398,5 +2401,24 @@ public final class CraftServer implements Server {
@@ -2457,5 +2460,24 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
}

View File

@ -5,10 +5,10 @@ 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 01cfa488e7b25b7c65e71908bb6f5e6b7b61ca89..b0422e655fa836b5ff44f56a2ba9b4318e56e93e 100644
index a251c60a150a4471f676fb2cadda3e186b9ba6ee..06ee6000f53da50e7883a68208bdb5f839632f94 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -321,6 +321,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -322,6 +322,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
public long activatedTick = Integer.MIN_VALUE;
@ -16,7 +16,7 @@ index 01cfa488e7b25b7c65e71908bb6f5e6b7b61ca89..b0422e655fa836b5ff44f56a2ba9b431
protected int numCollisions = 0; // Paper
public void inactiveTick() { }
// Spigot end
@@ -1862,6 +1863,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -1863,6 +1864,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -27,7 +27,7 @@ index 01cfa488e7b25b7c65e71908bb6f5e6b7b61ca89..b0422e655fa836b5ff44f56a2ba9b431
// Paper end
return nbt;
} catch (Throwable throwable) {
@@ -2001,6 +2006,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2002,6 +2007,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
this.originWorld = originWorld;
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
}
@ -49,10 +49,10 @@ index 037dafb59e54047d1d54474c44897d35b8f46c98..e310c1eb1108780bcff4d7ba9d49cefa
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
Entity vehicle = entity.getVehicle();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index db430d20186fc8d307fd4e521778316845cd8581..2840228aa6aa8f1559b976d396aa9d1f8f4d6a40 100644
index 7e50d589724c15ce30424cf1d82eb56e84acd28b..edf381a0fd8a568fb2095a0369c3eb062e9a566b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1162,5 +1162,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1167,5 +1167,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
//noinspection ConstantConditions
return originVector.toLocation(world);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 9e98e854b6b3f8dac3990abaa1c9f60fd1ff3836..7beb84da34e58b18cd83a53eab2bcf703e8bf35e 100644
index e955126fc82dfcdadb824c8d2d15e8b1f33bc67f..90b70935242757b5c302bac7777eb1428d69619e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -8,6 +8,7 @@ import java.util.Iterator;
@ -16,7 +16,7 @@ index 9e98e854b6b3f8dac3990abaa1c9f60fd1ff3836..7beb84da34e58b18cd83a53eab2bcf70
import net.minecraft.world.InteractionHand;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.effect.MobEffect;
@@ -332,6 +333,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -344,6 +345,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
}

View File

@ -58,10 +58,10 @@ index 77645019c88d61dde28b7598d8a29b7d0c23c209..8a079ee3ed243fd19b1dd7eed2de1dd3
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 4a61ce62ffe75622583bbb2d83e6d46f1e769d59..d8136ba1aacf55f710365a9171033f743ce2775b 100644
index 4175eb5f71522c23eadcbaac6e4b0fbd31f572bc..650e119a4683ad5cb0175dd558f9299f0ebcca0d 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -311,7 +311,21 @@ public class CraftBlock implements Block {
@@ -315,7 +315,21 @@ public class CraftBlock implements Block {
@Override
public BlockState getState() {
@ -85,11 +85,11 @@ index 4a61ce62ffe75622583bbb2d83e6d46f1e769d59..d8136ba1aacf55f710365a9171033f74
switch (material) {
case ACACIA_SIGN:
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index fd5b5287d67af364f149d4e284001fd319986bd5..972d4aa11a0a119e8e6703af99d93bcd3cddc6d8 100644
index 5203741fc3ba3b856f15d27e563b641c1e48e022..204a61767d5cacc962094b9ecc37f457987cbde7 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -26,20 +26,40 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
this.tileEntity = tileEntityClass.cast(world.getHandle().getBlockEntity(this.getPosition()));
@@ -25,20 +25,40 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
this.tileEntity = tileEntityClass.cast(getWorldHandle().getBlockEntity(this.getPosition()));
Preconditions.checkState(this.tileEntity != null, "Tile is null, asynchronous access? %s", block);
+ // Paper start
@ -133,7 +133,7 @@ index fd5b5287d67af364f149d4e284001fd319986bd5..972d4aa11a0a119e8e6703af99d93bcd
+ // Paper end
}
private T createSnapshot(T tileEntity) {
public void refreshSnapshot() {
diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
index ddd7b63f0452042baa3fca04bb9fbdb42fcecbfd..b638351581fa09c488425a2318b782a5812140ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java

View File

@ -72,10 +72,10 @@ index cf42d59254f2786bfe8785249ad270d35996417a..8c2242d7e443bee26741608c65d314d8
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 472c466c8257bcd696184ac71019acd491eca714..f3461229c19ad011e33b2d0e2675622e1f339bcb 100644
index eb46de0cff9dbedf19a3826ca2a876f22284f210..ad2b2e17125408712a247457db167ef6bf3e354e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1933,7 +1933,7 @@ public final class CraftServer implements Server {
@@ -1992,7 +1992,7 @@ public final class CraftServer implements Server {
offers = this.tabCompleteChat(player, message);
}

View File

@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4
public ClientboundStatusResponsePacket(ServerStatus metadata) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 34e801e225173246ba6f4c2ab68ef3f5f2278d78..2bbed2eb8f992764deac2cd5e08471aa0f967606 100644
index d7ec805b7922b19e4d67288bb4eb4fc10af5166f..cc90827ca284c058f6f209cf7c9cc6ca8b8be29d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2,6 +2,9 @@ package net.minecraft.server;
@ -203,7 +203,7 @@ index 34e801e225173246ba6f4c2ab68ef3f5f2278d78..2bbed2eb8f992764deac2cd5e08471aa
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1313,7 +1316,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1328,7 +1331,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (i - this.lastServerStatus >= 5000000000L) {
this.lastServerStatus = i;
this.status.setPlayers(new ServerStatus.Players(this.getMaxPlayers(), this.getPlayerCount()));
@ -236,7 +236,7 @@ index 9baa56d6da9c24706f1dbc8851fd68ca752cab26..d65191a50349ec86fe35df4ac1070f94
// CraftBukkit end
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index e7586c325290ceb8669f9f9d430c73080a37dd05..314fa148fe783a0558ba00b068e0bf69a91577e1 100644
index d73dfe72a54b621c0f944c90904df3e3bc709445..8e7630de11637a75a4a54a22283cbb2d0c7e6438 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -289,7 +289,7 @@ public class SpigotConfig

View File

@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f3461229c19ad011e33b2d0e2675622e1f339bcb..ac431c5b9a05a9aa65351092534298141f506fb8 100644
index ad2b2e17125408712a247457db167ef6bf3e354e..063c6f78c6813d5f49ea6f15e23cfb7aa4adbc2f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1591,6 +1591,25 @@ public final class CraftServer implements Server {
@@ -1650,6 +1650,25 @@ public final class CraftServer implements Server {
return recipients.size();
}

View File

@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 160da347ed52739e930044fe456a4dd36e561a43..d06fa20dd605e9ce0e41a4d69ffeec98bceb3a63 100644
index 2aecd5ce8e5db8c0fc54bc0c86759baaaa4bd615..22c6d606256708ff9142569e745e58b608da62a6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1242,12 +1242,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -34,10 +34,10 @@ index 160da347ed52739e930044fe456a4dd36e561a43..d06fa20dd605e9ce0e41a4d69ffeec98
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 1e96978cb4abf92eadd570bcda6a04ac76793e30..39412e473be4d138d789cabe27f4b64b00f23a97 100644
index f5cc3134edfc56885b53fa2efbbff1ab24955f0f..d6a9f43b72d8b135734a17946cb0482c9dffbaec 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2404,11 +2404,17 @@ public class CraftWorld implements World {
@@ -1721,11 +1721,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) {

View File

@ -7,18 +7,18 @@ This API has more capabilities than .dropItem with the Consumer function
Item can be set inside of the Consumer pre spawn function.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 18e4c893f86cdaf816e5d88416fe3fe7be953bc5..1aab57f7eabc1acce9827017fde7daf382b46dce 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1508,6 +1508,10 @@ public class CraftWorld implements World {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index eca9a9eb3d8dcd51ee9e96f2f4050bf51bc58b48..aea3fafb093814bfb1e010aa70d138eecc07af93 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -525,6 +525,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
if (Boat.class.isAssignableFrom(clazz)) {
entity = new net.minecraft.world.entity.vehicle.Boat(this.world, x, y, z);
entity = new net.minecraft.world.entity.vehicle.Boat(world, x, y, z);
entity.moveTo(x, y, z, yaw, pitch);
+ // Paper start
+ } else if (org.bukkit.entity.Item.class.isAssignableFrom(clazz)) {
+ entity = new ItemEntity(world, x, y, z, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Item.byBlock(net.minecraft.world.level.block.Blocks.DIRT)));
+ entity = new net.minecraft.world.entity.item.ItemEntity(world, x, y, z, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Item.byBlock(net.minecraft.world.level.block.Blocks.DIRT)));
+ // Paper end
} else if (FallingBlock.class.isAssignableFrom(clazz)) {
entity = new FallingBlockEntity(this.world, x, y, z, this.world.getBlockState(new BlockPos(x, y, z)));
entity = new FallingBlockEntity(world, x, y, z, this.getHandle().getBlockState(new BlockPos(x, y, z)));
} else if (Projectile.class.isAssignableFrom(clazz)) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 379612cb78d275fa61125390c7429fcb2920ab33..efdcccac85626835ff29ed00976978d5bb900356 100644
index 84f11780a22b3369519fc8f80d6c274360045df7..4b43e6a1b628e2060d1095dab892efd9d1dfc485 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -172,6 +172,13 @@ public final class CraftItemStack extends ItemStack {
@@ -173,6 +173,13 @@ public final class CraftItemStack extends ItemStack {
return (this.handle == null) ? Material.AIR.getMaxStackSize() : this.handle.getItem().getMaxStackSize();
}

View File

@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle()
However, replaced it too to make it clearer of intent.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 2840228aa6aa8f1559b976d396aa9d1f8f4d6a40..84316ea7f1ad285009f02cdf6e501c577958a170 100644
index edf381a0fd8a568fb2095a0369c3eb062e9a566b..8b776445716e483e040be165c18118593a63d694 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -786,14 +786,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -791,14 +791,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return false;
}
final CraftEntity other = (CraftEntity) obj;

View File

@ -19,7 +19,7 @@ index a0a846a2e60bdc17537bd697137f65321c1a61d8..e1110274a9f6b8f7007537732ec8eff7
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 571ca7409cdce36ce228c7f3ebf2bce7a87897df..0a954a83e29f2ffc622675f671416bdadc1d3f6a 100644
index 2c68fb49040dcb1b6acead188fa9094180577aa7..3be95347badafc35990f5fbb1c0be77b8702bc64 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3668,12 +3668,24 @@ public abstract class LivingEntity extends Entity {
@ -49,10 +49,10 @@ index 571ca7409cdce36ce228c7f3ebf2bce7a87897df..0a954a83e29f2ffc622675f671416bda
return this.isShiftKeyDown();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 7beb84da34e58b18cd83a53eab2bcf703e8bf35e..d9f06a7ff7c6b4c60ddbc5d7131916fabd0fc4d2 100644
index 90b70935242757b5c302bac7777eb1428d69619e..1ffdc8785d1073511e58d4826457efa9d71c357d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -712,5 +712,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -735,5 +735,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setArrowsStuck(int arrows) {
getHandle().setArrowCount(arrows);
}

View File

@ -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 1aab57f7eabc1acce9827017fde7daf382b46dce..9b9dc5b8e5c2ce6ab4876067374e24d6cbf2fa12 100644
index d6a9f43b72d8b135734a17946cb0482c9dffbaec..1200a6ddf67643250bb3386190bb2f6538abe52e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -892,6 +892,12 @@ public class CraftWorld implements World {
@@ -686,6 +686,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;
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d9f06a7ff7c6b4c60ddbc5d7131916fabd0fc4d2..0aec2e79d053b6cb845ffea393ad431b3d254b83 100644
index 1ffdc8785d1073511e58d4826457efa9d71c357d..918f87cc79062602e1db41d9368921c0092b1840 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -722,5 +722,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -745,5 +745,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setShieldBlockingDelay(int delay) {
getHandle().setShieldBlockingDelay(delay);
}

View File

@ -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 9b9dc5b8e5c2ce6ab4876067374e24d6cbf2fa12..dac119e71c53f246944b3d2072f1fa7d6c8fa828 100644
index 1200a6ddf67643250bb3386190bb2f6538abe52e..a049c5b10db3ebc3f5a27b3510d09075d2bccf2a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1298,6 +1298,15 @@ public class CraftWorld implements World {
@@ -1020,6 +1020,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return list;
}

View File

@ -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 ea9f165a958c507ef57523e7cfbccbea77aef6d9..7ce7660bcd6cdc23d6d06c9009a96a08e637ccbd 100644
index 06ee6000f53da50e7883a68208bdb5f839632f94..1d9b91e6c7180e4a7db03a01c7ec5f799f5ab983 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2809,7 +2809,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2810,7 +2810,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
public String toString() {

View File

@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set.
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 3cf23bc0a28ac5f4ac7b51f427f17365eaff8cc1..f02bbc2e927ea2d8e861597da4dbe4d199e48799 100644
index 4b43e6a1b628e2060d1095dab892efd9d1dfc485..e9fa60755da0bc358020266ff4e450e1b31da595 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -575,7 +575,7 @@ public final class CraftItemStack extends ItemStack {
@@ -576,7 +576,7 @@ public final class CraftItemStack extends ItemStack {
@Override
public boolean hasItemMeta() {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add hand to bucket events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 19f8e74f292e83f7438683efddbaa4930f1a7c48..4e0e5d3e0b91d4b7be4eaa6fe252287d90bc010e 100644
index c4bb49f8007169f62deeef19ccce2b907d961374..68e0d76aed7e993c35ac2e73dda6ed251a817d39 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1374,15 +1374,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -62,19 +62,19 @@ index 454e07a47d35b8dc8e5f1fb38da74669b4f7cdc7..15787afad42f9299638a1c9e57d26678
if (event.isCancelled()) {
return InteractionResult.PASS;
diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java
index 24272b384b96bb98a8231fe8583f404ad0c96de5..7c3e94c6bf8337ef660473d8ed451606d56082a5 100644
index 5870023250ed2dba16b2fa5c6a8be6f36cebc640..650b59b69eb12112bc71e5ff164767e3118e1c2a 100644
--- a/src/main/java/net/minecraft/world/item/BucketItem.java
+++ b/src/main/java/net/minecraft/world/item/BucketItem.java
@@ -71,7 +71,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
BucketPickup ifluidsource = (BucketPickup) iblockdata.getBlock();
@@ -72,7 +72,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
// CraftBukkit start
ItemStack dummyFluid = ifluidsource.pickupBlock(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata);
if (dummyFluid.isEmpty()) return InteractionResultHolder.fail(itemstack); // Don't fire event if the bucket won't be filled.
- PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((ServerLevel) world, user, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.getItem());
+ PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((ServerLevel) world, user, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.getItem(), hand); // Paper - add enumhand
if (event.isCancelled()) {
((ServerPlayer) user).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager)
@@ -102,7 +102,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -103,7 +103,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
iblockdata = world.getBlockState(blockposition);
BlockPos blockposition2 = iblockdata.getBlock() instanceof LiquidBlockContainer && this.content == Fluids.WATER ? blockposition : blockposition1;
@ -83,7 +83,7 @@ index 24272b384b96bb98a8231fe8583f404ad0c96de5..7c3e94c6bf8337ef660473d8ed451606
this.checkExtraContent(user, world, itemstack, blockposition2);
if (user instanceof ServerPlayer) {
CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayer) user, blockposition2, itemstack);
@@ -129,10 +129,12 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -130,10 +130,12 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@Override
public boolean emptyContents(@Nullable Player player, Level world, BlockPos pos, @Nullable BlockHitResult hitResult) {
@ -98,7 +98,7 @@ index 24272b384b96bb98a8231fe8583f404ad0c96de5..7c3e94c6bf8337ef660473d8ed451606
// CraftBukkit end
if (!(this.content instanceof FlowingFluid)) {
return false;
@@ -145,7 +147,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -146,7 +148,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
// CraftBukkit start
if (flag1 && entityhuman != null) {
@ -107,7 +107,7 @@ index 24272b384b96bb98a8231fe8583f404ad0c96de5..7c3e94c6bf8337ef660473d8ed451606
if (event.isCancelled()) {
((ServerPlayer) entityhuman).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-4238: needed when looking through entity
((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
@@ -154,7 +156,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
@@ -155,7 +157,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
}
// CraftBukkit end
if (!flag1) {
@ -117,7 +117,7 @@ index 24272b384b96bb98a8231fe8583f404ad0c96de5..7c3e94c6bf8337ef660473d8ed451606
int i = blockposition.getX();
int j = blockposition.getY();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 1fef077a6d5efc8bdc171b5c6e2a49129f8589ce..ac46dac8be79953720fab6485caf677f2c3ad87b 100644
index 17f596e6059334114ce3ee17fbde1ce3d14c5ca1..96c685ffbf6058b69f0c573a1255a9e8596365bf 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -292,6 +292,17 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -139,7 +139,7 @@ index 1fef077a6d5efc8bdc171b5c6e2a49129f8589ce..ac46dac8be79953720fab6485caf677f
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 ce01df5dbb4913b9620a1bab3c0a251defb99f75..0ddd9de39a0d67529a8f973f5dfaf5ff53f5eb66 100644
index b7fbbe39bc36f5315abe658b00704836a40d34ca..732a6f247e25e245909829d9fa784fced1d3cca2 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -222,7 +222,7 @@ public class CraftEventFactory {

View File

@ -36,10 +36,10 @@ index 7e4ac2699eca8aebba675f3ffdac3a4dad422e4c..96366bfb03e1bc57a10154c13341a80c
public static int tabSpamLimit = 500;
private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2bbed2eb8f992764deac2cd5e08471aa0f967606..d0d524bfe7ae90f6d2edefa4063bf009cddee17b 100644
index cc90827ca284c058f6f209cf7c9cc6ca8b8be29d..f043bc485e2813706bce53f10775d295bb2dd5e7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1084,6 +1084,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1099,6 +1099,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.updateStatusIcon(this.status);
// Spigot start
@ -48,10 +48,10 @@ index 2bbed2eb8f992764deac2cd5e08471aa0f967606..d0d524bfe7ae90f6d2edefa4063bf009
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ac431c5b9a05a9aa65351092534298141f506fb8..f1e50f3f6d0e4876aa54b72dd474d238cd91f9b6 100644
index 063c6f78c6813d5f49ea6f15e23cfb7aa4adbc2f..f18a48b83e848a166a7d99f1937493df25d3e11d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -815,6 +815,7 @@ public final class CraftServer implements Server {
@@ -821,6 +821,7 @@ public final class CraftServer implements Server {
@Override
public void reload() {
@ -59,7 +59,7 @@ index ac431c5b9a05a9aa65351092534298141f506fb8..f1e50f3f6d0e4876aa54b72dd474d238
this.reloadCount++;
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
@@ -930,6 +931,7 @@ public final class CraftServer implements Server {
@@ -936,6 +937,7 @@ public final class CraftServer implements Server {
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b0881f67ca05 100644
index f1b0e8f3de0b54837770a49d2c663ebf6915d8be..28e03ed12848cba961aaae1b04b25b1e724a728b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
@@ -44,6 +44,12 @@ import net.minecraft.world.level.biome.Biomes;
@ -41,7 +41,7 @@ index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b088
this.wasOnGround = nbt.getBoolean("wasOnGround");
}
@@ -453,7 +465,7 @@ public class Slime extends Mob implements Enemy {
@@ -454,7 +466,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@ -50,7 +50,7 @@ index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b088
}
@Override
@@ -480,7 +492,15 @@ public class Slime extends Mob implements Enemy {
@@ -481,7 +493,15 @@ public class Slime extends Mob implements Enemy {
public boolean canUse() {
LivingEntity entityliving = this.slime.getTarget();
@ -67,7 +67,7 @@ index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b088
}
@Override
@@ -493,7 +513,15 @@ public class Slime extends Mob implements Enemy {
@@ -494,7 +514,15 @@ public class Slime extends Mob implements Enemy {
public boolean canContinueToUse() {
LivingEntity entityliving = this.slime.getTarget();
@ -84,7 +84,7 @@ index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b088
}
@Override
@@ -501,6 +529,13 @@ public class Slime extends Mob implements Enemy {
@@ -502,6 +530,13 @@ public class Slime extends Mob implements Enemy {
this.slime.lookAt((Entity) this.slime.getTarget(), 10.0F, 10.0F);
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setDirection(this.slime.getYRot(), this.slime.isDealsDamage());
}
@ -98,7 +98,7 @@ index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b088
}
private static class SlimeRandomDirectionGoal extends Goal {
@@ -516,14 +551,18 @@ public class Slime extends Mob implements Enemy {
@@ -517,14 +552,18 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@ -119,7 +119,7 @@ index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b088
}
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setDirection(this.chosenDegrees, false);
@@ -541,7 +580,7 @@ public class Slime extends Mob implements Enemy {
@@ -542,7 +581,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@ -128,7 +128,7 @@ index 2dbdc97bbc0f0960896528cfade12919fde137c4..6ac78ec82b6176771ab024e0c928b088
}
@Override
@@ -549,4 +588,15 @@ public class Slime extends Mob implements Enemy {
@@ -550,4 +589,15 @@ public class Slime extends Mob implements Enemy {
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setWantedMovement(1.0D);
}
}

View File

@ -29,10 +29,10 @@ index 3bbf6c9bfbb79fd4242cf66d7ace1d8f87404636..e8c36e8541f041a0d72a86f49ced2a3c
public boolean canDropMobsSkull() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
index 9b0079eac44b7b4e2ff45be92244ae1b81c46241..0cb5bb2d571a4b618515bc6d80935be90cbd26a8 100644
index ea9dc2219cdff3976796e4848b0faa278656be63..63a8188010f045d5c17a1ecb63e8081ec86c2960 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
@@ -100,4 +100,16 @@ public class CraftCreeper extends CraftMonster implements Creeper {
@@ -94,4 +94,16 @@ public class CraftCreeper extends CraftMonster implements Creeper {
public EntityType getType() {
return EntityType.CREEPER;
}

View File

@ -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 dac119e71c53f246944b3d2072f1fa7d6c8fa828..ce723a4340202c16eaf7544f77c1075c4f277cb9 100644
index a049c5b10db3ebc3f5a27b3510d09075d2bccf2a..d99d019df02f8defb6c5c9082b8c650231c20775 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -508,7 +508,7 @@ public class CraftWorld implements World {
@@ -367,7 +367,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

View File

@ -2299,10 +2299,10 @@ index fb0b3c5770f66cc3590f5ac4e690a33cb6179be3..7ce854edba32ffcafaa5268d4bb2822a
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataFixers.getDataFixer(), minecraftsessionservice, gameprofilerepository, usercache, LoggerChunkProgressListener::new);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d0d524bfe7ae90f6d2edefa4063bf009cddee17b..7671731bee6df3766127448e0ee983970b94230e 100644
index f043bc485e2813706bce53f10775d295bb2dd5e7..a727b0305b2dfb92c763ea1b31d85769868cfed2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -984,7 +984,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -999,7 +999,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getProfileCache().save(false); // Paper
}
// Spigot end
@ -2802,7 +2802,7 @@ index 918555ba0af8a779ad55c7cf73f615eb804d00d9..c0bde909755190603e9b4946fe924ba1
} finally {
chunkMap.callbackExecutor.run();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index a67905f4cc6ade36b17eeb6c77d00f4837c42c86..1bd378a60e761f9aeca347ebb80546ef4cf58eb4 100644
index 9d4552eed81570e6329e036ac122b21f72000d96..80e440d7397c0155213109a2ad0e1edeb49bbc59 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -206,6 +206,79 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -2883,7 +2883,7 @@ index a67905f4cc6ade36b17eeb6c77d00f4837c42c86..1bd378a60e761f9aeca347ebb80546ef
+ // Paper end
+
// Add env and gen to constructor, WorldData -> WorldDataServer
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey<Level> resourcekey, DimensionType dimensionmanager, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, ServerLevelData iworlddataserver, ResourceKey<Level> resourcekey, DimensionType dimensionmanager, ChunkProgressListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
@@ -277,6 +350,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -3619,10 +3619,10 @@ index e5e138fb23d03eb63e547e74d3e14ec9d96d8107..90f7b06bd2c558be35c4577044fa033e
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9128b6db3f28f168864345ca354707e37a77faaa..8a244988f984e7cb9df7308b21aec1524fbef3f1 100644
index d99d019df02f8defb6c5c9082b8c650231c20775..5d0e56a2c8fb6f801643928f8b75e06cdff83a52 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2471,6 +2471,34 @@ public class CraftWorld implements World {
@@ -1784,6 +1784,34 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public DragonBattle getEnderDragonBattle() {
return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight());
}
@ -3658,7 +3658,7 @@ index 9128b6db3f28f168864345ca354707e37a77faaa..8a244988f984e7cb9df7308b21aec152
// Spigot start
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 50e2cbade05dd299ef60bea4f835f9bf6df88f44..7e0986e085895ad046685771acb9e4374c5cfe89 100644
index 8b776445716e483e040be165c18118593a63d694..3980197b7e876ffea27c183121a8e58409ecc4a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -15,6 +15,7 @@ import net.minecraft.network.chat.Component;

View File

@ -28,7 +28,7 @@ index 49fd3486a6c595749f33bbe1c1bec0454e4725c5..5c290f263fc2b643987c96ea75729bf1
switch (enumDirection) {
case DOWN:
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 91a0699ba30fa1e9c8172e07f034ea1fabee9d11..616d6404a966153f89ae63b559b5b66cbb832104 100644
index bfec0ae49c74ec5f6762140199cbfaf9e87a047c..4bc467f5c0fd261a01fd4ecc49015b6e7d6b6ef9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3689,6 +3689,23 @@ public abstract class LivingEntity extends Entity {
@ -56,10 +56,10 @@ index 91a0699ba30fa1e9c8172e07f034ea1fabee9d11..616d6404a966153f89ae63b559b5b66c
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 0391f0d240b8846806b60adfb1e3589ac4cbe893..856860c502a3bf91faf9d075326c9ea39db44d9e 100644
index 918f87cc79062602e1db41d9368921c0092b1840..873b70c36d145a14632102c9e92d501745064fa4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -190,6 +190,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -198,6 +198,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return blocks.get(0);
}

View File

@ -163,10 +163,10 @@ index 31d4431a60e742e2ca3b1a2abcce33954f599488..f4b6c2bf74884c0b53956788dcfcca78
public Path(List<Node> nodes, BlockPos target, boolean reachesTarget) {
this.nodes = nodes;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index 71872fdfafca82cf745eecee4bf984726d49f5a4..9c9fa83615cd06539ce5e4e3d4feaa69f65b7931 100644
index ee84ae1baf959a496a4228edab89b9c0079bc615..140672d03dd2563d2b1fb905d79164ff53cf0b76 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -11,8 +11,11 @@ import org.bukkit.loot.LootTable;
@@ -12,8 +12,11 @@ import org.bukkit.loot.LootTable;
public abstract class CraftMob extends CraftLivingEntity implements Mob {
public CraftMob(CraftServer server, net.minecraft.world.entity.Mob entity) {
super(server, entity);
@ -177,4 +177,4 @@ index 71872fdfafca82cf745eecee4bf984726d49f5a4..9c9fa83615cd06539ce5e4e3d4feaa69
+ @Override public com.destroystokyo.paper.entity.Pathfinder getPathfinder() { return paperPathfinder; } // Paper
@Override
public void setTarget(LivingEntity target) {
net.minecraft.world.entity.Mob entity = this.getHandle();
Preconditions.checkState(!this.getHandle().generation, "Cannot set target during world generation");

View File

@ -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 03a7e5d61d8888e1e836bd5a69ee9443b723f72c..01e63133d769e3d5c33944907a04ce4def8bbb45 100644
index 5d0e56a2c8fb6f801643928f8b75e06cdff83a52..4edfe886ae753f1c9e90be2bff69483c330287ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -868,6 +868,13 @@ public class CraftWorld implements World {
@@ -662,6 +662,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
}
@ -23,10 +23,10 @@ index 03a7e5d61d8888e1e836bd5a69ee9443b723f72c..01e63133d769e3d5c33944907a04ce4d
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 9c9fa83615cd06539ce5e4e3d4feaa69f65b7931..317b6abd2764cf34ef5c42bdbf48ab0bc5a03d27 100644
index 140672d03dd2563d2b1fb905d79164ff53cf0b76..e0022ea4bf228eef8384f20cfc717076c5ca5c99 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -77,4 +77,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
@@ -80,4 +80,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
public long getSeed() {
return this.getHandle().lootTableSeed;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 676d24a1c57b5d3d14c3599d09196da128b6e19e..ef3b47c30e9fa0a41268b61d3008507587999aa6 100644
index 82d6d56d6e1bc6f98811a4a9b2a9d80a62c61292..1c97ba35c9588b98d66e82ca83e4c48615b9e01b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@ -56,7 +56,7 @@ index 676d24a1c57b5d3d14c3599d09196da128b6e19e..ef3b47c30e9fa0a41268b61d30085075
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 856860c502a3bf91faf9d075326c9ea39db44d9e..e9795e569b5aa8aa639d6a4e0b6789f9681cd73d 100644
index 873b70c36d145a14632102c9e92d501745064fa4..c396ad36084e46c4b812d970e07a9188aed16daf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1,5 +1,6 @@
@ -66,7 +66,7 @@ index 856860c502a3bf91faf9d075326c9ea39db44d9e..e9795e569b5aa8aa639d6a4e0b6789f9
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
import java.util.ArrayList;
@@ -210,6 +211,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -218,6 +219,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().level, ((net.minecraft.world.phys.BlockHitResult)rayTrace).getBlockPos()),
net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.world.phys.BlockHitResult)rayTrace).getDirection()));
}

View File

@ -225,10 +225,10 @@ index 39bdda56aaa5503efc15207261634127b462c3e7..3fd913f3e963cf2da849a52364356e3b
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f1e50f3f6d0e4876aa54b72dd474d238cd91f9b6..e388a319a311e81dcddf83d3984af35b55f0c6ab 100644
index f18a48b83e848a166a7d99f1937493df25d3e11d..a2acf9c1969fd3d365276421d63aae6617a52dc4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -688,7 +688,7 @@ public final class CraftServer implements Server {
@@ -694,7 +694,7 @@ public final class CraftServer implements Server {
@Override
public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations

View File

@ -67,10 +67,10 @@ index 65e0ca442980f273d2fe5f131e174cd92f80da20..81f4f26a6b83079d36acd1fd86dede0e
return executorService;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7671731bee6df3766127448e0ee983970b94230e..18e272de9238c0b0cbc2182b18bfcb98f6218d17 100644
index a727b0305b2dfb92c763ea1b31d85769868cfed2..8b81f618598a4a95e4cb19c3e65b7e6d03459530 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -314,6 +314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -316,6 +316,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
atomicreference.set(s0);

View File

@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 18e272de9238c0b0cbc2182b18bfcb98f6218d17..df69838ab551d9b7e47785abd0a5acea869ab9c5 100644
index 8b81f618598a4a95e4cb19c3e65b7e6d03459530..a5a48c0450cd3f15c2bc49f45487da9573a4dec3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1389,12 +1389,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1404,12 +1404,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Make the default permission message configurable
TODO: Change the message in PaperCommand
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 94dc0fe5f5fe44d066847752ecd7e91f1bef35de..670867c0a530b0b276abd0657921c125d009780f 100644
index cdec195a7aab9195c07ebfbba4f25b27a319ca6e..26de4e9daf0826b97a5f12304d7691dc815feee8 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -20,6 +20,7 @@ import java.util.regex.Pattern;
@ -30,10 +30,10 @@ index 94dc0fe5f5fe44d066847752ecd7e91f1bef35de..670867c0a530b0b276abd0657921c125
Object val = config.get("settings.save-player-data");
if (val instanceof Boolean) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e388a319a311e81dcddf83d3984af35b55f0c6ab..bdaf6f35df2066b1626c6c52683c5468d9948aec 100644
index a2acf9c1969fd3d365276421d63aae6617a52dc4..5ce7eba5d2a66d545034526d022eb12e46962d30 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2423,6 +2423,11 @@ public final class CraftServer implements Server {
@@ -2482,6 +2482,11 @@ public final class CraftServer implements Server {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
}

View File

@ -41,10 +41,10 @@ index 1fb1755706bac5633094ca7f17744bd46a9e87ee..fcbc5019e5f9a9aca56abc0f684dbb54
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 103a0eb2580384d50eda74da83fbc64f5e6dd7cd..70f18293c5b6f6a8f9e83048a393cb21dbb04164 100644
index 8d671a4649343b4de88cfd8d51ad63a7f1aa68ad..a1ead61eaeaf4e3c2c0aa744891fc88c951a0689 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2239,12 +2239,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2240,12 +2240,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
@ -62,7 +62,7 @@ index 103a0eb2580384d50eda74da83fbc64f5e6dd7cd..70f18293c5b6f6a8f9e83048a393cb21
}
}
@@ -2307,7 +2310,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2308,7 +2311,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
return true; // CraftBukkit
}
@ -74,7 +74,7 @@ index 103a0eb2580384d50eda74da83fbc64f5e6dd7cd..70f18293c5b6f6a8f9e83048a393cb21
if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
@@ -2317,7 +2323,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2318,7 +2324,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) this.getBukkitEntity(),
@ -83,7 +83,7 @@ index 103a0eb2580384d50eda74da83fbc64f5e6dd7cd..70f18293c5b6f6a8f9e83048a393cb21
);
// Suppress during worldgen
if (this.valid) {
@@ -2331,7 +2337,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2332,7 +2338,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
// CraftBukkit end
// Spigot start
@ -93,7 +93,7 @@ index 103a0eb2580384d50eda74da83fbc64f5e6dd7cd..70f18293c5b6f6a8f9e83048a393cb21
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index da90cd890cbe702565daa485141ce5a680511192..6927e6aa94ca509eef70fea6a489840f1e1f47a1 100644
index 1c97ba35c9588b98d66e82ca83e4c48615b9e01b..04a979eb45b903eb0411b996ef4fc9d889983b5d 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3335,11 +3335,13 @@ public abstract class LivingEntity extends Entity {

View File

@ -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 1bd378a60e761f9aeca347ebb80546ef4cf58eb4..4f53eb165616d690683a35d64abdf741f690a2a0 100644
index 80e440d7397c0155213109a2ad0e1edeb49bbc59..62a1a4f40763f3628ba16b218e406817c05be09c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1072,6 +1072,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -35,7 +35,7 @@ index 2c17e723a1b1613c06b53c1e426c4ce1c072e8ad..abba62b7252c6d6ee92a4b1a9b23df77
});
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 70f18293c5b6f6a8f9e83048a393cb21dbb04164..1d8eb407c892e4c635f11070036013587a9264cb 100644
index a1ead61eaeaf4e3c2c0aa744891fc88c951a0689..508e83183bafacac0fa7469ae50123ed26898120 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -67,6 +67,8 @@ import net.minecraft.world.InteractionHand;
@ -55,7 +55,7 @@ index 70f18293c5b6f6a8f9e83048a393cb21dbb04164..1d8eb407c892e4c635f1107003601358
// Paper end
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
@@ -1865,6 +1868,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -1866,6 +1869,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -65,7 +65,7 @@ index 70f18293c5b6f6a8f9e83048a393cb21dbb04164..1d8eb407c892e4c635f1107003601358
// Save entity's from mob spawner status
if (spawnedViaMobSpawner) {
nbt.putBoolean("Paper.FromMobSpawner", true);
@@ -2010,6 +2016,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2011,6 +2017,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@ -105,10 +105,10 @@ index 494174608c0c6d0e0d9820ad4f263bef90c3dfdf..fe5e691ebbe930662f8a4f00811fdd8e
// Spigot Start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 7e0986e085895ad046685771acb9e4374c5cfe89..ec929f74405a6a1e770986474715d9dc65b951ab 100644
index 3980197b7e876ffea27c183121a8e58409ecc4a7..c2e9f30379cd7458dc18585053faac8c593bbfa2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1191,5 +1191,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1196,5 +1196,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean fromMobSpawner() {
return getHandle().spawnedViaMobSpawner;
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index df69838ab551d9b7e47785abd0a5acea869ab9c5..8908b61dc601dc8fd16976df350197ff1d3e3bd7 100644
index a5a48c0450cd3f15c2bc49f45487da9573a4dec3..8415342e178ab61660321570454815eb418b5282 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1312,6 +1312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1327,6 +1327,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
// Paper end
@ -17,7 +17,7 @@ index df69838ab551d9b7e47785abd0a5acea869ab9c5..8908b61dc601dc8fd16976df350197ff
++this.tickCount;
this.tickChildren(shouldKeepTicking);
@@ -1355,6 +1356,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1370,6 +1371,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// Paper end

View File

@ -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 01e63133d769e3d5c33944907a04ce4def8bbb45..1adcb0a90fb1e8318223a51637ce83a50efe6213 100644
index 4edfe886ae753f1c9e90be2bff69483c330287ae..ef9779a35d6102b5977dda0c68d4ca311d7298ad 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -343,6 +343,29 @@ public class CraftWorld implements World {
@@ -202,6 +202,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return this.getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING);
}

View File

@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
synchronously when the server gets shut down.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8908b61dc601dc8fd16976df350197ff1d3e3bd7..85477d81a38aefa09f95671951cd06da713fd79c 100644
index 8415342e178ab61660321570454815eb418b5282..a2d93627dd241e05699ef5a4b52d0efa3a09a51f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2264,7 +2264,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2279,7 +2279,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
@Override
public boolean isSameThread() {
@ -29,10 +29,10 @@ index 8908b61dc601dc8fd16976df350197ff1d3e3bd7..85477d81a38aefa09f95671951cd06da
public boolean isDebugging() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bdaf6f35df2066b1626c6c52683c5468d9948aec..4279eb8c20b546247c27a3a7fd4713e26d91ed5b 100644
index 5ce7eba5d2a66d545034526d022eb12e46962d30..fbb4177c4ca094f93adb99c9a69258535053cbb7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1922,7 +1922,7 @@ public final class CraftServer implements Server {
@@ -1981,7 +1981,7 @@ public final class CraftServer implements Server {
@Override
public boolean isPrimaryThread() {

View File

@ -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 1adcb0a90fb1e8318223a51637ce83a50efe6213..3e2ab97daf807a6cc3502214f85559ecd21c59f7 100644
index ef9779a35d6102b5977dda0c68d4ca311d7298ad..642c0d98f3fc8a4a4caf75f4e67dfaadbde7dd70 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -414,13 +414,13 @@ public class CraftWorld implements World {
@@ -273,13 +273,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean isChunkLoaded(int x, int z) {

Some files were not shown because too many files have changed in this diff Show More