Merge branch 'staging/1.16.5' of github.com:YatopiaMC/Yatopia into dev/c2me-port

This commit is contained in:
Simon Gardling 2021-05-27 13:22:44 -04:00
commit a0f44447c3
339 changed files with 2854 additions and 1741 deletions

View File

@ -14,7 +14,6 @@ # Patches
| server | Actually unload POI data | Spottedleaf | |
| server | Add /ping command | William Blake Galbreath | |
| server | Add 5 second tps average in /tps | William Blake Galbreath | |
| api | Add ChatColor.getById | Aikar | |
| api | Add EntityTeleportHinderedEvent | Mariell Hoversholm | |
| server | Add EntityTeleportHinderedEvent | Mariell Hoversholm | |
| api | Add GameProfileLookupEvent | tr7zw | |
@ -30,6 +29,7 @@ # Patches
| server | Add allow water in end world option | William Blake Galbreath | |
| server | Add boat fall damage config | BillyGalbreath | |
| server | Add canSaveToDisk to Entity | William Blake Galbreath | |
| server | Add config change multiplier critical damage value | DoctaEnkoda | |
| server | Add config for allowing Endermen to despawn even while | jmp | |
| server | Add config for snow on blue ice | BillyGalbreath | |
| server | Add config for villager trading | Ben Kerllenevich | |
@ -99,10 +99,12 @@ # Patches
| server | Avoid double I/O operation on load player file | ㄗㄠˋ ㄑㄧˊ | |
| server | Barrels and enderchests 6 rows | William Blake Galbreath | |
| server | Be aware of entity teleports when chunk checking entities | Spottedleaf | |
| server | Better checking for useless move packets | Paul Sauve | |
| server | Brand changes | Spottedleaf | |
| server | Brandings | YatopiaMC | |
| server | Break individual slabs when sneaking | BillyGalbreath | |
| server | Breedable Polar Bears | William Blake Galbreath | |
| server | Breedable parrots | BillyGalbreath | |
| api | Bring back server name | William Blake Galbreath | |
| server | Bring back server name | William Blake Galbreath | |
| server | C2ME Port | ishland | Simon Gardling |
@ -118,8 +120,10 @@ # Patches
| server | Chickens can retaliate | William Blake Galbreath | |
| server | Config for Enderman to aggro spawned Endermites | Encode42 | |
| server | Config for changing the blocks that turn into paths | 12emin34 | |
| server | Config for health to impact Creeper explosion radius | Encode42 | |
| server | Config for powered rail activation distance | Encode42 | |
| server | Config for skipping night | Ben Kerllenevich | |
| server | Config for unverified username message | Ben Kerllenevich | |
| server | Config for wither explosion radius | Ben Kerllenevich | |
| server | Config migration: climbing should not bypass cramming | jmp | |
| server | Config migration: disable saving projectiles to disk -> | jmp | |
@ -152,6 +156,7 @@ # Patches
| server | Configurable jockey options | William Blake Galbreath | |
| server | Configurable movement checks | l_MrBoom_l | |
| api | Configurable permission message upgrades | William Blake Galbreath | |
| server | Configurable powered rail boost modifier | Callum Seabrook | |
| server | Configurable ravager griefable blocks list | BillyGalbreath | |
| server | Configurable server mod name | William Blake Galbreath | |
| server | Configurable sponge absorption | Encode42 | |
@ -238,10 +243,11 @@ # Patches
| server | Global Eula file | tr7zw | |
| server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn |
| server | Heavily optimize recipe lookups in CraftingManager | Mykyta Komarn | Ivan Pekov, ishland |
| server | Hide hidden players from entity selector | BillyGalbreath | |
| server | Highly optimise single and multi-AABB VoxelShapes and | Spottedleaf | |
| server | Highly optimize VillagePlace filtering | Ivan Pekov | |
| server | Hopper Optimizations | Phoenix616 | |
| server | Illusioners AI settings | William Blake Galbreath | |
| server | Implement Mob Blindness | Encode42 | |
| server | Implement TPSBar | BillyGalbreath | |
| server | Implement bed explosion options | William Blake Galbreath | |
| server | Implement configurable search radius for villagers to spawn | William Blake Galbreath | |
@ -250,11 +256,13 @@ # 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 container checking with a bitset | Paul Sauve | |
| 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 | |
| server | Infinity bow settings | William Blake Galbreath | |
| api | Iron golem poppy calms anger | BillyGalbreath | |
| server | Iron golem poppy calms anger | BillyGalbreath | |
| api | Item entity immunities | William Blake Galbreath | |
| server | Item entity immunities | William Blake Galbreath | |
| server | Item stuck sleep config | tr7zw | |
@ -281,6 +289,7 @@ # Patches
| server | MC-Dev fixes | Spottedleaf | |
| server | Make CallbackExecutor strict again | Spottedleaf | |
| server | Make Iron Golems Swim | William Blake Galbreath | |
| server | Make VoxelShapeCollisionEntity lazier | Paul Sauve | |
| server | Make entity breeding times configurable | jmp | |
| server | Make entity tracker use highest range of passengers | Spottedleaf | |
| server | Make lava flow speed configurable | William Blake Galbreath | |
@ -317,6 +326,7 @@ # Patches
| server | Optimize TileEntity load/unload | tr7zw | |
| server | Optimize Villagers | Ivan Pekov | |
| server | Optimize advancement loading | Ivan Pekov | |
| server | Optimize collisions | DoctaEnkoda | |
| server | Optimize inventory API item handling | Phoenix616 | |
| server | Optimize random calls in chunk ticking | Paul Sauve | |
| server | Optimize redundant calls | Paul Sauve | |
@ -325,6 +335,7 @@ # Patches
| server | Option for Villager Clerics to farm Nether Wart | jmp | |
| server | Option for chests to open even with a solid block on top | jmp | |
| server | Option for simpler Villagers | tr7zw | |
| server | Option to disable dragon egg teleporting | BillyGalbreath | |
| server | Option to make doors require redstone | BillyGalbreath | |
| server | Option to toggle milk curing bad omen | William Blake Galbreath | |
| server | Origami - Fix ProtocolLib issues on Java 15 | Phoenix616 | |
@ -427,9 +438,12 @@ # Patches
| api | Tuinity config | Spottedleaf | |
| server | Tulips change fox type | William Blake Galbreath | |
| server | Update version fetcher repo | JRoy | |
| server | Use array for gamerule storage | Paul Sauve | |
| server | Use configured height for nether surface builders | William Blake Galbreath | |
| server | Use entity ticking chunk map for entity tracker | Spottedleaf | |
| server | Use hash table for maintaing changed block set | Spottedleaf | |
| server | Use list for fast iteration over pathfinder goals | Paul Sauve | |
| server | Use raw iterator where possible | Paul Sauve | |
| server | Use unmodifiableMap instead of making copy | Paul Sauve | |
| server | Util patch | Spottedleaf | |
| server | Utilities | YatopiaMC | Mykyta Komarnytskyy, Ivan Pekov |
@ -448,7 +462,6 @@ # Patches
| server | lithium HashedList | JellySquid | |
| server | lithium MixinBox | JellySquid | |
| server | lithium MixinDirection | JellySquid | |
| server | lithium MixinGoalSelector | JellySquid | |
| server | lithium MultiNoiseBiomeSourceMixin | ishland | |
| server | lithium NoiseChunkGeneratorMixin | JellySquid | |
| server | lithium PerlinNoiseSamplerMixin | JellySquid | Bud Gidiere |

2
Paper

@ -1 +1 @@
Subproject commit b3cc88799f83500b0d4277a46818e422a6a623f6
Subproject commit 41e6073cedee9035355f09a3cd1f48e85dbad70f

View File

@ -6,7 +6,7 @@ ## Supported Versions:
| Version | Supported |
| ------- | ------------------ |
| 1.16.5 | :white_check_mark: |
| 1.16.4 | :white_check_mark: |
| 1.16.4 | :x: |
| 1.16.3 | :x: |
| 1.16.2 | :x: |
| 1.16.1 | :x: |

View File

@ -5,14 +5,14 @@ Subject: [PATCH] Expose findClass for profiler
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 7760be3e34fa20825faf145d9fb5b2855c1a4602..79d839034d38c941745c6b91f973f908d6cdb8ee 100644
index 81da90531cc3a7ab13d455860f89411081825949..6ced06643cd9740e2c62bc8f10d150a2f9a92e31 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -111,6 +111,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
return findClass(name, true);
@@ -114,6 +114,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
return loadClass0(name, resolve, true, true);
}
+ public Class<?> _airplane_findClass(@NotNull String name) throws ClassNotFoundException { return this.classes.get(name); } // Airplane
Class<?> findClass(@NotNull String name, boolean checkGlobal) throws ClassNotFoundException {
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
throw new ClassNotFoundException(name);
Class<?> loadClass0(@NotNull String name, boolean resolve, boolean checkGlobal, boolean checkLibraries) throws ClassNotFoundException {
try {
return super.loadClass(name, resolve);

View File

@ -119,3 +119,33 @@ index 95d0c9f22d79194ca83ca6f6a8e6d91180a3c8da..5c712af849abf1e5f58a7760b19c5434
}
public LootTableInfo build(LootContextParameterSet lootcontextparameterset) {
diff --git a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java
index dcb3e4b0cf34699ed77208f8122710bbdfa3d063..45e6943d141082f510833dc92e41a016de766ca5 100644
--- a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java
+++ b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java
@@ -35,6 +35,8 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision {
@Deprecated
protected VoxelShapeCollisionEntity(Entity entity) {
+ // Airplane start - compile fixes
+ /*
boolean flag = entity.by();
double d0 = entity.locY();
Item item = entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR;
@@ -50,8 +52,15 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision {
return false;
};
}
+ */
- this(flag, d0, item, predicate);
+ this(
+ entity.by(),
+ entity.locY(),
+ entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR,
+ entity instanceof EntityLiving ? ((EntityLiving) entity)::a : (fluidtype) -> false
+ );
+ // Airplane end
}
@Override

View File

@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/pom.xml b/pom.xml
index de7da911833569c97b7f800a43ee7354d19677e2..ed18cc4a00761d3a4f435bcccbfd651a3201238d 100644
index 642ee96ead8176f5c5a811946b050f4fa5dab6e2..6dc6469928051a2a38e8eba43aa237b0f21a502f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,8 +39,8 @@
@ -72,10 +72,10 @@ index 7063f1da3654b382e26b0093ad5d0ff04a2b38c2..b9c5479e5561f8fe68ea8f94fbf4e64d
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2767a9369ddc922f1d9c7cb6c7acc8270545535a..7b4b9f54510b3a05aad3f7e50e32ee0bf977244a 100644
index 72d1c1202581abc284848000663ada5514cfcb15..3fc494965ff56a2195af437093e5f227ab8b5554 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1649,7 +1649,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -85,10 +85,10 @@ index 2767a9369ddc922f1d9c7cb6c7acc8270545535a..7b4b9f54510b3a05aad3f7e50e32ee0b
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ce2fb6288edb871414c44d003ac63ff4045a820a..f7ea02d8791d9fe2250522646ecc001c30cf3f50 100644
index 0e9819a7da160e7a5f28734c4dd3b673c8881792..4d0a9c89ca6838907b25ac4b2b1a849844efa7ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
@@ -230,7 +230,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {

View File

@ -22,10 +22,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/pom.xml b/pom.xml
index ed18cc4a00761d3a4f435bcccbfd651a3201238d..a148af69be216d2869538d402d9a0d12c81b5df6 100644
index 6dc6469928051a2a38e8eba43aa237b0f21a502f..65c8a649cb0e4d2d8d1b1c21ec30405f60539b9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -166,6 +166,13 @@
@@ -193,6 +193,13 @@
<version>1.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
@ -183,7 +183,7 @@ index 0000000000000000000000000000000000000000..807cf274619b8f7be839e249cb62b981
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index fa7a78549a9bb92b93c305dc16f43a9ace7f6f43..858bd62d2a17c15ee573c5cd607a876d3a99c2b1 100644
index 392a707d7d71f2009134741529fb9539bd025619..60aad444eec3af7364b84ec3f696d3b78586cd6a 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -216,6 +216,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer

View File

@ -55,7 +55,7 @@ index cc566784c7dd21cc2c44e0f351347f657e57ddcf..e9e7fcf2b63febe2a7d055826fabb86b
return d0 == 0.0D ? 0 : (d0 > 0.0D ? 1 : -1);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 96cc46a26eef701b0579f3407e67af9176e1743b..5c7ce20609a1c18687696581a76f21a1b182ea7c 100644
index 33f689b1c9f4c00969fbdd8ddb21901637afb81c..785c210414ca11584bc51087616845f0d5badc91 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -111,6 +111,7 @@ import net.minecraft.world.phys.AxisAlignedBB;
@ -76,7 +76,7 @@ index 96cc46a26eef701b0579f3407e67af9176e1743b..5c7ce20609a1c18687696581a76f21a1
@Override
diff --git a/src/main/java/net/minecraft/world/level/IBlockAccess.java b/src/main/java/net/minecraft/world/level/IBlockAccess.java
index e612e1d30f76e217b1aa23488ab025adce048f57..c9198d242b9053fad6fa5b53c1894679002d50a7 100644
index e612e1d30f76e217b1aa23488ab025adce048f57..6109d59c02d0c7877e213213c6aec6f8513ccc47 100644
--- a/src/main/java/net/minecraft/world/level/IBlockAccess.java
+++ b/src/main/java/net/minecraft/world/level/IBlockAccess.java
@@ -14,9 +14,11 @@ import net.minecraft.world.level.block.state.IBlockData;
@ -91,12 +91,13 @@ index e612e1d30f76e217b1aa23488ab025adce048f57..c9198d242b9053fad6fa5b53c1894679
public interface IBlockAccess {
@@ -56,6 +58,15 @@ public interface IBlockAccess {
@@ -56,6 +58,16 @@ public interface IBlockAccess {
return BlockPosition.a(axisalignedbb).map(this::getType);
}
+ // Airplane start - broken down variant of below rayTraceBlock, used by World#rayTraceDirect
+ default MovingObjectPosition.EnumMovingObjectType rayTraceBlockDirect(Vec3D vec3d, Vec3D vec3d1, BlockPosition blockposition, IBlockData iblockdata, VoxelShapeCollision voxelshapecoll) {
+ if (iblockdata.isAir()) return null; // Tuinity - optimise air cases
+ VoxelShape voxelshape = RayTrace.BlockCollisionOption.COLLIDER.get(iblockdata, this, blockposition, voxelshapecoll);
+ MovingObjectPositionBlock movingobjectpositionblock = this.rayTrace(vec3d, vec3d1, blockposition, voxelshape, iblockdata);
+
@ -108,7 +109,7 @@ index e612e1d30f76e217b1aa23488ab025adce048f57..c9198d242b9053fad6fa5b53c1894679
default MovingObjectPositionBlock rayTraceBlock(RayTrace raytrace1, BlockPosition blockposition) {
// Paper start - Prevent raytrace from loading chunks
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index af01f5d635eada7175b9d7fdb47a65530686a539..3e08e56f67516333e7d880fdc595447a3ae4dc83 100644
index 276b1f0c9c9af7db31fba9be0593ae9def540caf..6ab528223682d57bec1cdbd383acd8ab06904e4a 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -69,6 +69,8 @@ import net.minecraft.world.level.saveddata.maps.WorldMap;
@ -120,7 +121,7 @@ index af01f5d635eada7175b9d7fdb47a65530686a539..3e08e56f67516333e7d880fdc595447a
import net.minecraft.world.phys.shapes.OperatorBoolean;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
@@ -378,6 +380,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -387,6 +389,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return null;
}

View File

@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index a8a2c29874e95dc08b85eb41882fc947108fbe5b..fc3a5a9d86978e52f0906ef004dd9f1abdf83f1b 100644
index 6fc215df5ed3aa6ef0c23a57e8444602ff9309e8..239af30d85bff561d14a96de97e1215378018f85 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1212,7 +1212,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -46,7 +46,7 @@ index fe040615ff03478a20cdf8376f89a6b7d100ba61..207a9c3928aad7c6e89a120b54d87e00
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index fc3a5a9d86978e52f0906ef004dd9f1abdf83f1b..b2343d4e5c4dd6ec44503c275c374739bba28536 100644
index 239af30d85bff561d14a96de97e1215378018f85..39b978c6e61e675249743d082699bb9882fd39ff 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1202,6 +1202,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 5c7ce20609a1c18687696581a76f21a1b182ea7c..74f80b6af18c0b91d9613384ca6bafd9c89f23a4 100644
index 785c210414ca11584bc51087616845f0d5badc91..c6d551ad958711dec777902f02c9f5dadac26ff8 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -910,11 +910,13 @@ public abstract class EntityLiving extends Entity {

View File

@ -68,7 +68,7 @@ index ab019b577002677a4ce788106f8e5a1d7757a2ae..0e452ea9c5d098326d22a20aa67e423f
+
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index feab0ae1930b5271fe0d06a40c180317dcbc9d1d..c6b4af810fe3bda7797ab94316b2357178c9cd49 100644
index 6b6abf401cc7c7c79ffb472c35550596fc8e55b5..ebcb668b7f793d9c19bb098ff54007280c6d07d8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -289,6 +289,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
@ -82,7 +82,7 @@ index feab0ae1930b5271fe0d06a40c180317dcbc9d1d..c6b4af810fe3bda7797ab94316b23571
public float getBukkitYaw() {
return this.yaw;
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index aae13c2e6c2a30b69c33417932c6a4d0aefeb7f5..f4440a5c4aedb1d7d303517f86a07c856dd1309b 100644
index bd66ee1b93fc776f77218b87717e0915668e7c04..d325b2437887afad634d569e8c6483a14d3b967c 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -201,10 +201,10 @@ public abstract class EntityInsentient extends EntityLiving {

View File

@ -20,10 +20,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/pom.xml b/pom.xml
index a148af69be216d2869538d402d9a0d12c81b5df6..c917f825378dd16a329105b4e7fcc8882755bc5a 100644
index 65c8a649cb0e4d2d8d1b1c21ec30405f60539b9f..efa2ea6b8422f900643eb2f0f65cf067c034cea3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -173,6 +173,13 @@
@@ -200,6 +200,13 @@
<version>fe3dbb4420</version>
<scope>compile</scope>
</dependency>

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Skip copying unloading tile entities
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 3e08e56f67516333e7d880fdc595447a3ae4dc83..f0420b87025a090a659542a00614e805bf850fd2 100644
index 6ab528223682d57bec1cdbd383acd8ab06904e4a..3abea117b29e57013fb556855ef9def023069bf9 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -106,7 +106,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -17,7 +17,7 @@ index 3e08e56f67516333e7d880fdc595447a3ae4dc83..f0420b87025a090a659542a00614e805
public final Thread serverThread;
private final boolean debugWorld;
private int d;
@@ -986,12 +986,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -995,12 +995,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
gameprofilerfiller.enter("blockEntities");
timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] More debug for plugins not shutting down tasks
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f7ea02d8791d9fe2250522646ecc001c30cf3f50..34b9fe484ba16193cfcb938cb0dc51b2066acc5f 100644
index 4d0a9c89ca6838907b25ac4b2b1a849844efa7ec..e476806646c89c22da7e733d8072e0073383bd79 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -978,6 +978,11 @@ public final class CraftServer implements Server {
@@ -995,6 +995,11 @@ public final class CraftServer implements Server {
plugin.getDescription().getName(),
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
));

View File

@ -9,10 +9,10 @@ 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
index 0000000000000000000000000000000000000000..aa8467b9dda1f7707e41f50ac7b3e9d7343723ec
--- /dev/null
+++ b/src/main/java/gg/airplane/structs/FluidDirectionCache.java
@@ -0,0 +1,142 @@
@@ -0,0 +1,136 @@
+package gg.airplane.structs;
+
+import it.unimi.dsi.fastutil.HashCommon;
@ -44,8 +44,8 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8
+ private static class FluidDirectionEntry<T> {
+ private final T data;
+ private final boolean flag;
+ private short uses = 0;
+ private short age = 0;
+ private int uses = 0;
+ private int age = 0;
+
+ private FluidDirectionEntry(T data, boolean flag) {
+ this.data = data;
@ -57,15 +57,11 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8
+ }
+
+ public void incrementUses() {
+ if (this.uses < Short.MAX_VALUE) {
+ this.uses++;
+ }
+ this.uses = this.uses + 1 & Integer.MAX_VALUE;
+ }
+
+ public void incrementAge() {
+ if (this.age < Short.MAX_VALUE) {
+ this.age++;
+ }
+ this.age = this.age + 1 & Integer.MAX_VALUE;
+ }
+ }
+
@ -74,12 +70,10 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8
+ 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);
+ int arraySize = HashCommon.nextPowerOfTwo(size);
+ this.entries = new FluidDirectionEntry[arraySize];
+ this.mask = arraySize - 1;
+ this.maxDistance = Math.max(4, arraySize >> 4);
+ this.maxDistance = Math.min(arraySize, 4);
+ }
+
+ public Boolean getValue(T data) {
@ -138,11 +132,11 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8
+ int expectedPos = HashCommon.mix(data.hashCode()) & this.mask;
+
+ int toRemovePos = expectedPos;
+ FluidDirectionEntry<T> entryToRemove = this.entries[toRemovePos];
+ FluidDirectionEntry 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];
+ FluidDirectionEntry entry = this.entries[pos];
+ if (entry.getValue() < entryToRemove.getValue()) {
+ toRemovePos = pos;
+ entryToRemove = entry;
@ -156,7 +150,7 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8
+ }
+}
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
index 7279893d599351785652279c8827fe0efbd72f12..96d7990c66bd569b1b5ee287c0238c7dbb4c503e 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 {
@ -168,7 +162,7 @@ index 596b4597313b87296d39027b13555b5ad1cba9e6..f8a982add50862f1bc977f3039e7e9ae
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
index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..3b8fa837db21c5f67eab2ff8752e906ea97c288d 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 {
@ -187,8 +181,8 @@ index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..b14b0134b42aa6d1eb285aa453ec6067
+ */
+ 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);
+ // with 2048 it seems very infrequent on a small world that it has to remove old entries
+ return new gg.airplane.structs.FluidDirectionCache<>(2048);
+ });
+ // Airplane end
private final Map<Fluid, VoxelShape> f = Maps.newIdentityHashMap();

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Skip creating hashset for entity track range
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index c6b4af810fe3bda7797ab94316b2357178c9cd49..99c93d48726b4b92a341ba98721173df8b4ff30a 100644
index ebcb668b7f793d9c19bb098ff54007280c6d07d8..2a779f1219de2eb1d2ba7d28110bed4824b1d5c5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -319,10 +319,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Cache climbing check for activation
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 74f80b6af18c0b91d9613384ca6bafd9c89f23a4..003e1f6dc8efbabcb2e0f7a6b379196f02203903 100644
index c6d551ad958711dec777902f02c9f5dadac26ff8..a49dbcffecc971f797651984cb72c455d40f9331 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1745,6 +1745,19 @@ public abstract class EntityLiving extends Entity {

View File

@ -26,7 +26,7 @@ index 7ec84ef1d1cbb1fabf4c590a2f2c1da3cc181010..c9e00334655ccd273ba108a541ed1cb0
+
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index f4440a5c4aedb1d7d303517f86a07c856dd1309b..dc78bafeddf6b584181c818b90efa7ff531377a3 100644
index d325b2437887afad634d569e8c6483a14d3b967c..91eecf296905b85d7cc602dbc3a7b14479ec686a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -774,8 +774,15 @@ public abstract class EntityInsentient extends EntityLiving {

View File

@ -23,10 +23,10 @@ index c9e00334655ccd273ba108a541ed1cb0633f69b7..65adf3ceda012c8cfdea675c40e2bb27
+
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7b4b9f54510b3a05aad3f7e50e32ee0bf977244a..2bb00a42492b08036e984d3e1d9a564d4b4226c2 100644
index 3fc494965ff56a2195af437093e5f227ab8b5554..06d0592bebaefc16c1995781a9e8a3554f4a3205 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2196,7 +2196,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2199,7 +2199,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
}
@ -38,3 +38,23 @@ index 7b4b9f54510b3a05aad3f7e50e32ee0bf977244a..2bb00a42492b08036e984d3e1d9a564d
return this.methodProfiler;
}
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 3abea117b29e57013fb556855ef9def023069bf9..f8d11a1f0337acf60f2d9f94bd4bbbf6eb77c6de 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -18,6 +18,7 @@ import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
import javax.annotation.Nullable;
+
import net.minecraft.CrashReport;
import net.minecraft.CrashReportSystemDetails;
import net.minecraft.ReportedException;
@@ -1815,6 +1816,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
}
public GameProfilerFiller getMethodProfiler() {
+ if (gg.airplane.AirplaneConfig.disableMethodProfiler) return net.minecraft.util.profiling.GameProfilerDisabled.a; // Airplane
return (GameProfilerFiller) this.methodProfiler.get();
}

View File

@ -0,0 +1,64 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Sun, 9 May 2021 16:49:49 -0500
Subject: [PATCH] Use array for gamerule storage
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
index 3783f3a83e3e70d77cf0fa1021f62a89c5950af5..d0c63be6ebfa2f95fb3d63eed2e11b1c5cd6384e 100644
--- a/src/main/java/net/minecraft/world/level/GameRules.java
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
@@ -86,6 +86,7 @@ public class GameRules {
public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> FORGIVE_DEAD_PLAYERS = a("forgiveDeadPlayers", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleBoolean.b(true));
public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> UNIVERSAL_ANGER = a("universalAnger", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleBoolean.b(false));
private final Map<GameRules.GameRuleKey<?>, GameRules.GameRuleValue<?>> J;
+ private final GameRules.GameRuleValue<?>[] gameruleArray;
private static <T extends GameRules.GameRuleValue<T>> GameRules.GameRuleKey<T> a(String s, GameRules.GameRuleCategory gamerules_gamerulecategory, GameRules.GameRuleDefinition<T> gamerules_gameruledefinition) {
GameRules.GameRuleKey<T> gamerules_gamerulekey = new GameRules.GameRuleKey<>(s, gamerules_gamerulecategory);
@@ -104,17 +105,31 @@ public class GameRules {
}
public GameRules() {
- this.J = (Map) GameRules.I.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> {
+ // Airplane start - use this()
+ this((Map) GameRules.I.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> {
return ((GameRules.GameRuleDefinition) entry.getValue()).getValue();
- }));
+ })));
+ // Airplane end
}
private GameRules(Map<GameRules.GameRuleKey<?>, GameRules.GameRuleValue<?>> map) {
this.J = map;
+
+ int arraySize = map.keySet().stream().mapToInt(key -> key.gameRuleIndex).max().orElse(-1) + 1;
+ GameRules.GameRuleValue<?>[] values = new GameRules.GameRuleValue[arraySize];
+
+ for (Entry<GameRuleKey<?>, GameRuleValue<?>> entry : map.entrySet()) {
+ values[entry.getKey().gameRuleIndex] = entry.getValue();
+ }
+
+ this.gameruleArray = values;
}
public <T extends GameRules.GameRuleValue<T>> T get(GameRules.GameRuleKey<T> gamerules_gamerulekey) {
- return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error
+ // Airplane start
+ return gamerules_gamerulekey == null ? null : (T) this.gameruleArray[gamerules_gamerulekey.gameRuleIndex];
+ //return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error
+ // Airplane end
}
public NBTTagCompound a() {
@@ -357,6 +372,10 @@ public class GameRules {
}
public static final class GameRuleKey<T extends GameRules.GameRuleValue<T>> {
+ // Airplane start
+ private static int lastGameRuleIndex = 0;
+ public final int gameRuleIndex = lastGameRuleIndex++;
+ // Airplane end
private final String a;
private final GameRules.GameRuleCategory b;

View File

@ -0,0 +1,54 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Sun, 9 May 2021 18:35:05 -0500
Subject: [PATCH] Make VoxelShapeCollisionEntity lazier
diff --git a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java
index 45e6943d141082f510833dc92e41a016de766ca5..dbb6a68eea01a3484f2ac862745b57d1d832b80c 100644
--- a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java
+++ b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java
@@ -23,14 +23,16 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision {
};
private final boolean b;
private final double c;
- private final Item d;
- private final Predicate<FluidType> e;
+ private Item d; // Airplane
+ private Entity entity; // Airplane
+ private Predicate<FluidType> e; // Airplane
protected VoxelShapeCollisionEntity(boolean flag, double d0, Item item, Predicate<FluidType> predicate) {
this.b = flag;
this.c = d0;
this.d = item;
this.e = predicate;
+ this.entity = null; // Airplane
}
@Deprecated
@@ -57,19 +59,22 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision {
this(
entity.by(),
entity.locY(),
- entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR,
- entity instanceof EntityLiving ? ((EntityLiving) entity)::a : (fluidtype) -> false
+ null, //entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR, // Airplane - lazy
+ null //entity instanceof EntityLiving ? ((EntityLiving) entity)::a : (fluidtype) -> false
);
+ this.entity = entity;
// Airplane end
}
@Override
public boolean a(Item item) {
+ if (this.d == null) this.d = this.entity instanceof EntityLiving ? ((EntityLiving) this.entity).getItemInMainHand().getItem() : Items.AIR; // Airplane
return this.d == item;
}
@Override
public boolean a(Fluid fluid, FluidTypeFlowing fluidtypeflowing) {
+ if (this.e == null) return this.entity instanceof EntityLiving && ((EntityLiving) this.entity).a(fluidtypeflowing); // Airplane
return this.e.test(fluidtypeflowing) && !fluid.getType().a((FluidType) fluidtypeflowing);
}

View File

@ -0,0 +1,101 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Sun, 9 May 2021 19:32:29 -0500
Subject: [PATCH] Use list for fast iteration over pathfinder goals
diff --git a/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java b/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java
new file mode 100644
index 0000000000000000000000000000000000000000..36eea0acd815e08e0be10bf55541ea0bb605b8f5
--- /dev/null
+++ b/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java
@@ -0,0 +1,35 @@
+package gg.airplane.structs;
+
+import java.util.AbstractSet;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/*
+ * Used when you want fast iteration more than fast contain/remove
+ */
+public class LinkedHashSetArrayList<E> extends AbstractSet<E> {
+ private final List<E> internal = new ArrayList<>();
+
+ @Override
+ public boolean add(E e) {
+ if (this.internal.contains(e)) {
+ return false;
+ }
+ return this.internal.add(e);
+ }
+
+ @Override
+ public Iterator<E> iterator() {
+ return this.internal.iterator();
+ }
+
+ public E get(int index) {
+ return this.internal.get(index);
+ }
+
+ @Override
+ public int size() {
+ return this.internal.size();
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
index 02e8288473138dcea008d6157318758e8d7ee3be..697e666a027d5e2ace7d0758909be5a658c480d2 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java
@@ -28,7 +28,7 @@ public class PathfinderGoalSelector {
}
};
private final Map<PathfinderGoal.Type, PathfinderGoalWrapped> c = new EnumMap(PathfinderGoal.Type.class);
- private final Set<PathfinderGoalWrapped> d = Sets.newLinkedHashSet(); public final Set<PathfinderGoalWrapped> getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public
+ private final gg.airplane.structs.LinkedHashSetArrayList<PathfinderGoalWrapped> d = new gg.airplane.structs.LinkedHashSetArrayList<>(); public final Set<PathfinderGoalWrapped> getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public // Airplane - it's a set, but it's an arraylist
private final Supplier<GameProfilerFiller> e;
private final EnumSet<PathfinderGoal.Type> f = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
private final OptimizedSmallEnumSet<PathfinderGoal.Type> goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector
@@ -85,8 +85,11 @@ public class PathfinderGoalSelector {
gameprofilerfiller.enter("goalCleanup");
// Paper start - remove streams from pathfindergoalselector
- for (Iterator<PathfinderGoalWrapped> iterator = this.d.iterator(); iterator.hasNext();) {
- PathfinderGoalWrapped wrappedGoal = iterator.next();
+ // Airplane start - remove iterators from pathfindergoalselector
+ //for (Iterator<PathfinderGoalWrapped> iterator = this.d.iterator(); iterator.hasNext();) {
+ // PathfinderGoalWrapped wrappedGoal = iterator.next();
+ for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) {
+ PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex);
if (!wrappedGoal.g()) {
continue;
}
@@ -105,8 +108,10 @@ public class PathfinderGoalSelector {
gameprofilerfiller.exit();
gameprofilerfiller.enter("goalUpdate");
// Paper start - remove streams from pathfindergoalselector
- goal_update_loop: for (Iterator<PathfinderGoalWrapped> iterator = this.d.iterator(); iterator.hasNext();) {
- PathfinderGoalWrapped wrappedGoal = iterator.next();
+ // Airplane start - remove iterators from pathfindergoalselector
+ goal_update_loop: for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { //for (Iterator<PathfinderGoalWrapped> iterator = this.d.iterator(); iterator.hasNext();) {
+ PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex);
+ // Airplane end
if (wrappedGoal.g()) {
continue;
}
@@ -149,8 +154,11 @@ public class PathfinderGoalSelector {
gameprofilerfiller.exit();
gameprofilerfiller.enter("goalTick");
// Paper start - remove streams from pathfindergoalselector
- for (Iterator<PathfinderGoalWrapped> iterator = this.d.iterator(); iterator.hasNext();) {
- PathfinderGoalWrapped wrappedGoal = iterator.next();
+ // Airplane start - remove iterators from pathfindergoalselector
+ //for (Iterator<PathfinderGoalWrapped> iterator = this.d.iterator(); iterator.hasNext();) {
+ // PathfinderGoalWrapped wrappedGoal = iterator.next();
+ for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex);
+ // Airplane end
if (wrappedGoal.g()) {
wrappedGoal.e();
}

View File

@ -0,0 +1,510 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Wed, 19 May 2021 13:08:26 -0500
Subject: [PATCH] Improve container checking with a bitset
diff --git a/src/main/java/gg/airplane/structs/ItemListWithBitset.java b/src/main/java/gg/airplane/structs/ItemListWithBitset.java
new file mode 100644
index 0000000000000000000000000000000000000000..bd3b58cb1a48da2f5259b0c64290b2be2ff1fdf7
--- /dev/null
+++ b/src/main/java/gg/airplane/structs/ItemListWithBitset.java
@@ -0,0 +1,105 @@
+package gg.airplane.structs;
+
+import net.minecraft.core.NonNullList;
+import net.minecraft.world.item.ItemStack;
+import org.apache.commons.lang.Validate;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.Arrays;
+
+public class ItemListWithBitset extends NonNullList<ItemStack> {
+ public static ItemListWithBitset fromNonNullList(NonNullList<ItemStack> list) {
+ if (list instanceof ItemListWithBitset) {
+ return (ItemListWithBitset) list;
+ }
+ return new ItemListWithBitset(list);
+ }
+
+ private static ItemStack[] createArray(int size) {
+ ItemStack[] array = new ItemStack[size];
+ Arrays.fill(array, ItemStack.NULL_ITEM);
+ return array;
+ }
+
+ private final ItemStack[] items;
+
+ private int bitSet = 0;
+ private final int allBits;
+
+ private ItemListWithBitset(NonNullList<ItemStack> list) {
+ this(list.size());
+
+ for (int i = 0; i < list.size(); i++) {
+ this.set(i, list.get(i));
+ }
+ }
+
+ public ItemListWithBitset(int size) {
+ super(null, ItemStack.NULL_ITEM);
+
+ Validate.isTrue(size < Integer.BYTES * 8, "size is too large");
+
+ this.items = createArray(size);
+ this.allBits = ((1 << size) - 1);
+ }
+
+ public boolean isCompletelyEmpty() {
+ return this.bitSet == 0;
+ }
+
+ public boolean hasFullStacks() {
+ return (this.bitSet & this.allBits) == allBits;
+ }
+
+ @Override
+ public ItemStack set(int index, ItemStack itemStack) {
+ ItemStack existing = this.items[index];
+
+ this.items[index] = itemStack;
+
+ if (itemStack == ItemStack.NULL_ITEM) {
+ this.bitSet &= ~(1 << index);
+ } else {
+ this.bitSet |= 1 << index;
+ }
+
+ return existing;
+ }
+
+ @NotNull
+ @Override
+ public ItemStack get(int var0) {
+ return this.items[var0];
+ }
+
+ @Override
+ public int size() {
+ return this.items.length;
+ }
+
+ @Override
+ public void clear() {
+ Arrays.fill(this.items, ItemStack.NULL_ITEM);
+ }
+
+ // these are unsupported for block inventories which have a static size
+ @Override
+ public void add(int var0, ItemStack var1) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ItemStack remove(int var0) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String toString() {
+ return "ItemListWithBitset{" +
+ "items=" + Arrays.toString(items) +
+ ", bitSet=" + Long.toString(bitSet, 2) +
+ ", allBits=" + Long.toString(allBits, 2) +
+ ", size=" + this.items.length +
+ '}';
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 39b978c6e61e675249743d082699bb9882fd39ff..b11af463045bbd3bab8d269fde34071ca5f026af 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -846,6 +846,22 @@ public class WorldServer extends World implements GeneratorAccessSeed {
return result;
}
+ // Airplane start - skip type lookup if already completed, but still run check
+ public TileEntity getAndCheckTileEntity(IBlockData data, BlockPosition pos) {
+ TileEntity result = super.getTileEntity(pos, false);
+ Block type = data.getBlock();
+
+ // copied from above
+ if (result != null && type != Blocks.AIR) {
+ if (!result.getTileType().isValidBlock(type)) {
+ result = fixTileEntity(pos, type, result);
+ }
+ }
+
+ return result;
+ }
+ // Airplane end
+
private TileEntity fixTileEntity(BlockPosition pos, Block type, TileEntity found) {
this.getServer().getLogger().log(Level.SEVERE, "Block at {0}, {1}, {2} is {3} but has {4}" + ". "
+ "Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.", new Object[]{pos.getX(), pos.getY(), pos.getZ(), type, found});
diff --git a/src/main/java/net/minecraft/world/IInventory.java b/src/main/java/net/minecraft/world/IInventory.java
index 774ba6a923f7e329f6af5efc17e1c46e87ed2d77..8faf3850f4c965feec42f6998563b7265a8f599e 100644
--- a/src/main/java/net/minecraft/world/IInventory.java
+++ b/src/main/java/net/minecraft/world/IInventory.java
@@ -1,6 +1,8 @@
package net.minecraft.world;
import java.util.Set;
+
+import net.minecraft.core.EnumDirection; // Airplane
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
@@ -18,6 +20,70 @@ public interface IInventory extends Clearable {
ItemStack getItem(int i);
+ // Airplane start - allow the inventory to override and optimize these frequent calls
+ default boolean hasEmptySlot(EnumDirection enumdirection) { // there is a slot with 0 items in it
+ if (this instanceof IWorldInventory) {
+ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) {
+ if (this.getHopperItem(i).isEmpty()) {
+ return true;
+ }
+ }
+ } else {
+ int size = this.getSize();
+ for (int i = 0; i < size; i++) {
+ if (this.getHopperItem(i).isEmpty()) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ default boolean isCompletelyFull(EnumDirection enumdirection) { // every stack is maxed
+ if (this instanceof IWorldInventory) {
+ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) {
+ ItemStack itemStack = this.getHopperItem(i);
+ if (itemStack.getCount() < itemStack.getMaxStackSize()) {
+ return false;
+ }
+ }
+ } else {
+ int size = this.getSize();
+ for (int i = 0; i < size; i++) {
+ ItemStack itemStack = this.getHopperItem(i);
+ if (itemStack.getCount() < itemStack.getMaxStackSize()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ default boolean isCompletelyEmpty(EnumDirection enumdirection) {
+ if (this instanceof IWorldInventory) {
+ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) {
+ if (!this.getHopperItem(i).isEmpty()) {
+ return false;
+ }
+ }
+ } else {
+ int size = this.getSize();
+ for (int i = 0; i < size; i++) {
+ if (!this.getHopperItem(i).isEmpty()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+ // Airplane end
+
+ // Airplane start - way for inventories to know it's a hopper, skipping certain steps
+ default ItemStack getHopperItem(int index) {
+ return this.getItem(index);
+ }
+ // Airplane end
+
ItemStack splitStack(int i, int j);
ItemStack splitWithoutUpdate(int i);
diff --git a/src/main/java/net/minecraft/world/InventoryLargeChest.java b/src/main/java/net/minecraft/world/InventoryLargeChest.java
index 92818df3689e35b921eb04678c84d2dd4b21ddbe..f6b723062a9cd0667efcc0171df71e9df93def06 100644
--- a/src/main/java/net/minecraft/world/InventoryLargeChest.java
+++ b/src/main/java/net/minecraft/world/InventoryLargeChest.java
@@ -1,5 +1,6 @@
package net.minecraft.world;
+import net.minecraft.core.EnumDirection; // Airplane
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.item.ItemStack;
@@ -91,6 +92,30 @@ public class InventoryLargeChest implements IInventory {
return i >= this.left.getSize() ? this.right.getItem(i - this.left.getSize()) : this.left.getItem(i);
}
+ // Airplane start
+ @Override
+ public boolean hasEmptySlot(EnumDirection enumdirection) {
+ return this.left.hasEmptySlot(null) || this.right.hasEmptySlot(null);
+ }
+
+ @Override
+ public boolean isCompletelyFull(EnumDirection enumdirection) {
+ return this.left.isCompletelyFull(null) && this.right.isCompletelyFull(null);
+ }
+
+ @Override
+ public boolean isCompletelyEmpty(EnumDirection enumdirection) {
+ return this.left.isCompletelyEmpty(null) && this.right.isCompletelyEmpty(null);
+ }
+ // Airplane end
+
+ // Airplane start
+ @Override
+ public ItemStack getHopperItem(int i) {
+ return i >= this.left.getSize() ? this.right.getHopperItem(i - this.left.getSize()) : this.left.getHopperItem(i);
+ }
+ // Airplane end
+
@Override
public ItemStack splitStack(int i, int j) {
return i >= this.left.getSize() ? this.right.splitStack(i - this.left.getSize(), j) : this.left.splitStack(i, j);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
index 111f62d0e5b40e945793b8f504f2c035c0884a6a..cfabc9047cd3e972af84700725355d0fe149b221 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java
@@ -36,7 +36,7 @@ import org.bukkit.entity.HumanEntity;
public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable
- private NonNullList<ItemStack> items;
+ private gg.airplane.structs.ItemListWithBitset items; // Airplane
protected float a;
protected float b;
public int viewingCount;
@@ -75,9 +75,31 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
protected TileEntityChest(TileEntityTypes<?> tileentitytypes) {
super(tileentitytypes);
+ // Airplane start
+ /*
this.items = NonNullList.a(27, ItemStack.b);
+ */
+ this.items = new gg.airplane.structs.ItemListWithBitset(27);
+ // Airplane end
}
+ // Airplane start
+ @Override
+ public boolean hasEmptySlot(EnumDirection enumdirection) {
+ return !this.items.hasFullStacks();
+ }
+
+ @Override
+ public boolean isCompletelyFull(EnumDirection enumdirection) {
+ return this.items.hasFullStacks() && super.isCompletelyFull(enumdirection);
+ }
+
+ @Override
+ public boolean isCompletelyEmpty(EnumDirection enumdirection) {
+ return this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection);
+ }
+ // Airplane end
+
public TileEntityChest() {
this(TileEntityTypes.CHEST);
}
@@ -95,7 +117,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
@Override
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
super.load(iblockdata, nbttagcompound);
- this.items = NonNullList.a(this.getSize(), ItemStack.b);
+ this.items = new gg.airplane.structs.ItemListWithBitset(this.getSize()); // Airplane
if (!this.b(nbttagcompound)) {
ContainerUtil.b(nbttagcompound, this.items);
}
@@ -295,7 +317,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
@Override
protected void a(NonNullList<ItemStack> nonnulllist) {
- this.items = nonnulllist;
+ this.items = gg.airplane.structs.ItemListWithBitset.fromNonNullList(nonnulllist); // Airplane
}
public static int a(IBlockAccess iblockaccess, BlockPosition blockposition) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
index 537dc52e5ff3325555ee6049bc7f277952983b76..056d280c7db6fc532d83b2a547d6a01402a49bd0 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
@@ -46,7 +46,7 @@ import org.bukkit.inventory.Inventory;
public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable {
- private NonNullList<ItemStack> items;
+ private gg.airplane.structs.ItemListWithBitset items; // Airplane
private int j;
private long k;
@@ -82,14 +82,31 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
public TileEntityHopper() {
super(TileEntityTypes.HOPPER);
- this.items = NonNullList.a(5, ItemStack.b);
+ this.items = new gg.airplane.structs.ItemListWithBitset(5); // Airplane
this.j = -1;
}
+ // Airplane start
+ @Override
+ public boolean hasEmptySlot(EnumDirection enumdirection) {
+ return !this.items.hasFullStacks();
+ }
+
+ @Override
+ public boolean isCompletelyFull(EnumDirection enumdirection) {
+ return this.items.hasFullStacks() && super.isCompletelyFull(enumdirection);
+ }
+
+ @Override
+ public boolean isCompletelyEmpty(EnumDirection enumdirection) {
+ return this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection);
+ }
+ // Airplane end
+
@Override
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
super.load(iblockdata, nbttagcompound);
- this.items = NonNullList.a(this.getSize(), ItemStack.b);
+ this.items = new gg.airplane.structs.ItemListWithBitset(this.getSize()); // Airplane
if (!this.b(nbttagcompound)) {
ContainerUtil.b(nbttagcompound, this.items);
}
@@ -181,16 +198,19 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
}
private boolean j() {
- Iterator iterator = this.items.iterator();
+ // Airplane start - no iterator
+ //Iterator iterator = this.items.iterator();
+ int i = 0;
ItemStack itemstack;
do {
- if (!iterator.hasNext()) {
+ if (i >= this.items.size()) {
return true;
}
- itemstack = (ItemStack) iterator.next();
+ itemstack = (ItemStack) this.items.get(i++);
+ // Airplane end
} while (!itemstack.isEmpty() && itemstack.getCount() == itemstack.getMaxStackSize());
return false;
@@ -205,7 +225,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
skipPushModeEventFire = skipHopperEvents;
boolean foundItem = false;
for (int i = 0; i < this.getSize(); ++i) {
- ItemStack item = this.getItem(i);
+ ItemStack item = this.getHopperItem(i); // Airplane
if (!item.isEmpty()) {
foundItem = true;
ItemStack origItemStack = item;
@@ -429,14 +449,14 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
private static boolean anyMatch(IInventory iinventory, EnumDirection enumdirection, java.util.function.BiPredicate<ItemStack, Integer> test) {
if (iinventory instanceof IWorldInventory) {
for (int i : ((IWorldInventory) iinventory).getSlotsForFace(enumdirection)) {
- if (test.test(iinventory.getItem(i), i)) {
+ if (test.test(iinventory.getHopperItem(i), i)) { // Airplane
return true;
}
}
} else {
int size = iinventory.getSize();
for (int i = 0; i < size; i++) {
- if (test.test(iinventory.getItem(i), i)) {
+ if (test.test(iinventory.getHopperItem(i), i)) { // Airplane
return true;
}
}
@@ -450,12 +470,22 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
private boolean b(IInventory iinventory, EnumDirection enumdirection) {
// Paper start - no streams
+ // Airplane start - use direct method
+ /*
return allMatch(iinventory, enumdirection, STACK_SIZE_TEST);
+ */
+ return iinventory.isCompletelyFull(enumdirection);
+ // Airplane end
// Paper end
}
private static boolean c(IInventory iinventory, EnumDirection enumdirection) {
+ // Airplane start - use direct method
+ /*
return allMatch(iinventory, enumdirection, IS_EMPTY_TEST);
+ */
+ return iinventory.isCompletelyEmpty(enumdirection);
+ // Airplane end
}
public static boolean a(IHopper ihopper) {
@@ -594,7 +624,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
if (a(iinventory1, itemstack, i, enumdirection)) {
boolean flag = false;
- boolean flag1 = iinventory1.isEmpty();
+ boolean flag1 = iinventory1.isCompletelyEmpty(enumdirection); // Airplane
if (itemstack1.isEmpty()) {
IGNORE_TILE_UPDATES = true; // Paper
@@ -677,7 +707,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
if (block instanceof IInventoryHolder) {
object = ((IInventoryHolder) block).a(iblockdata, world, blockposition);
} else if (block.isTileEntity()) {
- TileEntity tileentity = world.getTileEntity(blockposition);
+ TileEntity tileentity = ((net.minecraft.server.level.WorldServer) world).getAndCheckTileEntity(iblockdata, blockposition); // Airplane - skip validation check, since we already looked it up
if (tileentity instanceof IInventory) {
object = (IInventory) tileentity;
@@ -736,7 +766,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@Override
protected void a(NonNullList<ItemStack> nonnulllist) {
- this.items = nonnulllist;
+ this.items = gg.airplane.structs.ItemListWithBitset.fromNonNullList(nonnulllist); // Airplane
}
public void a(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
index f0da819627035bed83561128a11059424d2b7e30..36ef5b11f12da1a7e3c8031ec84d28ba22d59a5c 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
@@ -98,7 +98,11 @@ public abstract class TileEntityLootable extends TileEntityContainer {
public boolean isEmpty() {
this.d((EntityHuman) null);
// Paper start
- for (ItemStack itemStack : this.f()) {
+ // Airplane start - don't use abstract iterator
+ java.util.List<ItemStack> list = this.f();
+ for (int i = 0, size = list.size(); i < size; i++) {
+ ItemStack itemStack = list.get(i);
+ // Airplane end
if (!itemStack.isEmpty()) {
return false;
}
@@ -107,6 +111,13 @@ public abstract class TileEntityLootable extends TileEntityContainer {
return true;
}
+ // Airplane start - skip loot check for hoppers
+ @Override
+ public final ItemStack getHopperItem(int index) {
+ return this.f().get(index);
+ }
+ // Airplane end
+
@Override
public ItemStack getItem(int i) {
if (i == 0) this.d((EntityHuman) null); // Paper

View File

@ -0,0 +1,76 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Wed, 19 May 2021 20:36:24 -0500
Subject: [PATCH] Use raw iterator where possible
diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
index 207a9c3928aad7c6e89a120b54d87e003ebd232c..06864951af539e22f6e459c0f0c097b7c2fb929b 100644
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
@@ -1033,10 +1033,12 @@ public class ChunkProviderServer extends IChunkProvider {
//Collections.shuffle(list); // Paper
// Paper - moved up
// Tuinity start - optimise chunk tick iteration
- com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.entityTickingChunks.iterator();
+ // Airplane start - use raw iterator
+ //com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.entityTickingChunks.iterator();
+ int iterator = this.entityTickingChunks.createRawIterator();
try {
- while (iterator.hasNext()) {
- Chunk chunk = iterator.next();
+ while (iterator != -1) {
+ Chunk chunk = this.entityTickingChunks.rawGet(iterator);
PlayerChunk playerchunk = chunk.playerChunk;
if (playerchunk != null) { // make sure load event has been called along with the load logic we put there
// Tuinity end - optimise chunk tick iteration
@@ -1064,10 +1066,12 @@ public class ChunkProviderServer extends IChunkProvider {
}
}
}
+ iterator = this.entityTickingChunks.advanceRawIterator(iterator);
} // Tuinity start - optimise chunk tick iteration
} finally {
- iterator.finishedIterating();
+ this.entityTickingChunks.finishRawIterator();
}
+ // Airplane end
// Tuinity end - optimise chunk tick iteration
this.world.getMethodProfiler().enter("customSpawners");
if (flag1) {
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
index 33429be7da4d4c2b2469b8140e46e66d9921652c..38919488ce5917a751605c4ddcf0296ff0340b91 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
@@ -2170,10 +2170,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final void processTrackQueue() {
this.world.timings.tracker1.startTiming();
try {
- com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
+ // Airplane start - raw iterator
+ //com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
+ com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet<Chunk> chunks = this.world.getChunkProvider().entityTickingChunks;
+ int iterator = chunks.createRawIterator();
try {
- while (iterator.hasNext()) {
- Chunk chunk = iterator.next();
+ while (iterator != -1) {
+ Chunk chunk = chunks.rawGet(iterator);
Entity[] entities = chunk.entities.getRawData();
for (int i = 0, len = chunk.entities.size(); i < len; ++i) {
Entity entity = entities[i];
@@ -2183,10 +2186,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
tracker.trackerEntry.tick();
}
}
+
+ iterator = chunks.advanceRawIterator(iterator);
}
} finally {
- iterator.finishedIterating();
+ chunks.finishRawIterator();
}
+ // Airplane end
} finally {
this.world.timings.tracker1.stopTiming();
}

View File

@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Thu, 20 May 2021 12:05:47 -0500
Subject: [PATCH] Better checking for useless move packets
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..6aad662d823e0a64b8e18156b5f084399bc4f228 100644
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
@@ -186,6 +186,7 @@ public class EntityTrackerEntry {
boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L;
if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.isOnGround() && !(com.tuinity.tuinity.config.TuinityConfig.sendFullPosForHardCollidingEntities && this.tracker.hardCollides())) { // Tuinity - send full pos for hard colliding entities to prevent collision problems due to desync
+ if (flag2 || flag3 || this.tracker instanceof EntityArrow) { // Airplane
if ((!flag2 || !flag3) && !(this.tracker instanceof EntityArrow)) {
if (flag2) {
packet1 = new PacketPlayOutEntity.PacketPlayOutRelEntityMove(this.tracker.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.tracker.isOnGround());
@@ -195,6 +196,7 @@ public class EntityTrackerEntry {
} else {
packet1 = new PacketPlayOutEntity.PacketPlayOutRelEntityMoveLook(this.tracker.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.tracker.isOnGround());
}
+ } // Airplane
} else {
this.r = this.tracker.isOnGround();
this.o = 0;

View File

@ -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 137c52999666ea331ac52c230f0674d489a95524..7bba8508c22233ac524d782d159d97f6609748af 100644
index 61603bda0d1e305679ab2463188c3f6cf9c8c18d..dd2f3d79693710ddb3c1d34dffdc7925260e5de5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1450,6 +1450,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1453,6 +1453,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
//} // Paper
this.methodProfiler.enter("snooper");
@ -17,7 +17,7 @@ index 137c52999666ea331ac52c230f0674d489a95524..7bba8508c22233ac524d782d159d97f6
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
this.snooper.a();
}
@@ -1457,6 +1459,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1460,6 +1462,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && this.ticks % 6000 == 0) { // Spigot
this.snooper.b();
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Swaps the predicate order of collision
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 96c876960a1a8a5534802cba3ed30d0f71aee71e..eb04ed1d97deb075cc4dee22101d80755cba2c04 100644
index 4f0b8d966ba38672a39f95d1f6f55f95cdc8d334..9ad284fd9d8df3dc3302eae0161c483f6a5f594b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1754,8 +1754,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
@@ -1753,8 +1753,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
public void pickup(EntityHuman entityhuman) {}
public void collide(Entity entity) {

View File

@ -1,46 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 24 Apr 2017 20:27:23 -0400
Subject: [PATCH] Add ChatColor.getById
Bukkit has had a map of this for years and it was totally unused...
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
index 499b222dee1f11d497a29a9a263a5596401ca1eb..c6df76ea58f131ed066fa3cbf2808e6e79785743 100644
--- a/src/main/java/org/bukkit/ChatColor.java
+++ b/src/main/java/org/bukkit/ChatColor.java
@@ -263,6 +263,15 @@ public enum ChatColor {
return net.md_5.bungee.api.ChatColor.RESET;
};
+ /**
+ * Gets the numeric ID associated with this color
+ *
+ * @return An int value of this color code
+ */
+ public int getId() {
+ return intCode;
+ }
+
/**
* Gets the char value associated with this color
*
@@ -296,6 +305,18 @@ public enum ChatColor {
return !isFormat && this != RESET;
}
+ /**
+ * Gets the color represented by the specified color ID
+ *
+ * @param id Code to check
+ * @return Associative {@link org.bukkit.ChatColor} with the given id,
+ * or null if it doesn't exist
+ */
+ @Nullable // Yatopia
+ public static ChatColor getById(int id) {
+ return BY_ID.get(id);
+ }
+
/**
* Gets the color represented by the specified color code
*

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't trigger Lootable Refresh for non player interaction
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
index f0da819627035bed83561128a11059424d2b7e30..806a2e1a654bd917f635759725e6d7836b672f7d 100644
index 36ef5b11f12da1a7e3c8031ec84d28ba22d59a5c..316bdfc5c14774336214e83fbd4e6c1f02b94024 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java
@@ -69,6 +69,7 @@ public abstract class TileEntityLootable extends TileEntityContainer {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] dont load chunks for physics
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index ad9ccd07cc9f49c9d5b106b9078a4ed2ae8d3413..1814f9fe3a43b7bd06e920066e3500606708e08c 100644
index e71f76df887681f48702456378be4e9da86fb658..42933a84c1a52316317188107f5bc3a57f7d7727 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -868,7 +868,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -878,7 +878,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) {
@ -19,7 +19,7 @@ index ad9ccd07cc9f49c9d5b106b9078a4ed2ae8d3413..1814f9fe3a43b7bd06e920066e350060
try {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
index 370378b3b153720bf79a3d61d30d3f3d614a5d10..760370c3920b89469a6c79f062777c42726cd59e 100644
index 0990eb8b2e2d8a5f7c1a2640727d86c37a50298e..d894e7f16d232596ec308f3de3ea5da410588cbe 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
@@ -647,7 +647,8 @@ public abstract class BlockBase {

View File

@ -129,10 +129,10 @@ index 0000000000000000000000000000000000000000..fe7330fabe386966c2d203a190a00a78
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 1814f9fe3a43b7bd06e920066e3500606708e08c..e6daeb25aecc1759b505a2ad74a6e32d89597fd8 100644
index 42933a84c1a52316317188107f5bc3a57f7d7727..b38ae7942cb1c99ed3d0046a7b813da428d0867c 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -160,6 +160,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -161,6 +161,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur
@ -141,7 +141,7 @@ index 1814f9fe3a43b7bd06e920066e3500606708e08c..e6daeb25aecc1759b505a2ad74a6e32d
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPosition lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
@@ -291,6 +293,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -301,6 +303,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, final DimensionManager dimensionmanager, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName()); // Spigot
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
@ -150,10 +150,10 @@ index 1814f9fe3a43b7bd06e920066e3500606708e08c..e6daeb25aecc1759b505a2ad74a6e32d
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()), env); // Purpur
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 49214eaab41998781b1d2e519f65075366754fea..da33704efcce38a6c335adec0564cf7f826aa701 100644
index af3c01156a9a5f6f08fff9db67c9c089a321cb29..560020bf1372f68186f78b53502e3d2c145ab098 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -866,6 +866,7 @@ public final class CraftServer implements Server {
@@ -883,6 +883,7 @@ public final class CraftServer implements Server {
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
@ -161,7 +161,7 @@ index 49214eaab41998781b1d2e519f65075366754fea..da33704efcce38a6c335adec0564cf7f
for (WorldServer world : console.getWorlds()) {
world.worldDataServer.setDifficulty(config.difficulty);
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -902,6 +903,7 @@ public final class CraftServer implements Server {
@@ -919,6 +920,7 @@ public final class CraftServer implements Server {
world.paperConfig.init(); // Paper
world.tuinityConfig.init(); // Tuinity - Server Config
world.purpurConfig.init(); // Purpur
@ -170,10 +170,10 @@ index 49214eaab41998781b1d2e519f65075366754fea..da33704efcce38a6c335adec0564cf7f
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 326548230af7f64aabc8cdd1a1c804e734c9e0e0..17d0d0ec4e22ed8b344a2208925a2e9cba5dd58c 100644
index 51cdc7e87413302a73416a5da724d873efb29657..8b344d69b9076e1bf2a5ba310ecf3f8ddd375fdc 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -156,6 +156,14 @@ public class Main {
@@ -162,6 +162,14 @@ public class Main {
.describedAs("Yml file");
// Purpur end
@ -188,7 +188,7 @@ index 326548230af7f64aabc8cdd1a1c804e734c9e0e0..17d0d0ec4e22ed8b344a2208925a2e9c
// Paper start
acceptsAll(asList("server-name"), "Name of the server")
.withRequiredArg()
@@ -288,6 +296,7 @@ public class Main {
@@ -300,6 +308,7 @@ public class Main {
}
// Paper end
System.setProperty( "library.jansi.version", "Paper" ); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Optimize inventory API item handling
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index 40e5a2fae032445467ac453f1fab7e366e911283..0fa7c1c9b5237b098fc7bde5ac7851f3a8208021 100644
index 922a15097bdfe64be657fdf157145d1e882b6a40..fe648a00d834410837c923ab3c15ecc33b808851 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -274,11 +274,13 @@ public class CraftInventory implements Inventory {

View File

@ -5,12 +5,12 @@ Subject: [PATCH] Add option to disable observer clocks
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
index adee28db7c3eecae30b2b05f3eef3fb1bcc1cfbd..bd81abc4dc17491c9c4bb10c2edb4e1ca103c8f8 100644
index fe7330fabe386966c2d203a190a00a785ea21be0..f9762c7f40bbb850d14fb7b0c9ff4f3c09921155 100644
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
@@ -118,6 +118,11 @@ public final class OrigamiConfig {
tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
@@ -112,6 +112,11 @@ public final class OrigamiConfig {
config.addDefault("worlds.default." + path, Double.valueOf(dfl));
return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl));
}
+
+ public boolean disableObserverClocks = false;

View File

@ -1,262 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv>
Date: Tue, 24 Mar 2020 17:40:50 +0100
Subject: [PATCH] Hopper Optimizations
- Don't tick empty hoppers: This avoids ticking hoppers that are only used to transport items in a
chain.
- Add config option to increase the full hopper cooldown
- Only set check cooldown if it's bigger than already set cooldown
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
index fe7330fabe386966c2d203a190a00a785ea21be0..adee28db7c3eecae30b2b05f3eef3fb1bcc1cfbd 100644
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
@@ -112,6 +112,12 @@ public final class OrigamiConfig {
config.addDefault("worlds.default." + path, Double.valueOf(dfl));
return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl));
}
+ public boolean tickEmptyHoppers = false;
+ public int fullHopperCooldown = 128;
+ private void hopperOptimizations() {
+ tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers);
+ fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown);
+ }
}
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/world/entity/item/EntityItem.java b/src/main/java/net/minecraft/world/entity/item/EntityItem.java
index 51663e58def93cc38157a99069db86603faf4c0a..e4525a934cc1b189f80fc7eb8aad5b6d326e05fd 100644
--- a/src/main/java/net/minecraft/world/entity/item/EntityItem.java
+++ b/src/main/java/net/minecraft/world/entity/item/EntityItem.java
@@ -168,6 +168,13 @@ public class EntityItem extends Entity {
}
}
+ // Origami start - don't tick empty hoppers
+ if (!world.origamiConfig.tickEmptyHoppers && locY() >= 1 && (this.age < 10 || this.age > this.getDespawnRate() - 10
+ || (int) locX() != (int) lastX || (int) locZ() != (int) lastZ || (int) locY() != (int) lastY)) {
+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(world.getTileEntity(new BlockPosition(locX(), locY() - 1, locZ())), 0);
+ }
+ // Origami end
+
if (!this.world.isClientSide && this.age >= this.getDespawnRate()) { // Spigot // Paper
// CraftBukkit start - fire ItemDespawnEvent
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
index 0166d11cb540a536390f486e1069d6119d8d23d6..b688ff6534e069bc631e2cb84bb1deb3e4f1914a 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
@@ -164,7 +164,6 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
if (!itemstack.isEmpty() && itemstack.getCount() > this.getMaxStackSize()) {
itemstack.setCount(this.getMaxStackSize());
}
-
}
@Override
@@ -178,7 +177,25 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
}
@Override
- public void update() {}
+ public void update() {
+ // Origami start - don't tick empty hoppers
+ checkHopperBelow();
+ }
+
+ @Override
+ public void tick() {
+ super.tick();
+ if (locY() >= 1 && ((int) locX() != (int) lastX || (int) locZ() != (int) lastZ || (int) locY() != (int) lastY)) {
+ checkHopperBelow();
+ }
+ }
+
+ private void checkHopperBelow() {
+ if (!world.origamiConfig.tickEmptyHoppers && !this.isEmpty()) {
+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(world.getTileEntity(new net.minecraft.core.BlockPosition(locX(), locY() - 1, locZ())), 0);
+ }
+ }
+ // Origami end
@Override
public boolean a(EntityHuman entityhuman) {
diff --git a/src/main/java/net/minecraft/world/level/block/BlockComposter.java b/src/main/java/net/minecraft/world/level/block/BlockComposter.java
index c0b235d5edf3cd14021696d1b4f76ce3de41f5d5..802139cf4e15191be0e4afddda12a01079e9ce35 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockComposter.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockComposter.java
@@ -23,6 +23,7 @@ import net.minecraft.world.level.GeneratorAccess;
import net.minecraft.world.level.IBlockAccess;
import net.minecraft.world.level.IMaterial;
import net.minecraft.world.level.World;
+import net.minecraft.world.level.block.entity.TileEntityHopper;
import net.minecraft.world.level.block.state.BlockBase;
import net.minecraft.world.level.block.state.BlockStateList;
import net.minecraft.world.level.block.state.IBlockData;
@@ -302,6 +303,7 @@ public class BlockComposter extends Block implements IInventoryHolder {
if ((Integer) iblockdata.get(BlockComposter.a) == 7) {
worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockComposter.a), 3);
worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.BLOCK_COMPOSTER_READY, SoundCategory.BLOCKS, 1.0F, 1.0F);
+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(worldserver.getTileEntity(new BlockPosition(blockposition.getX(), blockposition.getY() - 1, blockposition.getZ())), 0); // Origami - don't tick empty hoppers
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
index fb7a1a854efcf42f0351ef521aff67d5fcc4ab27..96dfe05ed57f7e2c3dac3a784ae3445ad9975c40 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java
@@ -98,4 +98,14 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento
return new org.bukkit.Location(world.getWorld(), position.getX(), position.getY(), position.getZ());
}
// CraftBukkit end
+
+ // Origami start - don't tick empty hoppers
+ @Override
+ public void update() {
+ super.update();
+ if (world != null && !world.origamiConfig.tickEmptyHoppers) {
+ TileEntityHopper.enableTicking(world.getTileEntity(position.shift(net.minecraft.core.EnumDirection.DOWN)), world.spigotConfig.hopperCheck);
+ }
+ }
+ // Origami end
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
index 537dc52e5ff3325555ee6049bc7f277952983b76..a859e12571ceff2199842e03df77b21ee9d689f2 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java
@@ -47,8 +47,9 @@ import org.bukkit.inventory.Inventory;
public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable {
private NonNullList<ItemStack> items;
- private int j;
+ private int j; public int getCooldown() { return this.j; } // Origami - OBFHELPER
private long k;
+ public boolean shouldTick = true; // Origami - don't tick empty hoppers
// CraftBukkit start - add fields and methods
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
@@ -126,7 +127,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
if (itemstack.getCount() > this.getMaxStackSize()) {
itemstack.setCount(this.getMaxStackSize());
}
-
+ shouldTick = true; // Origami - don't tick empty hoppers
}
@Override
@@ -136,7 +137,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@Override
public void tick() {
- if (this.world != null && !this.world.isClientSide) {
+ if (this.world != null && !this.world.isClientSide && (shouldTick || world.origamiConfig.tickEmptyHoppers)) { // Origami - don't tick empty hoppers
--this.j;
this.k = this.world.getTime();
if (!this.m()) {
@@ -145,7 +146,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
boolean result = this.a(() -> {
return a((IHopper) this);
});
- if (!result && this.world.spigotConfig.hopperCheck > 1) {
+ if (!result && this.world.spigotConfig.hopperCheck > 1 && this.world.spigotConfig.hopperCheck > this.getCooldown()) { // Origami - only set check cooldown if it's bigger than already set one
this.setCooldown(this.world.spigotConfig.hopperCheck);
}
// Spigot end
@@ -154,6 +155,26 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
}
}
+ // Origami start - don't tick empty hoppers
+ @Override
+ public void update() {
+ shouldTick = true;
+ super.update();
+ }
+
+ public static void enableTicking(TileEntity tileEntity, int cooldown) {
+ if (tileEntity instanceof TileEntityHopper) {
+ if (!((TileEntityHopper) tileEntity).shouldTick) {
+ if (((TileEntityHopper) tileEntity).getCooldown() > cooldown && tileEntity.getBlock().get(BlockHopper.ENABLED)) {
+ // Force the hopper to update if it is enabled and didn't tick/decrease cooldown before
+ ((TileEntityHopper) tileEntity).setCooldown(cooldown);
+ }
+ ((TileEntityHopper) tileEntity).shouldTick = true;
+ }
+ }
+ }
+ // Origami end
+
private boolean a(Supplier<Boolean> supplier) {
if (this.world != null && !this.world.isClientSide) {
if (!this.m() && (Boolean) this.getBlock().get(BlockHopper.ENABLED)) {
@@ -161,6 +182,10 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
if (!this.isEmpty()) {
flag = this.k();
+ // Origami - don't tick empty hoppers
+ } else {
+ shouldTick = world.origamiConfig.tickEmptyHoppers;
+ // Origami end
}
if (!this.j()) {
@@ -240,7 +265,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
}
}
if (foundItem && world.paperConfig.cooldownHopperWhenFull) { // Inventory was full - cooldown
- this.setCooldown(world.spigotConfig.hopperTransfer);
+ this.setCooldown(world.origamiConfig.fullHopperCooldown > -1 ? world.origamiConfig.fullHopperCooldown : world.spigotConfig.hopperTransfer); // Origami - full hopper cooldown config
}
return false;
}
@@ -280,7 +305,13 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
origItemStack.setCount(origCount);
if (world.paperConfig.cooldownHopperWhenFull) {
- cooldownHopper(ihopper);
+ // Origami start - full hopper cooldown config
+ if (ihopper instanceof TileEntityHopper) {
+ ((TileEntityHopper) ihopper).setCooldown(world.origamiConfig.fullHopperCooldown > -1 ? world.origamiConfig.fullHopperCooldown : world.spigotConfig.hopperTransfer);
+ } else if (ihopper instanceof EntityMinecartHopper) {
+ ((EntityMinecartHopper) ihopper).setCooldown(world.spigotConfig.hopperTransfer / 2);
+ }
+ // Origami end - full hopper cooldown config
}
return false;
@@ -488,6 +519,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
entityitem = (EntityItem) iterator.next();
} while (!a((IInventory) ihopper, entityitem));
+ if (ihopper instanceof TileEntityHopper) ((TileEntityHopper) ihopper).shouldTick = true; // Origami - don't tick empty hoppers
return true;
}
}
@@ -576,7 +608,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
itemstack = a(iinventory, iinventory1, itemstack, k, enumdirection);
}
}
-
+ if (iinventory1 instanceof TileEntityHopper) ((TileEntityHopper) iinventory1).shouldTick = true; // Origami - don't tick empty hoppers
return itemstack;
}
@@ -717,7 +749,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
return (double) this.position.getZ() + 0.5D;
}
- private void setCooldown(int i) {
+ public void setCooldown(int i) { // Origami - make public
this.j = i;
}
@@ -744,6 +776,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
BlockPosition blockposition = this.getPosition();
if (VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), this.aa_(), OperatorBoolean.AND)) {
+ enableTicking(this, 0); // Origami - don't tick empty hoppers
this.a(() -> {
return a((IInventory) this, (EntityItem) entity);
});

View File

@ -5,10 +5,10 @@ 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 89b8840e5cfc0fe0aa023882375c9b83826d1037..255f6b53db10191e8a6a2241d4cb4d6d8cad3a0b 100644
index 9e0c00bf0c1fb41d09de39d2a3831b6bc6658259..02c7110759d6104afb673fe56f4fdbac137644d3 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 {
@@ -1226,9 +1226,12 @@ public abstract class EntityLiving extends Entity {
} else if (damagesource.isFire() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
return false;
} else {
@ -24,7 +24,7 @@ index 89b8840e5cfc0fe0aa023882375c9b83826d1037..255f6b53db10191e8a6a2241d4cb4d6d
this.ticksFarFromPlayer = 0;
float f1 = f;
@@ -1982,6 +1985,11 @@ public abstract class EntityLiving extends Entity {
@@ -1994,6 +1997,11 @@ public abstract class EntityLiving extends Entity {
if (event.isCancelled()) {
return false;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix exp drop of zombie pigmen (MC-56653)
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
index bd81abc4dc17491c9c4bb10c2edb4e1ca103c8f8..e72be36d860630afb879b40bf028c5e456169634 100644
index f9762c7f40bbb850d14fb7b0c9ff4f3c09921155..9a008acd3e6dd5522d163dfbe09c611f6f717d4e 100644
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
@@ -123,6 +123,10 @@ public final class OrigamiConfig {
@@ -117,6 +117,10 @@ public final class OrigamiConfig {
private void observerClock() {
disableObserverClocks = getBoolean("disable-observer-clocks", disableObserverClocks);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Purpur config files
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index b3e7b2a8eaa3980e34bc74a846320b7871dc6e4b..c4aa05ae1fbc67b455f82ca6c08c7706659269ad 100644
index d1a9322cf54f57f0d213145aa50c219f0eb2a90b..1a319e2842f4b99951f1cddce8b2b4be9f5373a0 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1603,6 +1603,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Bring back server name
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..7eab52112a488150636a1457f5d7aba84da6cbf5 100644
index 33f04d57b7df3a6f9743246ba9af6d67f4fa4b54..45c64a9e4f20428a9a448194f22697a17dfb8e1f 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1943,4 +1943,15 @@ public final class Bukkit {
@@ -1951,4 +1951,15 @@ public final class Bukkit {
public static Server.Spigot spigot() {
return server.spigot();
}
@ -25,12 +25,12 @@ index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..7eab52112a488150636a1457f5d7aba8
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index c4aa05ae1fbc67b455f82ca6c08c7706659269ad..ce2909995791f3b334d253afc382baea9e49dd1d 100644
index 1a319e2842f4b99951f1cddce8b2b4be9f5373a0..91641c358b10219d4098f40b53ea56f1cfa5defc 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1719,4 +1719,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -1725,4 +1725,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
io.papermc.paper.datapack.DatapackManager getDatapackManager();
// Paper end
+
+ // Purpur start

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Lagging threshold
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 7eab52112a488150636a1457f5d7aba84da6cbf5..801bef2a060962b5c4f92234401e5bc34a62141a 100644
index 45c64a9e4f20428a9a448194f22697a17dfb8e1f..b3cd3e5288bdcdd928efb8cba97f504d8e3ec58e 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1953,5 +1953,14 @@ public final class Bukkit {
@@ -1961,5 +1961,14 @@ public final class Bukkit {
public static String getServerName() {
return server.getServerName();
}
@ -24,10 +24,10 @@ index 7eab52112a488150636a1457f5d7aba84da6cbf5..801bef2a060962b5c4f92234401e5bc3
// Purpur end
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index ce2909995791f3b334d253afc382baea9e49dd1d..28a1fe3af1546daa779df46468e0ff8ad823f9ca 100644
index 91641c358b10219d4098f40b53ea56f1cfa5defc..f546e3422539d91f1fcb98c94a722c4b17ef0170 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1727,5 +1727,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -1733,5 +1733,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
@NotNull
String getServerName();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] ItemFactory#getMonsterEgg
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index eab52f8615b329a795b3fe3a3719e5687e105061..0c5e488fca4370a18fede705f58bff25f3a7b4cb 100644
index ec7c07564608386c3f7d4322d0af4cbb7d92bc74..39323b3151c733392333858a2dbf1f3f8637341e 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -233,4 +233,15 @@ public interface ItemFactory {
@@ -242,4 +242,15 @@ public interface ItemFactory {
@Deprecated
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
// Paper end

View File

@ -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 9b1c9e60dba9ea3ef8d8e164f13dd76daf57db8e..b04e9de7183f00a9a47c1fce26895c83c8c0cfd8 100644
index e2b3470e3c9a97671723f5a67f722fb86fb07fbf..560b441ef35e507236e683b04f6a774c5949a078 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -8718,4 +8718,40 @@ public enum Material implements Keyed {
@@ -8731,4 +8731,40 @@ public enum Material implements Keyed {
// </editor-fold>
}
}
@ -50,7 +50,7 @@ index 9b1c9e60dba9ea3ef8d8e164f13dd76daf57db8e..b04e9de7183f00a9a47c1fce26895c83
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 3c64c6ef397af102a3e085fe6b77a888d5c3de84..8c6d6399b8562631f391a5a18cbde7ae5ef4a46b 100644
index 3e2c08641edffcf00b230ad624685aaff30af0e5..fceba6780a15c274c4689eccbeb6dfb2eee25ed9 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta;
@ -72,8 +72,8 @@ index 3c64c6ef397af102a3e085fe6b77a888d5c3de84..8c6d6399b8562631f391a5a18cbde7ae
/**
* Represents a stack of items.
@@ -853,4 +865,626 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
return Bukkit.getUnsafe().getItemStackRarity(this);
@@ -914,4 +926,626 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this);
}
// Paper end
+

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Left handed API
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
index d726453c041a980576312b6bee96a07837f37974..9d4eae5cf0bf8d01954db85b431bcdca8490ee8f 100644
index 7d4ce660adb21e579e564796568945ee20f0ca59..4205dc5746dafd966f95103cdd2a1a55e79642f8 100644
--- a/src/main/java/org/bukkit/entity/Mob.java
+++ b/src/main/java/org/bukkit/entity/Mob.java
@@ -64,4 +64,20 @@ public interface Mob extends LivingEntity, Lootable {
@@ -146,4 +146,20 @@ public interface Mob extends LivingEntity, Lootable {
* @return whether the mob is aware
*/
public boolean isAware();

View File

@ -419,37 +419,6 @@ index 5bb677ce585b856b3d3e589e29786a29619c56a7..613f00fa387dcc5af3191e550dea9d4d
public class CachedSizeConcurrentLinkedQueue<E> extends ConcurrentLinkedQueue<E> {
private final LongAdder cachedSize = new LongAdder();
diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
index a0f748957f4472103dd27fc95a711a42de7fae89..c66b49f05be7a9cc26ba595829d7751d38aebeb1 100644
--- a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java
@@ -19,6 +19,11 @@ public final class AsyncChatEvent extends AbstractChatEvent {
}
/**
+ * @param async Async
+ * @param player Player
+ * @param recipients Recipients
+ * @param formatter Formatter
+ * @param message Message
* @deprecated use {@link #AsyncChatEvent(boolean, Player, Set, ChatComposer, Component)}
*/
@Deprecated
diff --git a/src/main/java/io/papermc/paper/event/player/ChatEvent.java b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
index 13c5df5fb8ce1d0203d99e88dd691019146a8f52..558d6531e9c06e25369074932fd9f0ab00e9e2c8 100644
--- a/src/main/java/io/papermc/paper/event/player/ChatEvent.java
+++ b/src/main/java/io/papermc/paper/event/player/ChatEvent.java
@@ -24,6 +24,10 @@ public final class ChatEvent extends AbstractChatEvent {
}
/**
+ * @param player Player
+ * @param recipients Recipients
+ * @param formatter Formatter
+ * @param message Message
* @deprecated use {@link #ChatEvent(Player, Set, ChatComposer, Component)}
*/
@Deprecated
diff --git a/src/main/java/io/papermc/paper/inventory/ItemRarity.java b/src/main/java/io/papermc/paper/inventory/ItemRarity.java
index 74ef8395cc040ce488c2acaa416db20272cc2734..b974627a415cd6897b245275e953cc907a5929d8 100644
--- a/src/main/java/io/papermc/paper/inventory/ItemRarity.java
@ -520,7 +489,7 @@ index 3afd5f5c0208a4ee93b5dbfc2aab2b9d2e8a7544..7838731e0e16bdccfb79e74ceb64148f
/**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 28a1fe3af1546daa779df46468e0ff8ad823f9ca..7a3be414ef9d54d7a852ba92d704011fa7f125ac 100644
index f546e3422539d91f1fcb98c94a722c4b17ef0170..a126581c74da8fae4c86fde2f28a850150c408cd 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1568,6 +1568,9 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@ -534,7 +503,7 @@ index 28a1fe3af1546daa779df46468e0ff8ad823f9ca..7a3be414ef9d54d7a852ba92d704011f
@NotNull
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99a8466306 100644
index 379acee1b5f2d06e6a96f3444783f4a29ca24095..ef3011d74ce9acf02d0ee857033816854134ec0e 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -87,6 +87,8 @@ public interface UnsafeValues {
@ -549,7 +518,7 @@ index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99
@@ -105,6 +107,8 @@ public interface UnsafeValues {
/**
* Return the translation key for the Material, so the client can translate it into the active
* locale when using a TranslatableComponent.
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
+ *
+ * @param mat Material to check
* @return the translation key
@ -558,7 +527,7 @@ index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99
@@ -112,6 +116,8 @@ public interface UnsafeValues {
/**
* Return the translation key for the Block, so the client can translate it into the active
* locale when using a TranslatableComponent.
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
+ *
+ * @param block Block to check
* @return the translation key
@ -566,14 +535,14 @@ index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99
String getTranslationKey(org.bukkit.block.Block block);
@@ -120,6 +126,8 @@ public interface UnsafeValues {
* Return the translation key for the EntityType, so the client can translate it into the active
* locale when using a TranslatableComponent.<br>
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.<br>
* This is <code>null</code>, when the EntityType isn't known to NMS (custom entities)
+ *
+ * @param type EntityType to check
* @return the translation key
*/
String getTranslationKey(org.bukkit.entity.EntityType type);
@@ -128,6 +136,8 @@ public interface UnsafeValues {
@@ -135,6 +143,8 @@ public interface UnsafeValues {
* Creates and returns the next EntityId available.
* <p>
* Use this when sending custom packets, so that there are no collisions on the client or server.
@ -1073,7 +1042,7 @@ index 4623e0d767b343cbdc6fcf20b3b2ff7ff14863cf..ca3f98a8272bab3c9f57f59b077b206c
/**
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 1c367f78eadf24850061a84ce63b950b79d3c435..9021865244a7eacf0477b0db790e0ff41fc8ddfd 100644
index 684477b894e52ff33f9fce2edf76e58c292dd75e..581abc69290ca14b8e64f50fdf5a49c14be13940 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -27,7 +27,9 @@ public interface Skeleton extends Monster, RangedEntity { // Paper
@ -1416,7 +1385,7 @@ index c7b17eabf07b829a02afe7c1f27a5127b6bfea70..d4e2bcf8ce8fc2af851b471490147f00
/**
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 0c5e488fca4370a18fede705f58bff25f3a7b4cb..551bed4f91fe23d36f3299b1b1576546722eb799 100644
index 39323b3151c733392333858a2dbf1f3f8637341e..b2af5217a74266917365c3bf216a780b95c833bd 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -148,6 +148,7 @@ public interface ItemFactory {
@ -1427,7 +1396,7 @@ index 0c5e488fca4370a18fede705f58bff25f3a7b4cb..551bed4f91fe23d36f3299b1b1576546
* @return A hover event
*/
@NotNull
@@ -179,7 +180,7 @@ public interface ItemFactory {
@@ -188,7 +189,7 @@ public interface ItemFactory {
/**
* Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying.
*

View File

@ -17,10 +17,10 @@ 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 5f2d5e12f11b471662943680b2012c99a8466306..7395fe0261da696d1b16c845d244ad5d6957d92a 100644
index ef3011d74ce9acf02d0ee857033816854134ec0e..b2502aaab690b1414a1adffdf64e5a5456feb99c 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -165,4 +165,28 @@ public interface UnsafeValues {
@@ -194,4 +194,28 @@ public interface UnsafeValues {
*/
int getProtocolVersion();
// Paper end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Conflict on change for adventure deprecations
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 801bef2a060962b5c4f92234401e5bc34a62141a..d754200879bda29d582998433e1a304a6988bbbb 100644
index b3cd3e5288bdcdd928efb8cba97f504d8e3ec58e..8036c66af0bc6b11ffd0f716138901bcfea007e1 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -303,7 +303,7 @@ public final class Bukkit {
@ -72,7 +72,7 @@ index 801bef2a060962b5c4f92234401e5bc34a62141a..d754200879bda29d582998433e1a304a
return server.getShutdownMessage();
}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 7a3be414ef9d54d7a852ba92d704011fa7f125ac..0a3acc1aa156900aa2a6a5682ffb8c3dc25e7534 100644
index a126581c74da8fae4c86fde2f28a850150c408cd..0f66655541dbb0dbb05a13a3612bb46cfb2b538a 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -250,7 +250,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@ -370,10 +370,10 @@ index 129eac25da4f27489038fb15ab1aeecb172b60cc..670aca11bbaa2d155cd9d2105ac94c9d
return title;
}
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
index c9af02b0f62b3d18da1e91d1ea02ce0864fc60b9..5e4ade542c79b87a5174e7affb649d818d546362 100644
index 77aefda5aac4602bf5bf71c29600e7450defdd4e..240552d61ae12fbec826f771f0f366500e72d941 100644
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -161,7 +161,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
@@ -179,7 +179,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
* @deprecated in favour of {@link #kickMessage()}
*/
@NotNull
@ -382,7 +382,7 @@ index c9af02b0f62b3d18da1e91d1ea02ce0864fc60b9..5e4ade542c79b87a5174e7affb649d81
public String getKickMessage() {
return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message); // Paper
}
@@ -172,7 +172,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
@@ -190,7 +190,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
* @param message New kick message
* @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)}
*/
@ -391,7 +391,7 @@ index c9af02b0f62b3d18da1e91d1ea02ce0864fc60b9..5e4ade542c79b87a5174e7affb649d81
public void setKickMessage(@NotNull final String message) {
this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper
}
@@ -192,7 +192,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
@@ -210,7 +210,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
* @param message Kick message to display to the user
* @deprecated in favour of {@link #disallow(org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)}
*/

View File

@ -0,0 +1,17 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Thu, 13 May 2021 21:38:01 -0500
Subject: [PATCH] Iron golem poppy calms anger
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 39f77041133228c4bd4cec2427ad0bae8e739d4a..29144c0e325a3efbef05670a6fb2e849bbed6bba 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -214,5 +214,6 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<Drowned> DROWNED_ATTACK_VILLAGER = GoalKey.of(Drowned.class, NamespacedKey.minecraft("drowned_attack_villager"));
GoalKey<Zombie> ZOMBIE_ATTACK_VILLAGER = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_villager"));
GoalKey<Wolf> AVOID_RABID_WOLVES = GoalKey.of(Wolf.class, NamespacedKey.minecraft("avoid_rabid_wolves"));
+ GoalKey<IronGolem> RECEIVE_FLOWER = GoalKey.of(IronGolem.class, NamespacedKey.minecraft("receive_flower"));
// Purpur end
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
diff --git a/pom.xml b/pom.xml
index c917f825378dd16a329105b4e7fcc8882755bc5a..6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0 100644
index efa2ea6b8422f900643eb2f0f65cf067c034cea3..5136762f8e95cb1ea2564b6801703fb6f019fbe1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,8 +39,10 @@
@ -21,7 +21,7 @@ index c917f825378dd16a329105b4e7fcc8882755bc5a..6fe8dad8df109531f2b38fbfcb58b680
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
@@ -182,6 +184,14 @@
@@ -209,6 +211,14 @@
</dependency>
</dependencies>
@ -36,7 +36,7 @@ index c917f825378dd16a329105b4e7fcc8882755bc5a..6fe8dad8df109531f2b38fbfcb58b680
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
<build>
<finalName>tuinity-${minecraft.version}</finalName>
@@ -361,8 +371,15 @@
@@ -414,8 +424,15 @@
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
@ -92,10 +92,10 @@ index 3bc5cd1e53dd7c94b948e7f57f0dc8e073e349b0..87891161f5b06bb8be0e2016b490484e
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2bb00a42492b08036e984d3e1d9a564d4b4226c2..42c24781d058cee94db8f0fa1a6849b41a0394ff 100644
index 06d0592bebaefc16c1995781a9e8a3554f4a3205..e26b1d7b6ffc726c8ae8b469eab9df73c033a73f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1649,7 +1649,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -104,6 +104,25 @@ index 2bb00a42492b08036e984d3e1d9a564d4b4226c2..42c24781d058cee94db8f0fa1a6849b4
}
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 60aad444eec3af7364b84ec3f696d3b78586cd6a..ac701ac53bcf4340b012da5b7aaeb4c7260249df 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -277,11 +277,12 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
// Spigot start
- if (org.spigotmc.SpigotConfig.bungee) {
- DedicatedServer.LOGGER.warn("Whilst this makes it possible to use BungeeCord, unless access to your server is properly restricted, it also opens up the ability for hackers to connect with any username they choose.");
+ if (com.destroystokyo.paper.PaperConfig.isProxyOnlineMode()) { // Purpur
+ DedicatedServer.LOGGER.warn("Whilst this makes it possible to use BungeeCord or Velocity, unless access to your server is properly restricted, it also opens up the ability for hackers to connect with any username they choose."); // Purpur
DedicatedServer.LOGGER.warn("Please see http://www.spigotmc.org/wiki/firewall-guide/ for further information.");
} else {
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
+ DedicatedServer.LOGGER.warn("You will not be offered any support as long as the server allows offline-mode players to join."); // Purpur
}
// Spigot end
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
diff --git a/src/main/java/net/pl3x/purpur/PurpurVersionFetcher.java b/src/main/java/net/pl3x/purpur/PurpurVersionFetcher.java
new file mode 100644
index 0000000000000000000000000000000000000000..cabfcebf9f944f7a2a2a1cffc7401435803a8741
@ -230,10 +249,10 @@ index 0000000000000000000000000000000000000000..cabfcebf9f944f7a2a2a1cffc7401435
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 34b9fe484ba16193cfcb938cb0dc51b2066acc5f..1c67be65972a374d1e8fac393ce3064c7fca25e1 100644
index e476806646c89c22da7e733d8072e0073383bd79..c8e2f682746cd94c2f02a452bbeb672c36a916a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
@@ -230,7 +230,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
@ -243,7 +262,7 @@ index 34b9fe484ba16193cfcb938cb0dc51b2066acc5f..1c67be65972a374d1e8fac393ce3064c
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 6141e86278d876e42dbed6e8f2275280babcef77..67f93f252a26f8b598a4b48c63c321728b246cae 100644
index 6cb8608f8238c4a8c346b92ba672c8cc1c0cbcc4..3fa4d18d7a1e2d351fbe8e02d1e749587f98c2a2 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -397,7 +397,7 @@ public final class CraftMagicNumbers implements UnsafeValues {

View File

@ -45,7 +45,7 @@ index efc1e42d606e1c9feb1a4871c0714933ae92a1b2..a0ed8ed1d6b89a4f10dff645e09eaff3
config.save(CONFIG_FILE);
} catch (IOException ex) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 858bd62d2a17c15ee573c5cd607a876d3a99c2b1..a76219e59c24862b9c1e09e4a2a29cf2a6260514 100644
index ac701ac53bcf4340b012da5b7aaeb4c7260249df..b1ce70267506cde21dbb17d6ff19d13383e8c178 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -212,6 +212,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -65,10 +65,10 @@ index 858bd62d2a17c15ee573c5cd607a876d3a99c2b1..a76219e59c24862b9c1e09e4a2a29cf2
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
// Paper end
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index f0420b87025a090a659542a00614e805bf850fd2..89b892c23a396d94c11b5d6b7ffe79e892297181 100644
index f8d11a1f0337acf60f2d9f94bd4bbbf6eb77c6de..0ede4766117e0bc28127baf1b14535370d8ea878 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -157,6 +157,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -158,6 +158,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config
@ -76,7 +76,7 @@ index f0420b87025a090a659542a00614e805bf850fd2..89b892c23a396d94c11b5d6b7ffe79e8
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPosition lastPhysicsProblem; // Spigot
@@ -249,6 +250,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -259,6 +260,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config
@ -357,10 +357,10 @@ index 0000000000000000000000000000000000000000..536955124afaec5c8a070249c7432cb9
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1c67be65972a374d1e8fac393ce3064c7fca25e1..555685c32aa9b0dfbdf0e2ed4a2802eafd37495a 100644
index c8e2f682746cd94c2f02a452bbeb672c36a916a1..f53389a49e62f54faa6af19226589305b597d1ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -865,6 +865,7 @@ public final class CraftServer implements Server {
@@ -882,6 +882,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config
@ -368,7 +368,7 @@ index 1c67be65972a374d1e8fac393ce3064c7fca25e1..555685c32aa9b0dfbdf0e2ed4a2802ea
for (WorldServer world : console.getWorlds()) {
world.worldDataServer.setDifficulty(config.difficulty);
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -900,6 +901,7 @@ public final class CraftServer implements Server {
@@ -917,6 +918,7 @@ public final class CraftServer implements Server {
world.spigotConfig.init(); // Spigot
world.paperConfig.init(); // Paper
world.tuinityConfig.init(); // Tuinity - Server Config
@ -376,7 +376,7 @@ index 1c67be65972a374d1e8fac393ce3064c7fca25e1..555685c32aa9b0dfbdf0e2ed4a2802ea
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -918,6 +920,7 @@ public final class CraftServer implements Server {
@@ -935,6 +937,7 @@ public final class CraftServer implements Server {
reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
com.destroystokyo.paper.PaperConfig.registerCommands(); // Paper
@ -384,7 +384,7 @@ index 1c67be65972a374d1e8fac393ce3064c7fca25e1..555685c32aa9b0dfbdf0e2ed4a2802ea
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2361,6 +2364,18 @@ public final class CraftServer implements Server {
@@ -2385,6 +2388,18 @@ public final class CraftServer implements Server {
}
// Tuinity end - add config to timings report
@ -404,10 +404,10 @@ index 1c67be65972a374d1e8fac393ce3064c7fca25e1..555685c32aa9b0dfbdf0e2ed4a2802ea
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 145748b5ca095cd555fd1f085a596bf0f58fea13..adf182b651ba8c7105483a4b18d1adfea37f91b9 100644
index 57180e164ac51b1aac070c00d820792d13d67258..09168bced10094c2058ffe7a10613b83360d998b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -148,6 +148,14 @@ public class Main {
@@ -154,6 +154,14 @@ public class Main {
.describedAs("Yml file");
/* Conctete End - Server Config */

View File

@ -175,7 +175,7 @@ index 614ab2d73db2293116f2272f6cd5c16da446132d..2885dc250f171917393c0356a005b476
case DISPENSER:
case DROPPER:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index c3fa97ac34e1fc61ae02f224f8afe5a0b486fb4d..40e5a2fae032445467ac453f1fab7e366e911283 100644
index f6001047ada8308cfa1d9b26677a7a5d7774de51..922a15097bdfe64be657fdf157145d1e882b6a40 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -82,7 +82,7 @@ public class CraftInventory implements Inventory {

View File

@ -5,12 +5,12 @@ Subject: [PATCH] Advancement API
diff --git a/src/main/java/net/minecraft/advancements/Advancement.java b/src/main/java/net/minecraft/advancements/Advancement.java
index e3d5d55a2fe5d86db621d3e0c9322f553386d731..8bfd20ff9a3c96fa9ff5cc618ca7e858e62943a0 100644
index 2f3d9e5b849093027d3c2ef434494cd600f52a31..23567430901284ab9d4d4873e53a1c8a06da6862 100644
--- a/src/main/java/net/minecraft/advancements/Advancement.java
+++ b/src/main/java/net/minecraft/advancements/Advancement.java
@@ -77,7 +77,7 @@ public class Advancement {
}
@@ -78,7 +78,7 @@ public class Advancement {
public final @Nullable AdvancementDisplay getAdvancementDisplay() { return this.c(); } // Paper - OBFHELPER
@Nullable
- public AdvancementDisplay c() {
+ public AdvancementDisplay c() { return getDisplay(); } public AdvancementDisplay getDisplay() { // Purpur
@ -18,7 +18,7 @@ index e3d5d55a2fe5d86db621d3e0c9322f553386d731..8bfd20ff9a3c96fa9ff5cc618ca7e858
}
diff --git a/src/main/java/net/minecraft/advancements/AdvancementDisplay.java b/src/main/java/net/minecraft/advancements/AdvancementDisplay.java
index 721d7fbab447117349994f710338ca616ab11067..35b84373da154a070f691b0049086cc788f7de4d 100644
index adc6779e53e7b2ee04a80e2ea714e3378b8e6f39..3335c96ec15eb8d8f0b67f51846038f728f6f9fc 100644
--- a/src/main/java/net/minecraft/advancements/AdvancementDisplay.java
+++ b/src/main/java/net/minecraft/advancements/AdvancementDisplay.java
@@ -25,10 +25,11 @@ public class AdvancementDisplay {
@ -35,7 +35,7 @@ index 721d7fbab447117349994f710338ca616ab11067..35b84373da154a070f691b0049086cc7
public AdvancementDisplay(ItemStack itemstack, IChatBaseComponent ichatbasecomponent, IChatBaseComponent ichatbasecomponent1, @Nullable MinecraftKey minecraftkey, AdvancementFrameType advancementframetype, boolean flag, boolean flag1, boolean flag2) {
this.a = ichatbasecomponent;
@@ -46,22 +47,29 @@ public class AdvancementDisplay {
@@ -46,10 +47,12 @@ public class AdvancementDisplay {
this.j = f1;
}
@ -48,14 +48,12 @@ index 721d7fbab447117349994f710338ca616ab11067..35b84373da154a070f691b0049086cc7
public IChatBaseComponent b() {
return this.b;
}
+ public AdvancementFrameType getFrameType() { return e(); } // Purpur - OBFHELPER
public AdvancementFrameType e() {
@@ -59,11 +62,14 @@ public class AdvancementDisplay {
return this.e;
}
+ public void setShouldAnnounceToChat(boolean announce) { this.g = announce; } // Purpur - OBFHELPER
+ public boolean shouldAnnounceToChat() { return i(); } // Purpur - OBFHELPER
+ public final void setShouldAnnounceToChat(boolean announce) { this.g = announce; } // Purpur - OBFHELPER
public final boolean shouldAnnounceToChat() { return this.i(); } // Paper - OBFHELPER
public boolean i() {
return this.g;
}
@ -66,7 +64,7 @@ index 721d7fbab447117349994f710338ca616ab11067..35b84373da154a070f691b0049086cc7
return this.h;
}
diff --git a/src/main/java/net/minecraft/advancements/AdvancementFrameType.java b/src/main/java/net/minecraft/advancements/AdvancementFrameType.java
index f5d24950d317c78a971472821595fc1b44befc6e..f096ecf8d77b085e6c2ef4c3b64f0b65409bb287 100644
index 32380346555e194227423999a79f1ebcbbe38d3b..173266c81be66f85db06dd28d9c9d720e21f8bc4 100644
--- a/src/main/java/net/minecraft/advancements/AdvancementFrameType.java
+++ b/src/main/java/net/minecraft/advancements/AdvancementFrameType.java
@@ -4,16 +4,27 @@ import net.minecraft.EnumChatFormat;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] AFK API
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index fb61b6ac167b34486282a24e598020fb96081f28..c42a2813b40152079786dde33231d945f3144580 100644
index 32e400632ec1e61374f772c6262580f84a5b2288..aee1946f96ec6007caef63b2183c5218ffe71836 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -2071,8 +2071,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -2102,8 +2102,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void resetIdleTimer() {
this.ca = SystemUtils.getMonotonicMillis();
@ -64,10 +64,10 @@ index fb61b6ac167b34486282a24e598020fb96081f28..c42a2813b40152079786dde33231d945
return this.serverStatisticManager;
}
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index b2343d4e5c4dd6ec44503c275c374739bba28536..2affa0ba416957c4c8767708c9e88fc1944bfc71 100644
index b11af463045bbd3bab8d269fde34071ca5f026af..6433ce5a5b951334efb3d8d7199f784f23392e0e 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -1002,7 +1002,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1018,7 +1018,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// CraftBukkit end
if (this.everyoneSleeping && this.players.stream().noneMatch((entityplayer) -> {
@ -76,7 +76,7 @@ index b2343d4e5c4dd6ec44503c275c374739bba28536..2affa0ba416957c4c8767708c9e88fc1
})) {
// CraftBukkit start
long l = this.worldData.getDayTime() + 24000L;
@@ -1347,7 +1347,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1363,7 +1363,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
while (iterator.hasNext()) {
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
@ -86,7 +86,7 @@ index b2343d4e5c4dd6ec44503c275c374739bba28536..2affa0ba416957c4c8767708c9e88fc1
} else if (entityplayer.isSleeping()) {
++j;
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index e0c606bb6ecf23f2118a65775c05b437a09826d3..85964e7fe2cc96ad3b967dadd9ee5d095ee60e2a 100644
index 64fe0acfccd50465c5fe8c49346a6db2b830155e..8c9a6130fae64509c6e4a79e785bac5f60ba1cd1 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -399,6 +399,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -263,10 +263,10 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..2578a4677d1ee060f687be531e696b7c
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 51d68fc13fcb8c30c10e21063f4d658f403df8ce..9e07a1e59bf756101a0aaff9891361cc7486854d 100644
index f82fb89e30e30681b2052d1c6a2f24428d6fbfc7..05bd48bb026a71dd420b4d73c58da781828d58e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2496,4 +2496,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2494,4 +2494,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return spigot;
}
// Spigot end

View File

@ -17,12 +17,12 @@ index 1fab9b9c7d41a0d2a551096c2c15f741a887fa2d..f33309f4c1ad92960d0634f3f5b8105c
public final boolean spawnNpcs = this.getBoolean("spawn-npcs", true);
public final boolean pvp = this.getBoolean("pvp", true);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 555685c32aa9b0dfbdf0e2ed4a2802eafd37495a..f33f770a259ca59c50270ae70e4a14ed879967a2 100644
index f53389a49e62f54faa6af19226589305b597d1ae..3efe2a4eff95349107134b097033bf978f083d56 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2524,4 +2524,11 @@ public final class CraftServer implements Server {
return mobGoals;
@@ -2554,4 +2554,11 @@ public final class CraftServer implements Server {
}
// Paper end
+
+ // Purpur start

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable server mod name
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 42c24781d058cee94db8f0fa1a6849b41a0394ff..6121ef7fcbadb50d05fad4270556e825f636f4d8 100644
index e26b1d7b6ffc726c8ae8b469eab9df73c033a73f..87d121dcbb8fcf3545f6c80ce3e219358800d6b9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1649,7 +1649,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity safeFallDistance
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 003e1f6dc8efbabcb2e0f7a6b379196f02203903..6d4f844c68ce48b942280fc5f3a54af89b31c093 100644
index a49dbcffecc971f797651984cb72c455d40f9331..bb030f5b258d82a1a3e60151b42a113b8f8022f1 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -228,6 +228,7 @@ public abstract class EntityLiving extends Entity {
@ -62,11 +62,11 @@ index 3b004160da9a2aed440a3ccda538d78f91c61e87..5e6a92dcdbca686d5a8cfc4aaff72b70
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 3d497f69f89455b88fba423de8effb3db83e7af4..b5040de9885556561416bf3282476f3b33925a62 100644
index 4545bac9309f5a3aad617f48f7808d8ae829602d..d99ab01298c7e35eae806af8fc60d5beba89c826 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -843,4 +843,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
getHandle().setHurtDirection(hurtDirection);
@@ -859,4 +859,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category");
}
// Paper end
+

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Lagging threshold
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6121ef7fcbadb50d05fad4270556e825f636f4d8..c086f50613cc3b1061c9958eb2a8aba059a61e29 100644
index 87d121dcbb8fcf3545f6c80ce3e219358800d6b9..8a11047d0e60d20c83f2013b5e1488fe08152142 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -279,6 +279,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -280,6 +280,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public static final int TICK_TIME = 1000000000 / TPS;
private static final int SAMPLE_INTERVAL = 20; // Paper
public final double[] recentTps = new double[ 3 ];
@ -16,7 +16,7 @@ index 6121ef7fcbadb50d05fad4270556e825f636f4d8..c086f50613cc3b1061c9958eb2a8aba0
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -1114,6 +1115,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1117,6 +1118,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
recentTps[1] = tps5.getAverage();
recentTps[2] = tps15.getAverage();
// Paper end
@ -41,10 +41,10 @@ index 7eadf925c4e4429fa63fb02af9e87bf2ed68efa6..60ef024891e78e18c64435b7ee811807
public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f33f770a259ca59c50270ae70e4a14ed879967a2..c462a3aa61e23178fb04622e9a65fb5e83e22174 100644
index 3efe2a4eff95349107134b097033bf978f083d56..d46e5819bd0bc6ac16b536ee3abe5a0142995bf3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2530,5 +2530,10 @@ public final class CraftServer implements Server {
@@ -2560,5 +2560,10 @@ public final class CraftServer implements Server {
public String getServerName() {
return getProperties().serverName;
}

View File

@ -18,10 +18,10 @@ index 4d965e504a40eb52777575df839856c825a0900a..addddb64956c63563fc072b35cc511d3
private final int c;
private final EntityTypes<?> d;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 6966b9d1ce674232d3f867798fa58bd0933ff69e..1cc473eb4d346b1b498a7b170973fb44d8b8aea6 100644
index 347c23d4b7d47198f214c3f95354e8abb660b191..4ec0e93d93936080d876ffa017ebe181d2896b22 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -396,4 +396,18 @@ public final class CraftItemFactory implements ItemFactory {
@@ -401,4 +401,18 @@ public final class CraftItemFactory implements ItemFactory {
new net.md_5.bungee.api.chat.TextComponent(customName));
}
// Paper end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Player invulnerabilities
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b5a7fe1e3 100644
index aee1946f96ec6007caef63b2183c5218ffe71836..e65a3e3e7bf6a366c30b44e166e2085966ebc933 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -284,6 +284,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -285,6 +285,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.canPickUpLoot = true;
this.maxHealthCache = this.getMaxHealth();
this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
@ -17,7 +17,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b
}
// Paper start
public BlockPosition getPointInFront(double inFront) {
@@ -1119,6 +1121,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1129,6 +1131,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
@ -30,7 +30,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b
@Override
public boolean damageEntity(DamageSource damagesource, float f) {
if (this.isInvulnerable(damagesource)) {
@@ -1126,7 +1134,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1136,7 +1144,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
} else {
boolean flag = this.server.j() && this.canPvP() && "fall".equals(damagesource.translationIndex);
@ -39,7 +39,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b
return false;
} else {
if (damagesource instanceof EntityDamageSource) {
@@ -1302,6 +1310,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1312,6 +1320,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
// Paper end
@ -47,7 +47,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b
return this;
}
}
@@ -2489,9 +2498,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -2520,9 +2529,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public boolean isFrozen() { // Paper - protected > public
@ -67,19 +67,19 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b
public Scoreboard getScoreboard() {
return getBukkitEntity().getScoreboard().getHandle();
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 85964e7fe2cc96ad3b967dadd9ee5d095ee60e2a..71ab9f136144aa7b06494144671b41e2af85de48 100644
index 8c9a6130fae64509c6e4a79e785bac5f60ba1cd1..234f87a64684473d9458d0eceefab0b98ab7785e 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1901,6 +1901,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1902,6 +1902,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
// Paper start
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packetplayinresourcepackstatus.status.ordinal()];
+ player.setFrozen(packStatus == PlayerResourcePackStatusEvent.Status.ACCEPTED); // Purpur
+ if (player.world.purpurConfig.playerInvulnerableWhileAcceptingResourcePack) player.setFrozen(packStatus == PlayerResourcePackStatusEvent.Status.ACCEPTED); // Purpur
player.getBukkitEntity().setResourcePackStatus(packStatus);
this.server.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(getPlayer(), packStatus));
// Paper end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 76ba1e038fb68eafa2c2039fa1cdd74d060dcf9f..2e5afd00bc7a2a58fd66c3bf1b38293762408662 100644
index ab113991486c913e0a05df1029571d3e920af9c7..d640150c803bc30a353ad34215cbb413632ada86 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1015,6 +1015,8 @@ public abstract class PlayerList {
@ -108,10 +108,10 @@ index 2578a4677d1ee060f687be531e696b7c7be89e84..c441fcea9b2b5a77b801c8a69541cf42
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9e07a1e59bf756101a0aaff9891361cc7486854d..1c5bcc17a702f5af514ce4db7f5d096d5f449dd6 100644
index 05bd48bb026a71dd420b4d73c58da781828d58e4..14b9e4c845d73946f4151c902e12aa0690b9414c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2512,5 +2512,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2510,5 +2510,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetIdleTimer() {
getHandle().resetIdleTimer();
}

View File

@ -17,7 +17,7 @@ index b4c37287362907b8507d156b978ba5b9d961bb7b..9e6e6636539702507abb78515e002819
return this.a;
}
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 71ab9f136144aa7b06494144671b41e2af85de48..a0a476d55afdf5ed9850368e99ab25af019075a8 100644
index 234f87a64684473d9458d0eceefab0b98ab7785e..017c3cd5edfd78917445f7313a4d9455c3bde9a1 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -233,6 +233,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -50,7 +50,7 @@ index 71ab9f136144aa7b06494144671b41e2af85de48..a0a476d55afdf5ed9850368e99ab25af
if (this.isPendingPing()) {
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info
@@ -3084,6 +3100,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -3085,6 +3101,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Silk touch spawners
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
index cd2da276c09dcf98c1c50dc66aa30dd3b67b43af..2ef13ce5cb7df206753f41a692d74c8d68354cfc 100644
index c60457e9240c33a4721b82a00cef081fb320c8a7..5b5460c66291f1242ac7a20bc38514e214920739 100644
--- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
@@ -81,6 +81,7 @@ public final class PaperAdventure {

View File

@ -17,7 +17,7 @@ index c0fac7369b111e65b896a15848ae22457e5e8914..5278997e522b495b83e53cac5968388d
public void removeCommand(String name) {
children.remove(name);
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
index 5702f18cd39c1e7b5614c28a628108e2204b2ec1..b069ee845b2011b2c669b6c75d0a773f52e06e10 100644
index 56a0665127c7c55049b8438c91e72b6881ed11e0..575bc7d8a433cd6d4755757d82fe3a18da184d5a 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
@@ -87,6 +87,7 @@ public final class VanillaCommandWrapper extends BukkitCommand {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Logger settings (suppressing pointless logs)
diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
index 7a8a1960882e291c46301d07da3e1c5415516893..59d781b5e61c5d2c004bc92300d8d42e81821308 100644
index dfdbc028f68ced197ad179248ed3b1e9d70ba057..a1ee1066108985a95abddb03ff447b5a14f4f85f 100644
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
@@ -189,6 +189,7 @@ public class AdvancementDataPlayer {
@@ -190,6 +190,7 @@ public class AdvancementDataPlayer {
if (advancement == null) {
// CraftBukkit start
if (entry.getKey().getNamespace().equals("minecraft")) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Disable outdated build check
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index adf182b651ba8c7105483a4b18d1adfea37f91b9..326548230af7f64aabc8cdd1a1c804e734c9e0e0 100644
index 09168bced10094c2058ffe7a10613b83360d998b..51cdc7e87413302a73416a5da724d873efb29657 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -260,7 +260,7 @@ public class Main {
@@ -272,7 +272,7 @@ public class Main {
System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Giants AI settings
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 99c93d48726b4b92a341ba98721173df8b4ff30a..b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a 100644
index 2a779f1219de2eb1d2ba7d28110bed4824b1d5c5..5925a62e1c9a605ada4cf15a07a07ef7f543a29c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -228,7 +228,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
@ -18,10 +18,10 @@ index 99c93d48726b4b92a341ba98721173df8b4ff30a..b0cfd7e2be03222e3e34791e5bf6fb77
public float I;
protected final Random random;
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index dc78bafeddf6b584181c818b90efa7ff531377a3..af04853ba114a80eb756c1700d27567fd8548e13 100644
index 91eecf296905b85d7cc602dbc3a7b14479ec686a..dcc185b1e54886c8e82ee278e749d97044352405 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -1027,6 +1027,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1030,6 +1030,7 @@ public abstract class EntityInsentient extends EntityLiving {
return f;
}
@ -29,7 +29,7 @@ index dc78bafeddf6b584181c818b90efa7ff531377a3..af04853ba114a80eb756c1700d27567f
protected void a(DifficultyDamageScaler difficultydamagescaler) {
if (this.random.nextFloat() < 0.15F * difficultydamagescaler.d()) {
int i = this.random.nextInt(2);
@@ -1134,6 +1135,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1137,6 +1138,7 @@ public abstract class EntityInsentient extends EntityLiving {
}
}
@ -38,7 +38,7 @@ index dc78bafeddf6b584181c818b90efa7ff531377a3..af04853ba114a80eb756c1700d27567f
float f = difficultydamagescaler.d();
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 6d4f844c68ce48b942280fc5f3a54af89b31c093..8feb1526a3cd5e9cdd2ce731a7701527180e157d 100644
index bb030f5b258d82a1a3e60151b42a113b8f8022f1..b2be16652756de1ad06cc4a98cdbe95406a445d3 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -261,6 +261,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Zombie horse naturally spawn
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index 2affa0ba416957c4c8767708c9e88fc1944bfc71..a240e83f71a00e1b062486e47d42b5a9444f9ca3 100644
index 6433ce5a5b951334efb3d8d7199f784f23392e0e..e5de307dd70ab9a07cf8357e4d73e4f5d69e21ef 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -96,6 +96,7 @@ import net.minecraft.world.entity.ai.village.poi.VillagePlace;
@ -16,7 +16,7 @@ index 2affa0ba416957c4c8767708c9e88fc1944bfc71..a240e83f71a00e1b062486e47d42b5a9
import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton;
import net.minecraft.world.entity.boss.EntityComplexPart;
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
@@ -1221,12 +1222,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@@ -1237,12 +1238,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {
boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper
if (flag1) {

View File

@ -26,10 +26,10 @@ index 0eed10a6c4e0c7245f219d19ed1e2e5c94364db9..2b54a5f3347f788b751892105f888663
protected boolean h;
protected boolean i;
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..53e773c14689967d5b12467bf209eefb05f7a812 100644
index 6aad662d823e0a64b8e18156b5f084399bc4f228..71df7a322bcb1f8050bf37a0c1a8dc1d307166c3 100644
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
@@ -200,6 +200,7 @@ public class EntityTrackerEntry {
@@ -202,6 +202,7 @@ public class EntityTrackerEntry {
this.o = 0;
packet1 = new PacketPlayOutEntityTeleport(this.tracker);
}
@ -37,7 +37,7 @@ index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..53e773c14689967d5b12467bf209eefb
}
if ((this.e || this.tracker.impulse || this.tracker instanceof EntityLiving && ((EntityLiving) this.tracker).isGliding()) && this.tickCounter > 0) {
@@ -286,6 +287,22 @@ public class EntityTrackerEntry {
@@ -288,6 +289,22 @@ public class EntityTrackerEntry {
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Tulips change fox type
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
index a3b714a9d63c6bb33a2731fb9293c9d155754b17..cea46348c0876e168376061fbaf258048e9358cb 100644
index b7fa24318ef43918b6b10ff4ea8acb960527296e..19a9affdaba52d8e7dc1c4c20d5c0d52829f4989 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java
@@ -30,6 +30,8 @@ import net.minecraft.tags.Tag;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Cows eat mushrooms
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a..690685ac224a8b63a022d0801e3e4adb9416cc39 100644
index 5925a62e1c9a605ada4cf15a07a07ef7f543a29c..284fa5ed0393ed767ae4b74ee925105e1b10acae 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2917,6 +2917,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
@ -17,7 +17,7 @@ index b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a..690685ac224a8b63a022d0801e3e4adb
this.setPositionRotation(entity.locX(), entity.locY(), entity.locZ(), entity.yaw, entity.pitch);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 8feb1526a3cd5e9cdd2ce731a7701527180e157d..d419d71af42c361d30aab12e4d245358667f857b 100644
index b2be16652756de1ad06cc4a98cdbe95406a445d3..65d09af57111bb99f2438731bb8c053f6e3fafba 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -176,7 +176,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Signs allow color codes
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 6e3a3a50e01c41b40451bce05015714b5a7fe1e3..43900bb788f4baef420de0782c77d74dd7310f6e 100644
index e65a3e3e7bf6a366c30b44e166e2085966ebc933..a8d60d288afd9b413494fe6abe8cfddb7c1f0b3b 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -1579,6 +1579,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1603,6 +1603,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public void openSign(TileEntitySign tileentitysign) {
@ -17,10 +17,10 @@ index 6e3a3a50e01c41b40451bce05015714b5a7fe1e3..43900bb788f4baef420de0782c77d74d
this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition()));
}
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index a0a476d55afdf5ed9850368e99ab25af019075a8..3559f52e2fa30a8a7600334ece981fe34896bd68 100644
index 017c3cd5edfd78917445f7313a4d9455c3bde9a1..4041e5d0964ec6844b156c9097cd70ec59002854 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -3078,6 +3078,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -3079,6 +3079,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
}
// Paper end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Minecart settings and WASD controls
diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java
index 8edc279e7a3fdfb7e10718f1deee34b7e3fb2f28..9a446a77dd9dbf5fa6f6fe763c4586cc377980d6 100644
index 6a6381e85fef2ae2b9b5e6dff0b7917b92fa01e5..17d63cd4ca152adc66ffe9ffd3227a0770738a29 100644
--- a/src/main/java/net/minecraft/core/BlockPosition.java
+++ b/src/main/java/net/minecraft/core/BlockPosition.java
@@ -42,6 +42,12 @@ public class BlockPosition extends BaseBlockPosition {
@ -22,10 +22,10 @@ index 8edc279e7a3fdfb7e10718f1deee34b7e3fb2f28..9a446a77dd9dbf5fa6f6fe763c4586cc
super(i, j, k);
}
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 43900bb788f4baef420de0782c77d74dd7310f6e..01d4aa706f5c1cf35210bbdbf25b4687d110eaa1 100644
index a8d60d288afd9b413494fe6abe8cfddb7c1f0b3b..57900f89695bcce9aa6e90ab96007e456ef0448a 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -1132,6 +1132,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1142,6 +1142,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (this.isInvulnerable(damagesource)) {
return false;
} else {
@ -34,7 +34,7 @@ index 43900bb788f4baef420de0782c77d74dd7310f6e..01d4aa706f5c1cf35210bbdbf25b4687
if (!flag && isSpawnInvulnerable() && damagesource != DamageSource.OUT_OF_WORLD) { // Purpur
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index d419d71af42c361d30aab12e4d245358667f857b..bb227e7dfb1e91a7f5dcc4c7498387033b98df0f 100644
index 65d09af57111bb99f2438731bb8c053f6e3fafba..3116644a2689c7f553fac0fe778fe7277b0ac02d 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -194,9 +194,9 @@ public abstract class EntityLiving extends Entity {
@ -170,7 +170,7 @@ index 527f3ed664854cdd938c34f00a064bc2f77148cc..1a1de9491a50e9e746e714fcb35633c2
}
}
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 f8a982add50862f1bc977f3039e7e9aeed9138ae..fb7d5fa53c51766f348271285a2e921be1ca0497 100644
index 96d7990c66bd569b1b5ee287c0238c7dbb4c503e..2448ff8e3a9c60d6d99dd8f4d3033553b2780c77 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -83,6 +83,7 @@ public class Block extends BlockBase implements IMaterial {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Disable loot drops on death by cramming
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index bb227e7dfb1e91a7f5dcc4c7498387033b98df0f..e31538338e02fdb6e859c37bed899e5f3a83d5ae 100644
index 3116644a2689c7f553fac0fe778fe7277b0ac02d..7654b244bcabec35a3a9cdda862ebe220abf41c0 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1598,8 +1598,10 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Players should not cram to death
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 01d4aa706f5c1cf35210bbdbf25b4687d110eaa1..257265a036a62c7d5fbcff17a10a41198ed880a4 100644
index 57900f89695bcce9aa6e90ab96007e456ef0448a..c766ec5ac4519d1c734a10e667988ada040096c5 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -1556,7 +1556,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1580,7 +1580,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public boolean isInvulnerable(DamageSource damagesource) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix the dead lagging the server
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 690685ac224a8b63a022d0801e3e4adb9416cc39..56d7662ccc2181df298f37a043f7af4036fe6125 100644
index 284fa5ed0393ed767ae4b74ee925105e1b10acae..a70ed426cea0567e03876bc8d054ee59a2492de2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1662,6 +1662,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
@ -17,7 +17,7 @@ index 690685ac224a8b63a022d0801e3e4adb9416cc39..56d7662ccc2181df298f37a043f7af40
public void f(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index e31538338e02fdb6e859c37bed899e5f3a83d5ae..af08ec27f8c07653daa328d84bfc142bfc8a7f78 100644
index 7654b244bcabec35a3a9cdda862ebe220abf41c0..1da0905798c89b3c4b5a6ce93a838935b60cbfc4 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2610,7 +2610,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Skip events if there's no listeners
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
index 29a395e69aab9c50a45c5fd5ab8795fd8e3ef727..5ae31658fb1183eab66f682cc5477bc526c27753 100644
index 7e30ec9a08d919d2ae9218ee0a11f77719129f07..b1bfc42b4153b225243ba65e7f937c0314cb39a5 100644
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
@@ -367,6 +367,7 @@ public class CommandDispatcher {
@@ -368,6 +368,7 @@ public class CommandDispatcher {
}
private void runSync(EntityPlayer entityplayer, Collection<String> bukkit, RootCommandNode<ICompletionProvider> rootcommandnode) {
@ -16,7 +16,7 @@ index 29a395e69aab9c50a45c5fd5ab8795fd8e3ef727..5ae31658fb1183eab66f682cc5477bc5
// Paper end - Async command map building
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandListenerWrapper>(entityplayer.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
PlayerCommandSendEvent event = new PlayerCommandSendEvent(entityplayer.getBukkitEntity(), new LinkedHashSet<>(bukkit));
@@ -379,6 +380,7 @@ public class CommandDispatcher {
@@ -380,6 +381,7 @@ public class CommandDispatcher {
}
}
// CraftBukkit end

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for F3+N debug
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 2e5afd00bc7a2a58fd66c3bf1b38293762408662..3622ea01edfb9dfaab254ceaf09582d9e8993174 100644
index d640150c803bc30a353ad34215cbb413632ada86..fc47887dfd3d32788fa11845c738af53126fba46 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1174,6 +1174,7 @@ public abstract class PlayerList {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable TPS Catchup
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c086f50613cc3b1061c9958eb2a8aba059a61e29..dccff89fcacdafe4961cd3121eb38ff8844e10da 100644
index 8a11047d0e60d20c83f2013b5e1488fe08152142..ac21ebf5d835fb34dbaad5f3c40cc5aeb6153231 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1132,7 +1132,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1135,7 +1135,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(this::canSleepForTick);
this.methodProfiler.exitEnter("nextTickWait");
this.X = true;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Entities pick up loot bypass mob-griefing gamerule
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index af04853ba114a80eb756c1700d27567fd8548e13..92d8c5e716678862deadd7755db8e9270daafeda 100644
index dcc185b1e54886c8e82ee278e749d97044352405..dd3f958c3a0403c1a17b2f1568cc235cf933083f 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Allow leashing villagers
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index 92d8c5e716678862deadd7755db8e9270daafeda..4b4578e02fd4be72f20458c54a878892e3029d56 100644
index dd3f958c3a0403c1a17b2f1568cc235cf933083f..ec38a27dfa6eebc818f54cf14bbe4287bee8bb29 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -49,6 +49,7 @@ import net.minecraft.world.entity.item.EntityItem;
@ -16,7 +16,7 @@ index 92d8c5e716678862deadd7755db8e9270daafeda..4b4578e02fd4be72f20458c54a878892
import net.minecraft.world.entity.player.EntityHuman;
import net.minecraft.world.entity.vehicle.EntityBoat;
import net.minecraft.world.item.Item;
@@ -1224,6 +1225,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1227,6 +1228,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (!this.isAlive()) {
return EnumInteractionResult.PASS;
} else if (this.getLeashHolder() == entityhuman) {

View File

@ -5,7 +5,7 @@ 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 b14b0134b42aa6d1eb285aa453ec6067cc702878..46187d18f797f834deef3685c857e88a8c4f5659 100644
index 3b8fa837db21c5f67eab2ff8752e906ea97c288d..c735bcea9e8b1fa5a77c5c247584b8007f52e0d3 100644
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
@@ -226,7 +226,7 @@ public abstract class FluidTypeFlowing extends FluidType {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add canSaveToDisk to Entity
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 56d7662ccc2181df298f37a043f7af4036fe6125..08f286a085cf36ce9a0ea420389f4ea33fb1cc1a 100644
index a70ed426cea0567e03876bc8d054ee59a2492de2..969eae570a0e018afc7c263cd505b6260c41fa94 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -447,6 +447,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable void damage height and damage
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 08f286a085cf36ce9a0ea420389f4ea33fb1cc1a..0950dcce2353504775813d9f60407361981c801d 100644
index 969eae570a0e018afc7c263cd505b6260c41fa94..db43aba6a3455abfd12b8167fefbd5cb8fc14524 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -750,7 +750,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
@ -18,7 +18,7 @@ index 08f286a085cf36ce9a0ea420389f4ea33fb1cc1a..0950dcce2353504775813d9f60407361
&& this.locY() >= world.paperConfig.netherVoidTopDamageHeight)) {
this.doVoidDamage();
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index af08ec27f8c07653daa328d84bfc142bfc8a7f78..0d5bb154e4213283734c1c2c437aec2a8b8877fc 100644
index 1da0905798c89b3c4b5a6ce93a838935b60cbfc4..5203c1ecb333b7bf5a707e77e559ec707c276e6b 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2129,7 +2129,7 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Dispenser curse of binding protection
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index 4b4578e02fd4be72f20458c54a878892e3029d56..84995be65d033dd712211e1e479675815099c3b1 100644
index ec38a27dfa6eebc818f54cf14bbe4287bee8bb29..db1863aac58409d13ec093506c23ab7cb29a2379 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -65,6 +65,7 @@ import net.minecraft.world.item.ItemSword;
@ -16,7 +16,7 @@ index 4b4578e02fd4be72f20458c54a878892e3029d56..84995be65d033dd712211e1e47967581
import net.minecraft.world.level.GameRules;
import net.minecraft.world.level.GeneratorAccess;
import net.minecraft.world.level.IBlockAccess;
@@ -1074,6 +1075,13 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1077,6 +1078,13 @@ public abstract class EntityInsentient extends EntityLiving {
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add obfhelpers for plugin use
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index fee862951f2767d4a3c5268dff157c185378a939..91a1b2e955b04f0cc1ca05d7ee4d832d9efb97cb 100644
index 366ceb65d40c685117d1c79a933864ab91d8aa11..a342174cf35ee6ac1f10028b60c5a19e1b547ef4 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -694,6 +694,7 @@ public final class ItemStack {

View File

@ -18,7 +18,7 @@ index a7551e95185895a290be70d501496279eaf884ae..31d36ead273e8397ba2c826b791a2cf5
if (entry != null) {
ItemStack itemstack = (ItemStack) entry.getValue();
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 91a1b2e955b04f0cc1ca05d7ee4d832d9efb97cb..fcc6ee9481d577d39339cd0ac24dab06bd76e5c6 100644
index a342174cf35ee6ac1f10028b60c5a19e1b547ef4..72400425d6177ba938057ec145f9499eb1160288 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -468,10 +468,19 @@ public final class ItemStack {

View File

@ -27,10 +27,10 @@ index dc6bc1910ad0f9b27144d5750078c3ca607d03d3..e8be35f836ede2630d44902e99a21489
setListData(vector);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index dccff89fcacdafe4961cd3121eb38ff8844e10da..409c272629ca935dcbaa9e73e10ace4a0bd8f9b7 100644
index ac21ebf5d835fb34dbaad5f3c40cc5aeb6153231..cbc6d074a7366f6456c6af2a3fedf0f7bd40cb5b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -278,7 +278,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -279,7 +279,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / TPS;
private static final int SAMPLE_INTERVAL = 20; // Paper
@ -39,7 +39,7 @@ index dccff89fcacdafe4961cd3121eb38ff8844e10da..409c272629ca935dcbaa9e73e10ace4a
public boolean lagging = false; // Purpur
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
@@ -1015,6 +1015,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1018,6 +1018,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0;
private long catchupTime = 0;
@ -47,7 +47,7 @@ index dccff89fcacdafe4961cd3121eb38ff8844e10da..409c272629ca935dcbaa9e73e10ace4a
public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1107,13 +1108,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1110,13 +1111,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
{
final long diff = curTime - tickSection;
java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
@ -69,10 +69,10 @@ index dccff89fcacdafe4961cd3121eb38ff8844e10da..409c272629ca935dcbaa9e73e10ace4a
lagging = recentTps[0] < net.pl3x.purpur.PurpurConfig.laggingThreshold; // Purpur
tickSection = curTime;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c462a3aa61e23178fb04622e9a65fb5e83e22174..49214eaab41998781b1d2e519f65075366754fea 100644
index d46e5819bd0bc6ac16b536ee3abe5a0142995bf3..af3c01156a9a5f6f08fff9db67c9c089a321cb29 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2310,6 +2310,7 @@ public final class CraftServer implements Server {
@@ -2334,6 +2334,7 @@ public final class CraftServer implements Server {
@Override
public double[] getTPS() {
return new double[] {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Implement elytra settings
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 0d5bb154e4213283734c1c2c437aec2a8b8877fc..90c931f95dffbf9697ae4678a23d7c142c504a81 100644
index 5203c1ecb333b7bf5a707e77e559ec707c276e6b..75f397067ea57335ab57e492ae212b440d7bedf1 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -2968,7 +2968,16 @@ public abstract class EntityLiving extends Entity {
@ -54,7 +54,7 @@ index e7f958d137257da912ce9b83db017b4423959943..210b95f1d67ec12566d6fc93b8234e11
itemstack.subtract(1);
} else ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index fcc6ee9481d577d39339cd0ac24dab06bd76e5c6..81e2ccfa4f6cf6a4ad9236cf0ce94df8dc3ec5b6 100644
index 72400425d6177ba938057ec145f9499eb1160288..2aa761656ce75f78732c502fd4ce65034b6c2919 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -500,7 +500,7 @@ public final class ItemStack {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Item entity immunities
diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
index 53e773c14689967d5b12467bf209eefb05f7a812..b8f9238c598a55ba796951cb775cd35f3a401fa8 100644
index 71df7a322bcb1f8050bf37a0c1a8dc1d307166c3..ecbc865fa34c9218678c2be666b0d758fad8e98d 100644
--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java
@@ -67,7 +67,7 @@ public class EntityTrackerEntry {
@ -18,10 +18,10 @@ index 53e773c14689967d5b12467bf209eefb05f7a812..b8f9238c598a55ba796951cb775cd35f
private java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = null;
diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
index b28995ecfd7f45e6b6197be96c418aa0d05d3383..e25476f6a9477447cc06f24ed05679326e83cd95 100644
index 38919488ce5917a751605c4ddcf0296ff0340b91..3c5e4abd104aa016e5cb8e248c4d6a5eff08a42e 100644
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
@@ -2426,7 +2426,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2440,7 +2440,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
public class EntityTracker {
@ -31,7 +31,7 @@ index b28995ecfd7f45e6b6197be96c418aa0d05d3383..e25476f6a9477447cc06f24ed0567932
private final int trackingDistance;
private SectionPosition e;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0950dcce2353504775813d9f60407361981c801d..6c0b1bc0c710d5795d559fe98af6319a644487cc 100644
index db43aba6a3455abfd12b8167fefbd5cb8fc14524..f4bef3dda1c33380401750bf1179827c328e2daf 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1611,6 +1611,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add /ping command
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
index 5ae31658fb1183eab66f682cc5477bc526c27753..94ed3811cbcc6f60a2c8bb033920f9c1ae2e91d6 100644
index b1bfc42b4153b225243ba65e7f937c0314cb39a5..185dee82b86aa3abb04809ddcf31c81e29664c62 100644
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
@@ -191,6 +191,7 @@ public class CommandDispatcher {
@ -16,7 +16,7 @@ index 5ae31658fb1183eab66f682cc5477bc526c27753..94ed3811cbcc6f60a2c8bb033920f9c1
}
if (commanddispatcher_servertype.d) {
@@ -427,10 +428,12 @@ public class CommandDispatcher {
@@ -428,10 +429,12 @@ public class CommandDispatcher {
}
@ -29,7 +29,7 @@ index 5ae31658fb1183eab66f682cc5477bc526c27753..94ed3811cbcc6f60a2c8bb033920f9c1
public static <T> RequiredArgumentBuilder<CommandListenerWrapper, T> a(String s, ArgumentType<T> argumenttype) {
return RequiredArgumentBuilder.argument(s, argumenttype);
}
@@ -446,6 +449,7 @@ public class CommandDispatcher {
@@ -447,6 +450,7 @@ public class CommandDispatcher {
};
}

View File

@ -17,7 +17,7 @@ index 53ea8a6d90faf4f7f8fd0819be4499422bdd4cbe..6ba14f603b8ec69597c70677cc317f80
return (new EntityDamageSourceIndirect("indirectMagic", entity, entity1)).setIgnoreArmor().setMagic();
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6c0b1bc0c710d5795d559fe98af6319a644487cc..31835e73c2704aa56ab8b14c79dd3a337ab05dff 100644
index f4bef3dda1c33380401750bf1179827c328e2daf..2f53f45e2e53ab01d67839957013da106b78ddc8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2277,8 +2277,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
@ -108,7 +108,7 @@ index 9658d93615a51375204481cfe0a1fce6f105fd70..2c983e6a092464d1867fcbe875b2e146
@Override
protected void saveData(NBTTagCompound nbttagcompound) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d166918b8fc 100644
index 16c0c960aa1e4d35093b810c7648b5638175e106..e20b26ae0435c593218541eba6c68ef297fea7c8 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
@@ -12,6 +12,7 @@ import net.minecraft.nbt.NBTTagCompound;
@ -188,8 +188,8 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16
@Override
protected void initDatawatcher() {
@@ -235,6 +267,136 @@ public class EntityPhantom extends EntityFlying implements IMonster {
public void setSpawningEntity(java.util.UUID entity) { this.spawningEntity = entity; }
@@ -241,6 +273,136 @@ public class EntityPhantom extends EntityFlying implements IMonster {
public void setShouldBurnInDay(boolean shouldBurnInDay) { this.shouldBurnInDay = shouldBurnInDay; }
// Paper end
+ // Purpur start
@ -325,7 +325,7 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16
class b extends PathfinderGoal {
private final PathfinderTargetCondition b;
@@ -247,6 +409,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@@ -253,6 +415,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@Override
public boolean a() {
@ -333,7 +333,7 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16
if (this.c > 0) {
--this.c;
return false;
@@ -275,6 +438,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@@ -281,6 +444,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@Override
public boolean b() {
@ -341,7 +341,7 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false;
@@ -289,6 +453,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@@ -295,6 +459,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@Override
public boolean a() {

View File

@ -61,10 +61,10 @@ index d98526785ff2fa3b72e8ffffcb89a57a2203a5c8..7859d84471436b427138593776ebd30a
return iblockdata.r(iblockaccess, blockposition) ? false : (iblockdata.isPowerSource() ? false : (!fluid.isEmpty() ? false : (iblockdata.a((Tag) TagsBlock.PREVENT_MOB_SPAWNING_INSIDE) ? false : !entitytypes.a(iblockdata))));
}
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 89b892c23a396d94c11b5d6b7ffe79e892297181..23ade8d822fc7c50ccaeaef4a67351caf9a7df30 100644
index 0ede4766117e0bc28127baf1b14535370d8ea878..9c7c68a3e73734ec2dbc57983ae27a16a7618fa2 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -1749,6 +1749,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1759,6 +1759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return new DifficultyDamageScaler(this.getDifficulty(), this.getDayTime(), i, f);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement bed explosion options
diff --git a/src/main/java/net/minecraft/world/level/block/BlockBed.java b/src/main/java/net/minecraft/world/level/block/BlockBed.java
index abe0a1c309d526de37efcac44922fa259e1d112c..db9ef25d0578538fd7c7950a3b3d03453da336f1 100644
index 00a01a157deec004bcf2f8587723a0ecd0bfef85..d42a3e73c6e4e65f023fa5af65a26acbf2f01281 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockBed.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockBed.java
@@ -137,7 +137,7 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity {
@@ -138,7 +138,7 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity {
world.a(blockposition1, false);
}

View File

@ -27,10 +27,10 @@ index d126f668828e0788e369294c0b376ef52b344f2c..154a76b1b77a97bdf65153250c41275f
return true;
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 23ade8d822fc7c50ccaeaef4a67351caf9a7df30..bf239526681ef2060e4dbedcb46a4a9d6b022fc1 100644
index 9c7c68a3e73734ec2dbc57983ae27a16a7618fa2..45eb26b7414f39f3d4f5ca5994cd3f271f7d112f 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -1824,4 +1824,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1835,4 +1835,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public final boolean isDebugWorld() {
return this.debugWorld;
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Allow color codes in books
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 3559f52e2fa30a8a7600334ece981fe34896bd68..9998f20c9cc9857612f94f91d27e77da9c632323 100644
index 4041e5d0964ec6844b156c9097cd70ec59002854..2b3e4130b906be299760a26a5298b3c73f00103e 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -1216,7 +1216,8 @@ public class PlayerConnection implements PacketListenerPlayIn {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Entity lifespan
diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java
index 9998f20c9cc9857612f94f91d27e77da9c632323..4e43cd877c45a014add62547a4dbfadbd09082d2 100644
index 2b3e4130b906be299760a26a5298b3c73f00103e..e6d73912a333edd43c4e489c50f4e441c3b2cc29 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -2463,6 +2463,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -2464,6 +2464,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
boolean triggerLeashUpdate = itemInHand != null && itemInHand.getItem() == Items.LEAD && entity instanceof EntityInsentient;
Item origItem = this.player.inventory.getItemInHand() == null ? null : this.player.inventory.getItemInHand().getItem();
PlayerInteractEntityEvent event;
@ -17,7 +17,7 @@ index 9998f20c9cc9857612f94f91d27e77da9c632323..4e43cd877c45a014add62547a4dbfadb
event = new PlayerInteractEntityEvent((Player) this.getPlayer(), entity.getBukkitEntity(), (packetplayinuseentity.c() == EnumHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND);
} else {
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
index 84995be65d033dd712211e1e479675815099c3b1..e10377b379079bc467a60abe719075c5ef73e858 100644
index db1863aac58409d13ec093506c23ab7cb29a2379..698997425a7f5a7a5d46fa5d825ec26f61e6c7c4 100644
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
@@ -124,7 +124,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -94,7 +94,7 @@ index 84995be65d033dd712211e1e479675815099c3b1..e10377b379079bc467a60abe719075c5
}
@Override
@@ -1632,7 +1664,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1635,7 +1667,7 @@ public abstract class EntityInsentient extends EntityLiving {
this.a((EntityLiving) this, entity);
this.z(entity);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add option to teleport to spawn if outside world border
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
index 257265a036a62c7d5fbcff17a10a41198ed880a4..da708df0dc50ea02441f9db2bfd52f04d9a8e3da 100644
index c766ec5ac4519d1c734a10e667988ada040096c5..b3d12463fbeb2045860c6b933da74980f778472e 100644
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
@@ -2556,4 +2556,26 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -2587,4 +2587,26 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return (CraftPlayer) super.getBukkitEntity();
}
// CraftBukkit end
@ -36,7 +36,7 @@ index 257265a036a62c7d5fbcff17a10a41198ed880a4..da708df0dc50ea02441f9db2bfd52f04
+ // 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 90c931f95dffbf9697ae4678a23d7c142c504a81..620bccdc44d3325dcb4450af979363ee94ba3f97 100644
index 75f397067ea57335ab57e492ae212b440d7bedf1..30defe89af719e681c7ee5f8394f1fc3775c05c3 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -45,6 +45,7 @@ import net.minecraft.network.syncher.DataWatcher;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Phantoms burn in light
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
index daf738e8f0987aa6ab200189d7a26d166918b8fc..07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb 100644
index e20b26ae0435c593218541eba6c68ef297fea7c8..fd2e3a4abcfedaf04db4277291983627c097b545 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
@@ -18,6 +18,7 @@ import net.minecraft.sounds.SoundEffect;
@ -36,12 +36,12 @@ index daf738e8f0987aa6ab200189d7a26d166918b8fc..07ede7b75a65a5815f1ae1ebf03ec0fd
@Override
public void movementTick() {
- if (this.isAlive() && this.eG()) {
+ if (this.isAlive() && ((world.purpurConfig.phantomBurnInDaylight && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Purpur
- if (this.isAlive() && shouldBurnInDay && this.eG()) { // Paper - Configurable Burning
+ if (this.isAlive() && (((shouldBurnInDay || world.purpurConfig.phantomBurnInDaylight) && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Paper - Configurable Burning // Purpur
this.setOnFire(8);
}
@@ -416,7 +419,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@@ -422,7 +425,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
} else {
this.c = 60;
List<EntityHuman> list = EntityPhantom.this.world.a(this.b, (EntityLiving) EntityPhantom.this, EntityPhantom.this.getBoundingBox().grow(16.0D, 64.0D, 16.0D));
@ -50,7 +50,7 @@ index daf738e8f0987aa6ab200189d7a26d166918b8fc..07ede7b75a65a5815f1ae1ebf03ec0fd
if (!list.isEmpty()) {
list.sort(Comparator.comparing(Entity::locY).reversed());
Iterator iterator = list.iterator();
@@ -515,6 +518,12 @@ public class EntityPhantom extends EntityFlying implements IMonster {
@@ -521,6 +524,12 @@ public class EntityPhantom extends EntityFlying implements IMonster {
return false;
} else if (entityliving instanceof EntityHuman && (((EntityHuman) entityliving).isSpectator() || ((EntityHuman) entityliving).isCreative())) {
return false;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Redstone deactivates spawners
diff --git a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
index 5538404456dfee42257fad9040fcc0fefdfc5fab..b3a03dc66e803d9dc7000cc7d6960e87b089b3ed 100644
index 33a5dbcc11455f81088d9fd685a8c4b1b8f4b1f2..b65609bab36650c46e9dabdd25a139ae2af9d83a 100644
--- a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java
@@ -69,6 +69,7 @@ public abstract class MobSpawnerAbstract {
@ -16,7 +16,7 @@ index 5538404456dfee42257fad9040fcc0fefdfc5fab..b3a03dc66e803d9dc7000cc7d6960e87
return this.a().isAffectsSpawningPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange); // Paper
}
@@ -347,7 +348,7 @@ public abstract class MobSpawnerAbstract {
@@ -348,7 +349,7 @@ public abstract class MobSpawnerAbstract {
public abstract void a(int i);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Totems work in inventory
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
index 620bccdc44d3325dcb4450af979363ee94ba3f97..c9caa6919d47283331a9e0c79b22590b80293693 100644
index 30defe89af719e681c7ee5f8394f1fc3775c05c3..818363663cabe88bc9f76b8e6e57725c4f2f992a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
@@ -1426,6 +1426,19 @@ public abstract class EntityLiving extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add no-random-tick block list
diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java
index a240e83f71a00e1b062486e47d42b5a9444f9ca3..e4ffc8cd3ea69563bdcd2f1f63bce519b09a0717 100644
index e5de307dd70ab9a07cf8357e4d73e4f5d69e21ef..375ac2a1c126a27a0a47ab7a369a821785aeada9 100644
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
@@ -532,14 +532,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {

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