Reduce PlayerNaturallySpawnCreaturesEvent calls
This commit is contained in:
parent
c0f4b24e3a
commit
4df3dad85d
|
@ -1,4 +1,4 @@
|
|||
From a512d032fc82465e76cf0b6f8e67bd5c6fb051ad Mon Sep 17 00:00:00 2001
|
||||
From 4b032c2d960af52e463e60ac5ab539ff4f0a607e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 14 Jan 2018 17:36:02 -0500
|
||||
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
|
||||
|
@ -8,11 +8,50 @@ from triggering monster spawns on a server.
|
|||
|
||||
Also a highly more effecient way to blanket block spawns in a world
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 242ff923a0..99a4c0d227 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -502,6 +502,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
||||
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
this.world.getMethodProfiler().exit();
|
||||
+ //Paper start - call player naturally spawn event
|
||||
+ int chunkRange = world.spigotConfig.mobSpawnRange;
|
||||
+ chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
|
||||
+ chunkRange = Math.min(chunkRange, 8);
|
||||
+ for (EntityPlayer entityPlayer : this.world.players) {
|
||||
+ entityPlayer.playerNaturallySpawnedEvent = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityPlayer.getBukkitEntity(), (byte) chunkRange);
|
||||
+ entityPlayer.playerNaturallySpawnedEvent.callEvent();
|
||||
+ };
|
||||
+ // Paper end
|
||||
this.playerChunkMap.f().forEach((playerchunk) -> {
|
||||
Optional<Chunk> optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 1296eb04f0..625b684287 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+import com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.datafixers.util.Either;
|
||||
@@ -89,6 +90,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public boolean sentListPacket = false;
|
||||
public Integer clientViewDistance;
|
||||
// CraftBukkit end
|
||||
+ public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> cachedSingleHashSet; // Paper
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 936fc4f6b..b5da88587 100644
|
||||
index 936fc4f6b9..fcf229ad5d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -881,12 +881,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -881,12 +881,23 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
|
||||
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
|
||||
|
||||
|
@ -28,10 +67,9 @@ index 936fc4f6b..b5da88587 100644
|
|||
+ com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event;
|
||||
+ double blockRange = 16384.0D;
|
||||
+ if (reducedRange) {
|
||||
+ event = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityplayer.getBukkitEntity(), (byte) finalChunkRange);
|
||||
+ event.callEvent();
|
||||
+ event = entityplayer.playerNaturallySpawnedEvent;
|
||||
+ if (event == null || event.isCancelled()) return false;
|
||||
+ blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4));
|
||||
+ if (event.isCancelled()) return false;
|
||||
+ }
|
||||
+
|
||||
+ return (!entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange); // Spigot
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From abf6cb2c774d700e46442b8db37af7fcda2800ef Mon Sep 17 00:00:00 2001
|
||||
From 395926f7e3d53453169ffd333e788356c979edf5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 3 Jul 2018 21:56:23 -0400
|
||||
Subject: [PATCH] InventoryCloseEvent Reason API
|
||||
|
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
|||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 4721c288b..36748ccb7 100644
|
||||
index 4721c288ba..36748ccb73 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -164,7 +164,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
@ -34,10 +34,10 @@ index 4721c288b..36748ccb7 100644
|
|||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 1296eb04f..a9a16eace 100644
|
||||
index 625b684287..f849dba215 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -366,7 +366,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -368,7 +368,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
// Paper end
|
||||
if (!this.world.isClientSide && !this.activeContainer.canUse(this)) {
|
||||
|
@ -46,7 +46,7 @@ index 1296eb04f..a9a16eace 100644
|
|||
this.activeContainer = this.defaultContainer;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -542,7 +542,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.activeContainer != this.defaultContainer) {
|
||||
|
@ -55,7 +55,7 @@ index 1296eb04f..a9a16eace 100644
|
|||
}
|
||||
|
||||
String deathMessage = event.getDeathMessage();
|
||||
@@ -1060,7 +1060,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1062,7 +1062,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return OptionalInt.empty();
|
||||
} else {
|
||||
if (this.activeContainer != this.defaultContainer) {
|
||||
|
@ -64,7 +64,7 @@ index 1296eb04f..a9a16eace 100644
|
|||
}
|
||||
|
||||
this.nextContainerCounter();
|
||||
@@ -1120,7 +1120,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1122,7 +1122,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (this.activeContainer != this.defaultContainer) {
|
||||
|
@ -73,7 +73,7 @@ index 1296eb04f..a9a16eace 100644
|
|||
}
|
||||
|
||||
// this.nextContainerCounter(); // CraftBukkit - moved up
|
||||
@@ -1184,7 +1184,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1186,7 +1186,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
|
@ -88,7 +88,7 @@ index 1296eb04f..a9a16eace 100644
|
|||
this.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 4a0a84794..8eb12e89e 100644
|
||||
index 4a0a847944..8eb12e89ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2040,7 +2040,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
@ -101,7 +101,7 @@ index 4a0a84794..8eb12e89e 100644
|
|||
this.player.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 002f7e844..fd0f5c6f2 100644
|
||||
index 002f7e844a..fd0f5c6f29 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -403,7 +403,7 @@ public abstract class PlayerList {
|
||||
|
@ -114,7 +114,7 @@ index 002f7e844..fd0f5c6f2 100644
|
|||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
|
||||
cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index c773314cf..bad4e6f7f 100644
|
||||
index c773314cff..bad4e6f7fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1047,7 +1047,7 @@ public class WorldServer extends World {
|
||||
|
@ -136,7 +136,7 @@ index c773314cf..bad4e6f7f 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index cd8ad2704..e169679c8 100644
|
||||
index cd8ad27047..e169679c88 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -619,8 +619,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
|
@ -155,7 +155,7 @@ index cd8ad2704..e169679c8 100644
|
|||
@Override
|
||||
public boolean isBlocking() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index f4affa693..c1f392716 100644
|
||||
index 52640237ae..d7d86a8b24 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -786,7 +786,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -168,7 +168,7 @@ index f4affa693..c1f392716 100644
|
|||
|
||||
// Check if the fromWorld and toWorld are the same.
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index caf277439..f931fa48b 100644
|
||||
index caf277439a..f931fa48b4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1293,8 +1293,19 @@ public class CraftEventFactory {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 140f2f8cd05bce6212189c86a58921b55a2d2b0a Mon Sep 17 00:00:00 2001
|
||||
From 3379865420c1dcc82edb153736223cb3fc735378 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 08:25:40 -0400
|
||||
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
|||
Add -Ddebug.entities=true to your JVM flags to gain more information
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7364b92f41..5ca3233c00 100644
|
||||
index ec59ffc2e7..2612d60e38 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
@ -19,10 +19,10 @@ index 7364b92f41..5ca3233c00 100644
|
|||
if (bukkitEntity == null) {
|
||||
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index bf80af2354..e93741a8e8 100644
|
||||
index fcf229ad5d..f640d2ac76 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1062,6 +1062,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1061,6 +1061,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
} else {
|
||||
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking());
|
||||
|
||||
|
@ -30,7 +30,7 @@ index bf80af2354..e93741a8e8 100644
|
|||
this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker);
|
||||
playerchunkmap_entitytracker.track(this.world.getPlayers());
|
||||
if (entity instanceof EntityPlayer) {
|
||||
@@ -1104,7 +1105,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1103,7 +1104,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
if (playerchunkmap_entitytracker1 != null) {
|
||||
playerchunkmap_entitytracker1.a();
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ index bf80af2354..e93741a8e8 100644
|
|||
|
||||
protected void g() {
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 2bc0368d04..a5af0f9d35 100644
|
||||
index 5a237fa1dd..1814be9817 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -63,6 +63,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -52,7 +52,7 @@ index 2bc0368d04..a5af0f9d35 100644
|
|||
public boolean captureBlockStates = false;
|
||||
public boolean captureTreeGeneration = false;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index d46a664bdb..3d5a50ddcc 100644
|
||||
index c30630fa94..70e4b58a93 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -76,6 +76,9 @@ public class WorldServer extends World {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 781a971c7b159e43a4fb78b68a80793106047332 Mon Sep 17 00:00:00 2001
|
||||
From 08330b806b1c6fee692aedb3dabc2137b8295eef Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Tue, 21 Aug 2018 01:39:35 +0100
|
||||
Subject: [PATCH] Improve death events
|
||||
|
@ -279,10 +279,10 @@ index fa097e0551..eed3e7c58e 100644
|
|||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index a9a16eace9..52bbe4fc02 100644
|
||||
index f849dba215..4b40ffa978 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -76,6 +76,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public int ping;
|
||||
public boolean viewingCredits;
|
||||
private int containerUpdateDelay; // Paper
|
||||
|
@ -293,7 +293,7 @@ index a9a16eace9..52bbe4fc02 100644
|
|||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -537,6 +541,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -539,6 +543,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
String deathmessage = defaultMessage.getString();
|
||||
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory);
|
||||
|
@ -309,7 +309,7 @@ index a9a16eace9..52bbe4fc02 100644
|
|||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.activeContainer != this.defaultContainer) {
|
||||
@@ -675,8 +688,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -677,8 +690,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 6372e87abbe429925f311fbb2ce2d9acdf5a5eae Mon Sep 17 00:00:00 2001
|
||||
From ddf9098de1112465064b9e294429137b11f49e98 Mon Sep 17 00:00:00 2001
|
||||
From: Caleb Bassham <caleb.bassham@gmail.com>
|
||||
Date: Fri, 28 Sep 2018 02:32:19 -0500
|
||||
Subject: [PATCH] Call player spectator target events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 52bbe4fc02..10ca229cb4 100644
|
||||
index 4b40ffa978..bf21fb69a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -61,7 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private EnumChatVisibility ch;
|
||||
private boolean ci = true;
|
||||
private long cj = SystemUtils.getMonotonicMillis();
|
||||
|
@ -17,7 +17,7 @@ index 52bbe4fc02..10ca229cb4 100644
|
|||
public boolean worldChangeInvuln;
|
||||
private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer recipeBook;
|
||||
@@ -1589,15 +1589,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1591,15 +1591,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ index 52bbe4fc02..10ca229cb4 100644
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -1605,7 +1625,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1607,7 +1627,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
if (this.portalCooldown > 0 && !this.worldChangeInvuln) {
|
||||
--this.portalCooldown;
|
||||
}
|
||||
|
@ -67,5 +67,5 @@ index 52bbe4fc02..10ca229cb4 100644
|
|||
|
||||
@Override
|
||||
--
|
||||
2.25.0.windows.1
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 7bf6c013db4ac1e64b1feeb284d896efc66c82f2 Mon Sep 17 00:00:00 2001
|
||||
From 38a4719c10be78309b32b84152609dd9798b058a Mon Sep 17 00:00:00 2001
|
||||
From: GreenMeanie <GreenMeanieMC@gmail.com>
|
||||
Date: Sat, 20 Oct 2018 22:34:02 -0400
|
||||
Subject: [PATCH] Reset players airTicks on respawn
|
||||
|
@ -17,10 +17,10 @@ index 9a23380600..ecd0387627 100644
|
|||
return 300;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 10ca229cb4..f33580f8c5 100644
|
||||
index bf21fb69a5..e91938b54c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1865,6 +1865,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1867,6 +1867,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
this.setHealth(this.getMaxHealth());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 9856623497011fc34aab0913f4776faa0a7efbd5 Mon Sep 17 00:00:00 2001
|
||||
From f674142f1829bd9ec4930a304eab8c2aa9847e5e Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Thu, 15 Nov 2018 13:38:37 +0000
|
||||
Subject: [PATCH] force entity dismount during teleportation
|
||||
|
@ -112,10 +112,10 @@ index eed3e7c58e..4e64a80a8a 100644
|
|||
this.a(entity);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index f33580f8c5..68e12cf987 100644
|
||||
index e91938b54c..35ea476014 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1019,11 +1019,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1021,11 +1021,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 98fd5c7326cfb9649b535e7368af730e6c319055 Mon Sep 17 00:00:00 2001
|
||||
From 2affb5b1d31c0077ce56d879eb5181b45d147f90 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Wed, 2 Jan 2019 00:35:43 -0600
|
||||
Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed
|
||||
|
@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and
|
|||
documented as to their purpose.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 68e12cf987..d3bfb72e39 100644
|
||||
index 35ea476014..4cff86b9a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -75,6 +75,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -76,6 +76,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public int ping;
|
||||
public boolean viewingCredits;
|
||||
private int containerUpdateDelay; // Paper
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From df342c57c5f870ab82a077275a9192b5ac728f20 Mon Sep 17 00:00:00 2001
|
||||
From 1e07a3066cb1008b045de6ca119b6443e7251dc3 Mon Sep 17 00:00:00 2001
|
||||
From: connorhartley <vectrixu+gh@gmail.com>
|
||||
Date: Mon, 7 Jan 2019 14:43:48 -0600
|
||||
Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index d3bfb72e3..4d614b9ef 100644
|
||||
index 4cff86b9a5..f788e7eff0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1294,6 +1294,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1296,6 +1296,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public void n() {
|
||||
this.cq = true;
|
||||
this.ejectPassengers();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 0c0529b34d6836df61d8f96039ade9f3e5ce934d Mon Sep 17 00:00:00 2001
|
||||
From 2ae66cdb57a433f4cdc072ffe755090caedc9598 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 27 Mar 2019 23:01:33 -0400
|
||||
Subject: [PATCH] PlayerDeathEvent#getItemsToKeep
|
||||
|
@ -8,10 +8,10 @@ Exposes a mutable array on items a player should keep on death
|
|||
Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 4d614b9ef..77ad4774e 100644
|
||||
index f788e7eff0..d00b687d25 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -514,6 +514,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -516,6 +516,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ index 4d614b9ef..77ad4774e 100644
|
|||
@Override
|
||||
public void die(DamageSource damagesource) {
|
||||
boolean flag = this.world.getGameRules().getBoolean(GameRules.SHOW_DEATH_MESSAGES);
|
||||
@@ -600,7 +640,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -602,7 +642,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
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()) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 8bed72b22b6e498f8d8209d2a1700efcf92e8d94 Mon Sep 17 00:00:00 2001
|
||||
From 47e190d94ebf9a9cbb36580b101ee5871fde5b47 Mon Sep 17 00:00:00 2001
|
||||
From: stonar96 <minecraft.stonar96@gmail.com>
|
||||
Date: Mon, 20 Aug 2018 03:03:58 +0200
|
||||
Subject: [PATCH] Anti-Xray
|
||||
|
@ -1558,7 +1558,7 @@ index 5108d3ee98..b556a8fefa 100644
|
|||
this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 41a7b160c5..8525c3ab9f 100644
|
||||
index 72ae46eabb..5ef1aedbed 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -603,7 +603,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
@ -1570,7 +1570,7 @@ index 41a7b160c5..8525c3ab9f 100644
|
|||
}, this.executor);
|
||||
}
|
||||
|
||||
@@ -1322,7 +1322,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1321,7 +1321,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
private void a(EntityPlayer entityplayer, Packet<?>[] apacket, Chunk chunk) {
|
||||
if (apacket[0] == null) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 8b70c99a921260236a4ae3fa896eb675f9c6d266 Mon Sep 17 00:00:00 2001
|
||||
From 966c7f77bdfad41e7191a805034ed36f70e849e0 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 13 Jul 2019 09:23:10 -0700
|
||||
Subject: [PATCH] Asynchronous chunk IO and loading
|
||||
|
@ -121,7 +121,7 @@ tasks required to be executed by the chunk load task (i.e lighting
|
|||
and some poi tasks).
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
index 3a79cde59..8de6c4816 100644
|
||||
index 3a79cde595..8de6c4816c 100644
|
||||
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
@@ -63,6 +63,17 @@ public class WorldTimingsHandler {
|
||||
|
@ -161,7 +161,7 @@ index 3a79cde59..8de6c4816 100644
|
|||
|
||||
public static Timing getTickList(WorldServer worldserver, String timingsType) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 546a1cfe0..1d7d1ffbf 100644
|
||||
index 546a1cfe0a..1d7d1ffbf7 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -237,7 +237,7 @@ index 546a1cfe0..1d7d1ffbf 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
index 23626bef3..1edcecd2e 100644
|
||||
index 23626bef3a..1edcecd2ee 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
@@ -9,6 +9,7 @@ import java.util.concurrent.Executors;
|
||||
|
@ -318,7 +318,7 @@ index 23626bef3..1edcecd2e 100644
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/IOUtil.java b/src/main/java/com/destroystokyo/paper/io/IOUtil.java
|
||||
new file mode 100644
|
||||
index 000000000..5af0ac3d9
|
||||
index 0000000000..5af0ac3d9e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/IOUtil.java
|
||||
@@ -0,0 +1,62 @@
|
||||
|
@ -386,7 +386,7 @@ index 000000000..5af0ac3d9
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java
|
||||
new file mode 100644
|
||||
index 000000000..4f10a8311
|
||||
index 0000000000..4f10a8311e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java
|
||||
@@ -0,0 +1,661 @@
|
||||
|
@ -1053,7 +1053,7 @@ index 000000000..4f10a8311
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
|
||||
new file mode 100644
|
||||
index 000000000..78bd238f4
|
||||
index 0000000000..78bd238f4c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
|
||||
@@ -0,0 +1,276 @@
|
||||
|
@ -1335,7 +1335,7 @@ index 000000000..78bd238f4
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java b/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java
|
||||
new file mode 100644
|
||||
index 000000000..ee906b594
|
||||
index 0000000000..ee906b594b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java
|
||||
@@ -0,0 +1,241 @@
|
||||
|
@ -1582,7 +1582,7 @@ index 000000000..ee906b594
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
|
||||
new file mode 100644
|
||||
index 000000000..305da4786
|
||||
index 0000000000..305da47868
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
|
||||
@@ -0,0 +1,149 @@
|
||||
|
@ -1737,7 +1737,7 @@ index 000000000..305da4786
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java
|
||||
new file mode 100644
|
||||
index 000000000..60312b85f
|
||||
index 0000000000..60312b85f9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java
|
||||
@@ -0,0 +1,112 @@
|
||||
|
@ -1855,7 +1855,7 @@ index 000000000..60312b85f
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java
|
||||
new file mode 100644
|
||||
index 000000000..1dfa8abfd
|
||||
index 0000000000..1dfa8abfd8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java
|
||||
@@ -0,0 +1,40 @@
|
||||
|
@ -1901,7 +1901,7 @@ index 000000000..1dfa8abfd
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
|
||||
new file mode 100644
|
||||
index 000000000..715a2dd8d
|
||||
index 0000000000..715a2dd8d2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
|
||||
@@ -0,0 +1,455 @@
|
||||
|
@ -2361,7 +2361,7 @@ index 000000000..715a2dd8d
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index e7c9a969d..2c1937cbe 100644
|
||||
index 296f69a0ac..31377fd4af 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -218,11 +218,137 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -2516,7 +2516,7 @@ index e7c9a969d..2c1937cbe 100644
|
|||
this.world.timings.chunkAwait.stopTiming(); // Paper
|
||||
} // Paper
|
||||
ichunkaccess = (IChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
|
||||
@@ -745,11 +876,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -754,11 +885,12 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
protected boolean executeNext() {
|
||||
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
||||
try {
|
||||
|
@ -2531,7 +2531,7 @@ index e7c9a969d..2c1937cbe 100644
|
|||
} finally {
|
||||
playerChunkMap.callbackExecutor.run();
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index a950ad801..26f1a4b09 100644
|
||||
index a950ad801d..26f1a4b095 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
|
@ -2800,7 +2800,7 @@ index a950ad801..26f1a4b09 100644
|
|||
|
||||
nbttagcompound1.set("PostProcessing", a(ichunkaccess.l()));
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
index 134a4f0b7..88f167461 100644
|
||||
index 134a4f0b7d..88f1674616 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
@@ -153,6 +153,7 @@ public class ChunkStatus {
|
||||
|
@ -2812,7 +2812,7 @@ index 134a4f0b7..88f167461 100644
|
|||
return ChunkStatus.r.getInt(chunkstatus.c());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
index 7e5ece9d5..cfe43e882 100644
|
||||
index 7e5ece9d50..cfe43e882e 100644
|
||||
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
@@ -91,7 +91,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
|
||||
|
@ -2825,7 +2825,7 @@ index 7e5ece9d5..cfe43e882 100644
|
|||
;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java
|
||||
index 2f95174fc..134c76065 100644
|
||||
index 2f95174fcc..134c76065b 100644
|
||||
--- a/src/main/java/net/minecraft/server/IChunkLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/IChunkLoader.java
|
||||
@@ -3,37 +3,49 @@ package net.minecraft.server;
|
||||
|
@ -2950,7 +2950,7 @@ index 2f95174fc..134c76065 100644
|
|||
+// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index b6aeca05f..bcd5cc9f2 100644
|
||||
index b6aeca05f7..bcd5cc9f28 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -600,4 +600,9 @@ public final class MCUtil {
|
||||
|
@ -2964,7 +2964,7 @@ index b6aeca05f..bcd5cc9f2 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6fa08c60b..baeaf772b 100644
|
||||
index 6fa08c60bd..baeaf772be 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -789,6 +789,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
@ -2976,7 +2976,7 @@ index 6fa08c60b..baeaf772b 100644
|
|||
|
||||
public String getServerIp() {
|
||||
diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||
index e9c405fb5..33cfeabde 100644
|
||||
index e9c405fb53..33cfeabdee 100644
|
||||
--- a/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||
@@ -4,7 +4,7 @@ import java.util.Comparator;
|
||||
|
@ -2998,7 +2998,7 @@ index e9c405fb5..33cfeabde 100644
|
|||
this.e = t0;
|
||||
this.b = i;
|
||||
diff --git a/src/main/java/net/minecraft/server/NibbleArray.java b/src/main/java/net/minecraft/server/NibbleArray.java
|
||||
index ed8c4a87b..996c83263 100644
|
||||
index ed8c4a87b5..996c832638 100644
|
||||
--- a/src/main/java/net/minecraft/server/NibbleArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NibbleArray.java
|
||||
@@ -71,6 +71,7 @@ public class NibbleArray {
|
||||
|
@ -3010,7 +3010,7 @@ index ed8c4a87b..996c83263 100644
|
|||
return this.a == null ? new NibbleArray() : new NibbleArray((byte[]) this.a.clone());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index b556a8fef..b82ea26eb 100644
|
||||
index b556a8fefa..b82ea26eb6 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -127,6 +127,18 @@ public class PlayerChunk {
|
||||
|
@ -3055,7 +3055,7 @@ index b556a8fef..b82ea26eb 100644
|
|||
completablefuture = (CompletableFuture) this.statusFutures.get(i);
|
||||
if (completablefuture != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 8525c3ab9..85b21012e 100644
|
||||
index 5ef1aedbed..a3271d6c28 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -63,7 +63,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
@ -3537,7 +3537,7 @@ index 8525c3ab9..85b21012e 100644
|
|||
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
|
||||
// Spigot start
|
||||
return isOutsideOfRange(chunkcoordintpair, false);
|
||||
@@ -1371,6 +1587,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1370,6 +1586,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
}
|
||||
|
||||
|
@ -3546,7 +3546,7 @@ index 8525c3ab9..85b21012e 100644
|
|||
return this.m;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
index d37abf2cf..df728e2c0 100644
|
||||
index d37abf2cf3..df728e2c0a 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
@@ -36,6 +36,8 @@ public class RegionFile implements AutoCloseable {
|
||||
|
@ -3591,7 +3591,7 @@ index d37abf2cf..df728e2c0 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
index e07ae9854..0f201000f 100644
|
||||
index e07ae98540..0f201000f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
@@ -9,7 +9,7 @@ import java.io.File;
|
||||
|
@ -3696,7 +3696,7 @@ index e07ae9854..0f201000f 100644
|
|||
|
||||
return regionfile != null ? regionfile.chunkExists(pos) : false;
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
index db9f0196b..a6d8ef5eb 100644
|
||||
index db9f0196bd..a6d8ef5eb4 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
@@ -20,28 +20,29 @@ import javax.annotation.Nullable;
|
||||
|
@ -3832,7 +3832,7 @@ index db9f0196b..a6d8ef5eb 100644
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
|
||||
index 1d1b267f3..4b87ca2ec 100644
|
||||
index 1d1b267f32..4b87ca2ecb 100644
|
||||
--- a/src/main/java/net/minecraft/server/TicketType.java
|
||||
+++ b/src/main/java/net/minecraft/server/TicketType.java
|
||||
@@ -22,6 +22,7 @@ public class TicketType<T> {
|
||||
|
@ -3844,7 +3844,7 @@ index 1d1b267f3..4b87ca2ec 100644
|
|||
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
||||
return new TicketType<>(s, comparator, 0L);
|
||||
diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
index c999f8c9b..b59ef1a63 100644
|
||||
index c999f8c9bf..b59ef1a633 100644
|
||||
--- a/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
+++ b/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
@@ -24,8 +24,16 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
|
@ -3933,7 +3933,7 @@ index c999f8c9b..b59ef1a63 100644
|
|||
|
||||
HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 27dcc2528..6506daeec 100644
|
||||
index 27dcc25284..6506daeecd 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -82,6 +82,79 @@ public class WorldServer extends World {
|
||||
|
@ -4026,7 +4026,7 @@ index 27dcc2528..6506daeec 100644
|
|||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6204a2207..95a29d1b2 100644
|
||||
index 6204a22071..95a29d1b29 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -550,22 +550,23 @@ public class CraftWorld implements World {
|
||||
|
@ -4088,7 +4088,7 @@ index 6204a2207..95a29d1b2 100644
|
|||
@Override
|
||||
public int getViewDistance() {
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index 07936eeba..5bdcdcf9e 100644
|
||||
index 07936eeba2..5bdcdcf9e8 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -6,6 +6,7 @@ import java.lang.management.ThreadInfo;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 9a3e15afdf492a8f854a0f8947cdc283f7a3f45b Mon Sep 17 00:00:00 2001
|
||||
From 9ee9808e7cd582a872291765508cff73f7d80bd5 Mon Sep 17 00:00:00 2001
|
||||
From: kickash32 <kickash32@gmail.com>
|
||||
Date: Mon, 19 Aug 2019 01:27:58 +0500
|
||||
Subject: [PATCH] implement optional per player mob spawns
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
index 8de6c4816..e25544f11 100644
|
||||
index 8de6c4816c..e25544f116 100644
|
||||
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||
@@ -62,6 +62,7 @@ public class WorldTimingsHandler {
|
||||
|
@ -25,7 +25,7 @@ index 8de6c4816..e25544f11 100644
|
|||
poiUnload = Timings.ofSafe(name + "Chunk unload - POI");
|
||||
chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk");
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 9d9260ad0..fd3dbea62 100644
|
||||
index 9d9260ad07..fd3dbea628 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -613,4 +613,9 @@ public class PaperWorldConfig {
|
||||
|
@ -40,7 +40,7 @@ index 9d9260ad0..fd3dbea62 100644
|
|||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
||||
new file mode 100644
|
||||
index 000000000..9ebd7ecb7
|
||||
index 0000000000..9ebd7ecb7a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
|
||||
@@ -0,0 +1,253 @@
|
||||
|
@ -299,7 +299,7 @@ index 000000000..9ebd7ecb7
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
||||
new file mode 100644
|
||||
index 000000000..4f13d3ff8
|
||||
index 0000000000..4f13d3ff83
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
|
||||
@@ -0,0 +1,241 @@
|
||||
|
@ -545,7 +545,7 @@ index 000000000..4f13d3ff8
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 81d386b4c..e5af40e9f 100644
|
||||
index 93b4e6117f..7db96cec40 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -654,7 +654,22 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -572,7 +572,7 @@ index 81d386b4c..e5af40e9f 100644
|
|||
|
||||
this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
this.world.getMethodProfiler().exit();
|
||||
@@ -719,8 +734,23 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@@ -728,8 +743,23 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) {
|
||||
int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits
|
||||
|
||||
|
@ -599,10 +599,10 @@ index 81d386b4c..e5af40e9f 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 77ad4774e..22606d894 100644
|
||||
index d00b687d25..07a2310b18 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -80,6 +80,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -81,6 +81,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public boolean queueHealthUpdatePacket = false;
|
||||
public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket;
|
||||
// Paper end
|
||||
|
@ -614,7 +614,7 @@ index 77ad4774e..22606d894 100644
|
|||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@@ -114,6 +119,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -116,6 +121,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.displayName = this.getName();
|
||||
this.canPickUpLoot = true;
|
||||
this.maxHealthCache = this.getMaxHealth();
|
||||
|
@ -622,7 +622,7 @@ index 77ad4774e..22606d894 100644
|
|||
}
|
||||
|
||||
// Yes, this doesn't match Vanilla, but it's the best we can do for now.
|
||||
@@ -1769,6 +1775,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1771,6 +1777,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ index 77ad4774e..22606d894 100644
|
|||
return this.cs;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 79f854966..4100e367a 100644
|
||||
index 79f8549660..4100e367a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -254,6 +254,7 @@ public class EntityTypes<T extends Entity> {
|
||||
|
@ -643,7 +643,7 @@ index 79f854966..4100e367a 100644
|
|||
return this.bb;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 85b21012e..46d205380 100644
|
||||
index a3271d6c28..57bea926a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -78,7 +78,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
@ -682,7 +682,7 @@ index 85b21012e..46d205380 100644
|
|||
|
||||
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index fdac5bb3a..58bbf2f9d 100644
|
||||
index fdac5bb3a2..58bbf2f9d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||
|
@ -755,7 +755,7 @@ index fdac5bb3a..58bbf2f9d 100644
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index edffae055..88cc8763f 100644
|
||||
index edffae0558..88cc8763f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1024,7 +1024,20 @@ public class WorldServer extends World {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From a3e85079b53118282bf2c3897ee95b0e90e71223 Mon Sep 17 00:00:00 2001
|
||||
From d3d93a05728c92d839189478f6f31d069418f892 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Wed, 9 Oct 2019 21:51:43 -0500
|
||||
Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657)
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 22606d894..0b35a4b14 100644
|
||||
index 07a2310b18..cb795aa733 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -980,6 +980,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -982,6 +982,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.lastHealthSent = -1.0F;
|
||||
this.lastFoodSent = -1;
|
||||
|
||||
|
@ -18,7 +18,7 @@ index 22606d894..0b35a4b14 100644
|
|||
PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld());
|
||||
this.world.getServer().getPluginManager().callEvent(changeEvent);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index f702619aa..7b79ee4fe 100644
|
||||
index f702619aa2..7b79ee4fe5 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -729,6 +729,8 @@ public abstract class PlayerList {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 19d81003e11bd737430877d25d2582cb3c77f246 Mon Sep 17 00:00:00 2001
|
||||
From 3aedf938f6532cabef5d0668d0166effa1a9de2b Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 15 Dec 2019 19:41:28 +0000
|
||||
Subject: [PATCH] Fix spawn radius being treated as 0
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 0b35a4b14..4ca28c8b6 100644
|
||||
index cb795aa733..69a4228908 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -127,7 +127,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -129,7 +129,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public final BlockPosition getSpawnPoint(WorldServer worldserver) {
|
||||
BlockPosition blockposition = worldserver.getSpawn();
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 9c38e277c56a329d000cb60a7c628aa32c515357 Mon Sep 17 00:00:00 2001
|
||||
From 2efa2a5e795f3c1b2afbf18a83eca96fd89324b2 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Tue, 24 Dec 2019 00:35:42 +0000
|
||||
Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 4ca28c8b6..15230a834 100644
|
||||
index 69a4228908..e7bfbc3307 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -643,7 +643,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -645,7 +645,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
this.releaseShoulderEntities();
|
||||
// SPIGOT-5478 must be called manually now
|
||||
|
|
Loading…
Reference in New Issue