forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7ad016
commit 8c66529
Showing
6 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
From 24c442de168c0fbbd16ea7f2a185c0580659fbd2 Mon Sep 17 00:00:00 2001 | ||
From 9211578d5c1367d83ea0c8cfd6ef7f2bf0962606 Mon Sep 17 00:00:00 2001 | ||
From: Colin Godsey <[email protected]> | ||
Date: Thu, 28 Mar 2019 19:48:49 -0600 | ||
Subject: [PATCH] alternate mob spawning mechanic | ||
|
||
|
||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java | ||
index fc7ac2bc0..4aa42a73a 100644 | ||
index bfd690ecc..28bdb3a59 100644 | ||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java | ||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java | ||
@@ -599,4 +599,12 @@ public class PaperWorldConfig { | ||
@@ -608,4 +608,12 @@ public class PaperWorldConfig { | ||
log("Using improved mob spawn limits (Only Natural Spawns impact spawn limits for more natural spawns)"); | ||
} | ||
} | ||
|
@@ -86,7 +86,7 @@ index 3496d4236..1fc703e85 100644 | |
|
||
public BiomeMeta(EntityTypes<? extends EntityInsentient> entitytypes, int i, int j, int k) { | ||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java | ||
index f4a1939cc..da3ef1fc4 100644 | ||
index 46804203f..494316e8d 100644 | ||
--- a/src/main/java/net/minecraft/server/Chunk.java | ||
+++ b/src/main/java/net/minecraft/server/Chunk.java | ||
@@ -3,7 +3,6 @@ package net.minecraft.server; | ||
|
@@ -105,7 +105,7 @@ index f4a1939cc..da3ef1fc4 100644 | |
// Paper end | ||
public boolean areNeighborsLoaded(final int radius) { | ||
switch (radius) { | ||
@@ -743,6 +743,10 @@ public class Chunk implements IChunkAccess { | ||
@@ -746,6 +746,10 @@ public class Chunk implements IChunkAccess { | ||
itemCounts[k]++; | ||
} else if (entity instanceof IInventory) { | ||
inventoryEntityCounts[k]++; | ||
|
@@ -114,9 +114,9 @@ index f4a1939cc..da3ef1fc4 100644 | |
+ if(type != null) | ||
+ creatureCounts[type.ordinal()]++; | ||
} | ||
entity.setCurrentChunk(this); | ||
entityCounts.increment(entity.getMinecraftKeyString()); | ||
@@ -776,6 +780,16 @@ public class Chunk implements IChunkAccess { | ||
// Paper end | ||
} | ||
@@ -780,6 +784,16 @@ public class Chunk implements IChunkAccess { | ||
itemCounts[i]--; | ||
} else if (entity instanceof IInventory) { | ||
inventoryEntityCounts[i]--; | ||
|
@@ -131,9 +131,9 @@ index f4a1939cc..da3ef1fc4 100644 | |
+ creatureCounts[ord] = 0; | ||
+ } | ||
} | ||
entity.setCurrentChunk(null); | ||
entityCounts.decrement(entity.getMinecraftKeyString()); | ||
@@ -1519,6 +1533,10 @@ public class Chunk implements IChunkAccess { | ||
// Paper end | ||
@@ -1520,6 +1534,10 @@ public class Chunk implements IChunkAccess { | ||
runnable.run(); | ||
} | ||
} | ||
|
@@ -145,7 +145,7 @@ index f4a1939cc..da3ef1fc4 100644 | |
|
||
public static enum EnumTileEntityState { | ||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java | ||
index 095ea514c..db182dc42 100644 | ||
index d1ec201d8..4bac14626 100644 | ||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java | ||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java | ||
@@ -754,6 +754,7 @@ public abstract class EntityInsentient extends EntityLiving { | ||
|
@@ -234,7 +234,7 @@ index ac5d15809..6a80d640f 100644 | |
return this.done; | ||
} | ||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java | ||
index 17bb81c03..4d494725a 100644 | ||
index 297c53d15..6a533dc8f 100644 | ||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java | ||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java | ||
@@ -1,10 +1,12 @@ | ||
|
2 changes: 1 addition & 1 deletion
2
...34-Optimize-Persistent-Data-Loading.patch → ...35-Optimize-Persistent-Data-Loading.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 14eb7ffdc586daf3ae4a9789950e3c210dc842ce Mon Sep 17 00:00:00 2001 | ||
From 423ca3e8e0890cda023a0610c7762b1247e5c599 Mon Sep 17 00:00:00 2001 | ||
From: Aikar <[email protected]> | ||
Date: Fri, 29 Mar 2019 01:25:11 -0400 | ||
Subject: [PATCH] Optimize Persistent Data Loading | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
From 14952f6e3e04fbfb6be1ae4e959b0cefe58681b5 Mon Sep 17 00:00:00 2001 | ||
From 46e1468ed6691c516deafe9d83b43501f7224957 Mon Sep 17 00:00:00 2001 | ||
From: Spottedleaf <[email protected]> | ||
Date: Thu, 4 Apr 2019 17:55:05 -0700 | ||
Subject: [PATCH] Optimize GameRules to use LinkedHashMap | ||
|
||
Previously TreeMap was used which has poor get(K) performance. | ||
|
||
diff --git a/src/main/java/net/minecraft/server/GameRules.java b/src/main/java/net/minecraft/server/GameRules.java | ||
index fd2a4f1b8c..0bd5e02a28 100644 | ||
index fd2a4f1b8..0bd5e02a2 100644 | ||
--- a/src/main/java/net/minecraft/server/GameRules.java | ||
+++ b/src/main/java/net/minecraft/server/GameRules.java | ||
@@ -17,7 +17,17 @@ import javax.annotation.Nullable; | ||
|
@@ -49,7 +49,7 @@ index fd2a4f1b8c..0bd5e02a28 100644 | |
} | ||
|
||
diff --git a/src/test/java/org/bukkit/GameRuleTest.java b/src/test/java/org/bukkit/GameRuleTest.java | ||
index 1ed0f4cf2b..40edb8d668 100644 | ||
index 1ed0f4cf2..40edb8d66 100644 | ||
--- a/src/test/java/org/bukkit/GameRuleTest.java | ||
+++ b/src/test/java/org/bukkit/GameRuleTest.java | ||
@@ -21,7 +21,7 @@ public class GameRuleTest { | ||
|
@@ -62,5 +62,5 @@ index 1ed0f4cf2b..40edb8d668 100644 | |
for (Map.Entry<String, GameRules.GameRuleDefinition> entry : minecraftRules.entrySet()) { | ||
GameRule<?> bukkitRule = GameRule.getByName(entry.getKey()); | ||
-- | ||
2.21.0 | ||
2.17.2 (Apple Git-113) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 746b2dc3bcd9c7adcce8648dcf5ee18874a5e5cb Mon Sep 17 00:00:00 2001 | ||
From 3dcc4cc0e8ddb6b3385898d0a6ae0fbe4ccc0508 Mon Sep 17 00:00:00 2001 | ||
From: Aikar <[email protected]> | ||
Date: Sat, 6 Apr 2019 10:16:48 -0400 | ||
Subject: [PATCH] Optimize Captured TileEntity Lookup | ||
|
@@ -10,7 +10,7 @@ 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/server/World.java b/src/main/java/net/minecraft/server/World.java | ||
index 0e8025d311..b940f95bdb 100644 | ||
index 0e8025d31..b940f95bd 100644 | ||
--- a/src/main/java/net/minecraft/server/World.java | ||
+++ b/src/main/java/net/minecraft/server/World.java | ||
@@ -1935,12 +1935,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc | ||
|
@@ -31,5 +31,5 @@ index 0e8025d311..b940f95bdb 100644 | |
if (this.J) { | ||
tileentity = this.E(blockposition); | ||
-- | ||
2.21.0 | ||
2.17.2 (Apple Git-113) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From aae0b5f4b74ab34bbd6d0f3bcd5c34e78bcffabb Mon Sep 17 00:00:00 2001 | ||
From c2774cd4a947d85e43079500dd8ffa478e759b95 Mon Sep 17 00:00:00 2001 | ||
From: Spottedleaf <[email protected]> | ||
Date: Tue, 1 Jan 2019 02:22:01 -0800 | ||
Subject: [PATCH] Add Heightmap API | ||
|
@@ -50,5 +50,5 @@ index 40ee34675..457aa5a3f 100644 | |
BlockPosition spawn = world.getSpawn(); | ||
return new Location(this, spawn.getX(), spawn.getY(), spawn.getZ()); | ||
-- | ||
2.21.0 | ||
2.17.2 (Apple Git-113) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From ea03a714afb61798851be72f35684477ce4e5710 Mon Sep 17 00:00:00 2001 | ||
From 2673253bba09f2d7167ddaa240e19e0b83bd82ef Mon Sep 17 00:00:00 2001 | ||
From: Shane Freeder <[email protected]> | ||
Date: Mon, 15 Apr 2019 02:24:52 +0100 | ||
Subject: [PATCH] Handle bad chunks more gracefully | ||
|
@@ -15,7 +15,7 @@ Should Mojang choose to alter this behavior in the future, this change | |
will simply defer to whatever that new behavior is. | ||
|
||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java | ||
index 17e76815ad..369aaa84c4 100644 | ||
index 17e76815a..369aaa84c 100644 | ||
--- a/src/main/java/net/minecraft/server/RegionFileCache.java | ||
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java | ||
@@ -171,8 +171,20 @@ public class RegionFileCache { | ||
|
@@ -57,5 +57,5 @@ index 17e76815ad..369aaa84c4 100644 | |
|
||
@Nullable | ||
-- | ||
2.21.0 | ||
2.17.2 (Apple Git-113) | ||
|