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

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:
d264e972 #591: Add option for a consumer before spawning an item
1c537fce #590: Add spawn and transform reasons for piglin zombification.

CraftBukkit Changes:
ee5006d1 #810: Add option for a consumer before spawning an item
f6a39d3c #809: Add spawn and transform reasons for piglin zombification.
0c24068a Organise imports

Spigot Changes:
bff52619 Organise imports
This commit is contained in:
Josh Roy 2021-03-08 18:12:31 -05:00 committed by GitHub
parent a52b30814f
commit b31089a929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
220 changed files with 940 additions and 937 deletions

View File

@ -822,7 +822,7 @@ 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 b8a33ac504da73ec990550bdd23e4548f6ccba95..27faaf8d1101f8522b728e3d73833e4dddbf1715 100644
index fd2af5fded9335602e263a2098760da0e64a87a3..44f01a3d8a461acab187367fc8876e0b73c92386 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;
@ -834,7 +834,7 @@ index b8a33ac504da73ec990550bdd23e4548f6ccba95..27faaf8d1101f8522b728e3d73833e4d
/**
* Gets the {@link Block} at the given coordinates
@@ -616,6 +616,14 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -640,6 +640,14 @@ public interface World extends PluginMessageRecipient, Metadatable {
@NotNull
public List<Player> getPlayers();

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 789e070f6aee83e4b6426def784e05df98e1bc65..96e985eb98ab620e315aec13222b8f0334e5fe0a 100644
index 0f86a9c67797fd662cbbfdb808789bcab95caba4..cae848ce698337d0b254bd48938abfc1e68ad561 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 789e070f6aee83e4b6426def784e05df98e1bc65..96e985eb98ab620e315aec13222b8f03
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
@@ -635,6 +638,256 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -659,6 +662,256 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@NotNull
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);

View File

@ -515,10 +515,10 @@ index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c5217
* 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 ed7d484416f127467c2898411564937f256d8861..7a96670447fde144e2263d107771e01cd642aaf4 100644
index cae848ce698337d0b254bd48938abfc1e68ad561..05643d0f2bf2cb2dedb0a2ad693b2121565d3f1f 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2559,7 +2559,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -2583,7 +2583,57 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
* @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 4cf22afc3c1f1cc19b6e5350043431215908a612..af2ee43f2c5133668c18710f526a107d
* 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 7a96670447fde144e2263d107771e01cd642aaf4..608e57d92d93aef163bcb91c7fb63339b1672945 100644
index 05643d0f2bf2cb2dedb0a2ad693b2121565d3f1f..c7cdbc36f96a8ee9eaac2a2145afbfc76bc38cc9 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1418,6 +1418,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -1442,6 +1442,88 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
*/
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 432367560c572e3fa77c4c36cde5bf7d7e157846..9c4f2d9e1a4011e3a9860d913e1a718030696bed 100644
index c7cdbc36f96a8ee9eaac2a2145afbfc76bc38cc9..edf136ef50c9cdd8ccea2e35508e4464c3de99bd 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -922,6 +922,17 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -946,6 +946,17 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@NotNull
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);

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 ce2d4629ff39847cb21a34cc1a0868c9a4d3cdb9..cac7a083b439414ae269edc9df4dc242dfaf5b59 100644
index ec8e3a949a869545a8e0cb8c2f59f1a6dd8f5485..ce1a3de1d03e10b18c0098ee2778361cc9a4cb01 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1788,6 +1788,16 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -1812,6 +1812,16 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
*/
public void setFullTime(long time);

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 5c004fddaaeb41f966ace1e169103ecfb082a197..eb2b5ae9b66f8ce8adc548f0913c54729a822018 100644
index daa8e7a3eacfe4583166313727ac550c9775ebb8..476184db904d8a2e1347e1219e8ba196bf4da5cb 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3414,6 +3414,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -3438,6 +3438,34 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
int getViewDistance();
// Spigot end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Spawn Reason API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index eb2b5ae9b66f8ce8adc548f0913c54729a822018..6441d4e45e5d5f008f95233cdc34048b8be38592 100644
index 476184db904d8a2e1347e1219e8ba196bf4da5cb..c1010e314144a65e12eaf5514d639a87f45891a9 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -1,6 +1,8 @@
@ -17,7 +17,7 @@ index eb2b5ae9b66f8ce8adc548f0913c54729a822018..6441d4e45e5d5f008f95233cdc34048b
import org.bukkit.generator.ChunkGenerator;
import java.util.ArrayList;
@@ -2225,6 +2227,12 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -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;
@ -30,7 +30,7 @@ index eb2b5ae9b66f8ce8adc548f0913c54729a822018..6441d4e45e5d5f008f95233cdc34048b
/**
* 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.
@@ -2242,7 +2250,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
@@ -2266,7 +2274,28 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad
* {@link Entity} requested cannot be spawned
*/
@NotNull

View File

@ -485,10 +485,10 @@ index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d55
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f7e1d35b69906f165adbf346e28047d2b44862c0..cd260f0cbde31b5127bf3a73b9c946746defc348 100644
index 5ead0146ca3c11c53875d323ffd22fe8e055fa7f..2c8674fbdb76a03e87f94779c30e871962de1f4c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1556,9 +1556,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1558,9 +1558,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
ResourcePackRepository resourcepackrepository = this.resourcePackRepository;
this.resourcePackRepository.getClass();

View File

@ -3101,7 +3101,7 @@ index e01bc3cdbf382cf61add297b871ba8308720508d..03bfd29c12e7dd6e359481ffb56fddad
// CraftBukkit start - fire event
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c611a6e7178ec3fe3af29943b9fddc9fb154835d..8ad1256bcde950bc34aeb7f61ef9598f3b1cd2a3 100644
index 9038b28881dea326fb712528b3417a6a12dd5751..f49f66e3c128e9ce0f4edc24332f5c52cbb20d02 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -138,6 +138,7 @@ public abstract class EntityLiving extends Entity {
@ -3802,10 +3802,10 @@ index 0000000000000000000000000000000000000000..17d73ebbe51a83f79f338bdb1b366cec
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index cd260f0cbde31b5127bf3a73b9c946746defc348..472803c2d9292379a36fca681c2ab92ffb01184f 100644
index 2c8674fbdb76a03e87f94779c30e871962de1f4c..7678f69b9b9a28e6b1ac837fb9e499d8e0db1b13 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -765,6 +765,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -767,6 +767,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.convertable.getLevelName(), ioexception1);
}
// Spigot start
@ -4160,10 +4160,10 @@ index f645d3dfb57e99757e233ee2bbb51be5094203cb..985fc002fa5afc71ecd242aa8101684b
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 43168f3836eb8823f3b2046882664ba45f1be678..127c03c321e1414e0d174c8d81a7851c9da03574 100644
index 8ec2eac3646263634c1c763b7d827d25134e2938..e641f4b89b39525686bba4d1e91c4ec26a9bd681 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -101,6 +101,26 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -102,6 +102,26 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
};
// CraftBukkit end
@ -4190,7 +4190,7 @@ index 43168f3836eb8823f3b2046882664ba45f1be678..127c03c321e1414e0d174c8d81a7851c
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag);
this.visibleChunks = this.updatingChunks.clone();
@@ -190,6 +210,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -191,6 +211,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
};
}
@ -4205,7 +4205,7 @@ index 43168f3836eb8823f3b2046882664ba45f1be678..127c03c321e1414e0d174c8d81a7851c
private CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> a(ChunkCoordIntPair chunkcoordintpair, int i, IntFunction<ChunkStatus> intfunction) {
List<CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>>> list = Lists.newArrayList();
int j = chunkcoordintpair.x;
@@ -900,6 +928,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -901,6 +929,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (!flag1) {
this.chunkDistanceManager.a(SectionPosition.a((Entity) entityplayer), entityplayer);
}
@ -4213,7 +4213,7 @@ index 43168f3836eb8823f3b2046882664ba45f1be678..127c03c321e1414e0d174c8d81a7851c
} else {
SectionPosition sectionposition = entityplayer.O();
@@ -907,6 +936,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -908,6 +937,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (!flag2) {
this.chunkDistanceManager.b(sectionposition, entityplayer);
}
@ -4221,7 +4221,7 @@ index 43168f3836eb8823f3b2046882664ba45f1be678..127c03c321e1414e0d174c8d81a7851c
}
for (int k = i - this.viewDistance; k <= i + this.viewDistance; ++k) {
@@ -1017,6 +1047,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1018,6 +1048,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
}
@ -4594,7 +4594,7 @@ index 9ad17c560c8d99a396543ab9f97c34de648f6544..4bf48f77f3f7cd62a91590543f5af441
currentTask = null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index a8ce875f801edc424b5277abf7471e73ce91e3e6..f5f70c1fe31e5c533991e2c857fe8c10a83b94fc 100644
index 3c7066192ea4c05c101404bb56cbc839771f4200..09aa6809c5400ce8548ac902908b750ce7c964ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -39,6 +39,21 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot

View File

@ -92,11 +92,11 @@ index 0000000000000000000000000000000000000000..743142d0303fa25fe48a2abb07040d12
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index f002bafbf0ab5a240dd404416db87470f40e0296..b8f0653e3e82824a62dfe64348a33ab6432b4e17 100644
index 134c7a9567c97ecf206b272a0e0a28a8a7534009..c80f964aef02ac6edd0dcf9f4af9f849e8ac3da9 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -11,7 +11,7 @@ import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
@@ -13,7 +13,7 @@ import org.bukkit.inventory.InventoryHolder;
import org.spigotmc.CustomTimingsHandler; // Spigot
-public abstract class TileEntity {
@ -104,7 +104,7 @@ index f002bafbf0ab5a240dd404416db87470f40e0296..b8f0653e3e82824a62dfe64348a33ab6
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
// CraftBukkit start - data containers
@@ -19,7 +19,7 @@ public abstract class TileEntity {
@@ -21,7 +21,7 @@ public abstract class TileEntity {
public CraftPersistentDataContainer persistentDataContainer;
// CraftBukkit end
private static final Logger LOGGER = LogManager.getLogger();
@ -113,7 +113,7 @@ index f002bafbf0ab5a240dd404416db87470f40e0296..b8f0653e3e82824a62dfe64348a33ab6
@Nullable
protected World world;
protected BlockPosition position;
@@ -33,6 +33,26 @@ public abstract class TileEntity {
@@ -35,6 +35,26 @@ public abstract class TileEntity {
this.tileType = tileentitytypes;
}

View File

@ -117,10 +117,10 @@ index b8267cf23f795fd7e586b0e567037eae5048d08e..b35ffae9f88cc14aec01482c2a3ed2e2
private String entityKeyString;
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index b8f0653e3e82824a62dfe64348a33ab6432b4e17..b9ffd000c97111678d45fd55dc9c207ebadc140e 100644
index c80f964aef02ac6edd0dcf9f4af9f849e8ac3da9..43757f60d091414befe7daa192b17e2fe1ddbef9 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -53,6 +53,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
getMinecraftKey(); // Try to load if it doesn't exists.
return tileEntityKeyString;
}
@ -137,7 +137,7 @@ index b8f0653e3e82824a62dfe64348a33ab6432b4e17..b9ffd000c97111678d45fd55dc9c207e
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 2770441b13cb993b222c6bf31c11711f001b74c0..db7c4011c8b90b6daca2b48a6d9ec447d31f7197 100644
index 48747fada4f982ada8c8598fb8ba756d901b40f1..a2048d2dd71381ee5e878c87e0d727ab62756b20 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -145,6 +145,7 @@ import net.minecraft.server.EntityZombieVillager;

View File

@ -1173,19 +1173,19 @@ index 9946985407561596c6c364526d2fe7477771303a..b1fe488e41a2c9f77df091e1d14ed5c8
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145f0a7d07e 100644
index 7678f69b9b9a28e6b1ac837fb9e499d8e0db1b13..c1a651a1c2d5ffed80e4517e465901bb39274548 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.Main;
@@ -67,7 +67,7 @@ import org.bukkit.craftbukkit.Main;
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable {
@@ -119,8 +119,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -121,8 +121,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private long T;
public final Thread serverThread;
private long nextTick;
@ -1196,7 +1196,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
private final ResourcePackRepository resourcePackRepository;
private final ScoreboardServer scoreboardServer;
@Nullable
@@ -711,6 +711,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -713,6 +713,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@ -1204,7 +1204,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -908,9 +909,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -910,9 +911,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private boolean canSleepForTick() {
// CraftBukkit start
@ -1226,7 +1226,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
private void executeModerately() {
this.executeAll();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
@@ -918,9 +931,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -920,9 +933,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit end
protected void sleepForTick() {
@ -1238,7 +1238,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
});
}
@@ -1003,10 +1016,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1005,10 +1018,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
protected void exit() {}
protected void a(BooleanSupplier booleansupplier) {
@ -1258,7 +1258,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
++this.ticks;
this.b(booleansupplier);
if (i - this.T >= 5000000000L) {
@@ -1024,14 +1045,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1026,14 +1047,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -1273,7 +1273,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
}
this.methodProfiler.enter("snooper");
@@ -1044,6 +1063,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1046,6 +1065,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exit();
@ -1287,7 +1287,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
this.methodProfiler.enter("tallying");
long l = this.h[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
@@ -1054,30 +1080,29 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1056,30 +1082,29 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
@ -1326,7 +1326,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1085,7 +1110,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1087,7 +1112,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); // Add support for per player time
}
}
@ -1335,7 +1335,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@@ -1126,24 +1151,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1128,24 +1153,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exitEnter("connection");
@ -1367,7 +1367,7 @@ index 472803c2d9292379a36fca681c2ab92ffb01184f..89d3ff83f0e152e9747c554693af4145
this.methodProfiler.exit();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654fec23b673 100644
index e641f4b89b39525686bba4d1e91c4ec26a9bd681..5ca081e8be411aee98efce3e41876efe3bb2e327 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,7 +1,9 @@
@ -1380,7 +1380,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
@@ -508,11 +510,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -509,11 +511,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> f(ChunkCoordIntPair chunkcoordintpair) {
return CompletableFuture.supplyAsync(() -> {
@ -1398,7 +1398,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
boolean flag = nbttagcompound.hasKeyOfType("Level", 10) && nbttagcompound.getCompound("Level").hasKeyOfType("Status", 8);
if (flag) {
@@ -524,7 +529,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -525,7 +530,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
PlayerChunkMap.LOGGER.error("Chunk file at {} is missing level data, skipping", chunkcoordintpair);
@ -1407,7 +1407,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
} catch (ReportedException reportedexception) {
Throwable throwable = reportedexception.getCause();
@@ -561,7 +566,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -562,7 +567,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return "chunkGenerate " + chunkstatus.d();
});
return completablefuture.thenComposeAsync((either) -> {
@ -1416,7 +1416,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
try {
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> {
return this.c(playerchunk);
@@ -614,6 +619,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -615,6 +620,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
ChunkStatus chunkstatus = PlayerChunk.getChunkStatus(playerchunk.getTicketLevel());
return !chunkstatus.b(ChunkStatus.FULL) ? PlayerChunk.UNLOADED_CHUNK_ACCESS : either.mapLeft((ichunkaccess) -> {
@ -1424,7 +1424,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
Chunk chunk;
@@ -665,6 +671,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -666,6 +672,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
return chunk;
@ -1432,7 +1432,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
});
}, (runnable) -> {
Mailbox mailbox = this.mailboxMain;
@@ -1123,6 +1130,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1124,6 +1131,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker;
ObjectIterator objectiterator;
@ -1440,7 +1440,7 @@ index 127c03c321e1414e0d174c8d81a7851c9da03574..d98b6ef44e1836920956754dfcb6654f
for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) {
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
@@ -1140,16 +1148,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1141,16 +1149,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunkmap_entitytracker.e = sectionposition1;
}
}
@ -1544,7 +1544,7 @@ index 8c534c2f06fe72287364536b8767bd774b94c027..9c810b5aa21ca714ccf355d5648b7612
PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet);
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 8206523e78176f485605c35d5ff9ae63ab363a65..5b49047b820dbe1f326320b71445ac216bf688b5 100644
index 1ccc54af2feaec241b36304986e474cea5db564f..e712f33fe733b805098174558bb9319aa33572f0 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1554,7 +1554,7 @@ index 8206523e78176f485605c35d5ff9ae63ab363a65..5b49047b820dbe1f326320b71445ac21
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -955,10 +956,11 @@ public abstract class PlayerList {
@@ -950,10 +951,11 @@ public abstract class PlayerList {
}
public void savePlayers() {
@ -1617,14 +1617,13 @@ index e8ff43662b8397229cb19ea26342b66c88807379..3b8f56c0f0507ebdd9ac20be70688b4c
this.g.clear();
this.f.clear();
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index b9ffd000c97111678d45fd55dc9c207ebadc140e..f1d0e2faffb3ef27f5a41d06d0ff7d787f1098f5 100644
index 43757f60d091414befe7daa192b17e2fe1ddbef9..c8aa347baf100b25694ed9172590b073db810fe9 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
import org.bukkit.inventory.InventoryHolder;
@@ -12,10 +12,12 @@ import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
-import org.spigotmc.CustomTimingsHandler; // Spigot
import org.spigotmc.CustomTimingsHandler; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
+import co.aikar.timings.Timing; // Paper
@ -1810,11 +1809,11 @@ index 592af06de1fc02d94273363c2ede1175a39997f0..3d915105b277a7cbf330ba2cb3c2f145
// CraftBukkit start - moved from MinecraftServer.saveChunks
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a19242d717f7f9c254e6127fb2cb2f202be2d78a..351440f534653c9d315ccaf1e923e03ca6ba01f6 100644
index 9b3f9b11abe89cabb3044766dda60a8842c149f4..0e8de6b3a6acd37064209b6890270ae7f64e7f28 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2069,12 +2069,31 @@ public final class CraftServer implements Server {
private final Spigot spigot = new Spigot()
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{
+ @Deprecated
@ -2109,10 +2108,10 @@ index 4bf48f77f3f7cd62a91590543f5af441c8268029..ffe9cc1011226d604dc5499e7692e9a9
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad49c62088 100644
index 09aa6809c5400ce8548ac902908b750ce7c964ec..3c96807e97657502849093e4371e9fef3584a346 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,11 +1,13 @@
@@ -1,12 +1,15 @@
package org.bukkit.craftbukkit.scheduler;
import java.util.function.Consumer;
@ -2121,14 +2120,15 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitTask;
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
-import org.spigotmc.CustomTimingsHandler; // Spigot
import org.spigotmc.CustomTimingsHandler; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
+import co.aikar.timings.Timing; // Paper
public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -26,12 +28,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -26,12 +29,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
*/
private volatile long period;
private long nextRun;
@ -2144,7 +2144,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad
CraftTask() {
this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
}
@@ -51,7 +53,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -51,7 +54,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
this.id = id;
this.period = CraftTask.NO_REPEATING;
this.taskName = taskName;
@ -2153,7 +2153,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad
}
// Paper end
@@ -72,7 +74,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -72,7 +75,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
}
this.id = id;
this.period = period;
@ -2162,7 +2162,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad
}
@Override
@@ -92,11 +94,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -92,11 +95,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@Override
public void run() {
@ -2176,7 +2176,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad
}
long getPeriod() {
@@ -123,7 +127,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -123,7 +128,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
this.next = next;
}
@ -2185,7 +2185,7 @@ index f5f70c1fe31e5c533991e2c857fe8c10a83b94fc..90ba08993fefd975b1095dafa6304aad
return (rTask != null) ? rTask.getClass() : ((cTask != null) ? cTask.getClass() : null);
}
@@ -147,9 +151,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@@ -147,9 +152,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
return true;
}

View File

@ -1037,7 +1037,7 @@ index 68a5a0cbe88795f59ce96035da45371a5a366f5a..c186af518ef43e9efaf086233e1da8a1
public static EnumChatFormat a(int i) {
if (i < 0) {
diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java
index 7441beeaa4ee83467dac4d68176132efc6247337..de6bfc27cd38fd6293853d55cf62699aade94212 100644
index e312078162c7132635995aa47237df0b495d9320..921fe6399745318c18570360fb438c45762b1b8e 100644
--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java
+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java
@@ -1,5 +1,6 @@
@ -1047,7 +1047,7 @@ index 7441beeaa4ee83467dac4d68176132efc6247337..de6bfc27cd38fd6293853d55cf62699a
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
@@ -104,6 +105,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
@@ -107,6 +108,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
GsonBuilder gsonbuilder = new GsonBuilder();
gsonbuilder.disableHtmlEscaping();
@ -1055,7 +1055,7 @@ index 7441beeaa4ee83467dac4d68176132efc6247337..de6bfc27cd38fd6293853d55cf62699a
gsonbuilder.registerTypeHierarchyAdapter(IChatBaseComponent.class, new IChatBaseComponent.ChatSerializer());
gsonbuilder.registerTypeHierarchyAdapter(ChatModifier.class, new ChatModifier.ChatModifierSerializer());
gsonbuilder.registerTypeAdapterFactory(new ChatTypeAdapterFactory());
@@ -344,10 +346,12 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
@@ -347,10 +349,12 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
return jsonobject;
}
@ -1068,7 +1068,7 @@ index 7441beeaa4ee83467dac4d68176132efc6247337..de6bfc27cd38fd6293853d55cf62699a
public static JsonElement b(IChatBaseComponent ichatbasecomponent) {
return IChatBaseComponent.ChatSerializer.a.toJsonTree(ichatbasecomponent);
}
@@ -357,6 +361,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
@@ -360,6 +364,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
return (IChatMutableComponent) ChatDeserializer.a(IChatBaseComponent.ChatSerializer.a, s, IChatMutableComponent.class, false);
}
@ -1397,7 +1397,7 @@ index d34e91887cd73009bf852fb849e495a8affed7a9..5636a76f1a893dc0609f16a240ae5593
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254ebb31fe1f 100644
index e712f33fe733b805098174558bb9319aa33572f0..d1b26d753774ef89638a1c5130b10f16a6c743d8 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -8,6 +8,7 @@ import com.mojang.authlib.GameProfile;
@ -1416,7 +1416,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
@@ -188,7 +190,7 @@ public abstract class PlayerList {
@@ -183,7 +185,7 @@ public abstract class PlayerList {
}
// CraftBukkit start
chatmessage.a(EnumChatFormat.YELLOW);
@ -1425,7 +1425,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
playerconnection.a(entityplayer.locX(), entityplayer.locY(), entityplayer.locZ(), entityplayer.yaw, entityplayer.pitch);
this.players.add(entityplayer);
@@ -197,19 +199,18 @@ public abstract class PlayerList {
@@ -192,19 +194,18 @@ public abstract class PlayerList {
// this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below
// CraftBukkit start
@ -1450,7 +1450,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
}
// CraftBukkit end
@@ -406,7 +407,7 @@ public abstract class PlayerList {
@@ -401,7 +402,7 @@ public abstract class PlayerList {
}
@ -1459,7 +1459,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
WorldServer worldserver = entityplayer.getWorldServer();
entityplayer.a(StatisticList.LEAVE_GAME);
@@ -417,7 +418,7 @@ public abstract class PlayerList {
@@ -412,7 +413,7 @@ public abstract class PlayerList {
entityplayer.closeInventory();
}
@ -1468,7 +1468,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
@@ -478,7 +479,7 @@ public abstract class PlayerList {
@@ -473,7 +474,7 @@ public abstract class PlayerList {
cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
// CraftBukkit end
@ -1477,7 +1477,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
}
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
@@ -524,10 +525,10 @@ public abstract class PlayerList {
@@ -519,10 +520,10 @@ public abstract class PlayerList {
}
// return chatmessage;
@ -1490,7 +1490,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
} else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) {
IpBanEntry ipbanentry = this.l.get(socketaddress);
@@ -537,17 +538,17 @@ public abstract class PlayerList {
@@ -532,17 +533,17 @@ public abstract class PlayerList {
}
// return chatmessage;
@ -1511,7 +1511,7 @@ index 5b49047b820dbe1f326320b71445ac216bf688b5..614477b047579afafb88b2ca2a03254e
return null;
}
return entity;
@@ -1068,7 +1069,7 @@ public abstract class PlayerList {
@@ -1063,7 +1064,7 @@ public abstract class PlayerList {
public void shutdown() {
// CraftBukkit start - disconnect safely
for (EntityPlayer player : this.players) {
@ -1542,7 +1542,7 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..d11725d61b888ceb08c4ea30f23d5631
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 351440f534653c9d315ccaf1e923e03ca6ba01f6..0dc17debe0c2c01de0d69e944eeafe9d6136490a 100644
index 0e8de6b3a6acd37064209b6890270ae7f64e7f28..17f4e5a6fcf58ba74678f8a004fc3d5f4a81ae50 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -563,8 +563,11 @@ public final class CraftServer implements Server {
@ -1912,7 +1912,7 @@ index 34ceee4a81ef4ed05eb9007ca17c223f75f4ff50..11acf5f725a7f2e350a05268a00906ba
public net.minecraft.server.Enchantment getHandle() {
return target;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index db7c4011c8b90b6daca2b48a6d9ec447d31f7197..969bf1095bb2a90ad0f1cb1f1e023e056e3855c0 100644
index a2048d2dd71381ee5e878c87e0d727ab62756b20..d46ba8d0e3b02a76c02dcc39c87a8bb6c9073149 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -145,6 +145,7 @@ import net.minecraft.server.EntityZombieVillager;
@ -2556,7 +2556,7 @@ index 9f6e797d34e5ad21a496c89f5a45ddb0638d3adc..115ee3785b4e0ba6a235bbb31b643aa5
@Override
public CraftMerchant getCraftMerchant() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..1cc49b9d8c784f96cfc54159c1139af501264de6 100644
index 422c61215601a5f4014b490bd608ec97f3ef3572..123616ed018fbc4d69f46e65d5ff15734008a00d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -1,8 +1,9 @@
@ -2570,7 +2570,7 @@ index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..1cc49b9d8c784f96cfc54159c1139af5
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -267,6 +268,135 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -269,6 +270,135 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
this.generation = (generation == null) ? null : generation.ordinal();
}
@ -2706,7 +2706,7 @@ index a0cc04cb6d1f02df3018320b4147bd0b156dd81c..1cc49b9d8c784f96cfc54159c1139af5
@Override
public String getPage(final int page) {
Validate.isTrue(isValidPage(page), "Invalid page number");
@@ -411,7 +541,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -413,7 +543,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
}
@Override
@ -2991,10 +2991,10 @@ index e3036fe23fa2be100044332c432d1ad5b4872823..543792033497ff416396e8d6bee6b9e8
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index 0fba3d2a8d3bd7ec615d137e4625a7f357729d8d..b900aaf66f25e41956e7a4370b887fd4ed530570 100644
index 6c24db0d2583c5f348d1d96c39139cc44af828d8..d641a9cd493ff7039db592d90d7cad1b5cf459bb 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -27,6 +27,55 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
@@ -29,6 +29,55 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
return team.getName();
}

View File

@ -25,10 +25,10 @@ index 3618cc017feb60e257a28f67cbddca3f792a9833..796c17e0941922a9716212c6eae91643
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index a3f608e3a06abfa4268278b6f1298ece36264a02..d07847876e22971b4a90f67d8281bf08361424e0 100644
index 3533df35b9fc942b0e34f162a0524a65857370a7..f8b969b203cec7341382abf884a084cb4adbd7f9 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -21,7 +21,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
@@ -20,7 +20,7 @@ import org.bukkit.event.entity.EntityTransformEvent;
public class EntityZombie extends EntityMonster {
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
@ -37,7 +37,7 @@ index a3f608e3a06abfa4268278b6f1298ece36264a02..d07847876e22971b4a90f67d8281bf08
private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Integer> bo = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
@@ -124,9 +124,9 @@ public class EntityZombie extends EntityMonster {
@@ -123,9 +123,9 @@ public class EntityZombie extends EntityMonster {
if (this.world != null && !this.world.isClientSide) {
AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);

View File

@ -22,10 +22,10 @@ index 796c17e0941922a9716212c6eae91643d8360418..78948c42b13194005bdbbbc69c2b7ae0
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 96e5246b6e6f285f3c1029147a6566f00b576a27..ad2ec3472a164bdf3a1ff2c42ec18c74ad58a13c 100644
index 99a18a6c4d42b05cdcfd154c4ff24d9764e73057..b9243b0a2d429828f2a2b68c221129e23c6212ca 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -46,6 +46,10 @@ public class EntityFishingHook extends IProjectile {
@@ -47,6 +47,10 @@ public class EntityFishingHook extends IProjectile {
entityhuman.hookedFish = this;
this.an = Math.max(0, i);
this.lureLevel = Math.max(0, j);

View File

@ -25,7 +25,7 @@ index 89e76dd73811fd0f6f8c8e7e5af804d5a4bb5a75..d16ae924bcbe31c964f7fb448757c748
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b6ca0c88fbfec5cc0a3d06a33f1ab7cddd52cbe3..0f47b10c9c3357f7a462680e2f26d7808a5f8afc 100644
index ae96ff73f78a514328862de86d3ecdb29fa9c145..09bab3828197e3078a4ed95e7c8a9f34e8bf1b8d 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1765,6 +1765,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -76,10 +76,10 @@ index 50d7c2899deb707dbbe333242e049b963d9b549c..3dfe3d13ac713c963256a662b52f5471
this.world.addParticle(Particles.SMOKE, this.locX(), this.locY() + 0.5D, this.locZ(), 0.0D, 0.0D, 0.0D);
} else if (this.b == 0) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index b448467a92650e1bd3d5fac7de685550b7e891df..2b8ed9d14bd6dd9330712741859eb77ba0194153 100644
index 7064fd8e8318797a94b5292d675992a902b681ab..914ff5b7a9787ae5e8d5b8829e6888ba2637cc26 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -54,6 +54,12 @@ public class EntityTNTPrimed extends Entity {
@@ -55,6 +55,12 @@ public class EntityTNTPrimed extends Entity {
}
this.move(EnumMoveType.SELF, this.getMot());

View File

@ -19,10 +19,10 @@ index aab33df7a36eb69300fedfce733985d6c239ca01..550232cb3819138b3bae0fa1c5142948
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 89d3ff83f0e152e9747c554693af4145f0a7d07e..dd104b1cd544983024ac60888940a1c0917d05a1 100644
index c1a651a1c2d5ffed80e4517e465901bb39274548..82768ab4663b6dc220212581f92bf8c5188c73b5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1223,7 +1223,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1225,7 +1225,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -32,7 +32,7 @@ index 89d3ff83f0e152e9747c554693af4145f0a7d07e..dd104b1cd544983024ac60888940a1c0
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 99a242956a56121ab4f108fc58563e1df1537577..7a2409b78a044c37de1ee4fc772e4ac120ae657c 100644
index 17f4e5a6fcf58ba74678f8a004fc3d5f4a81ae50..6352c45db0053ce75356494ffa3b31b42d6e6414 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -226,7 +226,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;

View File

@ -56,10 +56,10 @@ index 98616f0db75d0e2b2e960dbf88289c87ba426ab6..b19c694cf01bc868dd7c4ec6432b613d
return this.b.containsKey(iblockstate);
}
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index d4b8daf1f064bff25ef5566b0288dad0087e379e..52f64460ba1bfb298f343f71a923c8f34de9e39d 100644
index 8e5ceacf7f6ed0d639d7850334d8a01a74aef6e3..54cad33750efd80b104664723e1115d107c7a72d 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.entity.HumanEntity;
// CraftBukkit end
@ -68,7 +68,7 @@ index d4b8daf1f064bff25ef5566b0288dad0087e379e..52f64460ba1bfb298f343f71a923c8f3
private NonNullList<ItemStack> items;
protected float a;
@@ -85,14 +85,20 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
@@ -86,14 +86,20 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
return nbttagcompound;
}
@ -91,7 +91,7 @@ index d4b8daf1f064bff25ef5566b0288dad0087e379e..52f64460ba1bfb298f343f71a923c8f3
this.b = this.a;
float f = 0.1F;
@@ -106,8 +112,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
@@ -107,8 +113,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
if (this.viewingCount > 0 && this.a == 0.0F) {
this.playOpenSound(SoundEffects.BLOCK_CHEST_OPEN);
}
@ -104,7 +104,7 @@ index d4b8daf1f064bff25ef5566b0288dad0087e379e..52f64460ba1bfb298f343f71a923c8f3
float f1 = this.a;
if (this.viewingCount > 0) {
@@ -123,8 +132,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
@@ -124,8 +133,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
float f2 = 0.5F;
if (this.a < 0.5F && f1 >= 0.5F) {
@ -117,7 +117,7 @@ index d4b8daf1f064bff25ef5566b0288dad0087e379e..52f64460ba1bfb298f343f71a923c8f3
if (this.a < 0.0F) {
this.a = 0.0F;
@@ -163,6 +175,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
@@ -164,6 +176,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
}
public void playOpenSound(SoundEffect soundeffect) {
@ -125,7 +125,7 @@ index d4b8daf1f064bff25ef5566b0288dad0087e379e..52f64460ba1bfb298f343f71a923c8f3
BlockPropertyChestType blockpropertychesttype = (BlockPropertyChestType) this.getBlock().get(BlockChest.c);
if (blockpropertychesttype != BlockPropertyChestType.LEFT) {
@@ -201,6 +214,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
@@ -202,6 +215,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
++this.viewingCount;
if (this.world == null) return; // CraftBukkit
@ -133,7 +133,7 @@ index d4b8daf1f064bff25ef5566b0288dad0087e379e..52f64460ba1bfb298f343f71a923c8f3
// CraftBukkit start - Call redstone event
if (this.getBlock().getBlock() == Blocks.TRAPPED_CHEST) {
@@ -223,6 +237,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
@@ -224,6 +238,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
--this.viewingCount;
// CraftBukkit start - Call redstone event

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 dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9ce26c16e 100644
index 82768ab4663b6dc220212581f92bf8c5188c73b5..f54300a107477e6b6aa79114212f0088dc4f5be5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -144,7 +144,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -146,7 +146,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -24,7 +24,7 @@ index dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public CommandDispatcher vanillaCommandDispatcher;
@@ -153,7 +153,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -155,7 +155,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / TPS;
@ -33,7 +33,7 @@ index dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9
public final double[] recentTps = new double[ 3 ];
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -806,6 +806,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -808,6 +808,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@ -91,7 +91,7 @@ index dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9
// Spigot End
protected void w() {
@@ -818,30 +869,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -820,30 +871,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Spigot start
Arrays.fill( recentTps, 20 );
@ -140,7 +140,7 @@ index dd104b1cd544983024ac60888940a1c0917d05a1..478dfe231720324e995dc4123fbf19b9
GameProfilerTick gameprofilertick = GameProfilerTick.a("Server");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7a2409b78a044c37de1ee4fc772e4ac120ae657c..390714fa5822a61f64f6b3b8731397e9dae77cfd 100644
index 6352c45db0053ce75356494ffa3b31b42d6e6414..2832610d080db4d8a6c26d946c441306404f6aba 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2113,6 +2113,17 @@ public final class CraftServer implements Server {
@ -159,7 +159,7 @@ index 7a2409b78a044c37de1ee4fc772e4ac120ae657c..390714fa5822a61f64f6b3b8731397e9
+ // Paper end
+
// Spigot start
private final Spigot spigot = new Spigot()
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
index f5b6dec1cbe7501ce2ee9125920e810bc94670cc..e62890433ffbe0b4e48942fe6c38b599a19e58fd 100644

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 14646561f8fe661ba2b815c1abfb81af61f027d4..48ebaa4cdb5d5f52334e7bd4f80309a10ecedfa9 100644
index dc996792df6046d442565a7993ec299af6605d92..c6b91de58c0190aca0455aacc04994f8ea5d81b7 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -162,6 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -70,10 +70,10 @@ index 6b226c04d40adff8b0f1d28c0cc79439df002b3d..bdeabfaeb17778a12ab4ad72689a72b0
public void a(boolean flag) {
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 2b8ed9d14bd6dd9330712741859eb77ba0194153..e25404fd89ad6317c2656c68c2e32aa05e5f0e73 100644
index 914ff5b7a9787ae5e8d5b8829e6888ba2637cc26..f71e82c365947de822be7b87083b46bd7ce4b902 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -104,6 +104,14 @@ public class EntityTNTPrimed extends Entity {
@@ -105,6 +105,14 @@ public class EntityTNTPrimed extends Entity {
@Override
protected void loadData(NBTTagCompound nbttagcompound) {
this.setFuseTicks(nbttagcompound.getShort("Fuse"));
@ -101,7 +101,7 @@ index ad8a506bb430b26fe147a657a2f826daf9bf4d45..ad4807e0bdd6409bd798f995da8f43ce
if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 21e4088cfdb7218e78fb771fe4c9bd2027594663..89c22be536a45199a29d328b125bdcb9c2848d65 100644
index 3d915105b277a7cbf330ba2cb3c2f1451ee868e4..02dac635cce43edea05ed4961711ea5394613971 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1135,6 +1135,11 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -117,7 +117,7 @@ index 21e4088cfdb7218e78fb771fe4c9bd2027594663..89c22be536a45199a29d328b125bdcb9
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 969bf1095bb2a90ad0f1cb1f1e023e056e3855c0..0582d15e14d4fde7630759849b573cb2e08fabe6 100644
index d46ba8d0e3b02a76c02dcc39c87a8bb6c9073149..2ed97dc772535f2364406c298d06fada8167fb74 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1063,4 +1063,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity and entity crashes
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index f1d0e2faffb3ef27f5a41d06d0ff7d787f1098f5..da96a91c6b4cc03ad2e4539053bd30e7dc62dfe8 100644
index c8aa347baf100b25694ed9172590b073db810fe9..5414858ba241c13d4e568191d11111d3d3ec3fc4 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -194,7 +194,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -197,7 +197,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
return IRegistry.BLOCK_ENTITY_TYPE.getKey(this.getTileType()) + " // " + this.getClass().getCanonicalName();
});
if (this.world != null) {

View File

@ -123,10 +123,10 @@ index afe61a1ddc75f155836411b6749198f71ed09919..ac39b02ec5f02f6f2db9f293513686d2
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 478dfe231720324e995dc4123fbf19b9ce26c16e..5b4b6810586761072a790b7bbe3368d26cd5bb13 100644
index f54300a107477e6b6aa79114212f0088dc4f5be5..38b0863bf470682b9afaab016c5c41af65800e5d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1207,6 +1207,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1209,6 +1209,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
this.methodProfiler.exit();
@ -135,7 +135,7 @@ index 478dfe231720324e995dc4123fbf19b9ce26c16e..5b4b6810586761072a790b7bbe3368d2
this.methodProfiler.exitEnter("connection");
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 21868a246d01c0f8c8642e42f82f66632b3bcadd..ca874ef00a925095c01767f5b41737302645f149 100644
index bc1946ea3060220f4598aae2e1aed3d84ab18387..e062f68b87bd70b128f46394881c09ad63278fdc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -84,6 +84,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -77,10 +77,10 @@ index 62a7db8c7d2604d248ec5c1efb3c43356c3d513c..dec48226d713ef0198ef3c679daf553a
this.c();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index d98b6ef44e1836920956754dfcb6654fec23b673..b40f6b7d45028b5bc58a222e2d54cb8693273325 100644
index 5ca081e8be411aee98efce3e41876efe3bb2e327..2ba10ed683788219c734a565a163ba553ec72c75 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1249,10 +1249,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1250,10 +1250,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final Entity tracker;
private final int trackingDistance;
private SectionPosition e;
@ -97,7 +97,7 @@ index d98b6ef44e1836920956754dfcb6654fec23b673..b40f6b7d45028b5bc58a222e2d54cb86
this.tracker = entity;
this.trackingDistance = i;
this.e = SectionPosition.a(entity);
@@ -1334,7 +1338,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1335,7 +1339,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
// CraftBukkit end

View File

@ -5,11 +5,11 @@ Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityBeacon.java b/src/main/java/net/minecraft/server/TileEntityBeacon.java
index 79774d8dabd46eb91940db934bb58f8b082ff9e2..c6b7bc3dc1445269c1562c308b386ce480d70ef3 100644
index 1305506d27010e4be03032c9863bed186e2bff06..fdf73eca821bab5ec7a742645893793679b5d42c 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -14,6 +14,11 @@ import org.bukkit.craftbukkit.potion.CraftPotionUtil;
import org.bukkit.entity.HumanEntity;
@@ -12,6 +12,11 @@ import javax.annotation.Nullable;
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
import org.bukkit.potion.PotionEffect;
// CraftBukkit end
+// Paper start
@ -20,7 +20,7 @@ index 79774d8dabd46eb91940db934bb58f8b082ff9e2..c6b7bc3dc1445269c1562c308b386ce4
public class TileEntityBeacon extends TileEntity implements ITileInventory, ITickable {
@@ -240,14 +245,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
@@ -238,14 +243,31 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
}
private void applyEffect(List list, MobEffectList effects, int i, int b0) {
@ -53,7 +53,7 @@ index 79774d8dabd46eb91940db934bb58f8b082ff9e2..c6b7bc3dc1445269c1562c308b386ce4
}
}
}
@@ -270,10 +292,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
@@ -268,10 +290,10 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic
int i = getLevel();
List list = getHumansInRange();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Use UserCache for player heads
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index e950b1957133fef20c464284807df262a7684238..c57634317b661e05ddd085d04f7338045445069f 100644
index 1a686e603feede34236dc43136ade71cfdc88214..42de897596ada4044df683dc5e8d5d750ee9c207 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -165,7 +165,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -166,7 +166,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
if (name == null) {
setProfile(null);
} else {

View File

@ -9,19 +9,19 @@ This is a duplicate API from spigot, so use our duplicate subclass and
improve setPosition to use raw
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1b0fe4f27a7346a1466db97e796c4a65b11e1ab8..fedc9e453cdf17c1b69c87de9fa32a145d4b6f70 100644
index d1b26d753774ef89638a1c5130b10f16a6c743d8..c71dea3e51c93cf1ad60b8a76408774d67552de8 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -145,7 +145,7 @@ public abstract class PlayerList {
@@ -140,7 +140,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event
Player bukkitPlayer = entityplayer.getBukkitEntity();
- PlayerSpawnLocationEvent ev = new PlayerSpawnLocationEvent(bukkitPlayer, bukkitPlayer.getLocation());
+ PlayerSpawnLocationEvent ev = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(bukkitPlayer, bukkitPlayer.getLocation()); // Paper use our duplicate event
Bukkit.getPluginManager().callEvent(ev);
- org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(bukkitPlayer, bukkitPlayer.getLocation());
+ org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(bukkitPlayer, bukkitPlayer.getLocation()); // Paper use our duplicate event
cserver.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation();
@@ -153,7 +153,7 @@ public abstract class PlayerList {
@@ -148,7 +148,7 @@ public abstract class PlayerList {
entityplayer.spawnIn(worldserver1);
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);

View File

@ -19,10 +19,10 @@ index 70e074cdf2087e638af8e0f3878d0ef8eb7305cc..416a6760883cb40367535c7c5acd7797
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index a737b9cae678a5a3006ee6a00a1f1ddf7bb4e07c..563340d410f76ec1df90403879b835ebd9e6b533 100644
index d6ecdbfcebeda8e9f599d7ac28e7cdaa8dc852a8..d774a0893b2e6599bade3a9edf22668a30587503 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -285,7 +285,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -286,7 +286,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player Tab List and Title APIs
diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java
index de6bfc27cd38fd6293853d55cf62699aade94212..65aec1dc2fd9ef9c9a9f022f13008505383a0af4 100644
index 921fe6399745318c18570360fb438c45762b1b8e..2b8916e3b3ecfd3917b5acf3ea6dfc2793e242c8 100644
--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java
+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java
@@ -356,6 +356,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
@@ -359,6 +359,7 @@ public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IC
return IChatBaseComponent.ChatSerializer.a.toJsonTree(ichatbasecomponent);
}
@ -64,7 +64,7 @@ index 772ca6256964692a2b9c12e2edc532d2a8f51f7b..71168d9d0252e93253fa3b3f0bface3a
// Paper end
packetdataserializer.a(this.b);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4c0a6d00b17b5e11c0f2b5d7170701bedd20b87c..2542b3a135dd3f728a5a44c9f9c81ae524734abf 100644
index e0805f4e295ff3866e7689214cfd922267a98008..4f3511447473f50336a1deea62958834cb3d4af1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@

View File

@ -107,10 +107,10 @@ index bf0ccfb9bf20422b90ef26370d113b49be7d730b..060887d765604e4be82913607bb6266a
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index b40f6b7d45028b5bc58a222e2d54cb8693273325..0542dde09d288488b88e17a044cc508d5d39782f 100644
index 2ba10ed683788219c734a565a163ba553ec72c75..612eb16bce1bce1cad40ea0f279d2b8397263dea 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -761,6 +761,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -762,6 +762,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return true;
} catch (Exception exception) {
PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception);

View File

@ -32,10 +32,10 @@ index 48eb9c8a68d45c88c7a42e8e400446a374fb4fc9..2c8d49501664862559ed8974b4821bdd
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5b4b6810586761072a790b7bbe3368d26cd5bb13..a3913ee0756f79159ea0671c9041ab68db0aa121 100644
index 38b0863bf470682b9afaab016c5c41af65800e5d..575b4e670810b0be51067ba3e4c838e547a1f1dc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1173,6 +1173,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1175,6 +1175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@ -44,7 +44,7 @@ index 5b4b6810586761072a790b7bbe3368d26cd5bb13..a3913ee0756f79159ea0671c9041ab68
this.methodProfiler.a(() -> {
return worldserver + " " + worldserver.getDimensionKey().a();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 096a1d3bf0e9c51244ecd9ad2fbd240f3e01f461..e04d2182915ca3ac69353ef967ae3f703ab9fc30 100644
index 7c6127739f1d88ee0dc411db5fcaa37d7fff36f7..5ce86030a71c181c4c28b8934be4fa8c7eafc299 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -406,7 +406,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -66,7 +66,7 @@ index 096a1d3bf0e9c51244ecd9ad2fbd240f3e01f461..e04d2182915ca3ac69353ef967ae3f70
this.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 4029f090d7b01c10b4f3f99004ab92f04653e884..7e44af3e933f16fc00cd2b43e913f87380fb1cae 100644
index a7b78b317dc70816fb0b23989bebe30a300ed561..7a1f6d446fb62b0aa72212b44899606c8ec99b55 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -87,6 +87,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index fedc9e453cdf17c1b69c87de9fa32a145d4b6f70..430d86aba42de6de057a78d78e9d8c41bc6fd680 100644
index c71dea3e51c93cf1ad60b8a76408774d67552de8..acbdc4736c2f6f181e25b776a2c025bd2af85af2 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -176,6 +176,7 @@ public abstract class PlayerList {
@@ -171,6 +171,7 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b()));
playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry()));

View File

@ -19,10 +19,10 @@ index 439dcc6effdc91830d2b7ede9063982998b37120..504efea7b6f50a0d17f4f353781953df
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a3913ee0756f79159ea0671c9041ab68db0aa121..31cc60dcf998cf07ca8db14dba37145ed5b3601c 100644
index 575b4e670810b0be51067ba3e4c838e547a1f1dc..5fd43537ced63947cab0e179f88109d63d1c87e7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -432,6 +432,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -434,6 +434,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}
@ -57,10 +57,10 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19
packetdataserializer.a(this.c);
packetdataserializer.a(this.d);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 37a6861fca3fb22cd4675e1402432e597c9fb307..8b20c92178d78900ed31e25364b6cbb78110bf48 100644
index acbdc4736c2f6f181e25b776a2c025bd2af85af2..5652462008dd857f2dc36b80e3fe5d3d83867ce5 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -77,6 +77,7 @@ public abstract class PlayerList {
@@ -72,6 +72,7 @@ public abstract class PlayerList {
// CraftBukkit start
private CraftServer cserver;
private final Map<String,EntityPlayer> playersByName = new java.util.HashMap<>();
@ -68,7 +68,7 @@ index 37a6861fca3fb22cd4675e1402432e597c9fb307..8b20c92178d78900ed31e25364b6cbb7
public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) {
this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this);
@@ -306,6 +307,13 @@ public abstract class PlayerList {
@@ -301,6 +302,13 @@ public abstract class PlayerList {
}
entityplayer.syncInventory();
@ -82,7 +82,7 @@ index 37a6861fca3fb22cd4675e1402432e597c9fb307..8b20c92178d78900ed31e25364b6cbb7
// CraftBukkit - Moved from above, added world
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), worldserver1.worldDataServer.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ());
}
@@ -426,6 +434,16 @@ public abstract class PlayerList {
@@ -421,6 +429,16 @@ public abstract class PlayerList {
entityplayer.playerTick(); // SPIGOT-924
// CraftBukkit end
@ -99,7 +99,7 @@ index 37a6861fca3fb22cd4675e1402432e597c9fb307..8b20c92178d78900ed31e25364b6cbb7
this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle();
@@ -1074,6 +1092,13 @@ public abstract class PlayerList {
@@ -1069,6 +1087,13 @@ public abstract class PlayerList {
}
// CraftBukkit end

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Configurable RCON IP address
For servers with multiple IP's, ability to bind to a specific interface.
diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
index bec3a69b0f68a29ecff71f10c7b195adc91d16b3..3ecfb193be1d83d2b2c90ca9e264388dabb88c05 100644
index ebeea0df593bc82e7740203bec6b45e16318ab35..205d56f88440789df8a028b3827dd388fea56f63 100644
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
@@ -57,6 +57,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
@@ -61,6 +61,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
public final GeneratorSettings generatorSettings;
@ -18,7 +18,7 @@ index bec3a69b0f68a29ecff71f10c7b195adc91d16b3..3ecfb193be1d83d2b2c90ca9e264388d
// CraftBukkit start
public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom, OptionSet optionset) {
super(properties, optionset);
@@ -108,6 +110,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
@@ -112,6 +114,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
this.textFilteringConfig = this.getString("text-filtering-config", "");
this.playerIdleTimeout = this.b("player-idle-timeout", 0);
this.whiteList = this.b("white-list", false);

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 31cc60dcf998cf07ca8db14dba37145ed5b3601c..68c6ccf0576752b836079a3c5352102182a6127e 100644
index 5fd43537ced63947cab0e179f88109d63d1c87e7..5c84033df42b2cba1719010e75aeeb00c817eb61 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -70,6 +70,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@@ -72,6 +72,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements IMojangStatistics, ICommandListener, AutoCloseable {
@ -17,7 +17,7 @@ index 31cc60dcf998cf07ca8db14dba37145ed5b3601c..68c6ccf0576752b836079a3c53521021
public static final Logger LOGGER = LogManager.getLogger();
public static final File b = new File("usercache.json");
public static final WorldSettings c = new WorldSettings("Demo World", EnumGamemode.SURVIVAL, false, EnumDifficulty.NORMAL, false, new GameRules(), DataPackConfiguration.a);
@@ -176,6 +177,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -178,6 +179,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public MinecraftServer(OptionSet options, DataPackConfiguration datapackconfiguration, Thread thread, IRegistryCustom.Dimension iregistrycustom_dimension, Convertable.ConversionSession convertable_conversionsession, SaveData savedata, ResourcePackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, DataPackResources datapackresources, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory) {
super("Server");
@ -25,7 +25,7 @@ index 31cc60dcf998cf07ca8db14dba37145ed5b3601c..68c6ccf0576752b836079a3c53521021
this.m = new GameProfilerSwitcher(SystemUtils.a, this::ai);
this.methodProfiler = GameProfilerDisabled.a;
this.serverPing = new ServerPing();
@@ -2043,7 +2045,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2045,7 +2047,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Deprecated
public static MinecraftServer getServer() {

View File

@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..a1923aff2b5e2e867670a5a064a76791
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index dba28796a921beda2e5d15ba1565c55f54e36435..df6377b5849aab20246a29b312744604b4cbf6bf 100644
index 487d041999fd1edc4b48790dbc975cf8cea8ba54..0dd63d2e0ed16eb08cf97dbf8c293e24a5a1bda9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -530,10 +530,10 @@ index dba28796a921beda2e5d15ba1565c55f54e36435..df6377b5849aab20246a29b312744604
public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 75e9c1538b3d8ef5186986ab3c8ca8b60f63ee6e..574838bd33a46e464ff7d801345613a3351f487f 100644
index 3258bf53761dbed2bfe9fd92e011161b914796d0..8e13aebb7043ddfb4b1c02bac46081eb15e906bf 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -19,6 +19,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@@ -20,6 +20,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
public long lootTableSeed;
// CraftBukkit start
@ -541,7 +541,7 @@ index 75e9c1538b3d8ef5186986ab3c8ca8b60f63ee6e..574838bd33a46e464ff7d801345613a3
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
private int maxStack = MAX_STACK;
@@ -176,12 +177,13 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@@ -177,12 +178,13 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@Override
protected void saveData(NBTTagCompound nbttagcompound) {
super.saveData(nbttagcompound);
@ -556,7 +556,7 @@ index 75e9c1538b3d8ef5186986ab3c8ca8b60f63ee6e..574838bd33a46e464ff7d801345613a3
ContainerUtil.a(nbttagcompound, this.items);
}
@@ -190,11 +192,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@@ -191,11 +193,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@Override
protected void loadData(NBTTagCompound nbttagcompound) {
super.loadData(nbttagcompound);
@ -570,7 +570,7 @@ index 75e9c1538b3d8ef5186986ab3c8ca8b60f63ee6e..574838bd33a46e464ff7d801345613a3
ContainerUtil.b(nbttagcompound, this.items);
}
@@ -225,14 +228,15 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
@@ -226,14 +229,15 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
}
public void d(@Nullable EntityHuman entityhuman) {
@ -646,7 +646,7 @@ index 9265bc7331f5d3cb43394a7457ab89140b731c8b..d9be182a574daaedcc7a106c759c2bde
if (entityhuman != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index da5a80267b189d75374375211a574ca5f18d96be..26cc40e57f5b73b9c32859bff37c4a3d94904c56 100644
index df71eb9672ecc69ac92c773925d9b692ad343fee..8a7e9302b4b6be086144add8df610b76b58e00d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -64,7 +64,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState

View File

@ -23,10 +23,10 @@ index 7b52bf335e60a700b4c4e25cab1b0261f32775bc..dc0cb79525adf0d5afee1f677e1fde54
if (!NameReferencingFileConverter.e(this)) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 68c6ccf0576752b836079a3c5352102182a6127e..7e4a966b5748417223243344bf7c4483e997a237 100644
index 5c84033df42b2cba1719010e75aeeb00c817eb61..110184bd18f689cff1f37ceefe97416b5dcfd405 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -787,7 +787,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -789,7 +789,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
} catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
LOGGER.info("Saving usercache.json");

View File

@ -32,7 +32,7 @@ index eb04fdb172a50ec1f5b7fe78fa0e7655246abd60..6eca3f300020006f02dd36253b522db4
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index df6377b5849aab20246a29b312744604b4cbf6bf..7abe7bcddd3c60bfb0f290e2475d28396d5319cf 100644
index 0dd63d2e0ed16eb08cf97dbf8c293e24a5a1bda9..6aa29495802b7d52c4c0f283495c7d1762f657fa 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2681,6 +2681,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -48,10 +48,10 @@ index df6377b5849aab20246a29b312744604b4cbf6bf..7abe7bcddd3c60bfb0f290e2475d2839
}
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index e25404fd89ad6317c2656c68c2e32aa05e5f0e73..b108874d977a4fb1a7c0d52f66bc08390decb4d0 100644
index f71e82c365947de822be7b87083b46bd7ce4b902..6e77dc89f5441f0f483571fee9aa9f34b6d1dd1c 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -80,7 +80,27 @@ public class EntityTNTPrimed extends Entity {
@@ -81,7 +81,27 @@ public class EntityTNTPrimed extends Entity {
this.world.addParticle(Particles.SMOKE, this.locX(), this.locY() + 0.5D, this.locZ(), 0.0D, 0.0D, 0.0D);
}
}
@ -80,7 +80,7 @@ index e25404fd89ad6317c2656c68c2e32aa05e5f0e73..b108874d977a4fb1a7c0d52f66bc0839
}
private void explode() {
@@ -149,4 +169,11 @@ public class EntityTNTPrimed extends Entity {
@@ -150,4 +170,11 @@ public class EntityTNTPrimed extends Entity {
public Packet<?> P() {
return new PacketPlayOutSpawnEntity(this);
}

View File

@ -25,10 +25,10 @@ index 58e9c99b44fd8e77e62c4098d9872d5378d4f5e5..8974d7944f159b9346680c639daf0f8c
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index da96a91c6b4cc03ad2e4539053bd30e7dc62dfe8..cea42d98aa6e1f96df0fa70234086dceb124fbbf 100644
index 5414858ba241c13d4e568191d11111d3d3ec3fc4..524f84ad2c50f8b837eefd0465901b1e22359410 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -20,6 +20,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -23,6 +23,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
public CraftPersistentDataContainer persistentDataContainer;
// CraftBukkit end
private static final Logger LOGGER = LogManager.getLogger();
@ -37,10 +37,10 @@ index da96a91c6b4cc03ad2e4539053bd30e7dc62dfe8..cea42d98aa6e1f96df0fa70234086dce
@Nullable
protected World world;
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index b7c9b356e24a8269ade76738335a63ef18890d4d..2b249e7e2018a283b80b9462fbc129420e47ec06 100644
index 810603bc03950580aa4d81233a9dd1c2f51d8a0b..5d0c5d856a66ce6c0594b618e8f6e892585ce665 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -59,13 +59,14 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
@@ -58,13 +58,14 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
}
try {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Remove FishingHook reference on Craft Entity removal
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
index 42b306f1a341672996843a5e3dfa57ef32be48e9..385fa768cda07a61079476a7344d492f890e59e9 100644
index f8e897f0bc4e5d0a432d20983fd37998bb00ae0f..b480ca876687991685b5e070181721da8192a5b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
@@ -118,4 +118,14 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
@@ -119,4 +119,14 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
public HookState getState() {
return HookState.values()[getHandle().hookState.ordinal()];
}

View File

@ -21,10 +21,10 @@ index 5bdde99d7143ee1bac5830b042bba5485a95f120..ee94c2827cfc53f7a37e61d8c1c0c30a
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 824e172f06e57f86010836a1006a14d0a3b0bda3..eedec25373cfc8adec7ac8a99b146770dc15c70e 100644
index d9f9694cb2677102269294043822fb3773de9b35..8b5901396a7f1dc554a5e237200a8193e9096a18 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -719,6 +719,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -717,6 +717,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
EntityVillager.LOGGER.info("Villager {} was struck by lightning {}.", this, entitylightning);
EntityWitch entitywitch = (EntityWitch) EntityTypes.WITCH.a((World) worldserver);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index fda68abbdd7c970048ba710d7ef35214f2aaa74c..2c2d44562f732c75532cda910db5ce67d6a534ab 100644
index 41f54158fe3312188d2a938ca882ece68cf3c08e..cc65c57637e07b82f5efcfa9f73f0e7abe9be6f5 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -188,7 +188,7 @@ public class EntityExperienceOrb extends Entity {
@@ -189,7 +189,7 @@ public class EntityExperienceOrb extends Entity {
}
if (this.value > 0) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't let fishinghooks use portals
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index ad2ec3472a164bdf3a1ff2c42ec18c74ad58a13c..0e5bbe285bcbb410cc442eba1738aeb2a117ce62 100644
index b9243b0a2d429828f2a2b68c221129e23c6212ca..65b9eebcd59d1d95a77780f41862d8c984dee03c 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -201,6 +201,11 @@ public class EntityFishingHook extends IProjectile {
@@ -202,6 +202,11 @@ public class EntityFishingHook extends IProjectile {
this.setMot(this.getMot().a(0.92D));
this.af();

View File

@ -31,10 +31,10 @@ index ad3c2f4b448fe8a49c1c43374cd5cf14114c9b16..4870a6f9f894b2c9d0fea83dad0808ac
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 7d07f95e669a9da9f2d6f663a75c907e6c829a98..bf2749fd724ac7b67fc0d5887aa307745c5f1835 100644
index 8f38500965a70fb713050321f71c97510703402a..6ff7a59cc7052e900516a89db8daf0720c64a1ac 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -228,4 +228,15 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
@@ -229,4 +229,15 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
public boolean hasEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
return (getHandle().disabledSlots & (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getSlotFlag() + lockType.ordinal() * 8)) != 0;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Firework API's
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
index 46b315036bbe576b2bf9938db73d9c5931003cc1..a646dc9f030ad1f76ba2b7bb1bc7897cd34b648c 100644
index 5306f1d4bdf18a5dbf92b222b892b4accf21f92c..9bc4d3dbd4c64a6fbf33dcf28afde59ace9171ba 100644
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
@@ -13,7 +13,8 @@ public class EntityFireworks extends IProjectile {
@@ -14,7 +14,8 @@ public class EntityFireworks extends IProjectile {
public static final DataWatcherObject<Boolean> SHOT_AT_ANGLE = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i);
private int ticksFlown;
public int expectedLifespan;
@ -18,7 +18,7 @@ index 46b315036bbe576b2bf9938db73d9c5931003cc1..a646dc9f030ad1f76ba2b7bb1bc7897c
public EntityFireworks(EntityTypes<? extends EntityFireworks> entitytypes, World world) {
super(entitytypes, world);
@@ -260,6 +261,11 @@ public class EntityFireworks extends IProjectile {
@@ -261,6 +262,11 @@ public class EntityFireworks extends IProjectile {
}
nbttagcompound.setBoolean("ShotAtAngle", (Boolean) this.datawatcher.get(EntityFireworks.SHOT_AT_ANGLE));
@ -30,7 +30,7 @@ index 46b315036bbe576b2bf9938db73d9c5931003cc1..a646dc9f030ad1f76ba2b7bb1bc7897c
}
@Override
@@ -276,7 +282,11 @@ public class EntityFireworks extends IProjectile {
@@ -277,7 +283,11 @@ public class EntityFireworks extends IProjectile {
if (nbttagcompound.hasKey("ShotAtAngle")) {
this.datawatcher.set(EntityFireworks.SHOT_AT_ANGLE, nbttagcompound.getBoolean("ShotAtAngle"));
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
index 3284143799db25f66d5311a9635e2890f63dcbe3..6a0f7b02c5a2663bb7304a1f8c6cbf1603507d45 100644
index b168fdd4df63c90eea1be4f06fb3aa36ff62deb6..91dacc5de8d695b2ea9b2f8b4547f6dbba0451ad 100644
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
@@ -155,7 +155,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
@@ -156,7 +156,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
location.setPitch(player.getLocation().getPitch());
location.setYaw(player.getLocation().getYaw());

View File

@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f7c5df44eda98ee965ccd38568403617bbde8fdc..3f35e1290beaab1fa2ca93ec64ab0dd42d68d71c 100644
index 8b68c1b680e0b7ecb21b9de782dbc2864e7b5dfe..af8593d117359c75ff8c635a93499d84e25eb854 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -281,6 +281,48 @@ public class CraftWorld implements World {
@@ -282,6 +282,48 @@ public class CraftWorld implements World {
private int waterAmbientSpawn = -1;
private int ambientSpawn = -1;

View File

@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index e8ede86cab0bfcf1164fcdb6b19a60099b50e5eb..fbb7424306d25b0c6dd69229e00c13c4c1a92fec 100644
index 5652462008dd857f2dc36b80e3fe5d3d83867ce5..1d137602b40e467020b89aa73dd67b661d3dedb7 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -976,11 +976,13 @@ public abstract class PlayerList {
@@ -971,11 +971,13 @@ public abstract class PlayerList {
}
public void savePlayers() {

View File

@ -8,7 +8,7 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index d847326b0099a0c05a085d5d62de630491c9ac56..b537385d12463adc82751e40b479b047b32fa5bd 100644
index 428a10fb100d1b4775dab6cfe69f28c29a45cd70..cee4e952c96b9f55c57186ac96aa730e656e1f16 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -228,13 +228,13 @@ public class Block extends BlockBase implements IMaterial {
@ -28,10 +28,10 @@ index d847326b0099a0c05a085d5d62de630491c9ac56..b537385d12463adc82751e40b479b047
}
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
index 5bdb0c3a7a04a55cd5ddff8e375497e402408811..fe9a083b724a8657cac8462b3f44d3cc12a4db58 100644
index 9e02e60060adbe4679a4ad2e848bf34b58a523aa..b69adda272f6bfb7f1570c282a16b343c9a552e2 100644
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
@@ -81,7 +81,7 @@ public class ContainerGrindstone extends Container {
@@ -82,7 +82,7 @@ public class ContainerGrindstone extends Container {
int k = EntityExperienceOrb.getOrbValue(j);
j -= k;
@ -41,10 +41,10 @@ index 5bdb0c3a7a04a55cd5ddff8e375497e402408811..fe9a083b724a8657cac8462b3f44d3cc
world.triggerEffect(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/server/EntityAnimal.java b/src/main/java/net/minecraft/server/EntityAnimal.java
index b2de91eebbc214cff34a3833541559b934c071f7..bba343542e7e6fa83ec802d97b4c139bb210ab28 100644
index 1f79975f47be069cddc15bf3b902ed8105bde8ac..b290218e506d5e4ddd1af17f91de19a588bbcfbd 100644
--- a/src/main/java/net/minecraft/server/EntityAnimal.java
+++ b/src/main/java/net/minecraft/server/EntityAnimal.java
@@ -237,7 +237,7 @@ public abstract class EntityAnimal extends EntityAgeable {
@@ -238,7 +238,7 @@ public abstract class EntityAnimal extends EntityAgeable {
if (worldserver.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
// CraftBukkit start - use event experience
if (experience > 0) {
@ -54,7 +54,7 @@ index b2de91eebbc214cff34a3833541559b934c071f7..bba343542e7e6fa83ec802d97b4c139b
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 81c926e506c1b6e5c0d909b71f1db81beb645699..ef9df3c7c7c455373641f7a7c701f82a23ffef36 100644
index 676b23616a0ef09cea62d3a8d2e3a5fe69f209f1..348d3575115ed6c95b4aee56f0fd930103651489 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -612,7 +612,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
@ -67,10 +67,10 @@ index 81c926e506c1b6e5c0d909b71f1db81beb645699..ef9df3c7c7c455373641f7a7c701f82a
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 2c2d44562f732c75532cda910db5ce67d6a534ab..a9fff75882217b1fd680fd8fd47110f85d88df28 100644
index cc65c57637e07b82f5efcfa9f73f0e7abe9be6f5..701d015baf03eba07b319baf447b5ae06ab8accd 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -16,9 +16,59 @@ public class EntityExperienceOrb extends Entity {
@@ -17,9 +17,59 @@ public class EntityExperienceOrb extends Entity {
public int value;
private EntityHuman targetPlayer;
private int targetTime;
@ -130,7 +130,7 @@ index 2c2d44562f732c75532cda910db5ce67d6a534ab..a9fff75882217b1fd680fd8fd47110f8
this.setPosition(d0, d1, d2);
this.yaw = (float) (this.random.nextDouble() * 360.0D);
this.setMot((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D);
@@ -153,6 +203,7 @@ public class EntityExperienceOrb extends Entity {
@@ -154,6 +204,7 @@ public class EntityExperienceOrb extends Entity {
nbttagcompound.setShort("Health", (short) this.e);
nbttagcompound.setShort("Age", (short) this.c);
nbttagcompound.setShort("Value", (short) this.value);
@ -138,7 +138,7 @@ index 2c2d44562f732c75532cda910db5ce67d6a534ab..a9fff75882217b1fd680fd8fd47110f8
}
@Override
@@ -160,6 +211,7 @@ public class EntityExperienceOrb extends Entity {
@@ -161,6 +212,7 @@ public class EntityExperienceOrb extends Entity {
this.e = nbttagcompound.getShort("Health");
this.c = nbttagcompound.getShort("Age");
this.value = nbttagcompound.getShort("Value");
@ -147,10 +147,10 @@ index 2c2d44562f732c75532cda910db5ce67d6a534ab..a9fff75882217b1fd680fd8fd47110f8
@Override
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 0e5bbe285bcbb410cc442eba1738aeb2a117ce62..723cd60254111579b157684dc82311af5cf9fd13 100644
index 65b9eebcd59d1d95a77780f41862d8c984dee03c..fac695125da50bb33b68f317339832a26f7625a6 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -464,7 +464,7 @@ public class EntityFishingHook extends IProjectile {
@@ -465,7 +465,7 @@ public class EntityFishingHook extends IProjectile {
this.world.addEntity(entityitem);
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
if (playerFishEvent.getExpToDrop() > 0) {
@ -173,7 +173,7 @@ index fef00b46e7cf3690044059f9ee527f799d535b81..a7bbf21e9736a0da38f95d93b013097b
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index cda084e6fe8f4f5dcd8c0b13bd07326db2ca7c59..abc300a54100b42e30705185ec60da6624db4c91 100644
index f54d05f59342231434a70c3b12b7cf9b73f98508..6c2370978443e02f2f39d4ef2ceffe559837bc69 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1501,7 +1501,8 @@ public abstract class EntityLiving extends Entity {
@ -213,10 +213,10 @@ index 61e24c2897a2cb93881caaa6fff86f44461765ac..19c92bea21ddcc3917eb011dcfe41006
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index eedec25373cfc8adec7ac8a99b146770dc15c70e..732323ee1de01929c73bc5f98444c0f68f908a67 100644
index 8b5901396a7f1dc554a5e237200a8193e9096a18..768dfbc58510e8599f05a5bba25558141124e531 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -532,7 +532,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -530,7 +530,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
}
if (merchantrecipe.isRewardExp()) {
@ -226,10 +226,10 @@ index eedec25373cfc8adec7ac8a99b146770dc15c70e..732323ee1de01929c73bc5f98444c0f6
}
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
index 86e9c9ec35153d4d6248512e2e3406ca2f3dac46..fa3e786cd6ef67da378a5d51583ca84a82677d8c 100644
index cce5663d2d6f9658f92c5819b323fee5349ed6bb..250a4e5ddd626794482678a64023f0f5459520e1 100644
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
@@ -145,7 +145,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
@@ -146,7 +146,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
if (merchantrecipe.isRewardExp()) {
int i = 3 + this.random.nextInt(4);
@ -239,10 +239,10 @@ index 86e9c9ec35153d4d6248512e2e3406ca2f3dac46..fa3e786cd6ef67da378a5d51583ca84a
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 862b17e6226f1488167caf08afe7a37b942f7674..8e5975a4871b99329c78379153ad64575d08d123 100644
index b5c464f34789889e71a9fed3cc600f7f9cb8828a..aae5feb77402d721c23f7e781b53864f6778c1dd 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -377,7 +377,7 @@ public class PlayerInteractManager {
@@ -378,7 +378,7 @@ public class PlayerInteractManager {
// Drop event experience
if (flag && event != null) {
@ -265,10 +265,10 @@ index d2698e847cfcbc4d2f91b4f5d66b38b47f86c10e..edc4a5c34e8064d900668d132b3496e3
public SlotFurnaceResult(EntityHuman entityhuman, IInventory iinventory, int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index a3ddf7be4c7ea588098381b8f05b2bad5b388853..99b20fa5feff0f766124d4ec9474852e33e329f2 100644
index 45bc958667776a4f62c8e625eb8fccdc3dfb0f21..af4db22cf87433fcd4f59be207257a8d7c255883 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -573,7 +573,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@@ -574,7 +574,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
int k = EntityExperienceOrb.getOrbValue(j);
j -= k;
@ -278,10 +278,10 @@ index a3ddf7be4c7ea588098381b8f05b2bad5b388853..99b20fa5feff0f766124d4ec9474852e
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e42f27bb10b6ee279555cfee3c90a88fccad9d65..5bf5a815653b0556d9d2bcaf5f69026b77bd28a6 100644
index af8593d117359c75ff8c635a93499d84e25eb854..4058484c256343a71d1392ae0aa54bf07fd0d26e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1827,7 +1827,7 @@ public class CraftWorld implements World {
@@ -1841,7 +1841,7 @@ public class CraftWorld implements World {
} else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new EntityTNTPrimed(world, x, y, z, null);
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 0542dde09d288488b88e17a044cc508d5d39782f..9c520643f415d5952a59c99da2a7726aae8d7ce3 100644
index 612eb16bce1bce1cad40ea0f279d2b8397263dea..02a516ddabda08db33c94cce2d19d9e77666e074 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -75,7 +75,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -76,7 +76,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final PlayerMap playerMap;
public final Int2ObjectMap<PlayerChunkMap.EntityTracker> trackedEntities;
private final Long2ByteMap z;
@ -17,7 +17,7 @@ index 0542dde09d288488b88e17a044cc508d5d39782f..9c520643f415d5952a59c99da2a7726a
private int viewDistance;
// CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback()
@@ -133,7 +133,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -134,7 +134,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.playerMap = new PlayerMap();
this.trackedEntities = new Int2ObjectOpenHashMap();
this.z = new Long2ByteOpenHashMap();
@ -26,7 +26,7 @@ index 0542dde09d288488b88e17a044cc508d5d39782f..9c520643f415d5952a59c99da2a7726a
this.definedStructureManager = definedstructuremanager;
this.w = convertable_conversionsession.a(worldserver.getDimensionKey());
this.world = worldserver;
@@ -391,7 +391,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -392,7 +392,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Spigot start
org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant;
activityAccountant.startActivity(0.5);
@ -35,7 +35,7 @@ index 0542dde09d288488b88e17a044cc508d5d39782f..9c520643f415d5952a59c99da2a7726a
// Spigot end
while (longiterator.hasNext()) { // Spigot
long j = longiterator.nextLong();
@@ -413,7 +413,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -414,7 +414,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
Runnable runnable;

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 7e4a966b5748417223243344bf7c4483e997a237..c6b520f3f8872a0345f76a75f0b48fe113021716 100644
index 110184bd18f689cff1f37ceefe97416b5dcfd405..3baf1be1b58ea53ab1ee8d388b5f9a4595ca478a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -91,6 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -93,6 +93,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public final Map<ResourceKey<World>, WorldServer> worldServer;
private PlayerList playerList;
private volatile boolean isRunning;
@ -41,7 +41,7 @@ index 7e4a966b5748417223243344bf7c4483e997a237..c6b520f3f8872a0345f76a75f0b48fe1
private boolean isStopped;
private int ticks;
protected final Proxy proxy;
@@ -740,7 +741,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -742,7 +743,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.savePlayers();
@ -50,7 +50,7 @@ index 7e4a966b5748417223243344bf7c4483e997a237..c6b520f3f8872a0345f76a75f0b48fe1
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
@@ -805,8 +806,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -807,8 +808,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return this.isRunning;
}
@ -64,7 +64,7 @@ index 7e4a966b5748417223243344bf7c4483e997a237..c6b520f3f8872a0345f76a75f0b48fe1
if (flag) {
try {
this.serverThread.join();
@@ -816,6 +822,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -818,6 +824,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
@ -73,10 +73,10 @@ index 7e4a966b5748417223243344bf7c4483e997a237..c6b520f3f8872a0345f76a75f0b48fe1
// Spigot Start
private static double calcTps(double avg, double exp, double tps)
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index fbb7424306d25b0c6dd69229e00c13c4c1a92fec..97cf3f1f4c19606f099de84745301b52295e2391 100644
index 1d137602b40e467020b89aa73dd67b661d3dedb7..74e55f85e2b128913015397ddec70322739e39d5 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1087,9 +1087,15 @@ public abstract class PlayerList {
@@ -1082,9 +1082,15 @@ public abstract class PlayerList {
entityplayer.playerInteractManager.b(worldserver.worldDataServer.getGameType()); // CraftBukkit
}
@ -92,7 +92,7 @@ index fbb7424306d25b0c6dd69229e00c13c4c1a92fec..97cf3f1f4c19606f099de84745301b52
player.playerConnection.disconnect(PaperAdventure.asVanilla(this.server.server.shutdownMessage())); // CraftBukkit - add custom shutdown message // Paper - Adventure
}
// CraftBukkit end
@@ -1102,6 +1108,7 @@ public abstract class PlayerList {
@@ -1097,6 +1103,7 @@ public abstract class PlayerList {
}
// Paper end
}

View File

@ -11,10 +11,10 @@ to make books with as much data as they want. Do not use this without
limiting incoming data from packets in some other way.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 1cc49b9d8c784f96cfc54159c1139af501264de6..88a021fa97b3daeeef002d485095f2fb90121827 100644
index 123616ed018fbc4d69f46e65d5ff15734008a00d..34449ac7899abbc863266da1e6197873f80940b0 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -38,6 +38,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -40,6 +40,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
static final int MAX_PAGES = 100;
static final int MAX_PAGE_LENGTH = 320; // 256 limit + 64 characters to allow for psuedo colour codes
static final int MAX_TITLE_LENGTH = 32;
@ -22,7 +22,7 @@ index 1cc49b9d8c784f96cfc54159c1139af501264de6..88a021fa97b3daeeef002d485095f2fb
protected String title;
protected String author;
@@ -240,7 +241,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -242,7 +243,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
if (title == null) {
this.title = null;
return true;
@ -31,7 +31,7 @@ index 1cc49b9d8c784f96cfc54159c1139af501264de6..88a021fa97b3daeeef002d485095f2fb
return false;
}
@@ -431,7 +432,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -433,7 +434,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
String validatePage(String page) {
if (page == null) {
page = "";
@ -40,7 +40,7 @@ index 1cc49b9d8c784f96cfc54159c1139af501264de6..88a021fa97b3daeeef002d485095f2fb
page = page.substring(0, MAX_PAGE_LENGTH);
}
return page;
@@ -441,7 +442,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -443,7 +444,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
// asserted: page != null
if (this.pages == null) {
this.pages = new ArrayList<String>();

View File

@ -186,19 +186,19 @@ index dc0cb79525adf0d5afee1f677e1fde546529cf97..750b1dc10ffb7adb9194e6cc8ace8fa9
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c6b520f3f8872a0345f76a75f0b48fe113021716..ee009052eb10125bbaca95b5fda306adbd8a9995 100644
index 3baf1be1b58ea53ab1ee8d388b5f9a4595ca478a..5e64853fca8e1baa103dd69c050a4900ef7f7f37 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -58,7 +58,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
// CraftBukkit start
@@ -59,7 +59,7 @@ import org.apache.logging.log4j.Logger;
import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
import com.google.common.collect.ImmutableSet;
-import jline.console.ConsoleReader;
+// import jline.console.ConsoleReader; // Paper
import joptsimple.OptionSet;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.CraftServer;
@@ -145,7 +145,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -147,7 +147,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
@ -207,7 +207,7 @@ index c6b520f3f8872a0345f76a75f0b48fe113021716..ee009052eb10125bbaca95b5fda306ad
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;
@@ -214,7 +214,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -216,7 +216,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.options = options;
this.datapackconfiguration = datapackconfiguration;
this.vanillaCommandDispatcher = datapackresources.commandDispatcher; // CraftBukkit
@ -217,7 +217,7 @@ index c6b520f3f8872a0345f76a75f0b48fe113021716..ee009052eb10125bbaca95b5fda306ad
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
@@ -235,6 +237,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -237,6 +239,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
LOGGER.warn((String) null, ex);
}
}
@ -226,7 +226,7 @@ index c6b520f3f8872a0345f76a75f0b48fe113021716..ee009052eb10125bbaca95b5fda306ad
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
@@ -978,7 +982,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -980,7 +984,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings
try {
@ -235,7 +235,7 @@ index c6b520f3f8872a0345f76a75f0b48fe113021716..ee009052eb10125bbaca95b5fda306ad
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1349,7 +1353,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1351,7 +1355,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Override
public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {
@ -245,10 +245,10 @@ index c6b520f3f8872a0345f76a75f0b48fe113021716..ee009052eb10125bbaca95b5fda306ad
public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 7ecd5e3747fd8acbddcdf5b42285d7b6f3ffbac2..07ab0bf135a6903c936606296b6701b970ad48db 100644
index 74e55f85e2b128913015397ddec70322739e39d5..a56f9a07472e9a56da12a096400e69bd0d0cd17f 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -81,8 +81,7 @@ public abstract class PlayerList {
@@ -76,8 +76,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) {
this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this);
@ -259,7 +259,7 @@ index 7ecd5e3747fd8acbddcdf5b42285d7b6f3ffbac2..07ab0bf135a6903c936606296b6701b9
this.k = new GameProfileBanList(PlayerList.b);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2101695ca111d0bfcec7da5065034b6029687949..38486fb74a29fd8ace2bfa6e74c1b5230ab99a7f 100644
index 1203780c0b1ac0f79c0a5a7d648e973371159e52..126debf6b1734368a6147e758de039b51867353d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -46,7 +46,7 @@ import java.util.function.Consumer;

View File

@ -21,10 +21,10 @@ index 9d1cddc6038f0fd0286e4a32013ae98ff0b00dd1..90ca51dfdbb3045dd528450225cba96f
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 8d7b77e01c5031953ab3a4811c8397503b52a0e3..7b9188a33c079155a7ff5b0e5de854550324f0f1 100644
index c649e391b0f6d94efb84e408ca4f61ef0eddef0a..78d136eed54b815f5c866d3ab0d96c1d819bc6b2 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -226,7 +226,7 @@ public class EntityCreeper extends EntityMonster {
@@ -227,7 +227,7 @@ public class EntityCreeper extends EntityMonster {
private void createEffectCloud() {
Collection<MobEffect> collection = this.getEffects();

View File

@ -21,10 +21,10 @@ index a819fc46bebc4b1aaae63f822087574e976e2ab8..6274cf1975270fdac8ae4986e1c170bd
}
}
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index b1e953fc5c61abe0aeb667a12fd4491d11f422de..507ad727ce62a30b1120104b16737e21b777d7ae 100644
index bbaba67d297c3d6a488bdbf6c500658e872772b0..9b400c1f4ea807149862d30154df9b30895176da 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -20,6 +20,7 @@ public class EntityItem extends Entity {
@@ -21,6 +21,7 @@ public class EntityItem extends Entity {
private UUID owner;
public final float b;
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit

View File

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 507ad727ce62a30b1120104b16737e21b777d7ae..57a2fdfbcd04345901f8f596c68932b4942790a1 100644
index 9b400c1f4ea807149862d30154df9b30895176da..051c97374fdbd6ff6d4eb58a3b6630ece8469967 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -336,6 +336,7 @@ public class EntityItem extends Entity {
@@ -337,6 +337,7 @@ public class EntityItem extends Entity {
// CraftBukkit start - fire PlayerPickupItemEvent
int canHold = entityhuman.inventory.canHold(itemstack);
int remaining = i - canHold;
@ -16,7 +16,7 @@ index 507ad727ce62a30b1120104b16737e21b777d7ae..57a2fdfbcd04345901f8f596c68932b4
if (this.pickupDelay <= 0 && canHold > 0) {
itemstack.setCount(canHold);
@@ -343,8 +344,14 @@ public class EntityItem extends Entity {
@@ -344,8 +345,14 @@ public class EntityItem extends Entity {
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
playerEvent.setCancelled(!entityhuman.canPickUpLoot);
this.world.getServer().getPluginManager().callEvent(playerEvent);
@ -31,7 +31,7 @@ index 507ad727ce62a30b1120104b16737e21b777d7ae..57a2fdfbcd04345901f8f596c68932b4
return;
}
@@ -374,7 +381,11 @@ public class EntityItem extends Entity {
@@ -375,7 +382,11 @@ public class EntityItem extends Entity {
// CraftBukkit end
if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 57a2fdfbcd04345901f8f596c68932b4942790a1..7e1cc212e22f21bec1f6b1a2d337ef2ee70dc699 100644
index 051c97374fdbd6ff6d4eb58a3b6630ece8469967..fac335b3f80e6af3b08544cfd4abe3c77b66b023 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -9,6 +9,7 @@ import javax.annotation.Nullable;
@@ -10,6 +10,7 @@ import javax.annotation.Nullable;
import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
// CraftBukkit end
@ -16,7 +16,7 @@ index 57a2fdfbcd04345901f8f596c68932b4942790a1..7e1cc212e22f21bec1f6b1a2d337ef2e
public class EntityItem extends Entity {
@@ -338,6 +339,22 @@ public class EntityItem extends Entity {
@@ -339,6 +340,22 @@ public class EntityItem extends Entity {
int remaining = i - canHold;
boolean flyAtPlayer = false; // Paper

View File

@ -513,7 +513,7 @@ index e89c92aded564fe689cc1aa8d0c83abb72f7b10c..aa1b18ffa1e2b7f865f63b7df81d8f3b
private volatile long c;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 3ddd97c732fe5ae24075e70f8b8a2b0c3e52a32c..2b6c9dbbbf97386cd9d9b37254640b8585092140 100644
index 0d52428faa3730cf4f2bf4e16884fdea6ad57c9a..5c9a2efe69bda1453ae9b679a2ee992ae98e965f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -227,6 +227,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -552,10 +552,10 @@ index 3ddd97c732fe5ae24075e70f8b8a2b0c3e52a32c..2b6c9dbbbf97386cd9d9b37254640b85
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index c57634317b661e05ddd085d04f7338045445069f..da9ad92f6c999d87b790852cb3129f9b04f624a9 100644
index 42de897596ada4044df683dc5e8d5d750ee9c207..58aeeff96a92b5ba0c3435c680885ad3bc4f4ce6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -79,6 +79,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -80,6 +80,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
}
private void setProfile(GameProfile profile) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 9a2441e3567e8315e71ab66844914ae7835623b4..30acb3cd9381bab2932a0679dc496e8b1ed65d94 100644
index a56f9a07472e9a56da12a096400e69bd0d0cd17f..2411832c96794f3c39a5e9083b20217880f773ff 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -544,9 +544,9 @@ public abstract class PlayerList {
@@ -539,9 +539,9 @@ public abstract class PlayerList {
// return chatmessage;
if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(chatmessage)); // Spigot // Paper - Adventure
@ -21,7 +21,7 @@ index 9a2441e3567e8315e71ab66844914ae7835623b4..30acb3cd9381bab2932a0679dc496e8b
} else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) {
IpBanEntry ipbanentry = this.l.get(socketaddress);
@@ -938,9 +938,25 @@ public abstract class PlayerList {
@@ -933,9 +933,25 @@ public abstract class PlayerList {
this.server.getCommandDispatcher().a(entityplayer);
}

View File

@ -13,10 +13,10 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
If Tile Entity was null, correct Sign to return empty lines instead of null
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index cea42d98aa6e1f96df0fa70234086dceb124fbbf..34d92491830c99172bec5251fa80300b6315e5ef 100644
index 524f84ad2c50f8b837eefd0465901b1e22359410..c6ae3d3f9d7957d4bbe0b4e2613558e5cd9dd9ec 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -33,6 +33,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -36,6 +36,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
public TileEntity(TileEntityTypes<?> tileentitytypes) {
this.position = BlockPosition.ZERO;
this.tileType = tileentitytypes;
@ -24,7 +24,7 @@ index cea42d98aa6e1f96df0fa70234086dceb124fbbf..34d92491830c99172bec5251fa80300b
}
// Paper start
@@ -81,7 +82,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -84,7 +85,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
this.position = new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z"));
// CraftBukkit start - read container
@ -33,7 +33,7 @@ index cea42d98aa6e1f96df0fa70234086dceb124fbbf..34d92491830c99172bec5251fa80300b
NBTBase persistentDataTag = nbttagcompound.get("PublicBukkitValues");
if (persistentDataTag instanceof NBTTagCompound) {
@@ -231,7 +232,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -234,7 +235,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
}
// CraftBukkit start - add method
@ -46,7 +46,7 @@ index cea42d98aa6e1f96df0fa70234086dceb124fbbf..34d92491830c99172bec5251fa80300b
if (world == null) return null;
// Spigot start
org.bukkit.block.Block block = world.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
@@ -240,7 +246,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@@ -243,7 +249,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
return null;
}
// Spigot end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Avoid NPE in PathfinderGoalTempt
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
index 74a24c2844d3fb5d6ff53b364c0566c007509e76..90738a547be8822e168abd1e8437a202d123229f 100644
index 87a20538dd1e056d7412154473863628a7fdefe2..582ea29068de07edce73ab1a55d3ae7373650e16 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
@@ -55,7 +55,7 @@ public class PathfinderGoalTempt extends PathfinderGoal {
@@ -56,7 +56,7 @@ public class PathfinderGoalTempt extends PathfinderGoal {
}
this.target = (event.getTarget() == null) ? null : ((CraftLivingEntity) event.getTarget()).getHandle();
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] PlayerPickupExperienceEvent
Allows plugins to cancel a player picking up an experience orb
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index a9fff75882217b1fd680fd8fd47110f85d88df28..8354d18aa03d29202c82227a1891903a64c7921b 100644
index 701d015baf03eba07b319baf447b5ae06ab8accd..e7b20e2c07426d156fa819ed2e23e29d6a71d499 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -217,7 +217,7 @@ public class EntityExperienceOrb extends Entity {
@@ -218,7 +218,7 @@ public class EntityExperienceOrb extends Entity {
@Override
public void pickup(EntityHuman entityhuman) {
if (!this.world.isClientSide) {

View File

@ -25,10 +25,10 @@ index ff56d7b045d7d93419a5f2f35df70b3644ac55b0..7b263594304a9b745f583fe7178ac169
return true;
});
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 8354d18aa03d29202c82227a1891903a64c7921b..4df7df781d12e38885ecfbc89dd1d42d9de14248 100644
index e7b20e2c07426d156fa819ed2e23e29d6a71d499..837a2c8f6af6e51316511e3948869ac059c8fc0d 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -249,10 +249,12 @@ public class EntityExperienceOrb extends Entity {
@@ -250,10 +250,12 @@ public class EntityExperienceOrb extends Entity {
}
}
@ -42,7 +42,7 @@ index 8354d18aa03d29202c82227a1891903a64c7921b..4df7df781d12e38885ecfbc89dd1d42d
return i * 2;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 69606cf1ac2c8419801af692c19d55d3d56bc0a8..d2f8b4b324b2a9719f409871afde88ad21a94efe 100644
index 9cd82ca462d4ae88c2cbcd96e6f0660288be5208..1e3794c3e6bf43c3cc2708c4c8c1f816867a3a09 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1180,8 +1180,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -40,10 +40,10 @@ index b1fe488e41a2c9f77df091e1d14ed5c87a4358c8..14f47d100c3f44a8263c9b907e9ca749
if (t0 != null) {
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 732323ee1de01929c73bc5f98444c0f68f908a67..b6ad33b3bfc1a71d3e4495c803cba12ee3c2a971 100644
index 768dfbc58510e8599f05a5bba25558141124e531..3a6992a5763238996847a8e59b650606a384e4ff 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -868,6 +868,21 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -866,6 +866,21 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
BlockPosition blockposition1 = this.a(blockposition, d0, d1);
if (blockposition1 != null) {

View File

@ -29,7 +29,7 @@ index a066026bce318683dcc022920dad39d7ec25e485..8017953af1df6c046a47ebe655e5d1af
Optional<Chunk> optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index fd7513008dde790107647f7f5b9670030696e064..3f559918e85b6d5c2ab8ff593b69d40c1db8bb16 100644
index 7a9e237d23051b43fe0ac3720cd6a36faabc9dd2..42bf31bd9569a8f1c2b36f1c3a2c5c0d805c9b5d 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1,5 +1,6 @@
@ -48,10 +48,10 @@ index fd7513008dde790107647f7f5b9670030696e064..3f559918e85b6d5c2ab8ff593b69d40c
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> cachedSingleHashSet; // Paper
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 9c520643f415d5952a59c99da2a7726aae8d7ce3..8862bbd73b627e37709d46e6aeeee70c89cbd821 100644
index 02a516ddabda08db33c94cce2d19d9e77666e074..8bfa412b0d3f881f694abec89101e15aa2d00bb7 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -912,12 +912,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -913,12 +913,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;

View File

@ -48,7 +48,7 @@ index 20588598386a4f479e6a58b294149bed789c63ce..ecc32c2fb1e8e1ac03074102b982adb4
public BlockFace getRotation() {
BlockData blockData = getBlockData();
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index da9ad92f6c999d87b790852cb3129f9b04f624a9..ca40a5e33f851d560086533382340dd59f783f54 100644
index 58aeeff96a92b5ba0c3435c680885ad3bc4f4ce6..fba6c1f454fdee3541393e6803d7249cf1fbe6d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableMap.Builder;
@ -60,7 +60,7 @@ index da9ad92f6c999d87b790852cb3129f9b04f624a9..ca40a5e33f851d560086533382340dd5
import net.minecraft.server.GameProfileSerializer;
import net.minecraft.server.NBTBase;
import net.minecraft.server.NBTTagCompound;
@@ -17,6 +19,7 @@ import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta;
@@ -18,6 +20,7 @@ import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.inventory.meta.SkullMeta;
@ -68,7 +68,7 @@ index da9ad92f6c999d87b790852cb3129f9b04f624a9..ca40a5e33f851d560086533382340dd5
@DelegateDeserialization(SerializableMeta.class)
class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -148,6 +151,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -149,6 +152,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
return hasOwner() ? profile.getName() : null;
}

View File

@ -13,11 +13,11 @@ starting point for future additions in this area.
Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82519250e1 100644
index 9be4f8d56eaa6dd0d798dc5c1ae7e2bb0ba39d49..2cdabee85fcb377a563951f13386b13431aed1e1 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -8,9 +8,22 @@ import org.bukkit.Material;
import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -9,9 +9,22 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey;
@DelegateDeserialization(CraftMetaItem.SerializableMeta.class)
-public class CraftMetaArmorStand extends CraftMetaItem {
@ -40,7 +40,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
NBTTagCompound entityTag;
CraftMetaArmorStand(CraftMetaItem meta) {
@@ -21,6 +34,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -22,6 +35,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
}
CraftMetaArmorStand armorStand = (CraftMetaArmorStand) meta;
@ -54,7 +54,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
this.entityTag = armorStand.entityTag;
}
@@ -29,11 +49,47 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -30,11 +50,47 @@ public class CraftMetaArmorStand extends CraftMetaItem {
if (tag.hasKey(ENTITY_TAG.NBT)) {
entityTag = tag.getCompound(ENTITY_TAG.NBT);
@ -102,7 +102,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
}
@Override
@@ -56,6 +112,32 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -57,6 +113,32 @@ public class CraftMetaArmorStand extends CraftMetaItem {
void applyToItem(NBTTagCompound tag) {
super.applyToItem(tag);
@ -135,7 +135,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
if (entityTag != null) {
tag.set(ENTITY_TAG.NBT, entityTag);
}
@@ -77,7 +159,7 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -78,7 +160,7 @@ public class CraftMetaArmorStand extends CraftMetaItem {
}
boolean isArmorStandEmpty() {
@ -144,7 +144,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
}
@Override
@@ -88,7 +170,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -89,7 +171,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
if (meta instanceof CraftMetaArmorStand) {
CraftMetaArmorStand that = (CraftMetaArmorStand) meta;
@ -159,7 +159,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
}
return true;
}
@@ -103,9 +191,14 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -104,9 +192,14 @@ public class CraftMetaArmorStand extends CraftMetaItem {
final int original;
int hash = original = super.applyHash();
@ -177,7 +177,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
return original != hash ? CraftMetaArmorStand.class.hashCode() ^ hash : hash;
}
@@ -114,6 +207,28 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -115,6 +208,28 @@ public class CraftMetaArmorStand extends CraftMetaItem {
Builder<String, Object> serialize(Builder<String, Object> builder) {
super.serialize(builder);
@ -206,7 +206,7 @@ index 1a3549480be056368bd6c9d1a98335b3bb07d1d5..25b310ad3f1bcefd04406b7efd1ffa82
return builder;
}
@@ -127,4 +242,56 @@ public class CraftMetaArmorStand extends CraftMetaItem {
@@ -128,4 +243,56 @@ public class CraftMetaArmorStand extends CraftMetaItem {
return clone;
}

View File

@ -13,10 +13,10 @@ Update adjacent blocks of doors, double plants, pistons and beds
when cancelling interaction.
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 8e5975a4871b99329c78379153ad64575d08d123..9b282a917e797a652b5ec10f1f9f550b6d82777f 100644
index aae5feb77402d721c23f7e781b53864f6778c1dd..daeaae8072a12b1d5f0718ba9e5bdd4f9c0e2169 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -148,6 +148,11 @@ public class PlayerInteractManager {
@@ -149,6 +149,11 @@ public class PlayerInteractManager {
PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, blockposition, enumdirection, this.player.inventory.getItemInHand(), EnumHand.MAIN_HAND);
if (event.isCancelled()) {
// Let the client know the block still exists
@ -28,7 +28,7 @@ index 8e5975a4871b99329c78379153ad64575d08d123..9b282a917e797a652b5ec10f1f9f550b
this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
// Update any tile entity data for this block
TileEntity tileentity = this.world.getTileEntity(blockposition);
@@ -452,13 +457,32 @@ public class PlayerInteractManager {
@@ -453,13 +458,32 @@ public class PlayerInteractManager {
interactItemStack = itemstack.cloneItemStack();
if (event.useInteractedBlock() == Event.Result.DENY) {

View File

@ -175,7 +175,7 @@ index 0000000000000000000000000000000000000000..39b236a6319b1f44fbe28bbe43f064be
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ee009052eb10125bbaca95b5fda306adbd8a9995..88b45c8b4f58ee83d625408eae08aa329c87a6d4 100644
index 5e64853fca8e1baa103dd69c050a4900ef7f7f37..41fbdaa99f2c884371b7922d28551dffd44686ed 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;
@ -188,7 +188,7 @@ index ee009052eb10125bbaca95b5fda306adbd8a9995..88b45c8b4f58ee83d625408eae08aa32
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1119,7 +1122,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1121,7 +1124,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (i - this.T >= 5000000000L) {
this.T = i;
this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));

View File

@ -43,10 +43,10 @@ index 885bf43a591492f19bd5a421ea4271854ae8f192..d192e341f0f6a3d03329dab16de3b199
if (this.a(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 5bf5a815653b0556d9d2bcaf5f69026b77bd28a6..94fd77595a6bf2ee8deace75e243e5ce4286d82d 100644
index 4058484c256343a71d1392ae0aa54bf07fd0d26e..6e2f73cac222044256e97bc2c07f5581d63de1a2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2339,11 +2339,17 @@ public class CraftWorld implements World {
@@ -2353,11 +2353,17 @@ public class CraftWorld 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

@ -8,10 +8,10 @@ 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 94fd77595a6bf2ee8deace75e243e5ce4286d82d..3518505236e1b5c7267bc65756acd60f34873cfc 100644
index 6e2f73cac222044256e97bc2c07f5581d63de1a2..e2dd76d0bc5db5dd07d8574135b8d64b40e2c34a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1507,6 +1507,10 @@ public class CraftWorld implements World {
@@ -1521,6 +1521,10 @@ public class CraftWorld implements World {
if (Boat.class.isAssignableFrom(clazz)) {
entity = new EntityBoat(world, x, y, z);
entity.setPositionRotation(x, y, z, yaw, pitch);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent
diff --git a/src/main/java/net/minecraft/server/TileEntityEndGateway.java b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
index 6a0f7b02c5a2663bb7304a1f8c6cbf1603507d45..5550fd9ea6bcae07dcdf431322cb0da0b26a6d71 100644
index 91dacc5de8d695b2ea9b2f8b4547f6dbba0451ad..a242dd1f7ca7f2d93312d630173397a3abd83b1d 100644
--- a/src/main/java/net/minecraft/server/TileEntityEndGateway.java
+++ b/src/main/java/net/minecraft/server/TileEntityEndGateway.java
@@ -168,9 +168,20 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
@@ -169,9 +169,20 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
}
// CraftBukkit end

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event
Otherwise the creeper infinite explodes
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 7b9188a33c079155a7ff5b0e5de854550324f0f1..647795bc7ea68f9dbe9d3f6488eaec82159feb9f 100644
index 78d136eed54b815f5c866d3ab0d96c1d819bc6b2..b0de5c0705983debd7995c586612a7802f6d8f59 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -12,7 +12,7 @@ public class EntityCreeper extends EntityMonster {
@@ -13,7 +13,7 @@ public class EntityCreeper extends EntityMonster {
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.b);
private static final DataWatcherObject<Boolean> POWERED = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i);
@ -18,7 +18,7 @@ index 7b9188a33c079155a7ff5b0e5de854550324f0f1..647795bc7ea68f9dbe9d3f6488eaec82
private int bo;
private int fuseTicks;
public int maxFuseTicks = 30;
@@ -217,6 +217,7 @@ public class EntityCreeper extends EntityMonster {
@@ -218,6 +218,7 @@ public class EntityCreeper extends EntityMonster {
this.createEffectCloud();
} else {
fuseTicks = 0;

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 3518505236e1b5c7267bc65756acd60f34873cfc..5059ae88375ca9077f02fa521b9ff35018584417 100644
index e2dd76d0bc5db5dd07d8574135b8d64b40e2c34a..ad80ebd9d69b4d86078a7c3daa274f115f172794 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -882,6 +882,11 @@ public class CraftWorld implements World {
@@ -896,6 +896,11 @@ public class CraftWorld implements World {
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled;
}

View File

@ -82,7 +82,7 @@ index 2ec1af8be419d94dfde8fe2cc46bae88751a9d8f..f31d3eed3a53d171596b888351064f6d
public CraftIllusioner(CraftServer server, EntityIllagerIllusioner entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
index 23ab78da150cacefbac3e35f860dbd20548e54fa..3f94c5a9206e2da9c852d282e267ab4d9f7324c4 100644
index 058010b9910a672264f198fcdcd17be42312e571..71faa1b38f613db468ee939a7ffac7aaed733d20 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
@@ -1,5 +1,6 @@
@ -92,8 +92,8 @@ index 23ab78da150cacefbac3e35f860dbd20548e54fa..3f94c5a9206e2da9c852d282e267ab4d
import com.google.common.base.Preconditions;
import net.minecraft.server.EntityLlama;
import org.bukkit.craftbukkit.CraftServer;
@@ -9,7 +10,7 @@ import org.bukkit.entity.Horse;
import org.bukkit.entity.Llama;
@@ -10,7 +11,7 @@ import org.bukkit.entity.Llama;
import org.bukkit.entity.Llama.Color;
import org.bukkit.inventory.LlamaInventory;
-public class CraftLlama extends CraftChestedHorse implements Llama {
@ -142,10 +142,10 @@ index 9c659d764b57adf7b5dda0dbd7358cf9df1a1065..662caa42ebb51c3a1ecf0fbe21605589
public CraftPillager(CraftServer server, EntityPillager entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
index b4ae8984019b09ae52d708a48663d9ca7509eb29..02df66ecfe92727e1b8e662bb41faac0dc014a44 100644
index 1cd359b3d5e8a68edda9cecce30bd9dc4beadee2..cf68b17745e2fbd8769e6b73d54b908e957e4a88 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
@@ -1,11 +1,12 @@
@@ -1,12 +1,13 @@
package org.bukkit.craftbukkit.entity;
+import com.destroystokyo.paper.entity.CraftRangedEntity;
@ -153,6 +153,7 @@ index b4ae8984019b09ae52d708a48663d9ca7509eb29..02df66ecfe92727e1b8e662bb41faac0
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Skeleton;
import org.bukkit.entity.Skeleton.SkeletonType;
-public class CraftSkeleton extends CraftMonster implements Skeleton {
+public class CraftSkeleton extends CraftMonster implements Skeleton, CraftRangedEntity<EntitySkeletonAbstract> { // Paper

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 5059ae88375ca9077f02fa521b9ff35018584417..6c58b404807c109bacdf6f3d35fbb05329ea8465 100644
index ad80ebd9d69b4d86078a7c3daa274f115f172794..d8d8a8e10911424ba6ce8a80c58f172fbe0b44af 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1296,6 +1296,15 @@ public class CraftWorld implements World {
@@ -1310,6 +1310,15 @@ public class CraftWorld implements World {
return list;
}

View File

@ -117,10 +117,10 @@ index 6051ceba109350fdb07f476df97a1f27345f20f1..7a52e92de0f0b1fccfc07045701d1b86
this.player.o();
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 57955b39fccc9642499445f07c10a55c7f8eacc7..1dfc6476593aeff1d867f8598a843b67f24d5207 100644
index 2411832c96794f3c39a5e9083b20217880f773ff..ec175cd90491c3473543daa0b565fdc453888a34 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -423,7 +423,7 @@ public abstract class PlayerList {
@@ -418,7 +418,7 @@ public abstract class PlayerList {
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
// See SPIGOT-5799, SPIGOT-6145
if (entityplayer.activeContainer != entityplayer.defaultContainer) {
@ -180,7 +180,7 @@ index b0142be8baeda1dbb921e171d903eea02953b5b2..8b692e93706fc571433df55f01428c84
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 785682d7b932693ff0c437563c9f53f32136e75e..df5c75aaeb1aef7cbed9e4b500a2a9a1632e049f 100644
index 9a49fb71a55aca88ed43322769bdb3c5605ea4b6..aab2f601bf6196e9a23762346d5e22e917f603ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -895,7 +895,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Vex#getSummoner API
Get's the NPC that summoned this Vex
diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java
index ffcb0e1bfbb196ddcbc144fa83d1525398970309..b84eb0394ab9a53e32b774682bc42b067625195e 100644
index b4bda8baff6ee124b0ec7aed155824a278f8ac50..00568a19d7a25189d599fc84afb6ca6d642e2855 100644
--- a/src/main/java/net/minecraft/server/EntityVex.java
+++ b/src/main/java/net/minecraft/server/EntityVex.java
@@ -89,6 +89,7 @@ public class EntityVex extends EntityMonster {
@@ -88,6 +88,7 @@ public class EntityVex extends EntityMonster {
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 7e1cc212e22f21bec1f6b1a2d337ef2ee70dc699..fde34e4c0c95d23a006304f26339a60ea6cf51fa 100644
index fac335b3f80e6af3b08544cfd4abe3c77b66b023..3ba7bd0461d1c58c235cf0cda8d4eecf36b57407 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -182,6 +182,10 @@ public class EntityItem extends Entity {
@@ -183,6 +183,10 @@ public class EntityItem extends Entity {
private void mergeNearby() {
if (this.z()) {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 74b1aa0d52d0e325f8162d78d60c27f855ef0112..64a739d0660098b840e2369f150670691eb9c441 100644
index 18ec6f553ddea775b279658a280fc2a3e5f96fa9..be5ad564964f26c90440bb30464edbf9882ff1e1 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -19,10 +19,10 @@ index 74b1aa0d52d0e325f8162d78d60c27f855ef0112..64a739d0660098b840e2369f15067069
if (bukkitEntity == null) {
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 8862bbd73b627e37709d46e6aeeee70c89cbd821..4bbcd00950405a4bf3ce391b557049a3b1d4aee8 100644
index 8bfa412b0d3f881f694abec89101e15aa2d00bb7..6d048fbb48444885051efcb83a55d32047ff6517 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1093,6 +1093,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1094,6 +1094,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
} else {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking());
@ -30,7 +30,7 @@ index 8862bbd73b627e37709d46e6aeeee70c89cbd821..4bbcd00950405a4bf3ce391b557049a3
this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker);
playerchunkmap_entitytracker.track(this.world.getPlayers());
if (entity instanceof EntityPlayer) {
@@ -1134,7 +1135,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1135,7 +1136,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (playerchunkmap_entitytracker1 != null) {
playerchunkmap_entitytracker1.a();
}
@ -40,7 +40,7 @@ index 8862bbd73b627e37709d46e6aeeee70c89cbd821..4bbcd00950405a4bf3ce391b557049a3
protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 33444cd8aec8ce39fb4fef232909cd42ef036d54..3bad056cf3c9a4322dbbf3486ea4510117a8d95b 100644
index d3c282eb5253351ec4288bffaeca715547089cec..cb1330ef117224aea07208cebff544c714ae313a 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -52,7 +52,7 @@ index 33444cd8aec8ce39fb4fef232909cd42ef036d54..3bad056cf3c9a4322dbbf3486ea45101
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 0156e97e736998ed63200d73f4244846050d8354..041dfa08066667501f18e043e8b894c660b949a7 100644
index 89cd1348ab609555d7c49536fa56ba7dcde2d601..f0c088c4c3283725e515e468faab1dee6a04a853 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -88,6 +88,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -50,10 +50,10 @@ index 0b62041f6dc9cb0151ea55407f6706cac134f1b5..97aed437adb98bc468ec757df8b6d375
return false;
}
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index f4be1584b5d09b6c5d01b29cecbc96849b6e90fc..9d62bc6d600526881dccb44d158e30f565078cec 100644
index 6fb62f75fef4651986c8314c22a465304e7aa97a..ae2ad70699347e169d941266ec3ad1af4c9b3786 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -154,7 +154,8 @@ public class ItemBlock extends Item {
@@ -155,7 +155,8 @@ public class ItemBlock extends Item {
EntityHuman entityhuman = blockactioncontext.getEntity();
VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.a() : VoxelShapeCollision.a((Entity) entityhuman);
// CraftBukkit start - store default return

View File

@ -83,10 +83,10 @@ index f649b6cc5840a79c80217427abdadd889bf2738c..e26b1362899a9fad5e0e3a4e49acd98b
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b229cbf7541 100644
index d8d8a8e10911424ba6ce8a80c58f172fbe0b44af..be028a80247dfb3bf7c726b1868c6e5c5bd99264 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1032,6 +1032,7 @@ public class CraftWorld implements World {
@@ -1046,6 +1046,7 @@ public class CraftWorld implements World {
for (Object o : world.entitiesById.values()) {
if (o instanceof net.minecraft.server.Entity) {
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
@ -94,7 +94,7 @@ index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b22
Entity bukkitEntity = mcEnt.getBukkitEntity();
// Assuming that bukkitEntity isn't null
@@ -1051,6 +1052,7 @@ public class CraftWorld implements World {
@@ -1065,6 +1066,7 @@ public class CraftWorld implements World {
for (Object o : world.entitiesById.values()) {
if (o instanceof net.minecraft.server.Entity) {
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
@ -102,7 +102,7 @@ index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b22
Entity bukkitEntity = mcEnt.getBukkitEntity();
// Assuming that bukkitEntity isn't null
@@ -1077,6 +1079,7 @@ public class CraftWorld implements World {
@@ -1091,6 +1093,7 @@ public class CraftWorld implements World {
for (Object entity: world.entitiesById.values()) {
if (entity instanceof net.minecraft.server.Entity) {
@ -110,7 +110,7 @@ index 6c58b404807c109bacdf6f3d35fbb05329ea8465..47d407af1a770404284c591978978b22
Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity();
if (bukkitEntity == null) {
@@ -1100,6 +1103,7 @@ public class CraftWorld implements World {
@@ -1114,6 +1117,7 @@ public class CraftWorld implements World {
for (Object entity: world.entitiesById.values()) {
if (entity instanceof net.minecraft.server.Entity) {

View File

@ -20,10 +20,10 @@ index 9a3183e55fcb6809d2b324ad52e27f3e77d8fcb2..abcf3ab8bab2ca98ab0f7e852b8185e2
return (this.disabledSlots & 1 << enumitemslot.getSlotFlag()) != 0 || enumitemslot.a() == EnumItemSlot.Function.HAND && !this.hasArms();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index bf2749fd724ac7b67fc0d5887aa307745c5f1835..c19f0b0dd3fe988a30049297355445fd73cae630 100644
index 6ff7a59cc7052e900516a89db8daf0720c64a1ac..557cdb6ca007c617278e8cf723a2a11eae67d57d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -238,5 +238,78 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
@@ -239,5 +239,78 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
public void setCanMove(boolean move) {
getHandle().canMove = move;
}

View File

@ -115,17 +115,17 @@ index c6fe9c1f7ef06c4524533130b493ca5e72bd1693..7b601955f3fd36f06c838b896b455a60
world.a(blockposition, false);
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index ef9df3c7c7c455373641f7a7c701f82a23ffef36..6bd55433fafcfd8079b8e7b1ce6b65daa13b83c1 100644
index 348d3575115ed6c95b4aee56f0fd930103651489..90a3d3711f71209b7db89d2515377ed1818c3c83 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -11,6 +11,7 @@ import org.bukkit.craftbukkit.block.CraftBlock;
@@ -12,6 +12,7 @@ import org.bukkit.craftbukkit.block.CraftBlock;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent;
// CraftBukkit end
+import com.destroystokyo.paper.event.block.TNTPrimeEvent; // Paper - TNTPrimeEvent
// PAIL: Fixme
public class EntityEnderDragon extends EntityInsentient implements IMonster {
@@ -466,6 +467,11 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
});
craftBlock.getNMS().dropNaturally((WorldServer) world, blockposition, ItemStack.b);

View File

@ -18,10 +18,10 @@ index c20484220edc849e43a1067d169d4d36f0059836..42e6761c8b18b79ffd3f4d5e853ea87a
if (event.isCancelled()) {
return EnumInteractionResult.PASS;
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java
index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cda8311aea 100644
index 70a0efac7a549fa0e9895813335f034ec98d3d2b..223361a1a8b41ebe91e0db39f40cf12a4968b1b4 100644
--- a/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/src/main/java/net/minecraft/server/ItemBucket.java
@@ -41,7 +41,7 @@ public class ItemBucket extends Item {
@@ -42,7 +42,7 @@ public class ItemBucket extends Item {
if (iblockdata.getBlock() instanceof IFluidSource) {
// CraftBukkit start
FluidType dummyFluid = ((IFluidSource) iblockdata.getBlock()).removeFluid(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata);
@ -30,7 +30,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
if (event.isCancelled()) {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager)
@@ -69,7 +69,7 @@ public class ItemBucket extends Item {
@@ -70,7 +70,7 @@ public class ItemBucket extends Item {
iblockdata = world.getType(blockposition);
BlockPosition blockposition2 = iblockdata.getBlock() instanceof IFluidContainer && this.fluidType == FluidTypes.WATER ? blockposition : blockposition1;
@ -39,7 +39,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
this.a(world, itemstack, blockposition2);
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition2, itemstack);
@@ -94,10 +94,12 @@ public class ItemBucket extends Item {
@@ -95,10 +95,12 @@ public class ItemBucket extends Item {
public void a(World world, ItemStack itemstack, BlockPosition blockposition) {}
public boolean a(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPositionBlock movingobjectpositionblock) {
@ -54,7 +54,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
// CraftBukkit end
if (!(this.fluidType instanceof FluidTypeFlowing)) {
return false;
@@ -110,7 +112,7 @@ public class ItemBucket extends Item {
@@ -111,7 +113,7 @@ public class ItemBucket extends Item {
// CraftBukkit start
if (flag1 && entityhuman != null) {
@ -63,7 +63,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
if (event.isCancelled()) {
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
@@ -119,7 +121,7 @@ public class ItemBucket extends Item {
@@ -120,7 +122,7 @@ public class ItemBucket extends Item {
}
// CraftBukkit end
if (!flag1) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] MC-135506: Experience should save as Integers
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 4df7df781d12e38885ecfbc89dd1d42d9de14248..c2be0c2bc315876f120cff207e5516dda2bd55d7 100644
index 837a2c8f6af6e51316511e3948869ac059c8fc0d..4a94ce72d559263ef5fa4fb16dc286f531f51d55 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -202,7 +202,7 @@ public class EntityExperienceOrb extends Entity {
@@ -203,7 +203,7 @@ public class EntityExperienceOrb extends Entity {
public void saveData(NBTTagCompound nbttagcompound) {
nbttagcompound.setShort("Health", (short) this.e);
nbttagcompound.setShort("Age", (short) this.c);
@ -17,7 +17,7 @@ index 4df7df781d12e38885ecfbc89dd1d42d9de14248..c2be0c2bc315876f120cff207e5516dd
this.savePaperNBT(nbttagcompound); // Paper
}
@@ -210,7 +210,7 @@ public class EntityExperienceOrb extends Entity {
@@ -211,7 +211,7 @@ public class EntityExperienceOrb extends Entity {
public void loadData(NBTTagCompound nbttagcompound) {
this.e = nbttagcompound.getShort("Health");
this.c = nbttagcompound.getShort("Age");

View File

@ -36,10 +36,10 @@ index bd508025b771424c942fd856c31d520b6f548082..62621562137cba4804f0465c58d25ca2
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 88b45c8b4f58ee83d625408eae08aa329c87a6d4..d6d93c76f047573b3e7ea91409fb85e093666812 100644
index 41fbdaa99f2c884371b7922d28551dffd44686ed..c24397d2ded7d3ea6f7440035ed64d29602900a6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -898,6 +898,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -900,6 +900,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(this.serverPing);
// Spigot start
@ -48,7 +48,7 @@ index 88b45c8b4f58ee83d625408eae08aa329c87a6d4..d6d93c76f047573b3e7ea91409fb85e0
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 be7c2153b3c712f3e5c1ebd3e8526b65bd2f5174..82fe3ab9c5e05bd372f6c5721758742f866f3605 100644
index 08015ffe6268469526fcc01e98012bf3aa073c92..dcf148dc56ee80d6dd454045ffed1cc467f724a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -813,6 +813,7 @@ public final class CraftServer implements Server {

View File

@ -122,10 +122,10 @@ index da21918ce0339a0eb8f65ce7791a04ceb12749b7..1fc0139cb9694ddea41f57d95774c3b4
this.d.values().stream().map((jsonlistentry) -> {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index cb6fa4be113d732ed93d9ccbef99c56f9044e7ee..ee56306b49224b5421b6d2870019c1aa053873d7 100644
index ec175cd90491c3473543daa0b565fdc453888a34..79f6984a8e5bb73daeae1725a11840556c398de2 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -547,7 +547,7 @@ public abstract class PlayerList {
@@ -542,7 +542,7 @@ public abstract class PlayerList {
} else if (!this.isWhitelisted(gameprofile, event)) { // Paper
//chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); // Paper
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted

View File

@ -137,10 +137,10 @@ index abcf3ab8bab2ca98ab0f7e852b8185e27949a210..5076dd7e874be76d81b13f53076bc472
this.datawatcher.set(EntityArmorStand.bh, vector3f);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index c19f0b0dd3fe988a30049297355445fd73cae630..cb22cbd68a4d310fecad3a87a97bf101216a5f64 100644
index 557cdb6ca007c617278e8cf723a2a11eae67d57d..40e9005c0f520a26a419beae17705171e61c646a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -311,5 +311,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
@@ -312,5 +312,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
public boolean isSlotDisabled(org.bukkit.inventory.EquipmentSlot slot) {
return getHandle().isSlotDisabled(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot));
}

View File

@ -5,13 +5,13 @@ Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029bcffd5f10 100644
index d774a0893b2e6599bade3a9edf22668a30587503..60818e1a7ce9c637bef8dc05de8cba10975ffc79 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -5,6 +5,14 @@ import java.util.Objects;
import java.util.Optional;
@@ -6,6 +6,14 @@ import java.util.Optional;
import java.util.Random;
import javax.annotation.Nullable;
+// Paper start
+import com.destroystokyo.paper.event.entity.SlimeChangeDirectionEvent;
+import com.destroystokyo.paper.event.entity.SlimeSwimEvent;
@ -23,7 +23,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
// CraftBukkit start
import java.util.ArrayList;
import java.util.List;
@@ -65,6 +73,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -66,6 +74,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@Override
public void saveData(NBTTagCompound nbttagcompound) {
super.saveData(nbttagcompound);
@ -31,7 +31,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
nbttagcompound.setInt("Size", this.getSize() - 1);
nbttagcompound.setBoolean("wasOnGround", this.bp);
}
@@ -79,6 +88,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -80,6 +89,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.setSize(i + 1, false);
super.loadData(nbttagcompound);
@ -43,7 +43,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
this.bp = nbttagcompound.getBoolean("wasOnGround");
}
@@ -358,7 +372,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -359,7 +373,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@Override
public boolean a() {
@ -52,7 +52,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
}
@Override
@@ -379,7 +393,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -380,7 +394,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@Override
public boolean a() {
@ -61,7 +61,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
}
@Override
@@ -405,14 +419,18 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -406,14 +420,18 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@Override
public boolean a() {
@ -82,7 +82,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
}
((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.b, false);
@@ -433,7 +451,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -434,7 +452,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
public boolean a() {
EntityLiving entityliving = this.a.getGoalTarget();
@ -99,7 +99,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
}
@Override
@@ -446,7 +472,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -447,7 +473,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
public boolean b() {
EntityLiving entityliving = this.a.getGoalTarget();
@ -116,7 +116,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
}
@Override
@@ -454,6 +488,13 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -455,6 +489,13 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.a.a((Entity) this.a.getGoalTarget(), 10.0F, 10.0F);
((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.eL());
}
@ -130,7 +130,7 @@ index 563340d410f76ec1df90403879b835ebd9e6b533..e99fd88118a75f36cb93d02aa7c6029b
}
static class ControllerMoveSlime extends ControllerMove {
@@ -512,4 +553,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -513,4 +554,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
}
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add More Creeper API
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 647795bc7ea68f9dbe9d3f6488eaec82159feb9f..79ef955070b2982be79cc58e40093624bd088ff0 100644
index b0de5c0705983debd7995c586612a7802f6d8f59..b2f028422d9a7a84e49e383b78032feb887a85c0 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -14,7 +14,7 @@ public class EntityCreeper extends EntityMonster {
@@ -15,7 +15,7 @@ public class EntityCreeper extends EntityMonster {
private static final DataWatcherObject<Boolean> POWERED = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Boolean> d = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> isIgnitedDW = d; // Paper OBFHELPER
private int bo;
@ -17,7 +17,7 @@ index 647795bc7ea68f9dbe9d3f6488eaec82159feb9f..79ef955070b2982be79cc58e40093624
public int maxFuseTicks = 30;
public int explosionRadius = 3;
private int bs;
@@ -254,7 +254,18 @@ public class EntityCreeper extends EntityMonster {
@@ -255,7 +255,18 @@ public class EntityCreeper extends EntityMonster {
}
public void ignite() {

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 9e9b9b9f81f1e4340b98724ca50fb03f699a03cb..ab05cc8e4188fcdfcd77ee6c1f217d0fa170c941 100644
index be028a80247dfb3bf7c726b1868c6e5c5bd99264..bf7b572e455dfc9dfdacce9d2b93266ec5eac0b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -507,7 +507,7 @@ public class CraftWorld implements World {
@@ -508,7 +508,7 @@ public class CraftWorld implements World {
@Override
public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

View File

@ -17,10 +17,10 @@ index 22568201a292edc8e25396e55cad1572d419b775..7ad595d5d7e090c523aa45a10d0f84b6
for (BlockState blockstate : blocks) {
blockstate.update(true, false);
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
index 52f64460ba1bfb298f343f71a923c8f34de9e39d..d429c6a4154497fea813ef98d1a30eef2ca5e5e0 100644
index 54cad33750efd80b104664723e1115d107c7a72d..28df29649a3e78708564b5ab9dc4d340835db9a3 100644
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -300,7 +300,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
@@ -301,7 +301,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
// CraftBukkit start
@Override
public boolean isFilteredNBT() {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent chunk loading from Fluid Flowing
diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
index 663731a5e7ad3990d1ffac3e0a3028dba37f2b07..d72a88e9275eb00eed35b6467538a46e5cee32d5 100644
index 9f99503a7631497fd20edb935cd3bb8b5b3cbdf7..cf9d3faabe8732d27c436f4806c727592e475f81 100644
--- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java
+++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
@@ -154,7 +154,8 @@ public abstract class FluidTypeFlowing extends FluidType {
@@ -155,7 +155,8 @@ public abstract class FluidTypeFlowing extends FluidType {
EnumDirection enumdirection = (EnumDirection) entry.getKey();
Fluid fluid1 = (Fluid) entry.getValue();
BlockPosition blockposition1 = blockposition.shift(enumdirection);
@ -18,7 +18,7 @@ index 663731a5e7ad3990d1ffac3e0a3028dba37f2b07..d72a88e9275eb00eed35b6467538a46e
if (this.a(generatoraccess, blockposition, iblockdata, enumdirection, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.getType())) {
// CraftBukkit start
@@ -181,7 +182,8 @@ public abstract class FluidTypeFlowing extends FluidType {
@@ -182,7 +183,8 @@ public abstract class FluidTypeFlowing extends FluidType {
while (iterator.hasNext()) {
EnumDirection enumdirection = (EnumDirection) iterator.next();
BlockPosition blockposition1 = blockposition.shift(enumdirection);
@ -28,7 +28,7 @@ index 663731a5e7ad3990d1ffac3e0a3028dba37f2b07..d72a88e9275eb00eed35b6467538a46e
Fluid fluid = iblockdata1.getFluid();
if (fluid.getType().a((FluidType) this) && this.a(enumdirection, (IBlockAccess) iworldreader, blockposition, iblockdata, blockposition1, iblockdata1)) {
@@ -298,11 +300,18 @@ public abstract class FluidTypeFlowing extends FluidType {
@@ -299,11 +301,18 @@ public abstract class FluidTypeFlowing extends FluidType {
if (enumdirection1 != enumdirection) {
BlockPosition blockposition2 = blockposition.shift(enumdirection1);
short short0 = a(blockposition1, blockposition2);
@ -51,7 +51,7 @@ index 663731a5e7ad3990d1ffac3e0a3028dba37f2b07..d72a88e9275eb00eed35b6467538a46e
IBlockData iblockdata1 = (IBlockData) pair.getFirst();
Fluid fluid = (Fluid) pair.getSecond();
@@ -374,11 +383,16 @@ public abstract class FluidTypeFlowing extends FluidType {
@@ -375,11 +384,16 @@ public abstract class FluidTypeFlowing extends FluidType {
EnumDirection enumdirection = (EnumDirection) iterator.next();
BlockPosition blockposition1 = blockposition.shift(enumdirection);
short short0 = a(blockposition, blockposition1);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
index 537e7224b9f9dbbe107537c5d7ef9d3bb4cbb422..c03ebbc933197be3e7097ea3f7b7cd08c90db7bb 100644
index 127428c400f6de1cb65458346aac6a176b6c1896..6ea402c603b9b54705e79a2fdc61fe5a254479a3 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
@@ -12,11 +12,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@@ -13,11 +13,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
private final Block g;
private final EntityInsentient entity;
private int i;
@ -22,7 +22,7 @@ index 537e7224b9f9dbbe107537c5d7ef9d3bb4cbb422..c03ebbc933197be3e7097ea3f7b7cd08
}
@Override
@@ -114,7 +116,9 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@@ -115,7 +117,9 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@Nullable
private BlockPosition a(BlockPosition blockposition, IBlockAccess iblockaccess) {
@ -33,7 +33,7 @@ index 537e7224b9f9dbbe107537c5d7ef9d3bb4cbb422..c03ebbc933197be3e7097ea3f7b7cd08
return blockposition;
} else {
BlockPosition[] ablockposition = new BlockPosition[]{blockposition.down(), blockposition.west(), blockposition.east(), blockposition.north(), blockposition.south(), blockposition.down().down()};
@@ -124,7 +128,7 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@@ -125,7 +129,7 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
for (int j = 0; j < i; ++j) {
BlockPosition blockposition1 = ablockposition1[j];
@ -42,7 +42,7 @@ index 537e7224b9f9dbbe107537c5d7ef9d3bb4cbb422..c03ebbc933197be3e7097ea3f7b7cd08
return blockposition1;
}
}
@@ -135,7 +139,7 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@@ -136,7 +140,7 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
@Override
protected boolean a(IWorldReader iworldreader, BlockPosition blockposition) {

View File

@ -11,18 +11,18 @@ to the nearest Integer when updating its current cook time.
Modified by: Eric Su <ericsu@alumni.usc.edu>
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index 99b20fa5feff0f766124d4ec9474852e33e329f2..51db9ea42d49c4c21f30cfeba25e09bce2dcbcbe 100644
index af4db22cf87433fcd4f59be207257a8d7c255883..abc76807595611d35c86f500ef1ef51159e9406b 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -10,6 +10,7 @@ import java.util.List;
import java.util.Map;
@@ -11,6 +11,7 @@ import java.util.Map;
import javax.annotation.Nullable;
// CraftBukkit start
+import java.util.List;
import org.bukkit.craftbukkit.block.CraftBlock;
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -28,6 +29,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@@ -29,6 +30,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
protected NonNullList<ItemStack> items;
public int burnTime;
private int ticksForCurrentFuel;
@ -30,7 +30,7 @@ index 99b20fa5feff0f766124d4ec9474852e33e329f2..51db9ea42d49c4c21f30cfeba25e09bc
public int cookTime;
public int cookTimeTotal;
protected final IContainerProperties b;
@@ -228,6 +230,11 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@@ -229,6 +231,11 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
this.n.put(new MinecraftKey(s), nbttagcompound1.getInt(s));
}
@ -42,7 +42,7 @@ index 99b20fa5feff0f766124d4ec9474852e33e329f2..51db9ea42d49c4c21f30cfeba25e09bc
}
@Override
@@ -236,6 +243,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@@ -237,6 +244,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
nbttagcompound.setShort("BurnTime", (short) this.burnTime);
nbttagcompound.setShort("CookTime", (short) this.cookTime);
nbttagcompound.setShort("CookTimeTotal", (short) this.cookTimeTotal);
@ -50,7 +50,7 @@ index 99b20fa5feff0f766124d4ec9474852e33e329f2..51db9ea42d49c4c21f30cfeba25e09bc
ContainerUtil.a(nbttagcompound, this.items);
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
@@ -296,7 +304,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@@ -297,7 +305,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
if (this.isBurning() && this.canBurn(irecipe)) {
++this.cookTime;
@ -59,7 +59,7 @@ index 99b20fa5feff0f766124d4ec9474852e33e329f2..51db9ea42d49c4c21f30cfeba25e09bc
this.cookTime = 0;
this.cookTimeTotal = this.getRecipeCookingTime();
this.burn(irecipe);
@@ -396,9 +404,13 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@@ -397,9 +405,13 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
}
}
@ -76,7 +76,7 @@ index 99b20fa5feff0f766124d4ec9474852e33e329f2..51db9ea42d49c4c21f30cfeba25e09bc
public static boolean isFuel(ItemStack itemstack) {
return f().containsKey(itemstack.getItem());
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
index e0e10feeb1608c46effd6104f64db50977f468fe..693511650a7fa39c7c4eeca50cdf50f4a6f58538 100644
index 27c8cc130e7466c396b514dd77f1385f967bebdb..298e75d72b889396a15907e713c29430c168b915 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
@@ -63,4 +63,20 @@ public abstract class CraftFurnace<T extends TileEntityFurnace> extends CraftCon

View File

@ -13,10 +13,10 @@ Shulkers) may need to be changed in order for it to re-save properly
No more crashing though.
diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
index 850e79b764513bd68a28b675e075f804f59b75a8..7e13b1cf6d92c3e0f2dab1ba1d42bd4f250e256c 100644
index e16f975e1babd2f08262cbbb42d7f47740525e97..e78809278b9159728722b2b33ad5dfae77e860ed 100644
--- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
+++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
@@ -60,7 +60,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
@@ -59,7 +59,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
this.command = nbttagcompound.getString("Command");
this.successCount = nbttagcompound.getInt("SuccessCount");
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow setting the vex's summoner
diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java
index b84eb0394ab9a53e32b774682bc42b067625195e..ed6a47ad2fd973695fbb151d1a44000ec3639e54 100644
index 00568a19d7a25189d599fc84afb6ca6d642e2855..9a33866e7529e1636c228bab01205737bc678b47 100644
--- a/src/main/java/net/minecraft/server/EntityVex.java
+++ b/src/main/java/net/minecraft/server/EntityVex.java
@@ -130,6 +130,7 @@ public class EntityVex extends EntityMonster {
@@ -129,6 +129,7 @@ public class EntityVex extends EntityMonster {
this.a(1, flag);
}

View File

@ -17,10 +17,10 @@ index fbecc8ccab47b428c43530ad344e325538cf242d..800a8dd2543f0b83eec67e7805104274
if (this.world.isDay() && !this.world.isClientSide) {
float f = this.aR();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index bc10ccd76fcf3f03c23f52064c4db17bcad1c574..46a7e7b2f6079df036d2b73c82d7bf5ea1b07871 100644
index bf7b572e455dfc9dfdacce9d2b93266ec5eac0b4..523f094b5d4572a04da36d68502fa0a22f239e61 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -858,6 +858,13 @@ public class CraftWorld implements World {
@@ -872,6 +872,13 @@ public class CraftWorld implements World {
}
}

View File

@ -12,10 +12,10 @@ server threads
Allow usage of a single thread executor by not using ForkJoin so single core CPU's.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d6d93c76f047573b3e7ea91409fb85e093666812..f1008096ee90b506c322fd1667c6b60faefd545c 100644
index c24397d2ded7d3ea6f7440035ed64d29602900a6..518e15e6a4b7750e90a958686bcd930c351f5e1c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -175,6 +175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -177,6 +177,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
S s0 = function.apply(thread); // CraftBukkit - decompile error
atomicreference.set(s0);

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