mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
More more more more more patches
This commit is contained in:
parent
f4c92b410c
commit
0f5c422d24
@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
|
||||
Fires event at start and end of a server tick
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 038e98c708f9fac8ab6109d02b0297a1d008710c..0f824428003776128f5d92c735df06cd30a8666b 100644
|
||||
index ca2a2b1f54f06f9035be8b379fad580128811fc2..9d2186655ae03022ddeaf078028570ef9118fb06 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1309,6 +1309,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1308,6 +1308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
// Paper end
|
||||
@ -17,7 +17,7 @@ index 038e98c708f9fac8ab6109d02b0297a1d008710c..0f824428003776128f5d92c735df06cd
|
||||
|
||||
++this.tickCount;
|
||||
this.tickChildren(shouldKeepTicking);
|
||||
@@ -1347,6 +1348,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1329,6 +1330,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.runAllTasks();
|
||||
}
|
||||
// Paper end
|
||||
@ -27,5 +27,5 @@ index 038e98c708f9fac8ab6109d02b0297a1d008710c..0f824428003776128f5d92c735df06cd
|
||||
+ new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||
+ // Paper end
|
||||
this.profiler.push("tallying");
|
||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
@ -11,10 +11,10 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
|
||||
public net.minecraft.world.entity.player.Inventory compartments
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d6aa16ccb18e1aac0e2c59e3fb83bea87572aa7c..e5b04fc62588a8b128fa32e5cd270f3103a6c95e 100644
|
||||
index 8d4cddb68fd074d7a8ca4986a86d378434cb5fb5..fe7be6e6b2471abaf7e810daf4baa6eb8e12dba5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -798,6 +798,46 @@ public class ServerPlayer extends Player {
|
||||
@@ -803,6 +803,46 @@ public class ServerPlayer extends Player {
|
||||
});
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ index d6aa16ccb18e1aac0e2c59e3fb83bea87572aa7c..e5b04fc62588a8b128fa32e5cd270f31
|
||||
@Override
|
||||
public void die(DamageSource damageSource) {
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
@@ -881,7 +921,12 @@ public class ServerPlayer extends Player {
|
||||
@@ -886,7 +926,12 @@ public class ServerPlayer extends Player {
|
||||
this.dropExperience();
|
||||
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
|
||||
if (!event.getKeepInventory()) {
|
@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
|
||||
just do a get call since the value can never be null.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index dcbd8afb4d6fcf509bbb66788f55e83f2faa6f90..07fa9e1b1b165bd98135b66ffd8eef5c9b5389fc 100644
|
||||
index d0fe8a99163c924c44983a9a575bd76714865cab..24d167436dab54ad18875c3633b1246a21d63518 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -899,9 +899,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -905,9 +905,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@Nullable
|
||||
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add Heightmap API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 019bb773ced8f0a79611602906bad2366926d5ed..79b8c2521ca67f7131d1a76dbc61e5c67e307ab8 100644
|
||||
index 3889e880e3a8a21e38d613c552829ad998c24fd5..05b2c78c64dc9258b2a6621bc2aed041d66c33ee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -221,6 +221,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -9,7 +9,7 @@ public net.minecraft.world.level.BaseSpawner delay(Lnet/minecraft/world/level/Le
|
||||
public net.minecraft.world.level.BaseSpawner setNextSpawnData(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/SpawnData;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 6ba97a0b4f2cb15d5435657c8e8f5c71c6fee3db..c5a117308f051c20b81818ad91e0ca40177feb69 100644
|
||||
index 091c72b95e3c4c3528812ace4aec64d451f25462..54a20433483d5b67a6668fcdbddc1654a246fee2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -239,7 +239,13 @@ public abstract class BaseSpawner {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 461bfd99b303fcf7ce6d7ee53184605313f48b10..c8dd695a4fe41785acd34dc6dd02810202a55d5c 100644
|
||||
index d754c32b1c1c0cf56a690f3b699eb24a795765e4..cb776250920c68d8b8cc0baac804b83b1ec9376a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -511,7 +511,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -513,7 +513,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
Objects.requireNonNull(this.connection);
|
||||
// CraftBukkit - Don't wait
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
|
||||
This also fixes the adding sound playing when the item frame direction is changed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
index b3f2e45186ed01a18b204a8d23ed57ffc6886703..880ca7cb3ebccc16949e24a0230b1f83887b653f 100644
|
||||
index 8de89f5cdad9ad02670b09bb3bb5cf67714e7df5..70107774f12a996c0f64b46cb4c6af9c5f50aa61 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -328,7 +328,7 @@ public class ItemFrame extends HangingEntity {
|
||||
@@ -332,7 +332,7 @@ public class ItemFrame extends HangingEntity {
|
||||
|
||||
this.onItemChanged(itemstack);
|
||||
this.getEntityData().set(ItemFrame.DATA_ITEM, itemstack);
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
This lets you disable it for some worlds and lower it for others.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0f824428003776128f5d92c735df06cd30a8666b..80519ddf6302bf0aa8a186bd03aaa6e518e19adc 100644
|
||||
index 9d2186655ae03022ddeaf078028570ef9118fb06..fe8c0ba8864afd582c5e1c9d310cff99ef4dbff6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -737,31 +737,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -739,31 +739,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
|
||||
@ -54,7 +54,7 @@ index 0f824428003776128f5d92c735df06cd30a8666b..80519ddf6302bf0aa8a186bd03aaa6e5
|
||||
|
||||
if (true) {
|
||||
ServerLevel worldserver1 = worldserver;
|
||||
@@ -784,7 +787,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -786,7 +789,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// this.nextTickTime = SystemUtils.getMillis() + 10L;
|
||||
this.executeModerately();
|
||||
// CraftBukkit end
|
||||
@ -64,7 +64,7 @@ index 0f824428003776128f5d92c735df06cd30a8666b..80519ddf6302bf0aa8a186bd03aaa6e5
|
||||
// CraftBukkit start
|
||||
// this.updateMobSpawningFlags();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 04826a7684940558368e95d4cfd7f90eda057df8..b287df21d9671963257f04e9ee75a1468bbc12e0 100644
|
||||
index 58c1769ea15249df950a40e2f164e2ff7aeb05bd..2a2e795923ecaa300c7fc26fd71444711bd43535 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -64,6 +64,7 @@ import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket;
|
||||
@ -75,7 +75,7 @@ index 04826a7684940558368e95d4cfd7f90eda057df8..b287df21d9671963257f04e9ee75a146
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.ServerScoreboard;
|
||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
@@ -1726,12 +1727,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1725,12 +1726,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex::load, MapIndex::new, "idcounts")).getFreeAuxValueForMap();
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ index 4d2348df25410a0b5364eec066880326d6667dad..286aad3205ef8a9e21a47ef07893844f
|
||||
this.maxCount = i * i;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 79b8c2521ca67f7131d1a76dbc61e5c67e307ab8..bb502b4203537dd41dcc3d6829283b1c4082c7aa 100644
|
||||
index 05b2c78c64dc9258b2a6621bc2aed041d66c33ee..ba6d74692039c39660ed5e1d960cb090553a82f0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1345,15 +1345,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 06272dba901fdac535ccbf7721bfd54724f5bf0f..fda2ab16bf4721ffae53ac2eccf95b96e6f47bbf 100644
|
||||
index 8f6d54197401ea8722be73e4291aad34000cab58..2c38caaff8c4535eca8a29fafc4e662fb7e6d87f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2673,5 +2673,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2671,5 +2671,10 @@ public final class CraftServer implements Server {
|
||||
profile.getProperties().putAll(((CraftPlayer)player).getHandle().getGameProfile().getProperties());
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
|
||||
}
|
@ -8,10 +8,10 @@ This patch also adds a chunk status cache on region files (note that
|
||||
its only purpose is to cache the status on DISK)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 7b8a5efc73a7a0bfb51af7299341b0e2e988d4c1..ae97f0c4b39d838ab321743a048de53cbc83de5d 100644
|
||||
index 27b646341bdae8918649c5e9fdf05708638ad835..299c7c60edf491cc44e609517474d8247fb6c724 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -671,9 +671,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -674,9 +674,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper end
|
||||
|
||||
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
|
||||
@ -28,7 +28,7 @@ index 7b8a5efc73a7a0bfb51af7299341b0e2e988d4c1..ae97f0c4b39d838ab321743a048de53c
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -682,6 +686,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -685,6 +689,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ index 8f729134d8f024678f3f5927059791e28ccb5b90..b294ef87fb93e7f4651dc04128124f29
|
||||
} catch (Throwable throwable) {
|
||||
if (dataoutputstream != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index bb502b4203537dd41dcc3d6829283b1c4082c7aa..dd12b13bc8e8f0a7791f6204c25461758d6d0d07 100644
|
||||
index ba6d74692039c39660ed5e1d960cb090553a82f0..19f711f82386aaa731699f60ddb95ac208bf3a19 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -298,9 +298,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -17,7 +17,7 @@ This should fully solve all of the issues around it so that only natural
|
||||
influences natural spawns.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index c3d6b904f1310c93a3d5c1e5e3fab2f3476f5a48..29dac07176eb99517c9cddbe012636908c3603fe 100644
|
||||
index 029835914c3c88811684e90b29bfed83191b3b3f..05c014c5f0805d50cfd251b043c79ce3355eef16 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -88,6 +88,13 @@ public final class NaturalSpawner {
|
@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
|
||||
server-internal fix makes this change future-proof.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index a904507707475e95b6389ccc437bd234b97c10cc..b226800c15f5adbc40c89b36536db23f08e2857d 100644
|
||||
index a85175190c1ebb14b496a0bfe2f7136e06d0072c..ae0e422ee7e1dcf01b4c7b64b23afdbbbe19819e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -162,7 +162,7 @@ public abstract class Projectile extends Entity {
|
||||
@@ -164,7 +164,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
|
||||
Vec3 vec3d = shooter.getDeltaMovement();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] offset item frame ticking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
index 1a48108d98f89c4f2485424e6ddfadf152faddf9..334a47b5e0d205c57dfcbb17168cbd3f21d15606 100644
|
||||
index 46946473713f08ef0304a49b017a8970f1957e88..f7d031e9a5aa533d78a49ed6147dd47dd0f27f01 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
@@ -38,7 +38,7 @@ public abstract class HangingEntity extends Entity {
|
||||
@@ -39,7 +39,7 @@ public abstract class HangingEntity extends Entity {
|
||||
protected static final Predicate<Entity> HANGING_ENTITY = (entity) -> {
|
||||
return entity instanceof HangingEntity;
|
||||
};
|
@ -7,12 +7,12 @@ The problem was we were checking isExpired() on the entry, but if it
|
||||
was expired at that point, then it would be null.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ce35bd1bf1e532ec1bf260d72299b0f6c2699e9a..b537dfce0492acd170e37406b3ed1ad215d7df7d 100644
|
||||
index d677a05741e1df4bba2598182256758d4da09a4b..1644ff0709d721ba8c19e4b4c7ef07fc8e8f5918 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -620,8 +620,10 @@ public abstract class PlayerList {
|
||||
@@ -627,8 +627,10 @@ public abstract class PlayerList {
|
||||
Player player = entity.getBukkitEntity();
|
||||
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.getRawAddress()).getAddress());
|
||||
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());
|
||||
|
||||
- if (this.getBans().isBanned(gameprofile) && !this.getBans().get(gameprofile).hasExpired()) {
|
||||
- UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(gameprofile);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3989a06970c896fedcd912eeaaca8945e3067858..66e8231d2a717ceed7c39b87809a3fd40d644963 100644
|
||||
index 69fbbd2745008e2d9caf6a30dd0779339e1c685b..5eaedecd2e53bcdc30defbf56d6a70a0c49f03ec 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3649,9 +3649,14 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3609,9 +3609,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void startUsingItem(InteractionHand hand) {
|
||||
@ -24,7 +24,7 @@ index 3989a06970c896fedcd912eeaaca8945e3067858..66e8231d2a717ceed7c39b87809a3fd4
|
||||
this.useItem = itemstack;
|
||||
this.useItemRemaining = itemstack.getUseDuration();
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -3731,6 +3736,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3691,6 +3696,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
@ -32,7 +32,7 @@ index 3989a06970c896fedcd912eeaaca8945e3067858..66e8231d2a717ceed7c39b87809a3fd4
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@@ -3766,8 +3772,8 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3726,8 +3732,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c8dd695a4fe41785acd34dc6dd02810202a55d5c..bae36fdcab69b27be03d4df6cb24912c6884340c 100644
|
||||
index cb776250920c68d8b8cc0baac804b83b1ec9376a..34a969d8902f23d5ec3f8cc481b60c0fd74f8245 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3220,6 +3220,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3229,6 +3229,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) {
|
||||
ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString());
|
@ -126,7 +126,7 @@ index ac2b7b5161eaaca3620268ae865d6f2a80227fde..a1192d1f6b99669f843e8d9a8928ff0e
|
||||
});
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
index cdc87f14e5d6336856c74d5089e50ae5ebad9923..6b84633bf6956406d2e2c5dd32fa358f41ccc890 100644
|
||||
index 4f3387d1b128bc98614cfabfb5306781bdcd93be..0d8fd4eaf912eb4d40bb9f600dd2a8d5c21ab572 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
@@ -207,7 +207,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
|
@ -56,10 +56,10 @@ index 0dc94dec1317b3f86d38074c6cbe41ab828cab1d..0e45a340ae534caf676b7f9d0adcbcee
|
||||
|
||||
public static void onChunkHolderCreate(final ServerLevel level, final ChunkHolder holder) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index ae97f0c4b39d838ab321743a048de53cbc83de5d..4b05139db6628808128337dbf817712e339c17d0 100644
|
||||
index 299c7c60edf491cc44e609517474d8247fb6c724..430be10a2b0487dc26f21793592ca08d01a39e53 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -534,6 +534,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -537,6 +537,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
entity.discard();
|
||||
needsRemoval = true;
|
||||
}
|
||||
@ -67,7 +67,7 @@ index ae97f0c4b39d838ab321743a048de53cbc83de5d..4b05139db6628808128337dbf817712e
|
||||
return !needsRemoval;
|
||||
}));
|
||||
// CraftBukkit end
|
||||
@@ -545,6 +546,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -548,6 +549,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
throw new UnsupportedOperationException(); // Paper - rewrite chunk system
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index e5b04fc62588a8b128fa32e5cd270f3103a6c95e..70b92f95a3b1964a6253e64854d7d7d65ed5311f 100644
|
||||
index fe7be6e6b2471abaf7e810daf4baa6eb8e12dba5..db3d5fd301f38ae3bf13ff6d7530d6e70acb8296 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -918,7 +918,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -923,7 +923,7 @@ public class ServerPlayer extends Player {
|
||||
this.tellNeutralMobsThatIDied();
|
||||
}
|
||||
// SPIGOT-5478 must be called manually now
|
@ -5,7 +5,7 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index f1e43449eca998e83eca1b53f479918b7b4faf25..aea3872c89493f68d31186877a1ea981a0c0df6d 100644
|
||||
index f7bd3e5b30b19e56d16fbc86f40dc851da99c63b..78fe610d69db727411bf685127c39d009090ee14 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -498,6 +498,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate
|
||||
Should help if something dumb happens
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index b8cf01fbfc3293bf78b1094a90da3594fa2067b4..b8f5ad1130b125f71a1feb1083120fb700b9bea1 100644
|
||||
index f9dd2d9312297a727344d43150c5cab74128cbca..b1c5e5ecf2488d1a6f0a5261d4ba8958de9659ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -94,6 +94,18 @@ public class ChunkSerializer {
|
||||
@ -38,7 +38,7 @@ index b8cf01fbfc3293bf78b1094a90da3594fa2067b4..b8f5ad1130b125f71a1feb1083120fb7
|
||||
if (!Objects.equals(chunkPos, chunkcoordintpair1)) {
|
||||
ChunkSerializer.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", new Object[]{chunkPos, chunkPos, chunkcoordintpair1});
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
index c3305cb49741523724ff7b3c9254a0df2cf3d6c6..e276b2ceddbb269ef9a8625f26cc1847ded3862a 100644
|
||||
index 35115f79825035ff28bdffa26ad4127fec8d05c1..10603eebf36caca7870e9cf087e99d529550ad3e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
@@ -178,6 +178,13 @@ public class ChunkStorage implements AutoCloseable {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
|
||||
Use the PlayerList map instead of iterating over all players
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b287df21d9671963257f04e9ee75a1468bbc12e0..f85cbcd0ba398bdd2622a2e1aaba7de24d53038a 100644
|
||||
index 2a2e795923ecaa300c7fc26fd71444711bd43535..dcdf59d18c0336f766bd320b2d536c115df3435d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -426,6 +426,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -424,6 +424,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
|
||||
@ -24,4 +24,4 @@ index b287df21d9671963257f04e9ee75a1468bbc12e0..f85cbcd0ba398bdd2622a2e1aaba7de2
|
||||
+
|
||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
|
@ -15,10 +15,10 @@ This patch resolves the conflict by offsetting checking Spigot's entity
|
||||
activation range check from an item's move method.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 02bd99934066b35a3f4fd59370cdabf0640ee218..477c9358a09067ace4d0fe3f519148feb4c7a335 100644
|
||||
index 007625b1a121f1e7241f7cbfba0b1f168e8be5df..6836288bd380651007f3aa76e608767f612f6644 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -140,7 +140,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -149,7 +149,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ When the server is lagging, players will wait longer when eating.
|
||||
Change to also use a time check instead if it passes.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b4a94a0e0 100644
|
||||
index 5eaedecd2e53bcdc30defbf56d6a70a0c49f03ec..38a5d219713f7d3bb3d5ea73e4e6756a03128d01 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3592,6 +3592,11 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3552,6 +3552,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b
|
||||
private void updatingUsingItem() {
|
||||
if (this.isUsingItem()) {
|
||||
if (ItemStack.isSame(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
|
||||
@@ -3609,8 +3614,12 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3569,8 +3574,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.shouldTriggerItemUseEffects()) {
|
||||
this.triggerItemUseEffects(stack, 5);
|
||||
}
|
||||
@ -37,7 +37,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b
|
||||
this.completeUsingItem();
|
||||
}
|
||||
|
||||
@@ -3658,7 +3667,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3618,7 +3627,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag
|
||||
this.useItem = itemstack;
|
||||
@ -49,7 +49,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b
|
||||
if (!this.level.isClientSide) {
|
||||
this.setLivingEntityFlag(1, true);
|
||||
this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND);
|
||||
@@ -3683,7 +3695,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3643,7 +3655,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
} else if (!this.isUsingItem() && !this.useItem.isEmpty()) {
|
||||
this.useItem = ItemStack.EMPTY;
|
||||
@ -61,7 +61,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3817,7 +3832,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3777,7 +3792,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.useItem = ItemStack.EMPTY;
|
@ -5,12 +5,12 @@ Subject: [PATCH] Optimize call to getFluid for explosions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index a9f45dbc2997c4deeba932d04a52e21f4dbfea95..1582f8aad002c14ed45a5748e99f259896e8c9e9 100644
|
||||
index e09e6be4f7c8b6c3761b38e181e4c0288a5c1871..83b2b56dbb6d74b58c43bf375ae7d1df9805037b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -168,7 +168,7 @@ public class Explosion {
|
||||
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
|
||||
BlockPos blockposition = new BlockPos(d4, d5, d6);
|
||||
BlockPos blockposition = BlockPos.containing(d4, d5, d6);
|
||||
BlockState iblockdata = this.level.getBlockState(blockposition);
|
||||
- FluidState fluid = this.level.getFluidState(blockposition);
|
||||
+ FluidState fluid = iblockdata.getFluidState(); // Paper
|
@ -9,10 +9,10 @@ dispensed. The resulting item would have size == 0 and therefore
|
||||
be convertered to air, hence why the effects disappeared.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
index 1a36fa2afcd53a0021135abbe0d0df4af557eed8..7132f1c304824feb80733f01b9554092e425f0bb 100644
|
||||
index 2773dfea3346793127b06d7e6d0b1344b03845d0..429b9729188fe340b62a3305e6436fabbb1a7caf 100644
|
||||
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
||||
@@ -511,7 +511,7 @@ public interface DispenseItemBehavior {
|
||||
@@ -515,7 +515,7 @@ public interface DispenseItemBehavior {
|
||||
}
|
||||
|
||||
itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
|
@ -18,7 +18,7 @@ public net.minecraft.world.entity.Entity isInsidePortal
|
||||
public net.minecraft.world.entity.LivingEntity jumping
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99f3b1dbe3 100644
|
||||
index dcdf59d18c0336f766bd320b2d536c115df3435d..5ad746ae673ef09f5581cf9fbbf1c9afa0ff0cd9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2,7 +2,6 @@ package net.minecraft.server.level;
|
||||
@ -29,7 +29,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
@@ -1047,17 +1046,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1046,17 +1045,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
++TimingHistory.entityTicks; // Paper - timings
|
||||
// Spigot start
|
||||
co.aikar.timings.Timing timer; // Paper
|
||||
@ -51,7 +51,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99
|
||||
try {
|
||||
// Paper end - timings
|
||||
entity.setOldPosAndRot();
|
||||
@@ -1068,9 +1067,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1067,9 +1066,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
|
||||
});
|
||||
gameprofilerfiller.incrementCounter("tickNonPassenger");
|
||||
@ -65,7 +65,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99
|
||||
Iterator iterator = entity.getPassengers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1078,13 +1081,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1077,13 +1080,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
@ -85,7 +85,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99
|
||||
passenger.setOldPosAndRot();
|
||||
++passenger.tickCount;
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
@@ -1093,8 +1101,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1092,8 +1100,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
|
||||
});
|
||||
gameprofilerfiller.incrementCounter("tickPassenger");
|
||||
@ -103,7 +103,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99
|
||||
gameprofilerfiller.pop();
|
||||
Iterator iterator = passenger.getPassengers().iterator();
|
||||
|
||||
@@ -1104,6 +1121,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1103,6 +1120,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.tickPassenger(passenger, entity2);
|
||||
}
|
||||
|
||||
@ -112,10 +112,10 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99
|
||||
} else {
|
||||
passenger.stopRiding();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b3746e543 100644
|
||||
index 80806cd557a481ffbfa9b26e84d1ab1bcba0543f..a0dbb02019d31b890a450d0ffe2197fc095f8362 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -384,6 +384,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -385,6 +385,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
@ -124,7 +124,7 @@ index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b
|
||||
protected int numCollisions = 0; // Paper
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
@javax.annotation.Nullable
|
||||
@@ -909,6 +911,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -910,6 +912,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
this.wasOnFire = this.isOnFire();
|
||||
if (movementType == MoverType.PISTON) {
|
||||
@ -133,7 +133,7 @@ index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b
|
||||
movement = this.limitPistonMovement(movement);
|
||||
if (movement.equals(Vec3.ZERO)) {
|
||||
return;
|
||||
@@ -921,6 +925,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -922,6 +926,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.setDeltaMovement(Vec3.ZERO);
|
||||
}
|
||||
@ -148,10 +148,10 @@ index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b
|
||||
movement = this.maybeBackOffFromEdge(movement, movementType);
|
||||
Vec3 vec3d1 = this.collide(movement);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index f61a4409ebb5ed89e5a5cfe0488498a52faa2346..7caae84b23ba0803458b4497a116e0b8cee26a89 100644
|
||||
index 60d833bf8b7dcee046da9712a2dc809b05a31b42..56cfdf15cf2fd0b88d4d68d0b537da4bf323474f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -210,6 +210,19 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -215,6 +215,19 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
return this.lookControl;
|
||||
}
|
||||
|
||||
@ -169,8 +169,8 @@ index f61a4409ebb5ed89e5a5cfe0488498a52faa2346..7caae84b23ba0803458b4497a116e0b8
|
||||
+ // Paper end
|
||||
+
|
||||
public MoveControl getMoveControl() {
|
||||
if (this.isPassenger() && this.getVehicle() instanceof Mob) {
|
||||
Mob entityinsentient = (Mob) this.getVehicle();
|
||||
Entity entity = this.getControlledVehicle();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java
|
||||
index 6ae3f5cd42dfd424fc3741957995f47ad5ec8941..bffec7fdf49994f702ea4c378237dac0983d0a19 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java
|
||||
@ -252,7 +252,7 @@ index 6efba52c2e5d7811ee329ed22c1c76f75d7ddbe1..26bf383caea68834c654b25653ced901
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index bc778aadb2604756b783d4d024e3154576ab3236..214c7947705eda61454b70cbc4bf37bc54dd26e8 100644
|
||||
index caab72b733eabfe6a78c2a75e252817def49cbd0..ece23ee7812ca62ff8e763ffc29cda2711d2f2e1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -225,17 +225,29 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@ -307,10 +307,10 @@ index bc778aadb2604756b783d4d024e3154576ab3236..214c7947705eda61454b70cbc4bf37bc
|
||||
super.customServerAiStep();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
index 3f8990d15bd6815db0ccb924e621dfcc3220e0e0..70f1916185b79bbb9f033f4ef8119d7b17a13ef8 100644
|
||||
index 9b36bf3dbad7c31a20446208f3f410246f85eff6..1b8f22805af87dc08e0dea9fd93a5f93c0b05107 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
@@ -57,6 +57,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -52,6 +52,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
if (bl != this.isEnabled()) {
|
||||
this.setEnabled(bl);
|
||||
}
|
||||
@ -318,21 +318,20 @@ index 3f8990d15bd6815db0ccb924e621dfcc3220e0e0..70f1916185b79bbb9f033f4ef8119d7b
|
||||
|
||||
}
|
||||
|
||||
@@ -107,11 +108,13 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -89,10 +90,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
|
||||
public boolean suckInItems() {
|
||||
if (HopperBlockEntity.suckInItems(this.level, this)) {
|
||||
+ this.immunize(); // Paper
|
||||
return true;
|
||||
} else {
|
||||
List<ItemEntity> list = this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(0.25D, 0.0D, 0.25D), EntitySelector.ENTITY_STILL_ALIVE);
|
||||
if (!list.isEmpty()) {
|
||||
HopperBlockEntity.addItem(this, list.get(0));
|
||||
+ this.immunize(); // Paper
|
||||
for(ItemEntity itemEntity : this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(0.25D, 0.0D, 0.25D), EntitySelector.ENTITY_STILL_ALIVE)) {
|
||||
if (HopperBlockEntity.addItem(this, itemEntity)) {
|
||||
+ this.immunize(); // Paper
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -149,4 +152,11 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -122,4 +125,11 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory) {
|
||||
return new HopperMenu(syncId, playerInventory, this);
|
||||
}
|
||||
@ -345,10 +344,10 @@ index 3f8990d15bd6815db0ccb924e621dfcc3220e0e0..70f1916185b79bbb9f033f4ef8119d7b
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 07fa9e1b1b165bd98135b66ffd8eef5c9b5389fc..16a5103e106f87fb5d33c4e4435b494cae583395 100644
|
||||
index 24d167436dab54ad18875c3633b1246a21d63518..48aef158ace14d3ca1f05ba2c6e5681e3ef9be59 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -157,6 +157,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -161,6 +161,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
|
||||
public List<ItemEntity> captureDrops;
|
||||
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
|
@ -14,10 +14,10 @@ light engine on shutdown...
|
||||
The queue size only puts a cap on max loss, doesn't solve that problem.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c277ccc012bd5011e31d746b08ace1ae5238c937..023119624c0534bedb248099d0e12c76622a363a 100644
|
||||
index fe8c0ba8864afd582c5e1c9d310cff99ef4dbff6..cb76b912ebb5ac4e53588c82cf35ac98bdf7d1e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -788,7 +788,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -790,7 +790,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.executeModerately();
|
||||
// CraftBukkit end
|
||||
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper
|
@ -1079,10 +1079,10 @@ index 7825d6f0fdcfda6212cff8033ec55fb7db236154..000853110c7a89f2d0403a7a2737025a
|
||||
|
||||
public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 4b05139db6628808128337dbf817712e339c17d0..710017f52ad1a0d338bb0a49e44a26cfc09f8b94 100644
|
||||
index 430be10a2b0487dc26f21793592ca08d01a39e53..bba77d5001638307fe640b2e656df0a2b3cb4c43 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -630,7 +630,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -633,7 +633,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
}
|
||||
|
||||
@ -1091,20 +1091,8 @@ index 4b05139db6628808128337dbf817712e339c17d0..710017f52ad1a0d338bb0a49e44a26cf
|
||||
if (player.level == this.level) {
|
||||
if (newWithinViewDistance && !oldWithinViewDistance) {
|
||||
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos.toLong());
|
||||
@@ -1123,21 +1123,26 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
ServerPlayer entityplayer;
|
||||
|
||||
+ java.util.Map<Object, net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket> refreshPackets = new java.util.HashMap<>(); // Paper - Anti-Xray - Bypass
|
||||
for (Iterator iterator = this.getPlayers(chunkcoordintpair, false).iterator(); iterator.hasNext(); entityplayer.trackChunk(chunkcoordintpair, (Packet) mutableobject.getValue())) {
|
||||
entityplayer = (ServerPlayer) iterator.next();
|
||||
- if (mutableobject.getValue() == null) {
|
||||
- mutableobject.setValue(new ClientboundLevelChunkWithLightPacket(chunk1, this.lightEngine, (BitSet) null, (BitSet) null, true));
|
||||
- }
|
||||
+ Boolean shouldModify = chunk1.getLevel().chunkPacketBlockController.shouldModify(entityplayer, chunk1);
|
||||
+ mutableobject.setValue(refreshPackets.computeIfAbsent(shouldModify, s -> new ClientboundLevelChunkWithLightPacket(chunk1, this.lightEngine, (BitSet) null, (BitSet) null, true, (Boolean) s))); // Paper - Anti-Xray - Bypass
|
||||
}
|
||||
|
||||
@@ -1145,12 +1145,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
}
|
||||
|
||||
- private void playerLoadedChunk(ServerPlayer player, MutableObject<ClientboundLevelChunkWithLightPacket> cachedDataPacket, LevelChunk chunk) {
|
||||
@ -1126,15 +1114,15 @@ index 4b05139db6628808128337dbf817712e339c17d0..710017f52ad1a0d338bb0a49e44a26cf
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
List<Entity> list1 = Lists.newArrayList();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3b528a6adaa431ebdf11ce2ce8ea3c99f3b1dbe3..76c388347ebbff2d50a975b40dbe93cc2760f6bb 100644
|
||||
index 5ad746ae673ef09f5581cf9fbbf1c9afa0ff0cd9..5ae321dc30d48f838c49322b5beef89bcbc952bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -438,7 +438,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||
|
||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||
- super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper
|
||||
+ super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor
|
||||
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper
|
||||
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor
|
||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
@ -1161,10 +1149,10 @@ index 514c045883060e4a22f748176091d3b236c2a7fd..aee5144bdc5bd9f7b07ce3b72331bcfd
|
||||
|
||||
public void destroyAndAck(BlockPos pos, int sequence, String reason) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 16a5103e106f87fb5d33c4e4435b494cae583395..c53fa2902c6572c65f42a07be987a7da096a8aee 100644
|
||||
index 48aef158ace14d3ca1f05ba2c6e5681e3ef9be59..637092303bbce94fd37f193367264d51b855847d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -176,6 +176,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -1172,16 +1160,16 @@ index 16a5103e106f87fb5d33c4e4435b494cae583395..c53fa2902c6572c65f42a07be987a7da
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -190,7 +191,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -194,7 +195,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator) { // Paper
|
||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
|
||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator) { // Paper
|
||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
||||
this.generator = gen;
|
||||
@@ -274,6 +275,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -280,6 +281,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
@ -1189,7 +1177,7 @@ index 16a5103e106f87fb5d33c4e4435b494cae583395..c53fa2902c6572c65f42a07be987a7da
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -455,6 +457,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -461,6 +463,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit end
|
||||
|
||||
BlockState iblockdata1 = chunk.setBlockState(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag
|
||||
@ -1225,7 +1213,7 @@ index 508c2fff8d8e0c6f37b6c4e3b72ba772c2ab2ee5..e254b2d04e4fc1dc76c26f61ea38aeb2
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index b4c76e53eef8dc0efec98848352a243931ffc1f3..7b28537fda4187036b15ecc04f68ac1c9bf5f67f 100644
|
||||
index b55080c38b1ac4581b73f0d55ac8a432824a13a4..f5bdb76e554c9fc492dbf2a67166845ada0ac103 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -93,7 +93,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -1238,7 +1226,7 @@ index b4c76e53eef8dc0efec98848352a243931ffc1f3..7b28537fda4187036b15ecc04f68ac1c
|
||||
this.setBlockNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world));
|
||||
this.setSkyNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world));
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index ae37e97e52557b48f129cc02eeea395378a48444..785fbcf9bafcdec1c5be213de3d8512690023415 100644
|
||||
index becc4c101e40d9b11e5e89a69e25dc0160bfaa32..8823751cde27bf195177282e99e9a69888441e35 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -36,10 +36,13 @@ public class LevelChunkSection {
|
||||
@ -1258,7 +1246,7 @@ index ae37e97e52557b48f129cc02eeea395378a48444..785fbcf9bafcdec1c5be213de3d85126
|
||||
}
|
||||
|
||||
public static int getBottomBlockY(int chunkPos) {
|
||||
@@ -177,10 +180,13 @@ public class LevelChunkSection {
|
||||
@@ -184,10 +187,13 @@ public class LevelChunkSection {
|
||||
this.biomes = datapaletteblock;
|
||||
}
|
||||
|
||||
@ -1276,7 +1264,7 @@ index ae37e97e52557b48f129cc02eeea395378a48444..785fbcf9bafcdec1c5be213de3d85126
|
||||
|
||||
public int getSerializedSize() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f741b0fec 100644
|
||||
index cd82985b0aa821dccc0484f328407381d58ec81f..34804dc42c7a18108126c14c1b5f3d5a9a46f83d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -29,6 +29,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@ -1441,7 +1429,7 @@ index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f
|
||||
List<T> list = serialized.paletteEntries();
|
||||
int i = paletteProvider.size();
|
||||
int j = paletteProvider.calculateBitsForSerialization(idList, list.size());
|
||||
@@ -220,7 +292,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -224,7 +296,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
}
|
||||
}
|
||||
|
||||
@ -1450,7 +1438,7 @@ index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -280,12 +352,12 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -284,12 +356,12 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
}
|
||||
|
||||
public PalettedContainer<T> copy() {
|
||||
@ -1465,7 +1453,7 @@ index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -329,9 +401,20 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -333,9 +405,20 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
return 1 + this.palette.getSerializedSize() + FriendlyByteBuf.getVarIntSize(this.storage.getSize()) + this.storage.getRaw().length * 8;
|
||||
}
|
||||
|
||||
@ -1504,7 +1492,7 @@ index 9a2bf744abd8916d492e901be889223591bac3fd..a27fce0f1af9776a713bf1b5277869ed
|
||||
int getSerializedSize();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index b8f5ad1130b125f71a1feb1083120fb700b9bea1..f6d1eac46c619831e146c62a9c08d3305c63c7bc 100644
|
||||
index b1c5e5ecf2488d1a6f0a5261d4ba8958de9659ae..4138ba8bdf6f359327dfc86d3402b787ae58c818 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -71,7 +71,7 @@ import org.slf4j.Logger;
|
||||
@ -1571,10 +1559,10 @@ index 832c6d92daaa96210a9c7edbd357ca824a60a4a5..0fadc763fb482cf9f3b51ed44427029b
|
||||
|
||||
public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fda2ab16bf4721ffae53ac2eccf95b96e6f47bbf..76860d584effba34b09becfb2a68bd755f0f675d 100644
|
||||
index 2c38caaff8c4535eca8a29fafc4e662fb7e6d87f..bdd45da02c9bd78758e4b315a19a25cf552a83da 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2245,7 +2245,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2243,7 +2243,7 @@ public final class CraftServer implements Server {
|
||||
public ChunkGenerator.ChunkData createChunkData(World world) {
|
||||
Validate.notNull(world, "World cannot be null");
|
||||
ServerLevel handle = ((CraftWorld) world).getHandle();
|
||||
@ -1584,7 +1572,7 @@ index fda2ab16bf4721ffae53ac2eccf95b96e6f47bbf..76860d584effba34b09becfb2a68bd75
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index dd12b13bc8e8f0a7791f6204c25461758d6d0d07..2d21aeceea5a91930fb80ae838d04e5accc63391 100644
|
||||
index 19f711f82386aaa731699f60ddb95ac208bf3a19..c46e875709d83a1684c5e37c6a11bb3e9acd20e5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -409,11 +409,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Implement alternative item-despawn-rate
|
||||
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd21272483f7be 100644
|
||||
index 6836288bd380651007f3aa76e608767f612f6644..028fd9c7cb927cde84ee2d078681d122d7d928aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -52,6 +52,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -53,6 +53,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
public final float bobOffs;
|
||||
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
|
||||
public boolean canMobPickup = true; // Paper
|
||||
@ -17,7 +17,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127
|
||||
|
||||
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -180,7 +181,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -189,7 +190,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127
|
||||
// CraftBukkit start - fire ItemDespawnEvent
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
||||
this.age = 0;
|
||||
@@ -204,7 +205,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -213,7 +214,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
this.lastTick = MinecraftServer.currentTick;
|
||||
// CraftBukkit end
|
||||
|
||||
@ -35,7 +35,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127
|
||||
// CraftBukkit start - fire ItemDespawnEvent
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
|
||||
this.age = 0;
|
||||
@@ -255,7 +256,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -264,7 +265,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
private boolean isMergable() {
|
||||
ItemStack itemstack = this.getItem();
|
||||
|
||||
@ -44,7 +44,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127
|
||||
}
|
||||
|
||||
private void tryToMerge(ItemEntity other) {
|
||||
@@ -499,6 +500,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -505,6 +506,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit
|
||||
this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
|
||||
this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty
|
||||
@ -52,7 +52,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -562,7 +564,7 @@ public class ItemEntity extends Entity {
|
||||
@@ -558,7 +560,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
public void makeFakeItem() {
|
||||
this.setNeverPickUp();
|
@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
|
||||
Also ignores Enderdragon, defaulting it to Mojang's setting
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 710017f52ad1a0d338bb0a49e44a26cfc09f8b94..381bc42e760c2b652b2b45237587cebd4ae31c47 100644
|
||||
index bba77d5001638307fe640b2e656df0a2b3cb4c43..40177f2e0206f89b83bbc0b6c80d74785d9d8414 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1320,6 +1320,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1333,6 +1333,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
int j = entity.getType().clientTrackingRange() * 16;
|
@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
|
||||
heightmap resolves the issue without having to load all spawn chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d8cb7a53940c244b3ad36d32cdbbee1b3746e543..6b11da94839a677c6bf63fd2d8d4994754e3ad05 100644
|
||||
index a0dbb02019d31b890a450d0ffe2197fc095f8362..8f8f8ec38737b50ad23bb2408f9f8262d7b3a507 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3210,6 +3210,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3229,6 +3229,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (flag1) {
|
||||
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
||||
} else {
|
@ -252,10 +252,10 @@ index 0000000000000000000000000000000000000000..11de56afaf059b00fa5bec293516bcdc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999be3f726b3 100644
|
||||
index 40177f2e0206f89b83bbc0b6c80d74785d9d8414..1c39d12a6e72954a24ad51d8d6346341dc1c5d22 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -149,6 +149,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -152,6 +152,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final Long2LongMap chunkSaveCooldowns;
|
||||
private final Queue<Runnable> unloadQueue;
|
||||
int viewDistance;
|
||||
@ -263,7 +263,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b
|
||||
|
||||
// Paper - rewrite chunk system
|
||||
|
||||
@@ -161,11 +162,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -164,11 +165,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||
@ -285,7 +285,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b
|
||||
}
|
||||
|
||||
void updateMaps(ServerPlayer player) {
|
||||
@@ -173,6 +184,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -176,6 +187,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||
this.playerChunkManager.updatePlayer(player); // Paper - replace chunk loader
|
||||
@ -297,7 +297,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b
|
||||
}
|
||||
// Paper end
|
||||
// Paper start
|
||||
@@ -258,6 +274,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -261,6 +277,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new);
|
||||
this.regionManagers.add(this.dataRegionManager);
|
||||
// Paper end
|
||||
@ -305,7 +305,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b
|
||||
}
|
||||
|
||||
protected ChunkGenerator generator() {
|
||||
@@ -283,6 +300,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -286,6 +303,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
}
|
||||
|
||||
@ -362,10 +362,10 @@ index c021733342c09adb04ce3f675209543f84ac4bda..d137aa95f670aab516e9e08272f33b21
|
||||
|
||||
this.lastSpawnState = spawnercreature_d;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 70b92f95a3b1964a6253e64854d7d7d65ed5311f..796ae37215856a511b72e7d1355f672a8c5a4566 100644
|
||||
index db3d5fd301f38ae3bf13ff6d7530d6e70acb8296..a8f51ab23b46287f6066c421271f4c0fcfe04c3a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -240,6 +240,11 @@ public class ServerPlayer extends Player {
|
||||
@@ -245,6 +245,11 @@ public class ServerPlayer extends Player {
|
||||
public boolean queueHealthUpdatePacket = false;
|
||||
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
|
||||
// Paper end
|
||||
@ -377,7 +377,7 @@ index 70b92f95a3b1964a6253e64854d7d7d65ed5311f..796ae37215856a511b72e7d1355f672a
|
||||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -331,6 +336,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -336,6 +341,7 @@ public class ServerPlayer extends Player {
|
||||
this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getScoreboardName()); // Paper
|
||||
this.bukkitPickUpLoot = true;
|
||||
this.maxHealthCache = this.getMaxHealth();
|
||||
@ -386,7 +386,7 @@ index 70b92f95a3b1964a6253e64854d7d7d65ed5311f..796ae37215856a511b72e7d1355f672a
|
||||
|
||||
// Yes, this doesn't match Vanilla, but it's the best we can do for now.
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 29dac07176eb99517c9cddbe012636908c3603fe..bf3fb416d36a19958033cdbf5cc313556fa0201b 100644
|
||||
index 05c014c5f0805d50cfd251b043c79ce3355eef16..a1770e5ae4b3014c3538b52d4912c60864e186a8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -70,6 +70,12 @@ public final class NaturalSpawner {
|
||||
@ -403,7 +403,7 @@ index 29dac07176eb99517c9cddbe012636908c3603fe..bf3fb416d36a19958033cdbf5cc31355
|
||||
Object2IntOpenHashMap<MobCategory> object2intopenhashmap = new Object2IntOpenHashMap();
|
||||
Iterator iterator = entities.iterator();
|
||||
@@ -104,11 +110,16 @@ public final class NaturalSpawner {
|
||||
spawnercreatureprobabilities.addCharge(entity.blockPosition(), biomesettingsmobs_b.getCharge());
|
||||
spawnercreatureprobabilities.addCharge(entity.blockPosition(), biomesettingsmobs_b.charge());
|
||||
}
|
||||
|
||||
- if (entity instanceof Mob) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index aea3872c89493f68d31186877a1ea981a0c0df6d..f3ce802bdb2eb7a5d570716bb9fd314d011c2617 100644
|
||||
index 78fe610d69db727411bf685127c39d009090ee14..5049d72f080bb82ca0e1fc5e2348b3605a0204f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
@ -18,19 +18,19 @@ public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraf
|
||||
Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
index 0afadbc8515d448b0ef817f4f0f53b1bb0abde43..64206d94a5bf210116d208f9678618b905a61428 100644
|
||||
index 943b5ee11fb066afcfb3717befe4dab35db5b600..5ecf02ce83b7496c977adfeb203b8eadb05f9da5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
|
||||
@@ -25,6 +25,11 @@ public class IceBlock extends HalfTransparentBlock {
|
||||
@Override
|
||||
public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) {
|
||||
super.playerDestroy(world, player, pos, state, blockEntity, stack);
|
||||
public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) {
|
||||
super.playerDestroy(world, player, pos, state, blockEntity, tool);
|
||||
+ // Paper start
|
||||
+ this.afterDestroy(world, pos, stack);
|
||||
+ this.afterDestroy(world, pos, tool);
|
||||
+ }
|
||||
+ public void afterDestroy(Level world, BlockPos pos, ItemStack stack) {
|
||||
+ public void afterDestroy(Level world, BlockPos pos, ItemStack tool) {
|
||||
+ // Paper end
|
||||
if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
||||
if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) == 0) {
|
||||
if (world.dimensionType().ultraWarm()) {
|
||||
world.removeBlock(pos, false);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
@ -320,10 +320,10 @@ index f838a921a08981bac0d0c0a68e334ba06d11cb18..665e088cb0b73f6a0c62f29c56da462b
|
||||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 76c388347ebbff2d50a975b40dbe93cc2760f6bb..52a514b657485246827bf9c153303b8b5229bf5b 100644
|
||||
index 5ae321dc30d48f838c49322b5beef89bcbc952bc..67e59ac94c584a742bf5e6e2094459234603ef06 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -424,6 +424,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -422,6 +422,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return this.entityLookup;
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove garbage Java version check
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index c9c0c17651b05094f96840b4fc0fd60825eef146..08e74f41516a545a2371a7418d995ab288831834 100644
|
||||
index 7968b883847877f7ddc11f7a25efbbb71605d2bf..8b03be6babe3052ab351061c0c206c84e26ef705 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -196,10 +196,6 @@ public class Main {
|
||||
@@ -205,10 +205,6 @@ public class Main {
|
||||
System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'.");
|
||||
return;
|
||||
}
|
@ -7,10 +7,10 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem
|
||||
(dispensers can throw eggs to hatch them, too).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
index 9ec976ab52c1ebe717317f99f1ccf3062bb66278..bdddec9510d84c8940b6116ede389bcac3680ab1 100644
|
||||
index c400bcb9da854e3c953c269d6f74c1a4f07b82a7..326eb972078e5dd700372c9ba09ea7f8415b144e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
@@ -77,6 +77,14 @@ public class ThrownEgg extends ThrowableItemProjectile {
|
||||
@@ -76,6 +76,14 @@ public class ThrownEgg extends ThrowableItemProjectile {
|
||||
hatchingType = event.getHatchingType();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4089ab947e144642bd6407bf6bef2e3b4a94a0e0..fd1637608b89e1f5af884410cd804c4bfc158c41 100644
|
||||
index 38a5d219713f7d3bb3d5ea73e4e6756a03128d01..e6e4856db7d983460fdf898583915ff2e4a43d14 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3264,8 +3264,10 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3224,8 +3224,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
} else if (this.isInLava() && (!this.onGround || d7 > d8)) {
|
||||
this.jumpInLiquid(FluidTags.LAVA);
|
||||
} else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) {
|
||||
@ -34,10 +34,10 @@ index e98849c103e7409f70e73a30c6713c644155b284..2db5d8a937c841718e7b568c215109c3
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
index 01dfe3e29ea55b9e839a4db027fdd6a1dbb5ca23..6a0b4f86e5157494a917cf5efecb730081bae628 100644
|
||||
index 24dc43c7806e99be6dc37af48ec056a5edd19947..74bc42623f16042c2a72993f842614a013bfb4d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
|
||||
@@ -177,7 +177,9 @@ public class Ravager extends Raider {
|
||||
@@ -176,7 +176,9 @@ public class Ravager extends Raider {
|
||||
}
|
||||
|
||||
if (!flag && this.onGround) {
|
||||
@ -48,7 +48,7 @@ index 01dfe3e29ea55b9e839a4db027fdd6a1dbb5ca23..6a0b4f86e5157494a917cf5efecb7300
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 0541d68f6fc758ce5915fe906f7a44814c33b2d6..c7cc9408f961aa804af9548d8c8fee46631421cf 100644
|
||||
index b19185c16f8fecbefef697017e8dcfd249306fe3..c5784574f584a5588020b16776f01faf6902cbe8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -887,5 +887,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d49c7a3c1 100644
|
||||
index 8f8f8ec38737b50ad23bb2408f9f8262d7b3a507..6fa842ae2f419a42d830b417f4d624451e6c4325 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -386,6 +386,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -387,6 +387,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// Paper start
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE; // Paper
|
||||
public boolean isTemporarilyActive = false; // Paper
|
||||
@ -16,7 +16,7 @@ index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d
|
||||
protected int numCollisions = 0; // Paper
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
@javax.annotation.Nullable
|
||||
@@ -2068,6 +2069,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2080,6 +2081,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||
}
|
||||
@ -26,7 +26,7 @@ index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d
|
||||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2209,6 +2213,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2222,6 +2226,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
@ -35,7 +35,7 @@ index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d
|
||||
String spawnReasonName = nbt.getString("Paper.SpawnReason");
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
index eb444932203620f6681002a1346ccf45866e6a4e..a423aff5fde3f42c8b8aecb74fe0022c4d2dbe81 100644
|
||||
index 47c99d86be833b7c6f9f76c76897fb89d6fca712..69f34c566bf825259253abbefd7d7ba2e847231b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
@@ -63,6 +63,8 @@ public class NetherPortalBlock extends Block {
|
@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 6e533fdcd0671892a0e9dbfc99662feb433a5cf8..24f1be1dcf2156fe17fec1c66529514b50925e2b 100644
|
||||
index bdd4572489cd12ea19560fe82006e3fe4db29b50..cdfd63b5d1a9c6fc9a957730adf2406decef633b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -349,13 +349,18 @@ public class CraftEventFactory {
|
||||
@@ -348,13 +348,18 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
org.bukkit.inventory.ItemStack item;
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
index d2864615588aadf81ac9763ba402ede0c1eebb23..e73acfa2f5a4066fa1beee1758082a2fe97a43b3 100644
|
||||
index f150afd99922bc5d2f2183ad39fd1918ce3de367..4fbbd74cda7e4f2c623db46c2c94d9697ca5df05 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
@@ -334,7 +334,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it
|
||||
easier to inline due to code size
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 7b28537fda4187036b15ecc04f68ac1c9bf5f67f..1c618cfb63561f4557f8ec71254b6397eb9cc485 100644
|
||||
index f5bdb76e554c9fc492dbf2a67166845ada0ac103..39defceb694875322b3433a3ad4bb16256413ea8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -427,18 +427,20 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -47,7 +47,7 @@ index 7b28537fda4187036b15ecc04f68ac1c9bf5f67f..1c618cfb63561f4557f8ec71254b6397
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index 785fbcf9bafcdec1c5be213de3d8512690023415..066874d27495dcaa3dea254b7328257e46920357 100644
|
||||
index 8823751cde27bf195177282e99e9a69888441e35..8c8445af8a2fe684fdbb468f8d8605d44a803758 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -54,7 +54,7 @@ public class LevelChunkSection {
|
@ -125,10 +125,10 @@ index d44d0074446c1c54e87dc8078dff7fef1d92f343..bbb8b1933ef33a3b91f69545f69dd3cf
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 023119624c0534bedb248099d0e12c76622a363a..8dcbeeae50afe23aa7e2a083239f0a315424574f 100644
|
||||
index cb76b912ebb5ac4e53588c82cf35ac98bdf7d1e2..728a9d2c11bce06cf3edb25cb500db0423d9b84d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -249,6 +249,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@Nullable private net.kyori.adventure.text.Component cachedMotd; // Paper
|
||||
private int playerIdleTimeout;
|
||||
public final long[] tickTimes;
|
||||
@ -140,20 +140,19 @@ index 023119624c0534bedb248099d0e12c76622a363a..8dcbeeae50afe23aa7e2a083239f0a31
|
||||
@Nullable
|
||||
private KeyPair keyPair;
|
||||
@Nullable
|
||||
@@ -1362,6 +1367,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.averageTickTime = this.averageTickTime * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
||||
long i1 = Util.getNanos();
|
||||
@@ -1344,6 +1349,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.averageTickTime = this.averageTickTime * 0.8F + (float) j / 1000000.0F * 0.19999999F;
|
||||
long k = Util.getNanos();
|
||||
|
||||
+ // Paper start
|
||||
+ tickTimes5s.add(this.tickCount, l);
|
||||
+ tickTimes10s.add(this.tickCount, l);
|
||||
+ tickTimes60s.add(this.tickCount, l);
|
||||
+ tickTimes5s.add(this.tickCount, j);
|
||||
+ tickTimes10s.add(this.tickCount, j);
|
||||
+ tickTimes60s.add(this.tickCount, j);
|
||||
+ // Paper end
|
||||
+
|
||||
this.frameTimer.logFrameDuration(i1 - i);
|
||||
this.frameTimer.logFrameDuration(k - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -2550,4 +2561,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2577,4 +2587,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
|
||||
}
|
||||
@ -185,10 +184,10 @@ index 023119624c0534bedb248099d0e12c76622a363a..8dcbeeae50afe23aa7e2a083239f0a31
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 76860d584effba34b09becfb2a68bd755f0f675d..61da47d40f289ebe65d60bd850ab7ef386d46c3f 100644
|
||||
index bdd45da02c9bd78758e4b315a19a25cf552a83da..271a17f767b316384fef563251a4777d297e2da2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2495,6 +2495,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2493,6 +2493,16 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
};
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 61da47d40f289ebe65d60bd850ab7ef386d46c3f..687bf0c2a77ca304bd05ac431965f01b6cabf454 100644
|
||||
index 271a17f767b316384fef563251a4777d297e2da2..341b441f54b65302ecfbf050ae740e2b25492a6d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2688,5 +2688,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2686,5 +2686,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 289276ae40409868c6293c5ab3bafe54c2ccf15c..69b126c8bbba26f517e0d314b3629b2445349770 100644
|
||||
index 976a8d9019cccd82d8f5cd2cf86202e4076753ed..e50daf4bafa38d92304ffda05326bd335d070422 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -460,6 +460,52 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
|
||||
world and the world age for the start day.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 796ae37215856a511b72e7d1355f672a8c5a4566..23bac54d7cc2938c8a3f1a8dbb97fea18047a809 100644
|
||||
index a8f51ab23b46287f6066c421271f4c0fcfe04c3a..2d1c3d222cfced339fb098b09c3c84e0c0805255 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -236,6 +236,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -241,6 +241,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper
|
||||
public long loginTime; // Paper
|
@ -5,7 +5,7 @@ Subject: [PATCH] Do not allow bees to load chunks for beehives
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index f3ce802bdb2eb7a5d570716bb9fd314d011c2617..3d06d69d170634f5c643cfa717fdc5ee348d01f0 100644
|
||||
index 5049d72f080bb82ca0e1fc5e2348b3605a0204f1..2a6dda97fcc761eb3e7109e032d3bb10c83908d7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -409,6 +409,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@ -24,7 +24,7 @@ index f3ce802bdb2eb7a5d570716bb9fd314d011c2617..3d06d69d170634f5c643cfa717fdc5ee
|
||||
BlockEntity tileentity = this.level.getBlockEntity(pos);
|
||||
|
||||
return tileentity instanceof BeehiveBlockEntity ? !((BeehiveBlockEntity) tileentity).isFull() : false;
|
||||
@@ -924,6 +926,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -919,6 +921,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@Override
|
||||
public boolean canBeeUse() {
|
||||
if (Bee.this.hasHive() && Bee.this.wantsToEnterHive() && Bee.this.hivePos.closerToCenterThan(Bee.this.position(), 2.0D)) {
|
||||
@ -32,7 +32,7 @@ index f3ce802bdb2eb7a5d570716bb9fd314d011c2617..3d06d69d170634f5c643cfa717fdc5ee
|
||||
BlockEntity tileentity = Bee.this.level.getBlockEntity(Bee.this.hivePos);
|
||||
|
||||
if (tileentity instanceof BeehiveBlockEntity) {
|
||||
@@ -947,6 +950,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -942,6 +945,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
@Override
|
||||
public void start() {
|
@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
|
||||
Stack will identify any causer of this and warn instead of crashing.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index fcdd8a8570d07e8bd3339275c7b6999be3f726b3..b2e95249ee5aa37d5e41679a7cb94e01c1b41494 100644
|
||||
index 1c39d12a6e72954a24ad51d8d6346341dc1c5d22..9c5925bc6a0fb277970d46c34dd812cc765a537a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1030,6 +1030,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1033,6 +1033,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
public void addEntity(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
|
||||
@ -25,10 +25,10 @@ index fcdd8a8570d07e8bd3339275c7b6999be3f726b3..b2e95249ee5aa37d5e41679a7cb94e01
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 52a514b657485246827bf9c153303b8b5229bf5b..62f1f568bba5fbcb68e49640adb79c9384619bc6 100644
|
||||
index 67e59ac94c584a742bf5e6e2094459234603ef06..4bf38f9006be9e838c54783dafd40cf84553d627 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2325,7 +2325,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2324,7 +2324,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTrackingStart(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||
@ -37,7 +37,7 @@ index 52a514b657485246827bf9c153303b8b5229bf5b..62f1f568bba5fbcb68e49640adb79c93
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
@@ -2359,6 +2359,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2358,6 +2358,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.valid = true; // CraftBukkit
|
@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
|
||||
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 23bac54d7cc2938c8a3f1a8dbb97fea18047a809..cbf11122d5cc43b057d72cc989e7b73615f9fb54 100644
|
||||
index 2d1c3d222cfced339fb098b09c3c84e0c0805255..206a66b6e403c8b7e60ff5b31eb478303d34b272 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -675,7 +675,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -680,7 +680,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
public void doTick() {
|
||||
try {
|
@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
|
||||
due to 1.15's new queue but processed while dead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 6f3d06b929e9b5c22b3090683d5eb90bc3c98421..deb67acf5a60ea8a3cec866cd75ac036257ef0b5 100644
|
||||
index 65adadd9e35f2ec6c10acd24ebf61e3cfba173e4..a7dc305297d1a17291ffff40fe6c3bd7b8cc6bdb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1154,7 +1154,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1153,7 +1153,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected boolean isImmobile() {
|
@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading
|
||||
massive amounts of surrounding chunks due to large AABB lookups.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index b537dfce0492acd170e37406b3ed1ad215d7df7d..8318548883bbaea273ea03d1385ee169e9560867 100644
|
||||
index 1644ff0709d721ba8c19e4b4c7ef07fc8e8f5918..2e61c92787625fc9c116cd6d8dc9097c2f7d709f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -805,6 +805,7 @@ public abstract class PlayerList {
|
||||
@@ -812,6 +812,7 @@ public abstract class PlayerList {
|
||||
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
// CraftBukkit end
|
||||
|
||||
@ -26,7 +26,7 @@ index b537dfce0492acd170e37406b3ed1ad215d7df7d..8318548883bbaea273ea03d1385ee169
|
||||
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6b19894c4353cf96d853d00128614b6d49c7a3c1..1e4699372b22c3fe3eed6859c3f15f9b70a537c0 100644
|
||||
index 6fa842ae2f419a42d830b417f4d624451e6c4325..8cfa823940b0fada04022034023f5372f1ca8b9f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -236,6 +236,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@ -13,19 +13,19 @@ By skipping this, we avoid potential for a large spike on server start.
|
||||
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index cbf11122d5cc43b057d72cc989e7b73615f9fb54..94a50cd836ea5400a0e65a388074c5a7cfbb27cc 100644
|
||||
index 206a66b6e403c8b7e60ff5b31eb478303d34b272..8754a37b405e96d2f5d02ef6b9864afac136212a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -328,7 +328,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -333,7 +333,7 @@ public class ServerPlayer extends Player {
|
||||
this.stats = server.getPlayerList().getPlayerStats(this);
|
||||
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
|
||||
this.maxUpStep = 1.0F;
|
||||
this.setMaxUpStep(1.0F);
|
||||
- this.fudgeSpawnLocation(world);
|
||||
+ //this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join
|
||||
|
||||
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
|
||||
@@ -562,7 +562,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -567,7 +567,7 @@ public class ServerPlayer extends Player {
|
||||
position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos());
|
||||
}
|
||||
this.level = world;
|
||||
@ -35,10 +35,10 @@ index cbf11122d5cc43b057d72cc989e7b73615f9fb54..94a50cd836ea5400a0e65a388074c5a7
|
||||
this.gameMode.setLevel((ServerLevel) world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 8318548883bbaea273ea03d1385ee169e9560867..508900514a98ad35d33854a1c67a1b38c5ac76b1 100644
|
||||
index 2e61c92787625fc9c116cd6d8dc9097c2f7d709f..187b3dc881f226963af5b61a2c4b957ecf537cf5 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -222,6 +222,8 @@ public abstract class PlayerList {
|
||||
@@ -223,6 +223,8 @@ public abstract class PlayerList {
|
||||
worldserver1 = worldserver;
|
||||
}
|
||||
|
@ -71,10 +71,10 @@ index 336795dff742b7c6957fbd3476aff31d25a5e659..30a58229aa6dac5039511d0c0df5f291
|
||||
cause = cause.getCause();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09ed4b6baf 100644
|
||||
index 728a9d2c11bce06cf3edb25cb500db0423d9b84d..155a9a5def5ff599ecf862782fa19fcc595e6789 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -295,7 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -298,7 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public Commands vanillaCommandDispatcher;
|
||||
@ -83,7 +83,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
@@ -306,6 +306,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -309,6 +309,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
public static long currentTickLong = 0L; // Paper
|
||||
|
||||
@ -93,7 +93,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
|
||||
@@ -885,6 +888,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -887,6 +890,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
@ -101,7 +101,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -899,6 +903,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -901,6 +905,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -121,7 +121,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
// CraftBukkit end
|
||||
if (this.metricsRecorder.isRecording()) {
|
||||
this.cancelRecordingMetrics();
|
||||
@@ -955,7 +972,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -957,7 +974,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getProfileCache().save(false); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
@ -140,7 +140,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
}
|
||||
|
||||
public String getLocalIp() {
|
||||
@@ -1050,6 +1078,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1052,6 +1080,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
protected void runServer() {
|
||||
try {
|
||||
@ -149,7 +149,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
throw new IllegalStateException("Failed to initialize server");
|
||||
}
|
||||
@@ -1061,6 +1090,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.updateStatusIcon(this.status);
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
// Spigot start
|
||||
+ // Paper start - move done tracking
|
||||
@ -211,7 +211,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
return new TickTask(this.tickCount, runnable);
|
||||
}
|
||||
|
||||
@@ -1453,6 +1506,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1461,6 +1514,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
|
||||
} catch (Throwable t) {
|
||||
@ -219,7 +219,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09
|
||||
throw new RuntimeException("Error generating crash report", t);
|
||||
}
|
||||
// Spigot End
|
||||
@@ -1933,7 +1987,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1959,7 +2013,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.worldData.setDataConfiguration(worlddataconfiguration);
|
||||
this.resources.managers.updateRegistryTags(this.registryAccess());
|
||||
@ -269,10 +269,10 @@ index f22c50f0a2ef05e9f52550db7c40b5b99632650c..549ea8e0fe702615eefcbfd1cd6a30e0
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 508900514a98ad35d33854a1c67a1b38c5ac76b1..0e15a5292cf32ad613952ba15c2f202c40d1d2b2 100644
|
||||
index 187b3dc881f226963af5b61a2c4b957ecf537cf5..a4b3e2caf550f578ac06c5d17077fe08aaa07a57 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -526,7 +526,7 @@ public abstract class PlayerList {
|
||||
@@ -533,7 +533,7 @@ public abstract class PlayerList {
|
||||
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||
|
||||
@ -294,10 +294,10 @@ index f5829ae484d93b547a5437b85a9621346384a11b..83701fbfaa56a232593ee8f11a3afb89
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index c53fa2902c6572c65f42a07be987a7da096a8aee..d9842447d7ae840bf9541bbe7c99b032c83d0039 100644
|
||||
index 637092303bbce94fd37f193367264d51b855847d..31edf8f2c683f56e53040e735d015ca6d6966d01 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -821,6 +821,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -827,6 +827,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
@ -306,10 +306,10 @@ index c53fa2902c6572c65f42a07be987a7da096a8aee..d9842447d7ae840bf9541bbe7c99b032
|
||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
MinecraftServer.LOGGER.error(msg, throwable);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 1c618cfb63561f4557f8ec71254b6397eb9cc485..6e95a98727322106d2c418de80f5f0aad2ea1953 100644
|
||||
index 39defceb694875322b3433a3ad4bb16256413ea8..86f19b7ed15c2029c5483f21b44895d8982a90b8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1218,6 +1218,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1230,6 +1230,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
gameprofilerfiller.pop();
|
||||
} catch (Throwable throwable) {
|
||||
@ -318,19 +318,10 @@ index 1c618cfb63561f4557f8ec71254b6397eb9cc485..6e95a98727322106d2c418de80f5f0aa
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 08e74f41516a545a2371a7418d995ab288831834..cce6886bb3973eed8f0c7ca7b1189547324fd4e2 100644
|
||||
index 8b03be6babe3052ab351061c0c206c84e26ef705..7f85bc8e8a666a32e392fa57418bf0d479e758d0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -12,6 +12,8 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
+import net.minecraft.util.ExceptionCollector;
|
||||
+import net.minecraft.world.level.lighting.LayerLightEventListener;
|
||||
import net.minecrell.terminalconsole.TerminalConsoleAppender; // Paper
|
||||
|
||||
public class Main {
|
||||
@@ -169,6 +171,36 @@ public class Main {
|
||||
@@ -178,6 +178,36 @@ public class Main {
|
||||
|
||||
OptionSet options = null;
|
||||
|
||||
@ -367,7 +358,7 @@ index 08e74f41516a545a2371a7418d995ab288831834..cce6886bb3973eed8f0c7ca7b1189547
|
||||
try {
|
||||
options = parser.parse(args);
|
||||
} catch (joptsimple.OptionException ex) {
|
||||
@@ -264,8 +296,64 @@ public class Main {
|
||||
@@ -273,8 +303,64 @@ public class Main {
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
@ -410,9 +401,9 @@ index 08e74f41516a545a2371a7418d995ab288831834..cce6886bb3973eed8f0c7ca7b1189547
|
||||
+ tryPreloadClass("com.destroystokyo.paper.event.player.PlayerConnectionCloseEvent");
|
||||
+ tryPreloadClass("com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent");
|
||||
+ // Minecraft, seen during saving
|
||||
+ tryPreloadClass(LayerLightEventListener.DummyLightLayerEventListener.class.getName());
|
||||
+ tryPreloadClass(LayerLightEventListener.class.getName());
|
||||
+ tryPreloadClass(ExceptionCollector.class.getName());
|
||||
+ tryPreloadClass(net.minecraft.world.level.lighting.LayerLightEventListener.DummyLightLayerEventListener.class.getName());
|
||||
+ tryPreloadClass(net.minecraft.world.level.lighting.LayerLightEventListener.class.getName());
|
||||
+ tryPreloadClass(net.minecraft.util.ExceptionCollector.class.getName());
|
||||
+ // Paper end
|
||||
+ }
|
||||
+ }
|
@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as
|
||||
arrow attacks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
index bf89b3a484334ec23f96426bdcf29e54725512c3..97257b450e848f53fdb9b5b7affa57b03ea5f459 100644
|
||||
index 46c2885097ab768bb9d62187fe0ad2d61007d353..7ffe5bef3778d5971ea4ceadf3102725fd0d08cd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -191,9 +191,29 @@ public abstract class PathNavigation {
|
||||
@@ -192,9 +192,29 @@ public abstract class PathNavigation {
|
||||
return this.moveTo(this.createPath(x, y, z, 1), speed);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ In order to get chunk values, we shouldn't need to create
|
||||
an optional each time.
|
||||
|
||||
diff --git a/src/main/java/com/mojang/datafixers/util/Either.java b/src/main/java/com/mojang/datafixers/util/Either.java
|
||||
index a90adac7bd7ebd423f480e9ae0f44cb9d521fa4f..3f65fe71024928e35111fc6719a290aab9a6859e 100644
|
||||
index de524d485fada3c3cca8c2fe6c63db0e0b33dad8..6eb0c94965a6e96ec8ae112125e98c6c4809805b 100644
|
||||
--- a/src/main/java/com/mojang/datafixers/util/Either.java
|
||||
+++ b/src/main/java/com/mojang/datafixers/util/Either.java
|
||||
@@ -22,7 +22,7 @@ public abstract class Either<L, R> implements App<Either.Mu<R>, L> {
|
@ -8,10 +8,10 @@ is important because we clone chunk data after reading it for safety.
|
||||
So, reduce the impact of the clone on GC.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index ca7d1d33cfd448673365b615b8609083dcb11da4..07593ecae8fb00412c5342681263e3333d3809c0 100644
|
||||
index 64765dab6fed87ffdf4af197d8d5f28a04544db0..1d13bc15c56faa69699fb3ad39210233d6b6934d 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -34,7 +34,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -36,7 +36,7 @@ public class CompoundTag implements Tag {
|
||||
if (i > 512) {
|
||||
throw new RuntimeException("Tried to read NBT tag with too high complexity, depth > 512");
|
||||
} else {
|
||||
@ -20,7 +20,7 @@ index ca7d1d33cfd448673365b615b8609083dcb11da4..07593ecae8fb00412c5342681263e333
|
||||
|
||||
byte b;
|
||||
while((b = CompoundTag.readNamedTagType(dataInput, nbtAccounter)) != 0) {
|
||||
@@ -128,7 +128,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -130,7 +130,7 @@ public class CompoundTag implements Tag {
|
||||
}
|
||||
|
||||
public CompoundTag() {
|
||||
@ -29,7 +29,7 @@ index ca7d1d33cfd448673365b615b8609083dcb11da4..07593ecae8fb00412c5342681263e333
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -447,8 +447,16 @@ public class CompoundTag implements Tag {
|
||||
@@ -449,8 +449,16 @@ public class CompoundTag implements Tag {
|
||||
|
||||
@Override
|
||||
public CompoundTag copy() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 94a50cd836ea5400a0e65a388074c5a7cfbb27cc..6fd27b00bac756654c29955f1e5fe921687ab3f3 100644
|
||||
index 8754a37b405e96d2f5d02ef6b9864afac136212a..40100da5295aaa9113b0decc44ff7ca385cfd440 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -644,7 +644,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -649,7 +649,7 @@ public class ServerPlayer extends Player {
|
||||
containerUpdateDelay = level.paperConfig().tickRates.containerUpdate;
|
||||
}
|
||||
// Paper end
|
||||
@ -17,7 +17,7 @@ index 94a50cd836ea5400a0e65a388074c5a7cfbb27cc..6fd27b00bac756654c29955f1e5fe921
|
||||
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
@@ -1522,7 +1522,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1498,7 +1498,7 @@ public class ServerPlayer extends Player {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
this.containerMenu = container;
|
@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
|
||||
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index fd1637608b89e1f5af884410cd804c4bfc158c41..b27959da01866910da7c1197c6675da87bb181c4 100644
|
||||
index e6e4856db7d983460fdf898583915ff2e4a43d14..25e1dc97e3260e7f58b15a1759b8f9531c6a6f20 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3364,10 +3364,24 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3328,10 +3328,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.level.isClientSide()) {
|
||||
this.level.getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
|
||||
} else {
|
@ -87,11 +87,11 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6fd27b00bac756654c29955f1e5fe921687ab3f3..596611c852d1b2b98fdae26d6bd75c3bce9d1984 100644
|
||||
index 40100da5295aaa9113b0decc44ff7ca385cfd440..b5cca159c392e329b4283aafdffa80d9aabdda10 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1885,9 +1885,24 @@ public class ServerPlayer extends Player {
|
||||
return s;
|
||||
@@ -1891,9 +1891,24 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start - Client option API
|
||||
@ -116,10 +116,10 @@ index 6fd27b00bac756654c29955f1e5fe921687ab3f3..596611c852d1b2b98fdae26d6bd75c3b
|
||||
if (getMainArm() != packet.mainHand()) {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index d21faa3e7a97c28e380323b503d32de5e5705d11..7dfa2ce4028b7ab3b1ebe063f497b8adda397079 100644
|
||||
index bb9940422a87e5d97a7c2d3ed368644074e9348c..3ea01452f4b18ac1c6a13a79f8e5c486e4c6f85b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -617,6 +617,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -618,6 +618,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
|
||||
}
|
||||
}
|
@ -31,10 +31,10 @@ delays anymore.
|
||||
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index b2e95249ee5aa37d5e41679a7cb94e01c1b41494..11a4ba46869e3073375d85820426f0662bd2caf7 100644
|
||||
index 9c5925bc6a0fb277970d46c34dd812cc765a537a..f2bdb647f137a1334789dc56e517844b74d70bd9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1036,6 +1036,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1039,6 +1039,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
+ ": " + entity + (this.entityMap.containsKey(entity.getId()) ? " ALREADY CONTAINED (This would have crashed your server)" : ""), new Throwable());
|
||||
return;
|
||||
}
|
||||
@ -43,10 +43,10 @@ index b2e95249ee5aa37d5e41679a7cb94e01c1b41494..11a4ba46869e3073375d85820426f066
|
||||
if (!(entity instanceof EnderDragonPart)) {
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 596611c852d1b2b98fdae26d6bd75c3bce9d1984..d7cce55b968e01641c46b7eae396393b6ff572e5 100644
|
||||
index b5cca159c392e329b4283aafdffa80d9aabdda10..308df2980f45d25902afd5e696449f6397b186b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -259,6 +259,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -264,6 +264,7 @@ public class ServerPlayer extends Player {
|
||||
public double maxHealthCache;
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
@ -55,10 +55,10 @@ index 596611c852d1b2b98fdae26d6bd75c3bce9d1984..d7cce55b968e01641c46b7eae396393b
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9e6c2d570 100644
|
||||
index a4b3e2caf550f578ac06c5d17077fe08aaa07a57..d483f69d376b486dfca8b4b58d43855c319e60b5 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -291,6 +291,12 @@ public abstract class PlayerList {
|
||||
@@ -297,6 +297,12 @@ public abstract class PlayerList {
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
||||
|
||||
@ -71,7 +71,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9
|
||||
// CraftBukkit start
|
||||
CraftPlayer bukkitPlayer = player.getBukkitEntity();
|
||||
|
||||
@@ -329,6 +335,8 @@ public abstract class PlayerList {
|
||||
@@ -335,6 +341,8 @@ public abstract class PlayerList {
|
||||
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
|
||||
}
|
||||
player.sentListPacket = true;
|
||||
@ -80,7 +80,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9
|
||||
// CraftBukkit end
|
||||
|
||||
player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
|
||||
@@ -353,6 +361,11 @@ public abstract class PlayerList {
|
||||
@@ -360,6 +368,11 @@ public abstract class PlayerList {
|
||||
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect));
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9
|
||||
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
|
||||
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
|
||||
// CraftBukkit start
|
||||
@@ -401,6 +414,10 @@ public abstract class PlayerList {
|
||||
@@ -408,6 +421,10 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9
|
||||
player.initInventoryMenu();
|
||||
// CraftBukkit - Moved from above, added world
|
||||
// Paper start - Add to collideRule team if needed
|
||||
@@ -410,6 +427,7 @@ public abstract class PlayerList {
|
||||
@@ -417,6 +434,7 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end
|
@ -7,10 +7,10 @@ The code following this has better support for null worlds to move
|
||||
them back to the world spawn.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1e4699372b22c3fe3eed6859c3f15f9b70a537c0..7e8d434944596b4d82675448ddff4046a1b0b4b4 100644
|
||||
index 8cfa823940b0fada04022034023f5372f1ca8b9f..d3f9954bda58b459e2f64b5d949807ab60905d48 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2186,9 +2186,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2199,9 +2199,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
bworld = server.getWorld(worldName);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b27959da01866910da7c1197c6675da87bb181c4..03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb 100644
|
||||
index 25e1dc97e3260e7f58b15a1759b8f9531c6a6f20..6541caa4a574271fa940d1dceef434655ffd8aa9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2128,7 +2128,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2126,7 +2126,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
|
||||
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads
|
||||
Caused a deadlock
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
index 7e48326b6dc847a84e0aff2d393cadf9bace7979..68be050e5187d372a65290c01c69f3582053f7a1 100644
|
||||
index 33ece83c6d41c65042356c44eee2c76934c07d0b..9576f581bb61e6c71de427c52dcc3e56dc3ed81e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -100,6 +100,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -101,6 +101,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
// CraftBukkit start
|
||||
@ -17,7 +17,7 @@ index 7e48326b6dc847a84e0aff2d393cadf9bace7979..68be050e5187d372a65290c01c69f358
|
||||
if (!this.canSurvive(state, world, pos)) {
|
||||
// Suppress during worldgen
|
||||
if (!(world instanceof Level)) {
|
||||
@@ -115,7 +116,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -116,7 +117,7 @@ public class FireBlock extends BaseFireBlock {
|
||||
return blockState.getHandle();
|
||||
}
|
||||
}
|
@ -17,10 +17,10 @@ index 6fd874a83a248e6a7d427d18d11fc608544662c5..302676ef78ed5b3b7fc1b04851447ca7
|
||||
private EntitySelector() {}
|
||||
// Paper start
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
index 0e96e9d7e4d636f4222f60cec556663f506c3906..5432b3eff8ac09e45c7e118ddc1bc5303005412b 100644
|
||||
index a3663ea031f3a243f670bf1c98272a49daed71b0..0ada1ba6774e3d0514afb946fd0f104004cc020d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -558,6 +558,7 @@ public class Phantom extends FlyingMob implements Enemy {
|
||||
@@ -563,6 +563,7 @@ public class Phantom extends FlyingMob implements Enemy {
|
||||
Player entityhuman = (Player) iterator.next();
|
||||
|
||||
if (Phantom.this.canAttack(entityhuman, TargetingConditions.DEFAULT)) {
|
||||
@ -29,7 +29,7 @@ index 0e96e9d7e4d636f4222f60cec556663f506c3906..5432b3eff8ac09e45c7e118ddc1bc530
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index 900a66fc7eb817509df904b71ccc3bd3976f3b35..24fa62da17ad6c84d45c6fb726305a87df85d2aa 100644
|
||||
index df7f23bb039a61ed26e117df934aad9ec5df3f58..66ac41d8fce4176feecf9a7e89e15244f47d261d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -51,7 +51,7 @@ public class PhantomSpawner implements CustomSpawner {
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
||||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8594d8b9d 100644
|
||||
index d3f9954bda58b459e2f64b5d949807ab60905d48..c69cc5dadac4bd81f08258f0420b7acd506cb04a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2316,11 +2316,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2329,11 +2329,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||
@ -34,7 +34,7 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@@ -3095,6 +3096,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3114,6 +3115,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@Nullable
|
||||
public Entity teleportTo(ServerLevel worldserver, PositionImpl location) {
|
||||
// CraftBukkit end
|
||||
@ -47,7 +47,7 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8
|
||||
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
||||
this.level.getProfiler().push("changeDimension");
|
||||
// CraftBukkit start
|
||||
@@ -3121,6 +3128,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3140,6 +3147,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit end
|
||||
|
||||
this.level.getProfiler().popPush("reloading");
|
||||
@ -59,7 +59,7 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8
|
||||
Entity entity = this.getType().create(worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
@@ -3134,10 +3146,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3153,10 +3165,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
this.getBukkitEntity().setHandle(entity);
|
||||
entity.bukkitEntity = this.getBukkitEntity();
|
||||
@ -70,20 +70,20 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -3258,7 +3266,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3277,7 +3285,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
- return true;
|
||||
+ return isAlive() && valid; // Paper
|
||||
- return !this.isPassenger() && !this.isVehicle();
|
||||
+ return !this.isPassenger() && !this.isVehicle() && isAlive() && valid; // Paper
|
||||
}
|
||||
|
||||
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb..8cea2de440c1f45e376067c1adda3ea67dce2fe5 100644
|
||||
index 6541caa4a574271fa940d1dceef434655ffd8aa9..b0a57ff0780c3f37110a9c3640f29cb08daa52d5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1647,9 +1647,9 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1636,9 +1636,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
// Paper start
|
||||
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
|
||||
if (deathEvent == null || !deathEvent.isCancelled()) {
|
||||
@ -96,7 +96,7 @@ index 03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb..8cea2de440c1f45e376067c1adda3ea6
|
||||
// Paper start - clear equipment if event is not cancelled
|
||||
if (this instanceof Mob) {
|
||||
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
|
||||
@@ -1747,8 +1747,13 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -1736,8 +1736,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.dropCustomDeathLoot(source, i, flag);
|
||||
this.clearEquipmentSlots = prev; // Paper
|
||||
}
|
||||
@ -113,10 +113,10 @@ index 03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb..8cea2de440c1f45e376067c1adda3ea6
|
||||
this.drops = new ArrayList<>();
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 4edd48ce10caf31ac0136af35f19836b555675e5..d7bb93cd6467fe5d1cb1a9b95fa0bc3b31ba9cd2 100644
|
||||
index dbb4bfb3d1f1ce2e435ca531be36ea448c0e3212..3be5ea477cb3dd3ce75f3feced8daf7cce7075cd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -609,7 +609,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -627,7 +627,7 @@ public class ArmorStand extends LivingEntity {
|
||||
for (i = 0; i < this.handItems.size(); ++i) {
|
||||
itemstack = (ItemStack) this.handItems.get(i);
|
||||
if (!itemstack.isEmpty()) {
|
||||
@ -125,7 +125,7 @@ index 4edd48ce10caf31ac0136af35f19836b555675e5..d7bb93cd6467fe5d1cb1a9b95fa0bc3b
|
||||
this.handItems.set(i, ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
@@ -617,7 +617,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -635,7 +635,7 @@ public class ArmorStand extends LivingEntity {
|
||||
for (i = 0; i < this.armorItems.size(); ++i) {
|
||||
itemstack = (ItemStack) this.armorItems.get(i);
|
||||
if (!itemstack.isEmpty()) {
|
||||
@ -135,10 +135,10 @@ index 4edd48ce10caf31ac0136af35f19836b555675e5..d7bb93cd6467fe5d1cb1a9b95fa0bc3b
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 24f1be1dcf2156fe17fec1c66529514b50925e2b..cd6e0904dbdac5d7e1630e59d6ffa2ba0a5b3b2f 100644
|
||||
index cdfd63b5d1a9c6fc9a957730adf2406decef633b..440806cc3d7852f9cf3648a747c48236afff7e80 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -810,6 +810,11 @@ public class CraftEventFactory {
|
||||
@@ -809,6 +809,11 @@ public class CraftEventFactory {
|
||||
}
|
||||
|
||||
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
@ -150,7 +150,7 @@ index 24f1be1dcf2156fe17fec1c66529514b50925e2b..cd6e0904dbdac5d7e1630e59d6ffa2ba
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
|
||||
populateFields(victim, event); // Paper - make cancellable
|
||||
@@ -823,11 +828,13 @@ public class CraftEventFactory {
|
||||
@@ -822,11 +827,13 @@ public class CraftEventFactory {
|
||||
playDeathSound(victim, event);
|
||||
// Paper end
|
||||
victim.expToDrop = event.getDroppedExp();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index bae36fdcab69b27be03d4df6cb24912c6884340c..7aea69bac0bc533380cebad8ef6b20a3a1442d69 100644
|
||||
index 34a969d8902f23d5ec3f8cc481b60c0fd74f8245..8d45c4fb59b7c570418506955b4f00876921b7c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -955,7 +955,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -957,7 +957,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handlePickItem(ServerboundPickItemPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 687bf0c2a77ca304bd05ac431965f01b6cabf454..8f57e42cbd691e1d13c651c46a2502b8445f1b71 100644
|
||||
index 341b441f54b65302ecfbf050ae740e2b25492a6d..bb467c24daedeaef5509cd62ffed959eedcc0caa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -574,6 +574,13 @@ public final class CraftServer implements Server {
|
||||
@@ -569,6 +569,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
@ -17,10 +17,10 @@ keeping long lived large direct buffers in cache.
|
||||
Set system properly at server startup if not set already to help protect from this.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index cce6886bb3973eed8f0c7ca7b1189547324fd4e2..0aef4fc4a89e627bc80504d7402f1ca2cdc95a74 100644
|
||||
index 7f85bc8e8a666a32e392fa57418bf0d479e758d0..e7b088a6ffed52d2dc9d6528d827997d68fcc84c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -28,6 +28,7 @@ public class Main {
|
||||
@@ -26,6 +26,7 @@ public class Main {
|
||||
}
|
||||
// Paper end
|
||||
// Todo: Installation script
|
@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d7670f0ba7e6 100644
|
||||
index 155a9a5def5ff599ecf862782fa19fcc595e6789..8251db0d176ce55426cea6e0e355151c59eb7cc7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -889,6 +889,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -891,6 +891,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
public volatile boolean hasFullyShutdown = false; // Paper
|
||||
@ -40,7 +40,7 @@ index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d767
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -903,6 +904,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -905,6 +906,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -48,7 +48,7 @@ index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d767
|
||||
// Paper start - kill main thread, and kill it hard
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
@@ -1004,6 +1006,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1006,6 +1008,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
this.isRestarting = isRestarting;
|
||||
@ -58,7 +58,7 @@ index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d767
|
||||
this.running = false;
|
||||
if (waitForShutdown) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 9d3ea20adba300a38a544c3454eff2edd9b4bbb9..3e6ec2cef2b5b058f240dd471d5c7a22d362e067 100644
|
||||
index 0c7f280bae81bbb492d5780a43e5ffda0f58756a..238a7bc87ab49da1f0fa3c733dd512fdffbd8ffc 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -183,6 +183,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@ -74,10 +74,10 @@ index 9d3ea20adba300a38a544c3454eff2edd9b4bbb9..3e6ec2cef2b5b058f240dd471d5c7a22
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent));
|
||||
this.connection.disconnect(ichatmutablecomponent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8f57e42cbd691e1d13c651c46a2502b8445f1b71..541b4d7187f5ac21a15581e47b8f18238db37039 100644
|
||||
index bb467c24daedeaef5509cd62ffed959eedcc0caa..ff5bfbc200d75ac10e9b8d8d30a963a406db3275 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -997,6 +997,7 @@ public final class CraftServer implements Server {
|
||||
@@ -992,6 +992,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getFullName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
@ -5,13 +5,13 @@ Subject: [PATCH] Prevent teleporting dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7aea69bac0bc533380cebad8ef6b20a3a1442d69..ec31ca45c7e95aea3ff8d1be690c96dfae470c81 100644
|
||||
index 8d45c4fb59b7c570418506955b4f00876921b7c2..526e06bf895eb1b57e30df8c4c46aba885fad5d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1621,6 +1621,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1611,6 +1611,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
||||
+ // Paper start
|
||||
+ if (player.isRemoved()) {
|
||||
+ LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
|
@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 243e40cb0e14f62e284fc272aeb0b6a1bc54ea9f..daf75df1e515511fd28ed555c2c0c8ea70ec47dd 100644
|
||||
index b6b077262132be3b30f81a2a6c9288afbd11c358..18949b866cd8da3825b730a7d0545bd8af21afa2 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -19,6 +19,7 @@ dependencies {
|
||||
@ -22,8 +22,8 @@ index 243e40cb0e14f62e284fc272aeb0b6a1bc54ea9f..daf75df1e515511fd28ed555c2c0c8ea
|
||||
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
+ implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
|
||||
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
@@ -105,6 +107,18 @@ tasks.check {
|
||||
}
|
||||
@ -462,7 +462,7 @@ index 30a58229aa6dac5039511d0c0df5f2912ea7de9f..abe37c7c3c6f5ab73afd738ec78f06d7
|
||||
this.exception = cause;
|
||||
this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/CrashReportCategory.java b/src/main/java/net/minecraft/CrashReportCategory.java
|
||||
index 65231daec99d36d9ad3c1ca8561b6dbc49efde10..6df4d02020a14d17d9c5b1971bb5640b35411c45 100644
|
||||
index 52eb3176437113f9a0ff85d10ce5c2415e1b5570..b54ddd0ba0b001fbcb1838a838ca4890df936f1b 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReportCategory.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReportCategory.java
|
||||
@@ -104,6 +104,7 @@ public class CrashReportCategory {
|
||||
@ -474,10 +474,10 @@ index 65231daec99d36d9ad3c1ca8561b6dbc49efde10..6df4d02020a14d17d9c5b1971bb5640b
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 00c4c8eb0fe70931a6fab24416ddcfa6f256d0cd..d032f8d011b94f396c9d5606f42a8c331db62740 100644
|
||||
index 184f36a137ed5e5cd20797e131801bc29449cf5c..d3b5039adaa91fa254a582f030b33276c68fca0d 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -62,13 +62,13 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -64,13 +64,13 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
});
|
||||
public static final AttributeKey<ConnectionProtocol> ATTRIBUTE_PROTOCOL = AttributeKey.valueOf("protocol");
|
||||
public static final LazyLoadedValue<NioEventLoopGroup> NETWORK_WORKER_GROUP = new LazyLoadedValue<>(() -> {
|
||||
@ -494,7 +494,7 @@ index 00c4c8eb0fe70931a6fab24416ddcfa6f256d0cd..d032f8d011b94f396c9d5606f42a8c33
|
||||
});
|
||||
private final PacketFlow receiving;
|
||||
private final Queue<Connection.PacketHolder> queue = Queues.newConcurrentLinkedQueue();
|
||||
@@ -193,7 +193,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -196,7 +196,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
||||
}
|
||||
}
|
||||
@ -516,10 +516,10 @@ index 549ea8e0fe702615eefcbfd1cd6a30e05b7b3fd5..771677c0e1cd7bfe089b9a5bb9095650
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 62f1f568bba5fbcb68e49640adb79c9384619bc6..44ca46e7dff19ae99ff6cf0d82269c5f7ad7274a 100644
|
||||
index 4bf38f9006be9e838c54783dafd40cf84553d627..51e8070864ffc4a35377021a7ded9813a40c1a11 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -220,7 +220,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -218,7 +218,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
@ -530,7 +530,7 @@ index 62f1f568bba5fbcb68e49640adb79c9384619bc6..44ca46e7dff19ae99ff6cf0d82269c5f
|
||||
}
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
@@ -1327,7 +1329,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1326,7 +1328,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity.isRemoved()) {
|
||||
// Paper start
|
||||
if (DEBUG_ENTITIES) {
|
||||
@ -540,10 +540,10 @@ index 62f1f568bba5fbcb68e49640adb79c9384619bc6..44ca46e7dff19ae99ff6cf0d82269c5f
|
||||
}
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index a24ef433d0c9d06b86fd612978cfd6d877036791..1b38326c9a709536dc4cccf9af93aede98a1a782 100644
|
||||
index fbf375534e2b8bd6ef052c4625764f4f8feb2ed6..bb9e65eee7e0ca0f715cd5791c47579a57b1b577 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
@@ -54,10 +54,10 @@ public class ServerConnectionListener {
|
||||
@@ -51,10 +51,10 @@ public class ServerConnectionListener {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final LazyLoadedValue<NioEventLoopGroup> SERVER_EVENT_GROUP = new LazyLoadedValue<>(() -> {
|
||||
@ -557,7 +557,7 @@ index a24ef433d0c9d06b86fd612978cfd6d877036791..1b38326c9a709536dc4cccf9af93aede
|
||||
final MinecraftServer server;
|
||||
public volatile boolean running;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 3e6ec2cef2b5b058f240dd471d5c7a22d362e067..b09069196fbcba32bdd6ea67718ea4c3086fb318 100644
|
||||
index 238a7bc87ab49da1f0fa3c733dd512fdffbd8ffc..9858f907e58fa606510f87efbdf8793c35ec711c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -185,7 +185,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@ -592,7 +592,7 @@ index 6599f874d9f97e9ef4862039ecad7277bbc5fd91..7edd4b88eb0476f0630630bc4681e859
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 6e95a98727322106d2c418de80f5f0aad2ea1953..a3c1bba1c1f795d203207776bab41b4b8f4e69d7 100644
|
||||
index 86f19b7ed15c2029c5483f21b44895d8982a90b8..05b8b37a4b1089b859b399323ecda8f23e9f6e67 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -640,7 +640,7 @@ public class LevelChunk extends ChunkAccess {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index daf75df1e515511fd28ed555c2c0c8ea70ec47dd..dbaff3f2505f09e87bea314bb179a408eebd2e7c 100644
|
||||
index 18949b866cd8da3825b730a7d0545bd8af21afa2..d98add7d741e47d9ff095a817e0f895b7235a488 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -36,6 +36,7 @@ dependencies {
|
||||
@ -791,10 +791,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 541b4d7187f5ac21a15581e47b8f18238db37039..fd30a811366d3a334be92c9eaa9630f4c1e37540 100644
|
||||
index ff5bfbc200d75ac10e9b8d8d30a963a406db3275..17cfd84e67682a95f19930964f9a5c9c44ada3b8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2701,5 +2701,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2699,5 +2699,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Option for maximum exp value when merging orbs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index cd6e0904dbdac5d7e1630e59d6ffa2ba0a5b3b2f..4db162f13a0a9b4afacbdb30326e6d18529d5382 100644
|
||||
index 440806cc3d7852f9cf3648a747c48236afff7e80..e40053ef61b49e3c9269595f714a6c93e872fd6c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -631,16 +631,30 @@ public class CraftEventFactory {
|
||||
@@ -630,16 +630,30 @@ public class CraftEventFactory {
|
||||
net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity;
|
||||
double radius = world.spigotConfig.expMerge;
|
||||
if (radius > 0) {
|
@ -9,10 +9,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 4db162f13a0a9b4afacbdb30326e6d18529d5382..4a260923efd062ccd72bf9c0c93255c9af73ab47 100644
|
||||
index e40053ef61b49e3c9269595f714a6c93e872fd6c..eb8b13becd2d72c4cac12a11e27aa467d1901b7e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -641,7 +641,7 @@ public class CraftEventFactory {
|
||||
@@ -640,7 +640,7 @@ public class CraftEventFactory {
|
||||
if (e instanceof net.minecraft.world.entity.ExperienceOrb) {
|
||||
net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e;
|
||||
// Paper start
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index c7cc9408f961aa804af9548d8c8fee46631421cf..b543619e50196f82e55dd7e648e5f8c580658dbe 100644
|
||||
index c5784574f584a5588020b16776f01faf6902cbe8..658d4dbb45d17e7064f69b10af8fbfa473a8dffe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -431,7 +431,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
|
||||
if any are still running after that delay just as reload does.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 366959f9841eb0ef3669b3b3b069d7670f0ba7e6..93c1a1bf602af1e73202590e78dac8336a5d3296 100644
|
||||
index 8251db0d176ce55426cea6e0e355151c59eb7cc7..6da8e9530c0112b1d9119c6ff722a277e5826241 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -929,6 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -931,6 +931,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@ -22,10 +22,10 @@ index 366959f9841eb0ef3669b3b3b069d7670f0ba7e6..93c1a1bf602af1e73202590e78dac833
|
||||
// CraftBukkit end
|
||||
if (this.getConnection() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fd30a811366d3a334be92c9eaa9630f4c1e37540..e31307d12013fed72a84f3d8d4248d115c1f0362 100644
|
||||
index 17cfd84e67682a95f19930964f9a5c9c44ada3b8..2b668a9e1e7d4c719602e1c006e2154a94d00a72 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1007,6 +1007,35 @@ public final class CraftServer implements Server {
|
||||
@@ -1002,6 +1002,35 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Ensure EntityRaider respects game and entity rules for
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||
index 6babc2ccd99b739a03145e9ac6f676a46f06c773..4bb9730b6a42702e91467f980b9f045585039db3 100644
|
||||
index 0c6a3887d28a8b520e8d73a5feae68e05bf97101..50010cc6774c351539cf09e517b7967f45822ec8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||
@@ -312,6 +312,7 @@ public abstract class Raider extends PatrollingMonster {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user