mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-14 14:45:48 +01:00
Merge branch 'ver/1.16.5' of github.com:YatopiaMC/Yatopia into staging/1.16.5
This commit is contained in:
commit
22fae2c050
@ -235,6 +235,7 @@ # Patches
|
||||
| server | Implement respawn anchor explosion options | William Blake Galbreath | |
|
||||
| server | Improve abnormal server shutdown process | Spottedleaf | |
|
||||
| server | Improve async tp to not load chunks when crossing worlds | Spottedleaf | |
|
||||
| server | Improve fluid direction caching | Paul Sauve | |
|
||||
| server | Improve paper prevent moving into unloaded chunk check | Spottedleaf | |
|
||||
| server | Improved oversized chunk data packet handling | Spottedleaf | |
|
||||
| server | Infinite fuel furnace | William Blake Galbreath | |
|
||||
@ -320,6 +321,7 @@ # Patches
|
||||
| server | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | |
|
||||
| api | Phantoms attracted to crystals and crystals shoot phantoms | William Blake Galbreath | |
|
||||
| server | Phantoms burn in light | draycia | |
|
||||
| server | Piglin portal spawn modifier | BillyGalbreath | |
|
||||
| server | Pigs give saddle back | William Blake Galbreath | |
|
||||
| server | Player invulnerabilities | William Blake Galbreath | |
|
||||
| api | Player invulnerabilities | William Blake Galbreath | |
|
||||
|
2
Paper
2
Paper
@ -1 +1 @@
|
||||
Subproject commit 4492bc4cc18d29471ae6ab58dc20c8212cf6e5b8
|
||||
Subproject commit 606cdac609441c2234ca30f0abb99eb98521a4c0
|
@ -0,0 +1,257 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Wed, 14 Apr 2021 22:58:15 -0500
|
||||
Subject: [PATCH] Improve fluid direction caching
|
||||
|
||||
Implements a custom cache that better fits the needs of fluids
|
||||
calculating whether a direction can be moved in or something. There's a
|
||||
big javadoc on the FluidDirectionCache with some more information.
|
||||
|
||||
diff --git a/src/main/java/gg/airplane/structs/FluidDirectionCache.java b/src/main/java/gg/airplane/structs/FluidDirectionCache.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8ff0cbb47
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/airplane/structs/FluidDirectionCache.java
|
||||
@@ -0,0 +1,142 @@
|
||||
+package gg.airplane.structs;
|
||||
+
|
||||
+import it.unimi.dsi.fastutil.HashCommon;
|
||||
+
|
||||
+/**
|
||||
+ * This is a replacement for the cache used in FluidTypeFlowing.
|
||||
+ * The requirements for the previous cache were:
|
||||
+ * - Store 200 entries
|
||||
+ * - Look for the flag in the cache
|
||||
+ * - If it exists, move to front of cache
|
||||
+ * - If it doesn't exist, remove last entry in cache and insert in front
|
||||
+ *
|
||||
+ * This class accomplishes something similar, however has a few different
|
||||
+ * requirements put into place to make this more optimize:
|
||||
+ *
|
||||
+ * - maxDistance is the most amount of entries to be checked, instead
|
||||
+ * of having to check the entire list.
|
||||
+ * - In combination with that, entries are all tracked by age and how
|
||||
+ * frequently they're used. This enables us to remove old entries,
|
||||
+ * without constantly shifting any around.
|
||||
+ *
|
||||
+ * Usage of the previous map would have to reset the head every single usage,
|
||||
+ * shifting the entire map. Here, nothing happens except an increment when
|
||||
+ * the cache is hit, and when it needs to replace an old element only a single
|
||||
+ * element is modified.
|
||||
+ */
|
||||
+public class FluidDirectionCache<T> {
|
||||
+
|
||||
+ private static class FluidDirectionEntry<T> {
|
||||
+ private final T data;
|
||||
+ private final boolean flag;
|
||||
+ private short uses = 0;
|
||||
+ private short age = 0;
|
||||
+
|
||||
+ private FluidDirectionEntry(T data, boolean flag) {
|
||||
+ this.data = data;
|
||||
+ this.flag = flag;
|
||||
+ }
|
||||
+
|
||||
+ public int getValue() {
|
||||
+ return this.uses - (this.age >> 1); // age isn't as important as uses
|
||||
+ }
|
||||
+
|
||||
+ public void incrementUses() {
|
||||
+ if (this.uses < Short.MAX_VALUE) {
|
||||
+ this.uses++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void incrementAge() {
|
||||
+ if (this.age < Short.MAX_VALUE) {
|
||||
+ this.age++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private final FluidDirectionEntry[] entries;
|
||||
+ private final int mask;
|
||||
+ private final int maxDistance; // the most amount of entries to check for a value
|
||||
+
|
||||
+ public FluidDirectionCache(int size) {
|
||||
+ float fill = 0.75f;
|
||||
+
|
||||
+ int arraySize = HashCommon.arraySize(size, fill);
|
||||
+ this.entries = new FluidDirectionEntry[arraySize];
|
||||
+ this.mask = arraySize - 1;
|
||||
+ this.maxDistance = Math.max(4, arraySize >> 4);
|
||||
+ }
|
||||
+
|
||||
+ public Boolean getValue(T data) {
|
||||
+ FluidDirectionEntry curr;
|
||||
+ int pos;
|
||||
+
|
||||
+ if ((curr = this.entries[pos = HashCommon.mix(data.hashCode()) & this.mask]) == null) {
|
||||
+ return null;
|
||||
+ } else if (data.equals(curr.data)) {
|
||||
+ curr.incrementUses();
|
||||
+ return curr.flag;
|
||||
+ }
|
||||
+
|
||||
+ int checked = 1; // start at 1 because we already checked the first spot above
|
||||
+
|
||||
+ while ((curr = this.entries[pos = (pos + 1) & this.mask]) != null) {
|
||||
+ if (data.equals(curr.data)) {
|
||||
+ curr.incrementUses();
|
||||
+ return curr.flag;
|
||||
+ } else if (++checked >= this.maxDistance) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ public void putValue(T data, boolean flag) {
|
||||
+ FluidDirectionEntry<T> curr;
|
||||
+ int pos;
|
||||
+
|
||||
+ if ((curr = this.entries[pos = HashCommon.mix(data.hashCode()) & this.mask]) == null) {
|
||||
+ this.entries[pos] = new FluidDirectionEntry<>(data, flag); // add
|
||||
+ return;
|
||||
+ } else if (data.equals(curr.data)) {
|
||||
+ curr.incrementUses();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ int checked = 1; // start at 1 because we already checked the first spot above
|
||||
+
|
||||
+ while ((curr = this.entries[pos = (pos + 1) & this.mask]) != null) {
|
||||
+ if (data.equals(curr.data)) {
|
||||
+ curr.incrementUses();
|
||||
+ return;
|
||||
+ } else if (++checked >= this.maxDistance) {
|
||||
+ this.forceAdd(data, flag);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ this.entries[pos] = new FluidDirectionEntry<>(data, flag); // add
|
||||
+ }
|
||||
+
|
||||
+ private void forceAdd(T data, boolean flag) {
|
||||
+ int expectedPos = HashCommon.mix(data.hashCode()) & this.mask;
|
||||
+
|
||||
+ int toRemovePos = expectedPos;
|
||||
+ FluidDirectionEntry<T> entryToRemove = this.entries[toRemovePos];
|
||||
+
|
||||
+ for (int i = expectedPos + 1; i < expectedPos + this.maxDistance; i++) {
|
||||
+ int pos = i & this.mask;
|
||||
+ FluidDirectionEntry<T> entry = this.entries[pos];
|
||||
+ if (entry.getValue() < entryToRemove.getValue()) {
|
||||
+ toRemovePos = pos;
|
||||
+ entryToRemove = entry;
|
||||
+ }
|
||||
+
|
||||
+ entry.incrementAge(); // use this as a mechanism to age the other entries
|
||||
+ }
|
||||
+
|
||||
+ // remove the least used/oldest entry
|
||||
+ this.entries[toRemovePos] = new FluidDirectionEntry(data, flag);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 596b4597313b87296d39027b13555b5ad1cba9e6..f8a982add50862f1bc977f3039e7e9aeed9138ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -392,6 +392,7 @@ public class Block extends BlockBase implements IMaterial {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
+ /** currently seems to only return true for MOVING_PISTON and SCAFFOLDING */ public boolean isComplexHitbox() { return this.o(); } // Airplane - OBFHELPER
|
||||
public boolean o() {
|
||||
return this.aA;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..b14b0134b42aa6d1eb285aa453ec6067cc702878 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
@@ -45,6 +45,8 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
|
||||
public static final BlockStateBoolean FALLING = BlockProperties.i;
|
||||
public static final BlockStateInteger LEVEL = BlockProperties.at;
|
||||
+ // Airplane start - use our own threadlocal cache
|
||||
+ /*
|
||||
private static final ThreadLocal<Object2ByteLinkedOpenHashMap<Block.a>> e = ThreadLocal.withInitial(() -> {
|
||||
Object2ByteLinkedOpenHashMap<Block.a> object2bytelinkedopenhashmap = new Object2ByteLinkedOpenHashMap<Block.a>(200) {
|
||||
protected void rehash(int i) {}
|
||||
@@ -53,6 +55,13 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
object2bytelinkedopenhashmap.defaultReturnValue((byte) 127);
|
||||
return object2bytelinkedopenhashmap;
|
||||
});
|
||||
+ */
|
||||
+ private static final ThreadLocal<gg.airplane.structs.FluidDirectionCache<Block.a>> localFluidDirectionCache = ThreadLocal.withInitial(() -> {
|
||||
+ // Airplane todo - mess with this number for performance
|
||||
+ // with 1024 it seems very infrequent on a small world that it has to remove old entries
|
||||
+ return new gg.airplane.structs.FluidDirectionCache<>(1024);
|
||||
+ });
|
||||
+ // Airplane end
|
||||
private final Map<Fluid, VoxelShape> f = Maps.newIdentityHashMap();
|
||||
|
||||
public FluidTypeFlowing() {}
|
||||
@@ -240,6 +249,8 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
}
|
||||
|
||||
private boolean a(EnumDirection enumdirection, IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, BlockPosition blockposition1, IBlockData iblockdata1) {
|
||||
+ // Airplane start - modify to use our cache
|
||||
+ /*
|
||||
Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap;
|
||||
|
||||
if (!iblockdata.getBlock().o() && !iblockdata1.getBlock().o()) {
|
||||
@@ -247,9 +258,16 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
} else {
|
||||
object2bytelinkedopenhashmap = null;
|
||||
}
|
||||
+ */
|
||||
+ gg.airplane.structs.FluidDirectionCache<Block.a> cache = null;
|
||||
+
|
||||
+ if (!iblockdata.getBlock().isComplexHitbox() && !iblockdata1.getBlock().isComplexHitbox()) {
|
||||
+ cache = localFluidDirectionCache.get();
|
||||
+ }
|
||||
|
||||
Block.a block_a;
|
||||
|
||||
+ /*
|
||||
if (object2bytelinkedopenhashmap != null) {
|
||||
block_a = new Block.a(iblockdata, iblockdata1, enumdirection);
|
||||
byte b0 = object2bytelinkedopenhashmap.getAndMoveToFirst(block_a);
|
||||
@@ -260,11 +278,22 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
} else {
|
||||
block_a = null;
|
||||
}
|
||||
+ */
|
||||
+ if (cache != null) {
|
||||
+ block_a = new Block.a(iblockdata, iblockdata1, enumdirection);
|
||||
+ Boolean flag = cache.getValue(block_a);
|
||||
+ if (flag != null) {
|
||||
+ return flag;
|
||||
+ }
|
||||
+ } else {
|
||||
+ block_a = null;
|
||||
+ }
|
||||
|
||||
VoxelShape voxelshape = iblockdata.getCollisionShape(iblockaccess, blockposition);
|
||||
VoxelShape voxelshape1 = iblockdata1.getCollisionShape(iblockaccess, blockposition1);
|
||||
boolean flag = !VoxelShapes.b(voxelshape, voxelshape1, enumdirection);
|
||||
|
||||
+ /*
|
||||
if (object2bytelinkedopenhashmap != null) {
|
||||
if (object2bytelinkedopenhashmap.size() == 200) {
|
||||
object2bytelinkedopenhashmap.removeLastByte();
|
||||
@@ -272,6 +301,11 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
|
||||
object2bytelinkedopenhashmap.putAndMoveToFirst(block_a, (byte) (flag ? 1 : 0));
|
||||
}
|
||||
+ */
|
||||
+ if (cache != null) {
|
||||
+ cache.putValue(block_a, flag);
|
||||
+ }
|
||||
+ // Airplane end
|
||||
|
||||
return flag;
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable the Snooper
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 966b6e2f9b7c473d8dfcae205d8ef8f08912ded9..f72574fde82307a0e73a9eca6c9dc967d0c48f22 100644
|
||||
index 16c20b3e7dcbbdb08e8c2a15074495eacc001e70..f31b49381d1a70f66406dc6d048f84b45257c860 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1441,6 +1441,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1440,6 +1440,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
//} // Paper
|
||||
|
||||
this.methodProfiler.enter("snooper");
|
||||
@ -17,7 +17,7 @@ index 966b6e2f9b7c473d8dfcae205d8ef8f08912ded9..f72574fde82307a0e73a9eca6c9dc967
|
||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
||||
this.snooper.a();
|
||||
}
|
||||
@@ -1448,6 +1450,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1447,6 +1449,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.ticks % 6000 == 0) { // Spigot
|
||||
this.snooper.b();
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't wake up entities when damage event is cancelled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 7dbfd2dca4d99fcafc3a2fcd83b39f5d52c24f1c..254df060dcb7ebef59befa708a694fd7502fc063 100644
|
||||
index 82d3aaaf9bbb493d54f6bf2d34edafc5498aee88..59ba2332cd250c3bfff7505cd02be346ae0f38c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -1214,9 +1214,12 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -6,14 +6,14 @@ Subject: [PATCH] EMC - MonsterEggSpawnEvent
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/event/entity/MonsterEggSpawnEvent.java b/src/main/java/net/pl3x/purpur/event/entity/MonsterEggSpawnEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..983d67234b15c83c3785d9fbc191da70cf67ccab
|
||||
index 0000000000000000000000000000000000000000..8f1c9c421aeeb0ddf331f076a9b646c510ea4337
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/event/entity/MonsterEggSpawnEvent.java
|
||||
@@ -0,0 +1,67 @@
|
||||
+package net.pl3x.purpur.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+import org.bukkit.entity.LivingEntity;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.Event;
|
||||
@ -27,10 +27,10 @@ index 0000000000000000000000000000000000000000..983d67234b15c83c3785d9fbc191da70
|
||||
+ private boolean canceled;
|
||||
+
|
||||
+ private final Player player;
|
||||
+ private LivingEntity entity;
|
||||
+ private Entity entity;
|
||||
+ private final ItemStack item;
|
||||
+
|
||||
+ public MonsterEggSpawnEvent(@Nullable HumanEntity player, @NotNull LivingEntity entity, @NotNull ItemStack item) {
|
||||
+ public MonsterEggSpawnEvent(@Nullable HumanEntity player, @NotNull Entity entity, @NotNull ItemStack item) {
|
||||
+ this.player = (Player) player;
|
||||
+ this.entity = entity;
|
||||
+ this.item = item;
|
||||
@ -42,11 +42,11 @@ index 0000000000000000000000000000000000000000..983d67234b15c83c3785d9fbc191da70
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public LivingEntity getEntity() {
|
||||
+ public Entity getEntity() {
|
||||
+ return entity;
|
||||
+ }
|
||||
+
|
||||
+ public void setEntity(@Nullable LivingEntity entity) {
|
||||
+ public void setEntity(@Nullable Entity entity) {
|
||||
+ if (entity == null) {
|
||||
+ canceled = true;
|
||||
+ return;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack convenience methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 0a31a5321ac519568db936c94394f71b2e2fcec1..42a77a5f5b8968351a737cb1fd7cebf160b13245 100644
|
||||
index 9b1c9e60dba9ea3ef8d8e164f13dd76daf57db8e..5b41f1016ed2d5ace2b47d3dd398314230af84b7 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -8660,4 +8660,36 @@ public enum Material implements Keyed {
|
||||
@@ -8718,4 +8718,36 @@ public enum Material implements Keyed {
|
||||
// </editor-fold>
|
||||
}
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ index 28a1fe3af1546daa779df46468e0ff8ad823f9ca..7a3be414ef9d54d7a852ba92d704011f
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 7f90ef2fd1c87c5b8b69f2e9dba3ad8e6e9ce3ec..85f77a58bf6c21da815b6652c7b50d578951a14c 100644
|
||||
index ba899198be49f9e95c3fb64759313662f75c4567..db4b94f8a4dd49fffdcb0cd9bf0690f0770653d9 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -81,6 +81,8 @@ public interface UnsafeValues {
|
||||
|
@ -17,12 +17,12 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 85f77a58bf6c21da815b6652c7b50d578951a14c..59a91250d80e6f67a32cb4c7a216f1389338ddbf 100644
|
||||
index db4b94f8a4dd49fffdcb0cd9bf0690f0770653d9..bca389b75ed072ec95beb7a5c5eb5ac93ce42ecd 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -152,4 +152,28 @@ public interface UnsafeValues {
|
||||
@@ -159,4 +159,28 @@ public interface UnsafeValues {
|
||||
*/
|
||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
||||
int getProtocolVersion();
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur start
|
||||
|
@ -243,7 +243,7 @@ index aec6c036ed42078a6cc3540f1f6e46a551e87a2f..f9913d7bd66935f975b756f31e26153e
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 712a32c0b64dace1f3e3d6f8acb8cbef1736b1f9..eba28b9c5cb87dea09bf8430d253725f585f87b9 100644
|
||||
index 6bfba82b428250e6725688d196b3dc6ac11a5e01..38e1bd3893b9dfcf1bac1333d06b4e9792793ec6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -377,7 +377,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] EMC - MonsterEggSpawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
index 6335e9046a6288f7bcf945ad8c381e080744653d..94aca57dd9e08d8841086378a712794e0d9c0e00 100644
|
||||
index 6335e9046a6288f7bcf945ad8c381e080744653d..1bfde4cfc0f27705238abf7852ad9bb7997e23e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
@@ -318,13 +318,20 @@ public class EntityTypes<T extends Entity> {
|
||||
@ -47,7 +47,7 @@ index 6335e9046a6288f7bcf945ad8c381e080744653d..94aca57dd9e08d8841086378a712794e
|
||||
|
||||
+ // Purpur start
|
||||
+ if (spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG && itemstack != null && t0 != null) {
|
||||
+ final net.pl3x.purpur.event.entity.MonsterEggSpawnEvent event = new net.pl3x.purpur.event.entity.MonsterEggSpawnEvent(entityhuman != null ? entityhuman.getBukkitEntity() : null, (org.bukkit.entity.LivingEntity) t0.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack));
|
||||
+ final net.pl3x.purpur.event.entity.MonsterEggSpawnEvent event = new net.pl3x.purpur.event.entity.MonsterEggSpawnEvent(entityhuman != null ? entityhuman.getBukkitEntity() : null, t0.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack));
|
||||
+ if (!event.callEvent()) {
|
||||
+ worldserver.removeEntity(t0);
|
||||
+ return null;
|
||||
|
@ -159,7 +159,7 @@ index 527f3ed664854cdd938c34f00a064bc2f77148cc..d50a1093aa9b6d7187b59566309a3abd
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 596b4597313b87296d39027b13555b5ad1cba9e6..5ea059cde9e1a089c2ade12512e4a7abd07c5b8a 100644
|
||||
index f8a982add50862f1bc977f3039e7e9aeed9138ae..e18b3b575e4fe3fde869e749070feefb31548a25 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -41,6 +41,7 @@ import net.minecraft.world.level.block.entity.TileEntity;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement infinite lava
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..963b7edab813cd32f04c51fd2c6c137988e2a754 100644
|
||||
index b14b0134b42aa6d1eb285aa453ec6067cc702878..46187d18f797f834deef3685c857e88a8c4f5659 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
@@ -217,7 +217,7 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
@@ -226,7 +226,7 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..963b7edab813cd32f04c51fd2c6c1379
|
||||
IBlockData iblockdata2 = iworldreader.getType(blockposition.down());
|
||||
Fluid fluid1 = iblockdata2.getFluid();
|
||||
|
||||
@@ -288,6 +288,17 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
@@ -322,6 +322,17 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
return (Fluid) this.e().h().set(FluidTypeFlowing.FALLING, flag);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Short enderman height
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
index 94aca57dd9e08d8841086378a712794e0d9c0e00..6eb91f73b7040c13c43c3e3c319244640bfbbeaf 100644
|
||||
index 1bfde4cfc0f27705238abf7852ad9bb7997e23e6..2cf4e8f68fa85c4e09effda0da0c3a3f64ae7ba9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
@@ -268,7 +268,8 @@ public class EntityTypes<T extends Entity> {
|
||||
|
@ -419,7 +419,7 @@ index c9136f1b54ff0620a621b703b4e7487f4a63b01d..8b7f840bb1b24996b40c9bef85f4c1e9
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 451a28b1950bad61de7181a2fb89549063d8e2bf..81c0ccc4f8d0d1cf749cc2929c8d8f3c2c6c9887 100644
|
||||
index 451a28b1950bad61de7181a2fb89549063d8e2bf..c0a6bbe570e95f4449b404b21855860c7aba057a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -559,7 +559,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -453,27 +453,41 @@ index 451a28b1950bad61de7181a2fb89549063d8e2bf..81c0ccc4f8d0d1cf749cc2929c8d8f3c
|
||||
public void q(float f) {
|
||||
this.bu = f;
|
||||
}
|
||||
@@ -2951,6 +2953,20 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
@@ -2938,8 +2940,10 @@ public abstract class EntityLiving extends Entity {
|
||||
this.collideNearby();
|
||||
this.world.getMethodProfiler().exit();
|
||||
// Paper start
|
||||
- if (((WorldServer) world).hasEntityMoveEvent) {
|
||||
- if (lastX != locX() || lastY != locY() || lastZ != locZ() || lastYaw != yaw || lastPitch != pitch) {
|
||||
+ // Purpur start
|
||||
+ if (hasRider() && ((WorldServer) world).hasRidableMoveEvent && this instanceof EntityInsentient) {
|
||||
+ if (lastX != locX() || lastY != locY() || lastZ != locZ() || lastYaw != yaw || lastPitch != pitch) {
|
||||
+ Location from = new Location(world.getWorld(), lastX, lastY, lastZ, lastYaw, lastPitch);
|
||||
+ Location to = new Location (world.getWorld(), locX(), locY(), locZ(), yaw, pitch);
|
||||
+ net.pl3x.purpur.event.entity.RidableMoveEvent event = new net.pl3x.purpur.event.entity.RidableMoveEvent((org.bukkit.entity.Mob) getBukkitLivingEntity(), (Player) getRider().getBukkitEntity(), from, to.clone());
|
||||
+ if (!event.callEvent()) {
|
||||
+ setLocation(from.getX(), from.getY(), from.getZ(), from.getYaw(), from.getPitch());
|
||||
+ } else if (!to.equals(event.getTo())) {
|
||||
+ setLocation(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch());
|
||||
+ if (lastX != locX() || lastY != locY() || lastZ != locZ() || lastYaw != yaw || lastPitch != pitch) {
|
||||
+ if (((WorldServer) world).hasEntityMoveEvent) {
|
||||
+ // Purpur end
|
||||
Location from = new Location(world.getWorld(), lastX, lastY, lastZ, lastYaw, lastPitch);
|
||||
Location to = new Location (world.getWorld(), locX(), locY(), locZ(), yaw, pitch);
|
||||
EntityMoveEvent event = new EntityMoveEvent(getBukkitLivingEntity(), from, to.clone());
|
||||
@@ -2949,6 +2953,21 @@ public abstract class EntityLiving extends Entity {
|
||||
setLocation(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch());
|
||||
}
|
||||
}
|
||||
+ // Purpur start
|
||||
+ if (hasRider()) {
|
||||
+ getRider().resetIdleTimer();
|
||||
+ if (((WorldServer) world).hasRidableMoveEvent && this instanceof EntityInsentient) {
|
||||
+ Location from = new Location(world.getWorld(), lastX, lastY, lastZ, lastYaw, lastPitch);
|
||||
+ Location to = new Location(world.getWorld(), locX(), locY(), locZ(), yaw, pitch);
|
||||
+ net.pl3x.purpur.event.entity.RidableMoveEvent event = new net.pl3x.purpur.event.entity.RidableMoveEvent((org.bukkit.entity.Mob) getBukkitLivingEntity(), (Player) getRider().getBukkitEntity(), from, to.clone());
|
||||
+ if (!event.callEvent()) {
|
||||
+ setLocation(from.getX(), from.getY(), from.getZ(), from.getYaw(), from.getPitch());
|
||||
+ } else if (!to.equals(event.getTo())) {
|
||||
+ setLocation(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end
|
||||
if (!this.world.isClientSide && this.dO() && this.aG()) {
|
||||
this.damageEntity(DamageSource.DROWN, 1.0F);
|
||||
+ // Purpur end
|
||||
}
|
||||
// Paper end
|
||||
if (!this.world.isClientSide && this.dO() && this.aG()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityTameableAnimal.java b/src/main/java/net/minecraft/world/entity/EntityTameableAnimal.java
|
||||
index 74636c4c0851da1cd5732daa0a2d1a4edda2050f..cdb56555889d17913d7b0c03d5ba23408a500f26 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityTameableAnimal.java
|
||||
@ -5401,10 +5415,19 @@ index e0324cdb2d4c85714eaad490a7a5c826b38e6b16..90cbef7fe8803295f82bddd6709fdf30
|
||||
this.setTradingPlayer(entityhuman);
|
||||
this.openTrade(entityhuman, this.getScoreboardDisplayName(), 1);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index 2ee7daa155d812af8f84ba646106d801d2fb0fec..1062317c22171bccee78a2db1841e0fd2b3023d7 100644
|
||||
index 2ee7daa155d812af8f84ba646106d801d2fb0fec..644f94002bfe2686f4c765251c3804c854b27869 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -2258,4 +2258,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -183,6 +183,8 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
// CraftBukkit end
|
||||
|
||||
// Purpur start
|
||||
+ public abstract void resetIdleTimer();
|
||||
+
|
||||
private javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino");
|
||||
|
||||
public void setAfk(boolean setAfk){
|
||||
@@ -2258,4 +2260,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
return this.g;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Crying obsidian valid for portal frames
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 5ea059cde9e1a089c2ade12512e4a7abd07c5b8a..97eb81338207c93125bea082256384946a8305bb 100644
|
||||
index e18b3b575e4fe3fde869e749070feefb31548a25..26cda907063f104fd4a3fbd2286b37fb539f741a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -141,6 +141,7 @@ public class Block extends BlockBase implements IMaterial {
|
||||
|
@ -61,7 +61,7 @@ index 59d52c252b2e59923b8e513dd4d2e1ec9ce34dc7..4be1c8ee85f411a8b01be50b8cc3dc38
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 97eb81338207c93125bea082256384946a8305bb..eecb17e887bf0d1680a5fb5198a8b4246c14e548 100644
|
||||
index 26cda907063f104fd4a3fbd2286b37fb539f741a..fab55929f72c5784291b3bc87f7717ac24b7806f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -15,10 +15,15 @@ import net.minecraft.core.EnumDirection;
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add critical hit check to EntityDamagedByEntityEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index 1062317c22171bccee78a2db1841e0fd2b3023d7..907bfe42bd866188639f7d25150fcde039c1e5f7 100644
|
||||
index 644f94002bfe2686f4c765251c3804c854b27869..8b956fb01cff3e1990823430333e5d707bf9addf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -171,6 +171,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -16,7 +16,7 @@ index 1062317c22171bccee78a2db1841e0fd2b3023d7..907bfe42bd866188639f7d25150fcde0
|
||||
|
||||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
@@ -1164,6 +1165,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1166,6 +1167,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper
|
||||
flag2 = flag2 && !this.isSprinting();
|
||||
if (flag2) {
|
||||
@ -24,7 +24,7 @@ index 1062317c22171bccee78a2db1841e0fd2b3023d7..907bfe42bd866188639f7d25150fcde0
|
||||
f *= 1.5F;
|
||||
}
|
||||
|
||||
@@ -1200,6 +1202,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1202,6 +1204,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
Vec3D vec3d = entity.getMot();
|
||||
boolean flag5 = entity.damageEntity(DamageSource.playerAttack(this), f);
|
||||
|
@ -7,7 +7,7 @@ Configurable chance to spawn a wolf that is rabid.
|
||||
Rabid wolves attack all players, mobs, and animals.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 81c0ccc4f8d0d1cf749cc2929c8d8f3c2c6c9887..72febe30dfcc731bc357d5fe1ede2a240f3d176d 100644
|
||||
index c0a6bbe570e95f4449b404b21855860c7aba057a..04ae8af914e65ae9725d276a9dcc24893cbcabb9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2200,6 +2200,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -17,18 +17,10 @@ index a551636c2c59e68a5abb1cd5611c1d5c7e36f514..b7663a3d64ae5202abb93eabba6ec013
|
||||
|
||||
if (commanddispatcher_servertype.d) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 45cb8681fd0942084b56eb8d45390c2dbc8a4f3d..966b6e2f9b7c473d8dfcae205d8ef8f08912ded9 100644
|
||||
index 45cb8681fd0942084b56eb8d45390c2dbc8a4f3d..16c20b3e7dcbbdb08e8c2a15074495eacc001e70 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -584,6 +584,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.serverConnection.acceptConnections();
|
||||
// CraftBukkit end
|
||||
|
||||
+ net.pl3x.purpur.task.TPSBarTask.start(); // Purpur
|
||||
}
|
||||
|
||||
protected void updateWorldSettings() {}
|
||||
@@ -979,6 +980,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -979,6 +979,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.safeShutdown(flag, false);
|
||||
}
|
||||
public void safeShutdown(boolean flag, boolean isRestarting) {
|
||||
@ -36,6 +28,19 @@ index 45cb8681fd0942084b56eb8d45390c2dbc8a4f3d..966b6e2f9b7c473d8dfcae205d8ef8f0
|
||||
this.isRunning = false;
|
||||
this.isRestarting = isRestarting;
|
||||
this.hasLoggedStop = true; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 28d47ef97939309ce26b6e4cae14925b510755fd..6d39b777a0f708d61f611d9c16c3b3c48f89d477 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -323,6 +323,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
MinecraftServerBeans.a((MinecraftServer) this);
|
||||
}
|
||||
|
||||
+ net.pl3x.purpur.task.TPSBarTask.start(); // Purpur
|
||||
+
|
||||
return true;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c316b0468c53825f90d9bc2ad40d655d92857715..d710834422afa1d4336f68e2425aaffd64d444e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@ -84,10 +89,10 @@ index 0000000000000000000000000000000000000000..807f5709af7fd9497633ecfc9e932f0d
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/task/TPSBarTask.java b/src/main/java/net/pl3x/purpur/task/TPSBarTask.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..dcb973f658c2ff30ab014785f530a3db0aebe512
|
||||
index 0000000000000000000000000000000000000000..a9d71d2b769b8e4e0f5039e997fc5ebc1cc9bfbb
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/task/TPSBarTask.java
|
||||
@@ -0,0 +1,111 @@
|
||||
@@ -0,0 +1,116 @@
|
||||
+package net.pl3x.purpur.task;
|
||||
+
|
||||
+import org.bukkit.Bukkit;
|
||||
@ -105,12 +110,18 @@ index 0000000000000000000000000000000000000000..dcb973f658c2ff30ab014785f530a3db
|
||||
+ private final NamespacedKey key;
|
||||
+ private BossBar bossbar;
|
||||
+
|
||||
+ public TPSBarTask() {
|
||||
+ instance = this;
|
||||
+ private TPSBarTask() {
|
||||
+ this.key = new NamespacedKey("purpur", "tpsbar");
|
||||
+ }
|
||||
+
|
||||
+ public BossBar getBossBar() {
|
||||
+ private static TPSBarTask instance() {
|
||||
+ if (instance == null) {
|
||||
+ instance = new TPSBarTask();
|
||||
+ }
|
||||
+ return instance;
|
||||
+ }
|
||||
+
|
||||
+ private BossBar bossbar() {
|
||||
+ if (bossbar == null) {
|
||||
+ bossbar = Bukkit.getBossBar(key);
|
||||
+ if (bossbar == null) {
|
||||
@ -124,7 +135,7 @@ index 0000000000000000000000000000000000000000..dcb973f658c2ff30ab014785f530a3db
|
||||
+
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ BossBar bossbar = getBossBar();
|
||||
+ BossBar bossbar = bossbar();
|
||||
+ if (bossbar.getPlayers().isEmpty()) {
|
||||
+ return;
|
||||
+ }
|
||||
@ -167,18 +178,18 @@ index 0000000000000000000000000000000000000000..dcb973f658c2ff30ab014785f530a3db
|
||||
+ @Override
|
||||
+ public void cancel() {
|
||||
+ super.cancel();
|
||||
+ BossBar bossbar = getBossBar();
|
||||
+ BossBar bossbar = bossbar();
|
||||
+ bossbar.setVisible(false);
|
||||
+ bossbar.removeAll();
|
||||
+ Bukkit.removeBossBar(key);
|
||||
+ }
|
||||
+
|
||||
+ public static void removePlayer(Player player) {
|
||||
+ instance.getBossBar().removePlayer(player);
|
||||
+ instance().bossbar().removePlayer(player);
|
||||
+ }
|
||||
+
|
||||
+ public static void togglePlayer(Player player) {
|
||||
+ BossBar bossbar = instance.getBossBar();
|
||||
+ BossBar bossbar = instance().bossbar();
|
||||
+ if (bossbar.getPlayers().contains(player)) {
|
||||
+ bossbar.removePlayer(player);
|
||||
+ } else {
|
||||
@ -189,8 +200,7 @@ index 0000000000000000000000000000000000000000..dcb973f658c2ff30ab014785f530a3db
|
||||
+
|
||||
+ public static void start() {
|
||||
+ stop();
|
||||
+ instance = new TPSBarTask();
|
||||
+ instance.runTaskTimerAsynchronously(new MinecraftInternalPlugin(), 20L, 20L);
|
||||
+ instance().runTaskTimerAsynchronously(new MinecraftInternalPlugin(), 20L, 20L);
|
||||
+ }
|
||||
+
|
||||
+ public static void stop() {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Full netherite armor grants fire resistance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index 907bfe42bd866188639f7d25150fcde039c1e5f7..b63019f40b28a2e543528a7919bbc08a4ccc8f07 100644
|
||||
index 8b956fb01cff3e1990823430333e5d707bf9addf..89d6bfe81c9fb33e2ba51b9e215d79fac6245d16 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -334,6 +334,16 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -336,6 +336,16 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.addEffect(new MobEffect(MobEffects.WATER_BREATHING, 200, 0, false, false, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.TURTLE_HELMET); // CraftBukkit
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add mobGriefing bypass to everything affected
|
||||
This adds the "bypass-mob-griefing" world config option to everything that is affected by the gamerule.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 72febe30dfcc731bc357d5fe1ede2a240f3d176d..ac5b13e943d70cfb982f9e2c8e19ab1e69b6ec43 100644
|
||||
index 04ae8af914e65ae9725d276a9dcc24893cbcabb9..1757e44ecb9d23fd0ca6f7e7f9c07509b377675f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -1571,7 +1571,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -19,10 +19,10 @@ index 63d93060b350069040876aaacb91c853d674ea7b..e9793954c872baacfe7be80ecf3888e8
|
||||
}
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index ac5b13e943d70cfb982f9e2c8e19ab1e69b6ec43..6ef78c9099a234abce3669a23e32777ec3beaba7 100644
|
||||
index 1757e44ecb9d23fd0ca6f7e7f9c07509b377675f..26ae5f5d0b8acfd173e3401aa07bc6fcdc860978 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2974,6 +2974,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2977,6 +2977,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
index 6eb91f73b7040c13c43c3e3c319244640bfbbeaf..72d97655906ed3798bc1ba4f647ebc75bb2e1b06 100644
|
||||
index 2cf4e8f68fa85c4e09effda0da0c3a3f64ae7ba9..c166e0a8e7eadb4f714078f764ef35f7afca543b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||
@@ -532,6 +532,7 @@ public class EntityTypes<T extends Entity> {
|
||||
@ -46,7 +46,7 @@ index a80f664d2cf713fd751421be3735e2f4779f0056..6c37bf58bd269c2d7e1c84e5791e8245
|
||||
// Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index eba28b9c5cb87dea09bf8430d253725f585f87b9..609eda567751b2f1cf74e9f090ca5cb0c1d771cc 100644
|
||||
index 38e1bd3893b9dfcf1bac1333d06b4e9792793ec6..05d0d2e5bb10bb002c8d7d4783a144ec35e4550f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -390,9 +390,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] One Punch Man!
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 6ef78c9099a234abce3669a23e32777ec3beaba7..49fefb5f20bda418ae9fcdc238630c5f27b1b859 100644
|
||||
index 26ae5f5d0b8acfd173e3401aa07bc6fcdc860978..2c5280fe13fa962cfa514b41b1da15c019e30715 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2019,6 +2019,23 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -18,7 +18,7 @@ index d321616b7f726f4ff307b46ced9efce6cc20b82f..c20787a20cf6f273092d2b7ef0d7d90a
|
||||
|
||||
public Iterable<ItemStack> bn() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 49fefb5f20bda418ae9fcdc238630c5f27b1b859..7dbfd2dca4d99fcafc3a2fcd83b39f5d52c24f1c 100644
|
||||
index 2c5280fe13fa962cfa514b41b1da15c019e30715..82d3aaaf9bbb493d54f6bf2d34edafc5498aee88 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -394,7 +394,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 13 Apr 2021 11:19:35 -0500
|
||||
Subject: [PATCH] Piglin portal spawn modifier
|
||||
|
||||
Allows changing the modifier for the piglin spawn chance from a portal block
|
||||
based on the world difficulty.
|
||||
|
||||
For example, with the default vanilla value of 2000 there is a 2 out of 2000 chance
|
||||
for a piglin to spawn in a portal block each tick in normal mode.
|
||||
|
||||
Equation: random.nextInt(modifier) < difficulty
|
||||
|
||||
Difficulties:
|
||||
0 - peaceful
|
||||
1 - easy
|
||||
2 - normal
|
||||
3 - hard
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BlockPortal.java b/src/main/java/net/minecraft/world/level/block/BlockPortal.java
|
||||
index ac5ce96ab62ec210816e7af85a4269073b7a9270..84140e01eba780ffb8289bff75d1b58af4deab76 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BlockPortal.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockPortal.java
|
||||
@@ -52,7 +52,7 @@ public class BlockPortal extends Block {
|
||||
|
||||
@Override
|
||||
public void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
|
||||
- if (worldserver.spigotConfig.enableZombiePigmenPortalSpawns && worldserver.getDimensionManager().isNatural() && worldserver.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && random.nextInt(2000) < worldserver.getDifficulty().a()) { // Spigot
|
||||
+ if (worldserver.spigotConfig.enableZombiePigmenPortalSpawns && worldserver.getDimensionManager().isNatural() && worldserver.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && random.nextInt(worldserver.purpurConfig.piglinPortalSpawnModifier) < worldserver.getDifficulty().a()) { // Spigot
|
||||
while (worldserver.getType(blockposition).a((Block) this)) {
|
||||
blockposition = blockposition.down();
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index a3cca259f03d6ee0551bd075ceaa91ffb8fa21fc..689656dcfa823e5478f7c053137ee38c6ef19c00 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1373,6 +1373,7 @@ public class PurpurWorldConfig {
|
||||
public boolean piglinRidable = false;
|
||||
public boolean piglinRidableInWater = false;
|
||||
public double piglinMaxHealth = 16.0D;
|
||||
+ public int piglinPortalSpawnModifier = 2000;
|
||||
private void piglinSettings() {
|
||||
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
|
||||
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
|
||||
@@ -1382,6 +1383,7 @@ public class PurpurWorldConfig {
|
||||
set("mobs.piglin.attributes.max_health", oldValue);
|
||||
}
|
||||
piglinMaxHealth = getDouble("mobs.piglin.attributes.max_health", piglinMaxHealth);
|
||||
+ piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier);
|
||||
}
|
||||
|
||||
public boolean piglinBruteRidable = false;
|
@ -120,7 +120,7 @@ index 033548a58d27f64d3954206d267783c0437d4019..08ed243259f052165c6f75aed1d1d65a
|
||||
|
||||
public TickThread(final Runnable run, final String name, final int id) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index 2f8bca35508640f6b8c312fff17d55f129431599..aac3f74af760e8d7dbb1e9d4031ce1aabe45ca21 100644
|
||||
index 3644e8b24b082e17752ef52934625416130aaa08..4dfc1101d5fc78630ef8b816e8f84f5541683f0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -74,6 +74,7 @@ public abstract class ChunkMapDistance {
|
||||
|
@ -47,7 +47,7 @@ index f10fa659680f8a574f77d260bbc52be349c244e8..182f419fde8eb3646a79cc0ba689ee48
|
||||
|
||||
public final String worldName;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index aac3f74af760e8d7dbb1e9d4031ce1aabe45ca21..8d4944fa1c761bb3ab299ec639663e7f52b512a3 100644
|
||||
index 4dfc1101d5fc78630ef8b816e8f84f5541683f0b..c474ee61d98772a2852c44dec1c4a1037472ed2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -40,7 +40,7 @@ public abstract class ChunkMapDistance {
|
||||
|
@ -1129,7 +1129,7 @@ index e832ea0497b2d6af7556bda7f6728e72c48d80a8..b7399d17dd64ca8b1f1fab405cb0ac91
|
||||
worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange);
|
||||
worldData.addProperty("visible-chunk-count", visibleChunks.size());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
index 8d4944fa1c761bb3ab299ec639663e7f52b512a3..db8532c42fcb2e96f4b3491352d1b9a25a8efe49 100644
|
||||
index c474ee61d98772a2852c44dec1c4a1037472ed2c..ad90735b5daa658cdd5467eadcb29183d018b1fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||
@@ -42,7 +42,7 @@ public abstract class ChunkMapDistance {
|
||||
@ -1193,8 +1193,8 @@ index 8d4944fa1c761bb3ab299ec639663e7f52b512a3..db8532c42fcb2e96f4b3491352d1b9a2
|
||||
+ /* Tuinity - replace old loader system
|
||||
class c extends ChunkMapDistance.b {
|
||||
|
||||
private int e = 0;
|
||||
@@ -787,6 +788,7 @@ public abstract class ChunkMapDistance {
|
||||
private int e = 0; private int getViewDistance() { return e; } private void setViewDistance(int value) { this.e = value; } // Paper - OBFHELPER
|
||||
@@ -791,6 +792,7 @@ public abstract class ChunkMapDistance {
|
||||
return i <= this.e - 2;
|
||||
}
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ Lighting is purged on update anyways, so let's not add more
|
||||
into the conversion process
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java
|
||||
index 3c532d3996dfc734ec07181701280b6072bff55f..21c8530c77161b5f8cfd0bae3126c8fd394dcae2 100644
|
||||
index 3c532d3996dfc734ec07181701280b6072bff55f..8c4e87b9404cfe2fedd0c345983f64cad16f32a0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java
|
||||
@@ -46,6 +46,7 @@ public class IChunkLoader implements AutoCloseable {
|
||||
|
||||
// CraftBukkit start
|
||||
private boolean check(ChunkProviderServer cps, int x, int z) throws IOException {
|
||||
+ if (true) return false; // Tuinity - this isn't even needed anymore, light is purged updating to 1.14+, why are we holding up the conversion process reading chunk data off disk
|
||||
+ if (true) return true; // Tuinity - this isn't even needed anymore, light is purged updating to 1.14+, why are we holding up the conversion process reading chunk data off disk - return true, we need to set light populated to true so the converter recognizes the chunk as being "full"
|
||||
ChunkCoordIntPair pos = new ChunkCoordIntPair(x, z);
|
||||
if (cps != null) {
|
||||
//com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread"); // Paper - this function is now MT-Safe
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index cea712b94bb32ccda2895670859839d660bd0748..d16dce599382f285685e0990a63dd1bbadc62cac 100644
|
||||
index cea712b94bb32ccda2895670859839d660bd0748..8f864ce333418e6eb617dd55a9e9f73887f981a6 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,11 +1,11 @@
|
||||
@ -150,12 +150,3 @@ index cea712b94bb32ccda2895670859839d660bd0748..d16dce599382f285685e0990a63dd1bb
|
||||
<scmDirectory>..</scmDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
@@ -385,7 +410,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
- <version>1.4.33-SNAPSHOT</version>
|
||||
+ <version>1.4.32</version>
|
||||
</dependency>
|
||||
<!-- Purpur end -->
|
||||
</dependencies>
|
||||
|
@ -79,7 +79,7 @@ index 17d0d0ec4e22ed8b344a2208925a2e9cba5dd58c..73d2287cc4b45b440612b863cea0ca50
|
||||
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
|
||||
// Paper End
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 609eda567751b2f1cf74e9f090ca5cb0c1d771cc..ced87bb10dcc0bd1fdfd99d6f05de079e6ec6eee 100644
|
||||
index 05d0d2e5bb10bb002c8d7d4783a144ec35e4550f..cf5ad2b81791b736fb14736922475c89e873a942 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -377,7 +377,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
@ -9,7 +9,7 @@ Co-authored-by: Mykyta Komarnytskyy <nkomarn@hotmail.com>
|
||||
Co-authored-by: Ivan Pekov <ivan@mrivanplays.com>
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index d16dce599382f285685e0990a63dd1bbadc62cac..17e7c9c40db817f6e06b4cce074f232e2db87c95 100644
|
||||
index 8f864ce333418e6eb617dd55a9e9f73887f981a6..eb1c3ea442ca73317b18179ad7de3ce16a60d3d5 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -197,6 +197,12 @@
|
||||
|
@ -7,10 +7,10 @@ Original patch by:
|
||||
Co-authored-by: tr7zw <tr7zw@live.de>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f72574fde82307a0e73a9eca6c9dc967d0c48f22..8004b6068e4f9dac2cdda8300615b285b7bf16b2 100644
|
||||
index f31b49381d1a70f66406dc6d048f84b45257c860..78d462ca99da4f8d3bab94b081e8cd88699389cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1055,6 +1055,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1054,6 +1054,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper End
|
||||
// Spigot End
|
||||
|
||||
@ -19,7 +19,7 @@ index f72574fde82307a0e73a9eca6c9dc967d0c48f22..8004b6068e4f9dac2cdda8300615b285
|
||||
protected void w() {
|
||||
try {
|
||||
long serverStartTime = SystemUtils.getMonotonicNanos(); // Paper
|
||||
@@ -1126,7 +1128,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1125,7 +1127,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.a(gameprofilertick);
|
||||
this.methodProfiler.a();
|
||||
this.methodProfiler.enter("tick");
|
||||
|
@ -27,7 +27,7 @@ index 4b171a2a60e24947e884f8988920f335bd99a471..5431ec9e8794397b3082a1eb49f82767
|
||||
String hostName = "BrokenHost";
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 28d47ef97939309ce26b6e4cae14925b510755fd..78f7155c8bbeb2b93d42fc2b108ff4135038ea72 100644
|
||||
index 6d39b777a0f708d61f611d9c16c3b3c48f89d477..8601b91e12be70474b2f1396487b1431e66799cf 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -227,6 +227,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
@ -60,7 +60,7 @@ index d710834422afa1d4336f68e2425aaffd64d444e2..26a3eeb58a7862e1efdf02d39a56f49b
|
||||
playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities));
|
||||
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 254df060dcb7ebef59befa708a694fd7502fc063..a33f2ef70ebb32e7d57a055a2e88cf5c4de48e75 100644
|
||||
index 59ba2332cd250c3bfff7505cd02be346ae0f38c7..d2113b48b996ffaa26bd037665935108b0a57f64 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -367,6 +367,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -59,10 +59,10 @@ index 27599f422be266ad2fdbda49617661801c2c1991..2457b240f3b49dbd5fe0eb603d86418f
|
||||
}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index a33f2ef70ebb32e7d57a055a2e88cf5c4de48e75..0d5acd5e7c2faafd59aa2df9e61f8bb1baa28ffe 100644
|
||||
index d2113b48b996ffaa26bd037665935108b0a57f64..d24daa68e7acdc76c35e41d6d6dc64399f1e25f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -3053,7 +3053,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -3056,7 +3056,7 @@ public abstract class EntityLiving extends Entity {
|
||||
// Paper - end don't run getEntities if we're not going to use its result
|
||||
// Tuinity start - reduce memory allocation from collideNearby
|
||||
List<Entity> list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add NBT API as a first-class lib
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 17e7c9c40db817f6e06b4cce074f232e2db87c95..09a8b8eab88f46bd76326542c35bdb0d4a830acf 100644
|
||||
index eb1c3ea442ca73317b18179ad7de3ce16a60d3d5..39488ce4694d0a1bac949d6d6bfd99569b2d035e 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -379,6 +379,10 @@
|
||||
|
@ -65,7 +65,7 @@ index 8078e4f5b79eaada03508265ba6b81db636e822a..b2d26289a6f501b093ec229394f75864
|
||||
};
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 0d5acd5e7c2faafd59aa2df9e61f8bb1baa28ffe..fb62d5bfe188a7ae82a038454cbf0db10de23dda 100644
|
||||
index d24daa68e7acdc76c35e41d6d6dc64399f1e25f2..5096afa6c11810decc4b4bd73867c48594b932b2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2736,10 +2736,12 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -39,7 +39,7 @@ index 2457b240f3b49dbd5fe0eb603d86418fd65f0205..fa6637caf388c5ed1d3371c6433c8ede
|
||||
for (final Method method : clazz.getDeclaredMethods()) {
|
||||
if (method.getReturnType() != void.class || method.getParameterCount() != 0 ||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 78f7155c8bbeb2b93d42fc2b108ff4135038ea72..cdd1d1f77f6b48fae9f7dcca4a69505c644f9085 100644
|
||||
index 8601b91e12be70474b2f1396487b1431e66799cf..25e1513c5b435adef1bdd78f0973e395de3b334d 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -235,7 +235,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
@ -10,10 +10,10 @@ added.
|
||||
These changes aim to reduce that load whenever you are using the /whitelist command.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8004b6068e4f9dac2cdda8300615b285b7bf16b2..57df64bb8ff906f035d50646678d194173864ded 100644
|
||||
index 78d462ca99da4f8d3bab94b081e8cd88699389cb..df1d8aa345518101320a4ec0636c34ebb872ff98 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2108,6 +2108,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -2107,6 +2107,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
return new DataPackConfiguration(list, list1);
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ index 96fbb1a3d216302aa937e07bf88fdb19c6ccc764..0521fa09488ef501cc5bcdf6c3134ac9
|
||||
return (String[]) this.d.keySet().toArray(new String[this.d.size()]);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index b63019f40b28a2e543528a7919bbc08a4ccc8f07..4525c2d30bc9eda267a83ef1c845877433bc6235 100644
|
||||
index 89d6bfe81c9fb33e2ba51b9e215d79fac6245d16..4e1289be9302b010d3803783904eef07e604f3e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -176,6 +176,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@ -180,7 +180,7 @@ index b63019f40b28a2e543528a7919bbc08a4ccc8f07..4525c2d30bc9eda267a83ef1c8458774
|
||||
|
||||
@Override
|
||||
public CraftHumanEntity getBukkitEntity() {
|
||||
@@ -2026,6 +2027,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -2028,6 +2029,15 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
return this.getProfile().getName();
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] PlayerAttackEntityEvent
|
||||
Added per request
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index 4525c2d30bc9eda267a83ef1c845877433bc6235..e8d2184eec6d3d844bb9066ef8c1259c66fffbe2 100644
|
||||
index 4e1289be9302b010d3803783904eef07e604f3e8..8c8716c94d813fc6de0ec2f7e8080c339e821207 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -1175,12 +1175,50 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1177,12 +1177,50 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper
|
||||
flag2 = flag2 && !this.isSprinting();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add nspt command
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index cdd1d1f77f6b48fae9f7dcca4a69505c644f9085..2959113e45ad85c515c88dd4a55dd156e35b91cd 100644
|
||||
index 25e1513c5b435adef1bdd78f0973e395de3b334d..72660ed675900eb954f51216f2b4f549326f990b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -234,6 +234,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
@ -8,10 +8,10 @@ In vanilla, statistics that count time spent for an action (i.e. time played or
|
||||
With an interval of 20, this patch saves roughly 3ms per tick on a server w/ 80 players online.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index e8d2184eec6d3d844bb9066ef8c1259c66fffbe2..c02364c0b049e084db01aa2fa4ed88befd60c701 100644
|
||||
index 8c8716c94d813fc6de0ec2f7e8080c339e821207..6034d51d8133fa8a1c18edcf61c9377b413e7c37 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -273,18 +273,23 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -275,18 +275,23 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
this.p();
|
||||
if (!this.world.isClientSide) {
|
||||
this.foodData.a(this);
|
||||
|
@ -8,10 +8,10 @@ Paper does alleviate this quite well by only firing if plugins are listening, bu
|
||||
This patch implements a hard toggle for the event.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 57df64bb8ff906f035d50646678d194173864ded..e7388faeda8ba564ac003e6b5d10c7d50f018b2c 100644
|
||||
index df1d8aa345518101320a4ec0636c34ebb872ff98..d90deadd51fe2fadbd972f029204bee92640663d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1537,7 +1537,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1536,7 +1536,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
WorldServer worldserver = (WorldServer) iterator.next();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimised hallowen checker
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e7388faeda8ba564ac003e6b5d10c7d50f018b2c..10590e98c4b40f21d24535b9137bdeec262a31ad 100644
|
||||
index d90deadd51fe2fadbd972f029204bee92640663d..01775d93c5cc6eda99c0a7190b5ce43be36d52cc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1465,6 +1465,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1464,6 +1464,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper end
|
||||
|
||||
com.tuinity.tuinity.util.CachedLists.reset(); // Tuinity
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Preload ProtocolLib EnumWrappers
|
||||
Currently, ProtocolLib load EnumWrappers lazily and causing memory effects issues. This patch preloads EnumWrappers to prevent further NPE.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 10590e98c4b40f21d24535b9137bdeec262a31ad..d4490515972936d762faffa3e432db92ee340ad2 100644
|
||||
index 01775d93c5cc6eda99c0a7190b5ce43be36d52cc..ada7639c31fe6952f689bc2e437db57abe1b1037 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1079,6 +1079,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1078,6 +1078,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper end
|
||||
|
||||
PaperJvmChecker.checkJvm(); // Paper jvm version nag
|
||||
|
@ -8,10 +8,10 @@ The goal of this patch is to reduce I/O operations from the main thread while sa
|
||||
Co-authored-by: ishland <ishlandmc@yeah.net>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d4490515972936d762faffa3e432db92ee340ad2..27378526efabe92735790b1fd993e9bb5f23f730 100644
|
||||
index ada7639c31fe6952f689bc2e437db57abe1b1037..0f7fec04ac5c46dec5947be337499f4f93df39f0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -942,7 +942,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -941,7 +941,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// Spigot start
|
||||
MCUtil.asyncExecutor.shutdown(); // Paper
|
||||
|
@ -75,10 +75,10 @@ index 71a000edfab27c9965d1929af78582821d5af97a..5c5ac70b4dae5d51303ab974261055aa
|
||||
LOGGER.error("Error whilst processing packet {} for {}[{}]", packet, networkmanager.getPlayer().getName(), networkmanager.getSocketAddress(), e);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 27378526efabe92735790b1fd993e9bb5f23f730..97bb17236a00dd6ecd4d5926826815bb928bfe9e 100644
|
||||
index 0f7fec04ac5c46dec5947be337499f4f93df39f0..89ddf0b9ac4a7aef44d15b5797ec54715a012260 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1159,7 +1159,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1158,7 +1158,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8de8e82a2bd6b404f0e8dde191302e0df37d7469
|
||||
Subproject commit 07897895befebc681563b37336042e3041349ad0
|
@ -1 +1 @@
|
||||
Subproject commit 2e66f8344b927b290830603be3eaf72e85778d03
|
||||
Subproject commit 2e626184bb0fcdb69444cdc58636b3ed86f916d9
|
@ -1 +1 @@
|
||||
Subproject commit d5261ad292adb425059eae538526db3166ffe1a0
|
||||
Subproject commit 32b4d526b4bed2f84a511a0aba36cccef0abea1e
|
@ -1 +1 @@
|
||||
8de8e82a2bd6b404f0e8dde191302e0df37d7469
|
||||
07897895befebc681563b37336042e3041349ad0
|
@ -1 +1 @@
|
||||
2e66f8344b927b290830603be3eaf72e85778d03
|
||||
2e626184bb0fcdb69444cdc58636b3ed86f916d9
|
@ -1 +1 @@
|
||||
d5261ad292adb425059eae538526db3166ffe1a0
|
||||
32b4d526b4bed2f84a511a0aba36cccef0abea1e
|
Loading…
Reference in New Issue
Block a user