Update Upstream

This commit is contained in:
tr7zw 2020-06-16 16:46:05 +02:00
parent 92a69a9365
commit d9533c36c5
76 changed files with 180 additions and 934 deletions

@ -1 +1 @@
Subproject commit 32ac48d8b2577bb9ba33ed78ac277700b8049846
Subproject commit 7c03cbe422c2fdc795647e4bebfda6ddeaf66f04

View File

@ -1,4 +1,4 @@
From 2b80937533a75b77cd9f9c583d1987c3695d9853 Mon Sep 17 00:00:00 2001
From d4186dbbc8621facafd0c7b2dd02260435577000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 3 Jun 2015 21:39:34 -0400
Subject: [PATCH] EMC Ignore completion starting with _

View File

@ -1,34 +0,0 @@
From e86c4431ac5664fb84a97a138c3c6b0a73c1ed3f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 28 Jan 2015 00:41:03 -0500
Subject: [PATCH] EMC add Setter for player name in AsyncPlayerPrelogin
This is so we can change the players name early in login process
---
.../java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
index 76c4a1a6..e482fa06 100644
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -18,7 +18,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private Result result;
private String message;
- private final String name;
+ private String name; // EMC
private final InetAddress ipAddress;
private final UUID uniqueId;
@@ -169,6 +169,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
public String getName() {
return name;
}
+ public void setName(String name) { this.name = name; } // EMC
/**
* Gets the player IP address.
--
2.25.1.windows.1

View File

@ -1,4 +1,4 @@
From 070e4ea7af4be88abd84695a1b57acdf47d0954a Mon Sep 17 00:00:00 2001
From bf1346bd3ddefd7bbf005af9b9c78d3c85fca4b0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 3 Jan 2016 22:02:53 -0500
Subject: [PATCH] EMC Add UnknownCommandEvent

View File

@ -1,4 +1,4 @@
From 2f7aa5b35b6460e4070743fb96678e304b67ece6 Mon Sep 17 00:00:00 2001
From a9ae2995a9f48f0ceec5d1c68bf0f2604e0e679c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Apr 2016 02:14:00 -0400
Subject: [PATCH] EMC Rework Spigot Deprecations

View File

@ -1,4 +1,4 @@
From 360de7c4dc995bef26a51dd217651ac93e7f3c14 Mon Sep 17 00:00:00 2001
From a634bb4e44b87f66984e2c2a1e791327c2e6d202 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 21 Nov 2016 17:02:11 -0500
Subject: [PATCH] EMC MonsterEggSpawn Events

View File

@ -1,4 +1,4 @@
From 1f88ea36464241f152926d9c96ba5dc40264b06f Mon Sep 17 00:00:00 2001
From 55416c812b32a069db723842ae0cc8d74c99310e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:01:08 -0500
Subject: [PATCH] EMC AchievementBroadcastEvent

View File

@ -1,4 +1,4 @@
From eb0f076af483ec69d18e2d27ff48201dd14aae57 Mon Sep 17 00:00:00 2001
From 87463376a8a6ccd3e182cc21b80e3bd9a188a262 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:02:45 -0500
Subject: [PATCH] EMC AnvilEvent

View File

@ -1,4 +1,4 @@
From 101589bec061173a7100c055cbeeec872542fbb9 Mon Sep 17 00:00:00 2001
From 1f66d9bd194d8bfc9ca6ee892f665b9cc0397483 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:03:19 -0500
Subject: [PATCH] EMC ArrowHitBlockEvent

View File

@ -1,4 +1,4 @@
From baec015c4d67215d5cdcf1abc3c006ddebbabaac Mon Sep 17 00:00:00 2001
From 6a55dae304dba80d291798d50804987e5d7aeb23 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:19:01 -0500
Subject: [PATCH] EMC EntityKnockbackEvent

View File

@ -1,4 +1,4 @@
From 9b745679e71a6448e2cccda07390cbd44f5fe1ea Mon Sep 17 00:00:00 2001
From cc751b3720c88831966e8d10303431e6f9cd027b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:19:22 -0500
Subject: [PATCH] EMC MovedTooQuicklyEvent

View File

@ -1,4 +1,4 @@
From c5191be3efd60fc0d31b5e74dcca3a716ec4e41e Mon Sep 17 00:00:00 2001
From 7166b56d43096232bf6f064d78b0ef6a975c5613 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:19:32 -0500
Subject: [PATCH] EMC ServerReloadEvent

View File

@ -1,4 +1,4 @@
From 39fc7f6cbe7bf95831f21c7da56291e54457207d Mon Sep 17 00:00:00 2001
From 21036a6530d617f29bc76519796827f0a267faa1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 14:59:41 -0500
Subject: [PATCH] EMC EntityEffectAddedEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC EntityEffectAddedEvent
diff --git a/src/main/java/com/empireminecraft/customevents/EntityEffectAddedEvent.java b/src/main/java/com/empireminecraft/customevents/EntityEffectAddedEvent.java
new file mode 100644
index 000000000..4695943b1
index 00000000..4695943b
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/EntityEffectAddedEvent.java
@@ -0,0 +1,49 @@

View File

@ -1,4 +1,4 @@
From b07bfdda605b86bed19a8e35690c6dee0512ceeb Mon Sep 17 00:00:00 2001
From 34e6a9ccbfe95c44041d9ff2ff34a9f93149e5b0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 15:09:48 -0500
Subject: [PATCH] EMC LivingEntityArmorProtectEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC LivingEntityArmorProtectEvent
diff --git a/src/main/java/com/empireminecraft/customevents/LivingEntityArmorProtectEvent.java b/src/main/java/com/empireminecraft/customevents/LivingEntityArmorProtectEvent.java
new file mode 100644
index 000000000..07e095737
index 00000000..07e09573
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/LivingEntityArmorProtectEvent.java
@@ -0,0 +1,38 @@

View File

@ -1,4 +1,4 @@
From 5386e799178b3d928b14a3fc73997bd5d7736b1d Mon Sep 17 00:00:00 2001
From 49496c1a54fc02a0ad1df40f189dcaf970eca411 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 15:22:03 -0500
Subject: [PATCH] EMC SpawnerInitiateEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC SpawnerInitiateEvent
diff --git a/src/main/java/com/empireminecraft/customevents/SpawnerInitiateEvent.java b/src/main/java/com/empireminecraft/customevents/SpawnerInitiateEvent.java
new file mode 100644
index 000000000..6c7d5821d
index 00000000..6c7d5821
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/SpawnerInitiateEvent.java
@@ -0,0 +1,88 @@

View File

@ -1,4 +1,4 @@
From 83bf1f2f88d5c95ab7baa4a03776a927f0a6e8e1 Mon Sep 17 00:00:00 2001
From 722bce9bc9d33ac4873ff44fb36ffe5da33d6507 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 15:27:06 -0500
Subject: [PATCH] EMC ZombieReinforcementEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC ZombieReinforcementEvent
diff --git a/src/main/java/com/empireminecraft/customevents/ZombieReinforcementEvent.java b/src/main/java/com/empireminecraft/customevents/ZombieReinforcementEvent.java
new file mode 100644
index 000000000..5e0a9bb41
index 00000000..5e0a9bb4
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/ZombieReinforcementEvent.java
@@ -0,0 +1,52 @@

View File

@ -1,4 +1,4 @@
From 1b8ba0b95e9676bce55409a27118f962a7f8eeae Mon Sep 17 00:00:00 2001
From 243440e291fff64313eba61e8b146aeaf5e0a6b3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 20:28:24 -0500
Subject: [PATCH] EMC SnowmanThrowSnowballEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC SnowmanThrowSnowballEvent
diff --git a/src/main/java/com/empireminecraft/customevents/SnowmanThrowSnowballEvent.java b/src/main/java/com/empireminecraft/customevents/SnowmanThrowSnowballEvent.java
new file mode 100644
index 000000000..53311062e
index 00000000..53311062
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/SnowmanThrowSnowballEvent.java
@@ -0,0 +1,63 @@

View File

@ -1,4 +1,4 @@
From 85cf12fcd64cd4292a64d38fac486a91f18e4135 Mon Sep 17 00:00:00 2001
From 12f0e953a62f0ce3bf0a918fecea2429879ce119 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 22:06:10 -0500
Subject: [PATCH] EMC SendSignEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC SendSignEvent
diff --git a/src/main/java/com/empireminecraft/customevents/SendSignEvent.java b/src/main/java/com/empireminecraft/customevents/SendSignEvent.java
new file mode 100644
index 000000000..c51559156
index 00000000..c5155915
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/SendSignEvent.java
@@ -0,0 +1,45 @@

View File

@ -1,4 +1,4 @@
From d5ce58a8e87b296ec9968807a148e8f7fc78737b Mon Sep 17 00:00:00 2001
From cf91100fafa3278dbc4db9f735618901a55f66f2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 7 Dec 2016 00:22:09 -0500
Subject: [PATCH] EMC PlayerUseItemEvent
@ -16,7 +16,7 @@ Subject: [PATCH] EMC PlayerUseItemEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerPostPlaceItemAtEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerPostPlaceItemAtEvent.java
new file mode 100644
index 000000000..8e83d0d9a
index 00000000..8e83d0d9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerPostPlaceItemAtEvent.java
@@ -0,0 +1,80 @@
@ -102,7 +102,7 @@ index 000000000..8e83d0d9a
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerPostUseItemEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerPostUseItemEvent.java
new file mode 100644
index 000000000..511082ea1
index 00000000..511082ea
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerPostUseItemEvent.java
@@ -0,0 +1,69 @@
@ -177,7 +177,7 @@ index 000000000..511082ea1
+}
diff --git a/src/main/java/com/empireminecraft/customevents/PlayerPlaceItemAtEvent.java b/src/main/java/com/empireminecraft/customevents/PlayerPlaceItemAtEvent.java
new file mode 100644
index 000000000..1b1bf8546
index 00000000..1b1bf854
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/PlayerPlaceItemAtEvent.java
@@ -0,0 +1,110 @@
@ -293,7 +293,7 @@ index 000000000..1b1bf8546
+}
diff --git a/src/main/java/com/empireminecraft/customevents/PlayerUseItemEvent.java b/src/main/java/com/empireminecraft/customevents/PlayerUseItemEvent.java
new file mode 100644
index 000000000..c61c6a44f
index 00000000..c61c6a44
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/PlayerUseItemEvent.java
@@ -0,0 +1,89 @@

View File

@ -1,4 +1,4 @@
From 30b791bc8c195f021024d231b0a05448cfb4e1f1 Mon Sep 17 00:00:00 2001
From 5966e1880b8d137b87d1238fb5b51445664bdc6c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 21:55:16 -0500
Subject: [PATCH] EMC EntityAttackedEntityEvent
@ -16,7 +16,7 @@ and that the damage event was not cancelled.
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityAttackedEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityAttackedEntityEvent.java
new file mode 100644
index 000000000..0f32f157b
index 00000000..0f32f157
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityAttackedEntityEvent.java
@@ -0,0 +1,92 @@
@ -114,7 +114,7 @@ index 000000000..0f32f157b
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityAttackedPlayerEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityAttackedPlayerEvent.java
new file mode 100644
index 000000000..8ce33f32d
index 00000000..8ce33f32
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityAttackedPlayerEvent.java
@@ -0,0 +1,40 @@
@ -160,7 +160,7 @@ index 000000000..8ce33f32d
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PlayerAttackedEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PlayerAttackedEntityEvent.java
new file mode 100644
index 000000000..134a7e02d
index 00000000..134a7e02
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PlayerAttackedEntityEvent.java
@@ -0,0 +1,41 @@

View File

@ -1,4 +1,4 @@
From a1778b4f40e83debd9836b2191f5440132a7be7e Mon Sep 17 00:00:00 2001
From ccd0e1939b19fbc825a457448b98a8ad8db9bad9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 10 May 2018 20:25:37 -0400
Subject: [PATCH] EMC BlazeLaunchFireballEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC BlazeLaunchFireballEvent
diff --git a/src/main/java/com/empireminecraft/customevents/BlazeLaunchFireballEvent.java b/src/main/java/com/empireminecraft/customevents/BlazeLaunchFireballEvent.java
new file mode 100644
index 000000000..029a1f9a1
index 00000000..029a1f9a
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/BlazeLaunchFireballEvent.java
@@ -0,0 +1,66 @@

View File

@ -1,4 +1,4 @@
From c131a44a6eef73197a6a1953adc55d4428444ab1 Mon Sep 17 00:00:00 2001
From 889328972ef434bf9674d652ee0fe734113f70f8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 17 Jun 2018 02:08:40 -0400
Subject: [PATCH] EMC Human#getAttackPct
@ -8,7 +8,7 @@ Subject: [PATCH] EMC Human#getAttackPct
1 file changed, 1 insertion(+)
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index c0d38f5a3..70f046ce5 100644
index c0d38f5a..70f046ce 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -20,6 +20,7 @@ import org.jetbrains.annotations.Nullable;

View File

@ -1,4 +1,4 @@
From 89b1a40836f5253e4f00f92c4e6d562d3bd902cd Mon Sep 17 00:00:00 2001
From 59d0f663adaf25f1e645fd361f76400690129d48 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 18 Aug 2018 21:09:39 -0400
Subject: [PATCH] EMC SpawnEggMeta#setSpawnedEntity API
@ -11,7 +11,7 @@ follow normal spawn behavior in the summon phase.
1 file changed, 39 insertions(+)
diff --git a/src/main/java/org/bukkit/inventory/meta/SpawnEggMeta.java b/src/main/java/org/bukkit/inventory/meta/SpawnEggMeta.java
index 9ae84de43..f6ee31cd6 100644
index 9ae84de4..f6ee31cd 100644
--- a/src/main/java/org/bukkit/inventory/meta/SpawnEggMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/SpawnEggMeta.java
@@ -9,6 +9,45 @@ import org.jetbrains.annotations.NotNull;

View File

@ -1,4 +1,4 @@
From f574c7d8d40084036ced9d39ae1c068b4a7a31e4 Mon Sep 17 00:00:00 2001
From 943257ee2950c7b933935ff7bada33dd566136ff Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Sun, 14 Jul 2019 13:50:18 -0500
Subject: [PATCH] EMC Add ConduitNewTargetEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC Add ConduitNewTargetEvent
diff --git a/src/main/java/com/empireminecraft/customevents/ConduitNewTargetEvent.java b/src/main/java/com/empireminecraft/customevents/ConduitNewTargetEvent.java
new file mode 100644
index 000000000..c3de31cf5
index 00000000..c3de31cf
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/ConduitNewTargetEvent.java
@@ -0,0 +1,39 @@

View File

@ -1,4 +1,4 @@
From ca2a134df9a84d43f8c4ef127bf50aede812b358 Mon Sep 17 00:00:00 2001
From daf3b3dd12e6da29039a4b520ff58da4b5224d74 Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Fri, 29 Nov 2019 02:47:35 -0600
Subject: [PATCH] EMC Add a PlayerThrowTrident event
@ -10,7 +10,7 @@ Subject: [PATCH] EMC Add a PlayerThrowTrident event
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerThrowTridentEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerThrowTridentEvent.java
new file mode 100644
index 000000000..1ee88dcf3
index 00000000..1ee88dcf
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerThrowTridentEvent.java
@@ -0,0 +1,49 @@

View File

@ -1,4 +1,4 @@
From b9c9eece57661111616724185fe0c0e5b34e5f35 Mon Sep 17 00:00:00 2001
From 4a5dc872c1d4967862890dd4fa8b82eaee5617bb Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Fri, 17 Jan 2020 21:27:29 -0600
Subject: [PATCH] EMC Add a BlockHarvestBeehiveEvent
@ -10,7 +10,7 @@ Subject: [PATCH] EMC Add a BlockHarvestBeehiveEvent
diff --git a/src/main/java/com/empireminecraft/customevents/BlockHarvestBeehiveEvent.java b/src/main/java/com/empireminecraft/customevents/BlockHarvestBeehiveEvent.java
new file mode 100644
index 000000000..39cc3a973
index 00000000..39cc3a97
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/BlockHarvestBeehiveEvent.java
@@ -0,0 +1,66 @@

View File

@ -1,4 +1,4 @@
From 192dedb044f9d228730febd2c8aeac0da0fcf64f Mon Sep 17 00:00:00 2001
From 77b63d2a8e2b80d99d0fa21163c7f4f0b4bc4e65 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 20:10:31 +0100
Subject: [PATCH] Kill AnnotationTest
@ -10,7 +10,7 @@ Subject: [PATCH] Kill AnnotationTest
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
deleted file mode 100644
index a48be38b1..000000000
index a48be38b..00000000
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ /dev/null
@@ -1,259 +0,0 @@

View File

@ -1,4 +1,4 @@
From cf79beb447bd168ee90ca2f349b600e1f8f44acb Mon Sep 17 00:00:00 2001
From aba0196f0a9ca36a5c8a5d126543a73dd5535019 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 22:21:14 +0100
Subject: [PATCH] Add GameProfileLookupEvent
@ -10,7 +10,7 @@ Subject: [PATCH] Add GameProfileLookupEvent
create mode 100644 src/main/java/de/tr7zw/yapfa/events/GameProfileLookupEvent.java
diff --git a/pom.xml b/pom.xml
index b9d515237..9b9e8c5c3 100644
index b9d51523..9b9e8c5c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,6 +40,10 @@
@ -40,7 +40,7 @@ index b9d515237..9b9e8c5c3 100644
<artifactId>fastutil</artifactId>
diff --git a/src/main/java/de/tr7zw/yapfa/events/GameProfileLookupEvent.java b/src/main/java/de/tr7zw/yapfa/events/GameProfileLookupEvent.java
new file mode 100644
index 000000000..4ab5fd191
index 00000000..4ab5fd19
--- /dev/null
+++ b/src/main/java/de/tr7zw/yapfa/events/GameProfileLookupEvent.java
@@ -0,0 +1,45 @@

View File

@ -1,4 +1,4 @@
From bb86d2fa9a4615aa87855e1ac1c9607e496fbd24 Mon Sep 17 00:00:00 2001
From f3a626fc997204282faf6653efaba8bde639dc2a Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 5 Mar 2020 21:13:14 +0100
Subject: [PATCH] Add getLastTickMs() api
@ -9,7 +9,7 @@ Subject: [PATCH] Add getLastTickMs() api
2 files changed, 19 insertions(+)
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index a9c10228e..53589303e 100644
index a9c10228..53589303 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1712,6 +1712,14 @@ public final class Bukkit {
@ -28,7 +28,7 @@ index a9c10228e..53589303e 100644
@NotNull
public static Server.Spigot spigot() {
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index cf20e7541..771827d80 100644
index cf20e754..771827d8 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1504,4 +1504,15 @@ public interface Server extends PluginMessageRecipient {

View File

@ -1,4 +1,4 @@
From cd6e51c2047b927970f39546b1b0e79adb2e57fa Mon Sep 17 00:00:00 2001
From afced8c2634fd0f2fe6413d9aac0c782255e9d39 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 2 Apr 2020 18:49:56 +0200
Subject: [PATCH] Add NBT-API as first-class lib
@ -11,7 +11,7 @@ Subject: [PATCH] Add NBT-API as first-class lib
4 files changed, 56 insertions(+)
diff --git a/pom.xml b/pom.xml
index 9b9e8c5c3..bd1fc68a6 100644
index 9b9e8c5c..bd1fc68a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,11 @@
@ -52,7 +52,7 @@ index 9b9e8c5c3..bd1fc68a6 100644
</plugin>
</plugins>
diff --git a/src/main/java/org/bukkit/block/TileState.java b/src/main/java/org/bukkit/block/TileState.java
index 3b10fcc13..acb135968 100644
index 3b10fcc1..acb13596 100644
--- a/src/main/java/org/bukkit/block/TileState.java
+++ b/src/main/java/org/bukkit/block/TileState.java
@@ -4,6 +4,8 @@ import org.bukkit.persistence.PersistentDataContainer;
@ -78,7 +78,7 @@ index 3b10fcc13..acb135968 100644
+ // YAPFA end
}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 3f0f38031..771e7ea73 100644
index 3f0f3803..771e7ea7 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -23,6 +23,8 @@ import org.jetbrains.annotations.Contract;
@ -104,7 +104,7 @@ index 3f0f38031..771e7ea73 100644
+ // YAPFA end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index eed5110bd..69d90f7d9 100644
index eed5110b..69d90f7d 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1,6 +1,10 @@

View File

@ -1,4 +1,4 @@
From 034cc6d131143f31aee7d722ab5e13d38ae7a2d0 Mon Sep 17 00:00:00 2001
From 6928e8e7293741f6783b964517e9b2b10949ffac Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 24 Apr 2017 20:27:23 -0400
Subject: [PATCH] EMC Add ChatColor.getById
@ -9,7 +9,7 @@ Bukkit has had a map of this for years and it was totally unused...
1 file changed, 20 insertions(+)
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
index a0ef2a827..eb60aedba 100644
index a0ef2a82..eb60aedb 100644
--- a/src/main/java/org/bukkit/ChatColor.java
+++ b/src/main/java/org/bukkit/ChatColor.java
@@ -263,6 +263,15 @@ public enum ChatColor {

View File

@ -1,4 +1,4 @@
From b6acd3d10cde8bc00e11f486c433daa36bad69b8 Mon Sep 17 00:00:00 2001
From 46da4bc36861aaa7c24302ac05373b3c8e823d95 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 18:37:34 +0100
Subject: [PATCH] Brandings
@ -53,10 +53,10 @@ index 000000000..b7a73408e
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 533caec8c..6ef81f2ff 100644
index 3c9392077..f0959d301 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1626,7 +1626,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1630,7 +1630,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -66,7 +66,7 @@ index 533caec8c..6ef81f2ff 100644
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 0f97cf2b4..b281f05c4 100644
index 760752eae..6181f5886 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -205,7 +205,7 @@ import javax.annotation.Nullable; // Paper

View File

@ -1,4 +1,4 @@
From dd8d9f054298ee190dbf501086ed38219a9a1701 Mon Sep 17 00:00:00 2001
From 254502448f6e3ac2050c6e02ee6815afc652fe3f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 10 Jan 2014 22:05:59 -0500
Subject: [PATCH] EMC Disable Snooper
@ -9,10 +9,10 @@ What purpose does it provide...
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 32468041ea..04aa83f0c6 100644
index f0959d301..d18387971 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1272,11 +1272,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1275,11 +1275,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
//} // Paper
this.methodProfiler.enter("snooper");

View File

@ -1,4 +1,4 @@
From 5cee71773043550df6701c08422afa6da056b2e9 Mon Sep 17 00:00:00 2001
From 2d1d84b97d24eda054974bfcb0ee1e342c638956 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 5 Sep 2014 23:04:54 -0400
Subject: [PATCH] EMC Accept the EULA
@ -9,10 +9,10 @@ Starlis LLC, the owner of Empire Minecraft, accepts the Minecraft EULA with this
1 file changed, 1 insertion(+)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 11c575484..c9e7b24b8 100644
index d18387971..16535da3e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1483,6 +1483,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1487,6 +1487,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
System.err.println( "If you do not agree to the above EULA please stop your server and remove this flag immediately." );
}
// Spigot End

View File

@ -1,29 +0,0 @@
From a9ec46dca1402c4022dcda8e4c0b5178a4a88966 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 28 Jan 2015 01:01:17 -0500
Subject: [PATCH] EMC Allow changing of player name in Prelogin
This is so we can disable player renames and force them to use old name temporarily.
---
src/main/java/net/minecraft/server/LoginListener.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index f1222fcb..99541fd3 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -316,6 +316,11 @@ public class LoginListener implements PacketLoginInListener {
uniqueId = i.getId();
// Paper end
+ // EMC start
+ GameProfile old = i;
+ i = new GameProfile(uniqueId, asyncEvent.getName());
+ i.getProperties().putAll(old.getProperties());
+ // EMC end
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
final PlayerPreLoginEvent event = new PlayerPreLoginEvent(playerName, address, uniqueId);
if (asyncEvent.getResult() != PlayerPreLoginEvent.Result.ALLOWED) {
--
2.25.1.windows.1

View File

@ -1,4 +1,4 @@
From def9be892af238fdea48bb42156ba47c73123987 Mon Sep 17 00:00:00 2001
From d36229523dbf75db20c668e93d166e34fe4dfc78 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 30 Apr 2015 22:12:01 -0400
Subject: [PATCH] EMC Ignore statistics warnings
@ -8,7 +8,7 @@ Subject: [PATCH] EMC Ignore statistics warnings
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
index 449e4ec8..b3c9a5a8 100644
index 449e4ec8c..b3c9a5a84 100644
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
@@ -113,15 +113,15 @@ public class ServerStatisticManager extends StatisticManager {

View File

@ -1,4 +1,4 @@
From e85dd28471efa21880b6aaf2d611c34619571f08 Mon Sep 17 00:00:00 2001
From ef4059f6b4f20d1ab43422e34a6d4347ad87f0f2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 8 Jun 2015 23:55:20 -0400
Subject: [PATCH] EMC SendSignEvent
@ -11,7 +11,7 @@ Subject: [PATCH] EMC SendSignEvent
diff --git a/src/main/java/com/empireminecraft/api/SendSignEventImpl.java b/src/main/java/com/empireminecraft/api/SendSignEventImpl.java
new file mode 100644
index 0000000000..9f3cb62ffb
index 000000000..9f3cb62ff
--- /dev/null
+++ b/src/main/java/com/empireminecraft/api/SendSignEventImpl.java
@@ -0,0 +1,42 @@
@ -58,7 +58,7 @@ index 0000000000..9f3cb62ffb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index 0e9a90b70f..6323fe5594 100644
index 0e9a90b70..6323fe559 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -20,10 +20,15 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //

View File

@ -1,4 +1,4 @@
From 1144e2de00171924c89fe3c3c73b7f7b69557607 Mon Sep 17 00:00:00 2001
From fa4dc4a355819d26a5502092ed3daf593b9dba48 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 25 Jun 2015 21:00:09 -0400
Subject: [PATCH] EMC ServerReloadEvent
@ -8,7 +8,7 @@ Subject: [PATCH] EMC ServerReloadEvent
1 file changed, 1 insertion(+)
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b281f05c4b..6838b0ed2d 100644
index 6181f5886..206165c13 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -780,6 +780,7 @@ public final class CraftServer implements Server {

View File

@ -1,4 +1,4 @@
From f5f5651fb06870655bb7245642b1dfce8d9e5c1c Mon Sep 17 00:00:00 2001
From 63c2c696840bb4c5b970664baa21c4d6f6f20d22 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 21 Dec 2015 13:33:00 -0500
Subject: [PATCH] EMC SnowmanThrowSnowballEvent
@ -8,7 +8,7 @@ Subject: [PATCH] EMC SnowmanThrowSnowballEvent
1 file changed, 20 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
index dee55c5dea..9d1cfae9e0 100644
index dee55c5de..9d1cfae9e 100644
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
@@ -9,6 +9,25 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {

View File

@ -1,4 +1,4 @@
From fd14f5382adf6ac8b3a7c9c437ab583c01be6a39 Mon Sep 17 00:00:00 2001
From 97469e3531df7d350c60eb64ec56c541d17e607f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 1 Jun 2016 23:29:17 -0400
Subject: [PATCH] EMC Reset Ender Crystals on Dragon Spawn
@ -8,7 +8,7 @@ Subject: [PATCH] EMC Reset Ender Crystals on Dragon Spawn
1 file changed, 2 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index 687efa022d..2617a6c0d9 100644
index 687efa022..2617a6c0d 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -403,6 +403,7 @@ public class EnderDragonBattle {

View File

@ -1,4 +1,4 @@
From 12d7dd6152a24a37aa45d7766d716ba5dfbcbaa2 Mon Sep 17 00:00:00 2001
From 7ea04e202d29e9eedf93909cc35667ebd6f9e905 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 21:42:45 -0500
Subject: [PATCH] EMC EntityAttackedEntityEvent
@ -10,7 +10,7 @@ and that the damage event was not cancelled.
1 file changed, 7 insertions(+)
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ce8d7877ad..b661951ef2 100644
index ce8d7877a..b661951ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1008,7 +1008,14 @@ public class CraftEventFactory {

View File

@ -1,4 +1,4 @@
From d8e2e317ff312ba11bb562e9e2775ab1c9d661ce Mon Sep 17 00:00:00 2001
From fcd5d6a2277dadeb29dae1a4e3a4cf8a9ceb1bcd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 17 Jun 2018 02:09:37 -0400
Subject: [PATCH] EMC Human#getAttackPct
@ -9,7 +9,7 @@ Subject: [PATCH] EMC Human#getAttackPct
2 files changed, 4 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 8f4bb71b16..c1e8ff6ab3 100644
index 8f4bb71b1..c1e8ff6ab 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -79,6 +79,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -29,7 +29,7 @@ index 8f4bb71b16..c1e8ff6ab3 100644
f *= 0.2F + f2 * f2 * 0.8F;
f1 *= f2;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index a2815073bc..faa65ef202 100644
index a2815073b..faa65ef20 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -72,6 +72,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {

View File

@ -1,4 +1,4 @@
From e3347077fdfae725f03834cb0c7e995ae188057f Mon Sep 17 00:00:00 2001
From fa8b297bda7ff645d6ea8a02e42563d36ac61ce4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Jun 2018 22:35:39 -0400
Subject: [PATCH] EMC Tweak Explosions
@ -8,7 +8,7 @@ Subject: [PATCH] EMC Tweak Explosions
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index 2552f860ff..cfe37b7ff9 100644
index 2552f860f..cfe37b7ff 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -97,6 +97,7 @@ public class Explosion {

View File

@ -1,4 +1,4 @@
From 3bb3ebfbc77ae1907f20de299e568cb6009c6e45 Mon Sep 17 00:00:00 2001
From d0ae23f4fd1d2326820ecb71d18bc197efc6d80d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 18 Aug 2018 22:03:33 -0400
Subject: [PATCH] EMC SpawnEggMeta#setSpawnedEntity API
@ -11,7 +11,7 @@ follow normal spawn behavior in the summon phase.
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
index 0634fb36dd..24ac98e4d5 100644
index 0634fb36d..24ac98e4d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
@@ -2,6 +2,9 @@ package org.bukkit.craftbukkit.inventory;

View File

@ -1,4 +1,4 @@
From 81111b4cbd11a7e68111395a69795fb7a17d6e0f Mon Sep 17 00:00:00 2001
From e95bc0ecde22c25fc65fd258148ac65c12e9bf1b Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Sun, 14 Jul 2019 13:50:53 -0500
Subject: [PATCH] EMC ConduitNewTargetEvent and remove target for cancelled
@ -9,10 +9,10 @@ Subject: [PATCH] EMC ConduitNewTargetEvent and remove target for cancelled
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/TileEntityConduit.java b/src/main/java/net/minecraft/server/TileEntityConduit.java
index 07f265b299..b6ad68fcbf 100644
index 34c191d76..3f487a9d9 100644
--- a/src/main/java/net/minecraft/server/TileEntityConduit.java
+++ b/src/main/java/net/minecraft/server/TileEntityConduit.java
@@ -182,7 +182,14 @@ public class TileEntityConduit extends TileEntity implements ITickable {
@@ -199,7 +199,14 @@ public class TileEntityConduit extends TileEntity implements ITickable {
List<EntityLiving> list = this.world.a(EntityLiving.class, this.m(), (java.util.function.Predicate<EntityLiving>) (entityliving1) -> { // CraftBukkit - decompile error
return entityliving1 instanceof IMonster && entityliving1.isInWaterOrRain();
});
@ -28,7 +28,7 @@ index 07f265b299..b6ad68fcbf 100644
if (!list.isEmpty()) {
this.target = (EntityLiving) list.get(this.world.random.nextInt(list.size()));
}
@@ -195,7 +202,7 @@ public class TileEntityConduit extends TileEntity implements ITickable {
@@ -212,7 +219,7 @@ public class TileEntityConduit extends TileEntity implements ITickable {
CraftEventFactory.blockDamage = CraftBlock.at(this.world, this.position);
if (this.target.damageEntity(DamageSource.MAGIC, 4.0F)) {
this.world.playSound((EntityHuman) null, this.target.locX(), this.target.locY(), this.target.locZ(), SoundEffects.BLOCK_CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);

View File

@ -1,4 +1,4 @@
From bb57f36b3cd3cb8b2373823844ba1af5fc2ef1ef Mon Sep 17 00:00:00 2001
From 246cfe03a925008d8ee164cbcfa91e1beec0c3b9 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Fri, 16 Aug 2019 22:18:35 -0400
Subject: [PATCH] EMC Fix Bukkit.createInventory() with type LECTERN
@ -28,12 +28,12 @@ License: https://opensource.org/licenses/MIT
3 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/src/main/java/net/minecraft/server/TileEntityLectern.java b/src/main/java/net/minecraft/server/TileEntityLectern.java
index 6c2b48bdbe..ab1c15e0d1 100644
index c3b854b6a..2fa24a386 100644
--- a/src/main/java/net/minecraft/server/TileEntityLectern.java
+++ b/src/main/java/net/minecraft/server/TileEntityLectern.java
@@ -18,6 +18,11 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
// CraftBukkit start - add fields and methods
public final IInventory inventory = new LecternInventory();
public IInventory inventory = new LecternInventory(); // Tuinity - need non-final for `createCopyForPush`
public class LecternInventory implements IInventory {
+ // EMC start
+ public TileEntityLectern getLectern() {
@ -70,15 +70,15 @@ index 6c2b48bdbe..ab1c15e0d1 100644
}
@Override
@@ -158,6 +163,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -165,6 +170,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
private ItemStack book;
private int page;
private int maxPage;
+ public boolean virtual = false; // EMC
public TileEntityLectern() {
super(TileEntityTypes.LECTERN);
@@ -179,6 +185,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
// Tuinity start - pushable TE's
@Override
@@ -198,6 +204,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
}
private void k() {
@ -86,7 +86,7 @@ index 6c2b48bdbe..ab1c15e0d1 100644
this.page = 0;
this.maxPage = 0;
BlockLectern.setHasBook(this.getWorld(), this.getPosition(), this.getBlock(), false);
@@ -196,6 +203,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
@@ -215,6 +222,7 @@ public class TileEntityLectern extends TileEntity implements Clearable, ITileInv
if (j != this.page) {
this.page = j;
@ -95,7 +95,7 @@ index 6c2b48bdbe..ab1c15e0d1 100644
if (this.world != null) BlockLectern.a(this.getWorld(), this.getPosition(), this.getBlock()); // CraftBukkit
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index faa65ef202..74b9c45162 100644
index faa65ef20..74b9c4516 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -31,6 +31,7 @@ import net.minecraft.server.PacketPlayInCloseWindow;
@ -119,7 +119,7 @@ index faa65ef202..74b9c45162 100644
if (iinventory instanceof ITileInventory) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
index 32b36c70ae..f0c1d61104 100644
index 32b36c70a..f0c1d6110 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
@@ -126,8 +126,19 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat

View File

@ -1,4 +1,4 @@
From d2d149a01aa9c804dd0524b88b99da1bcdfd5db6 Mon Sep 17 00:00:00 2001
From fb1a9a659f1a59954205eebad4b83148f58d26ab Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Fri, 29 Nov 2019 02:48:17 -0600
Subject: [PATCH] EMC Add the PlayerThrowTridentEvent
@ -8,7 +8,7 @@ Subject: [PATCH] EMC Add the PlayerThrowTridentEvent
1 file changed, 3 insertions(+)
diff --git a/src/main/java/net/minecraft/server/ItemTrident.java b/src/main/java/net/minecraft/server/ItemTrident.java
index f571a1586d..2997c0e981 100644
index f571a1586..2997c0e98 100644
--- a/src/main/java/net/minecraft/server/ItemTrident.java
+++ b/src/main/java/net/minecraft/server/ItemTrident.java
@@ -1,6 +1,8 @@

View File

@ -1,4 +1,4 @@
From f4d1452e0d9f5256302c5bf661b90a9d0787f5f2 Mon Sep 17 00:00:00 2001
From 5ffd79cb671b6375a9b10af370446daee4d1447c Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Fri, 17 Jan 2020 21:32:10 -0600
Subject: [PATCH] EMC Add the BlockHarvestBeehiveEvent
@ -8,7 +8,7 @@ Subject: [PATCH] EMC Add the BlockHarvestBeehiveEvent
1 file changed, 6 insertions(+)
diff --git a/src/main/java/net/minecraft/server/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java
index 3af686c7f1..df0501b65e 100644
index 3af686c7f..df0501b65 100644
--- a/src/main/java/net/minecraft/server/IDispenseBehavior.java
+++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java
@@ -4,6 +4,7 @@ import java.util.Iterator;

View File

@ -1,4 +1,4 @@
From eee762f40fd0a8db5df9c8a30ee02aa9c9aff41d Mon Sep 17 00:00:00 2001
From 2d1bec28287ceae911426a1b6a18db40037e2599 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Tue, 4 Jun 2019 15:50:08 -0500
Subject: [PATCH] Purpur Fix 'outdated server' showing in ping before server
@ -9,7 +9,7 @@ Subject: [PATCH] Purpur Fix 'outdated server' showing in ping before server
1 file changed, 1 insertion(+)
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
index 4bb21c48bd..30f16db02c 100644
index 4bb21c48b..30f16db02 100644
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
@@ -135,6 +135,7 @@ public class PacketStatusListener implements PacketStatusInListener {

View File

@ -1,4 +1,4 @@
From c2d4a276383e4205cb62f2c7f6aeeb310d765655 Mon Sep 17 00:00:00 2001
From ea63c5b08bcb99f430f5ddf65a25bfd34479efe4 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 21:39:58 +0100
Subject: [PATCH] Don't save Fireworks and Arrows

View File

@ -1,4 +1,4 @@
From 1bb823d548c91284597f9cfd7d9236df8537f6e8 Mon Sep 17 00:00:00 2001
From 6902e3814ce6f664a479114b9cf374598cda084e Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 22:22:02 +0100
Subject: [PATCH] Add GameProfileLookupEvent
@ -9,7 +9,7 @@ Subject: [PATCH] Add GameProfileLookupEvent
2 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
index b151a13c1b..a37db9a55a 100644
index b151a13c1..a37db9a55 100644
--- a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
@@ -5,8 +5,12 @@ import com.google.common.base.Charsets;
@ -49,7 +49,7 @@ index b151a13c1b..a37db9a55a 100644
return profile.isComplete() && (!isOnlineMode || !textures || hasTextures());
}
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
index 0882d82cef..62607f495f 100644
index 0882d82ce..62607f495 100644
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
@@ -4,9 +4,14 @@ import com.google.common.collect.Iterables;

View File

@ -1,4 +1,4 @@
From 7ae9a2ae315cba0691a6515658a95c3e51e58b7f Mon Sep 17 00:00:00 2001
From c244713cc3fe52b12671a4b2194f118de83d2872 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 5 Mar 2020 21:13:33 +0100
Subject: [PATCH] Add getLastTickMs() api
@ -10,10 +10,10 @@ Subject: [PATCH] Add getLastTickMs() api
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e361f4a7f1..01fb435f26 100644
index 16535da3e..f41584b85 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -898,6 +898,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -901,6 +901,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
private static final java.math.BigDecimal TPS_BASE = new java.math.BigDecimal(1E9).multiply(new java.math.BigDecimal(SAMPLE_INTERVAL));
// Paper End
// Spigot End
@ -22,7 +22,7 @@ index e361f4a7f1..01fb435f26 100644
public void run() {
try {
@@ -962,9 +964,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -965,9 +967,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.d().d();
}
@ -36,7 +36,7 @@ index e361f4a7f1..01fb435f26 100644
this.methodProfiler.exitEnter("nextTickWait");
this.ac = true;
this.ab = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
@@ -972,6 +978,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -975,6 +981,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
this.methodProfiler.b();
this.hasTicked = true;
@ -45,7 +45,7 @@ index e361f4a7f1..01fb435f26 100644
} else {
this.a((CrashReport) null);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6838b0ed2d..93b3cd403e 100644
index 206165c13..0998fcaaa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2285,4 +2285,13 @@ public final class CraftServer implements Server {
@ -63,7 +63,7 @@ index 6838b0ed2d..93b3cd403e 100644
+ // YAPFA end
}
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
index 387af9d5c0..159c95eb8c 100644
index 387af9d5c..159c95eb8 100644
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
@@ -30,7 +30,7 @@ public class TicksPerSecondCommand extends Command

View File

@ -1,4 +1,4 @@
From 954cad21e69b376f2b67a36c0b5d8de51679f260 Mon Sep 17 00:00:00 2001
From b2e9b319d605f62ee2d614dc6d914f12d5993f47 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 5 Mar 2020 22:31:50 +0100
Subject: [PATCH] Add config, yapfa command and basic settings
@ -376,7 +376,7 @@ index 000000000..9711cbc52
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index c95e1722a..7297f8718 100644
index 77651d228..bbf4f1ef6 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -194,6 +194,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer

View File

@ -1,4 +1,4 @@
From 6d17034282bc77902a9afa910b1467e7f57b99d6 Mon Sep 17 00:00:00 2001
From 1d75ce8632d5a869f976cc31473f979c4017db5a Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 5 Mar 2020 23:08:01 +0100
Subject: [PATCH] Kill the vanilla "GameProfiler"
@ -11,7 +11,7 @@ Subject: [PATCH] Kill the vanilla "GameProfiler"
diff --git a/src/main/java/de/tr7zw/yapfa/GameProfilerDisabled.java b/src/main/java/de/tr7zw/yapfa/GameProfilerDisabled.java
new file mode 100644
index 0000000000..96a2270a81
index 000000000..96a2270a8
--- /dev/null
+++ b/src/main/java/de/tr7zw/yapfa/GameProfilerDisabled.java
@@ -0,0 +1,51 @@
@ -67,7 +67,7 @@ index 0000000000..96a2270a81
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 01fb435f26..43bec703f0 100644
index f41584b85..53acfcd5b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -80,7 +80,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -79,7 +79,7 @@ index 01fb435f26..43bec703f0 100644
private ServerConnection serverConnection;
public final WorldLoadListenerFactory worldLoadListenerFactory;
private final ServerPing serverPing = new ServerPing();
@@ -961,7 +961,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -964,7 +964,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.nextTick += 50L;
if (this.T) {
this.T = false;

View File

@ -1,4 +1,4 @@
From f5d3e38a68911e376a1ff0860f8df4a6d9af9044 Mon Sep 17 00:00:00 2001
From 644378526ab39dd3711e66633cbb52397242c09a Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 23 Mar 2020 18:20:58 +0100
Subject: [PATCH] Remove Stream usage
@ -145,7 +145,7 @@ index 000000000..d67753937
+
+}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index d051a54aa..48f764ef0 100644
index bd7a92599..62e7b4c1a 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -99,7 +99,7 @@ public class Block implements IMaterial {
@ -158,7 +158,7 @@ index d051a54aa..48f764ef0 100644
entity.enderTeleportTo(entity.locX(), entity.locY() + 1.0D + d0, entity.locZ());
}
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 3bf17ccda..67f95a9a6 100644
index 4c64798fb..c429470cd 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -72,7 +72,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@ -169,7 +169,7 @@ index 3bf17ccda..67f95a9a6 100644
+ return (T) new NBTTagIntArray(new int[]{this.getX(), this.getY(), this.getZ()}); // YAPFA
}
public static long a(long i, EnumDirection enumdirection) {
public static long getAdjacent(int baseX, int baseY, int baseZ, EnumDirection enumdirection) { return asLong(baseX + enumdirection.getAdjacentX(), baseY + enumdirection.getAdjacentY(), baseZ + enumdirection.getAdjacentZ()); } // Paper
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
index f0d7a91fa..15e2439d6 100644
--- a/src/main/java/net/minecraft/server/CraftingManager.java

View File

@ -1,4 +1,4 @@
From 3ee6626ba5050ec3ba8df5090c3f04fd06313571 Mon Sep 17 00:00:00 2001
From b1bae1bfe5264b7b52084ea00ac4656798c1fc04 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 23 Mar 2020 23:11:10 +0100
Subject: [PATCH] Add option for only players to have collisions with Entities

View File

@ -1,4 +1,4 @@
From a00be490b32075cb917f0eb1718a965fb29616cf Mon Sep 17 00:00:00 2001
From 9566c7136ddcc6f82e23eb0dd45359387b3e380e Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Sun, 29 Mar 2020 00:35:03 +0100
Subject: [PATCH] Allow to change the piston push limit
@ -9,7 +9,7 @@ Subject: [PATCH] Allow to change the piston push limit
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
index 655c4e68f3..29587589cb 100644
index 655c4e68f..29587589c 100644
--- a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
@@ -221,5 +221,9 @@ public class YapfaConfig {
@ -24,7 +24,7 @@ index 655c4e68f3..29587589cb 100644
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
index 8ac7d30bea..de1c98ccab 100644
index 8ac7d30be..de1c98cca 100644
--- a/src/main/java/net/minecraft/server/PistonExtendsChecker.java
+++ b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
@@ -79,7 +79,7 @@ public class PistonExtendsChecker {

View File

@ -1,4 +1,4 @@
From 8832a6c5969a2cef1ebd85699b32f7d8d9855270 Mon Sep 17 00:00:00 2001
From 830a7c3d35b87de89f9235b0a2d814e51ca78836 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Thu, 2 Apr 2020 18:49:38 +0200
Subject: [PATCH] Add NBT-API as first-class lib

View File

@ -1,691 +0,0 @@
From 2bf37c8c22d78962b83dc0b6e2976d366b15cf91 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Sun, 29 Mar 2020 01:59:27 +0100
Subject: [PATCH] Add option for pushable TileEntities
[WIP] This patch is a Spigot patch port of Carpet-Mod's option to allow pushable TileEntities. Original source can be found here: https://github.com/gnembon/fabric-carpet
---
src/main/java/de/tr7zw/yapfa/YapfaConfig.java | 5 +
.../net/minecraft/server/BlockPiston.java | 53 ++-
.../server/PistonExtendsChecker.java | 96 ++++-
.../java/net/minecraft/server/TileEntity.java | 6 +
.../minecraft/server/TileEntityPiston.java | 369 ++++++++++++++++++
.../net/minecraft/server/WorldServer.java | 7 +
6 files changed, 531 insertions(+), 5 deletions(-)
create mode 100644 src/main/java/net/minecraft/server/TileEntityPiston.java
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
index 29587589c..e804bd3f5 100644
--- a/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
+++ b/src/main/java/de/tr7zw/yapfa/YapfaConfig.java
@@ -226,4 +226,9 @@ public class YapfaConfig {
pistonPushLimit = getInt("settings.pistonPushLimit", 12);
}
+ public static boolean pushableTileEntities = false;
+ private static void pushableTileEntities() {
+ pushableTileEntities = getBoolean("settings.pushableTileEntities", false);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
index b29525c40..86c760f40 100644
--- a/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
@@ -241,11 +241,16 @@ public class BlockPiston extends BlockDirectional {
return true;
}
+ // YAPFA isMovable
public static boolean a(IBlockData iblockdata, World world, BlockPosition blockposition, EnumDirection enumdirection, boolean flag, EnumDirection enumdirection1) {
Block block = iblockdata.getBlock();
if (block == Blocks.OBSIDIAN) {
return false;
+ // YAPFA start
+ } else if (de.tr7zw.yapfa.YapfaConfig.pushableTileEntities && block instanceof BlockCommand) {
+ return true;
+ // YAPFA end
} else if (!world.getWorldBorder().a(blockposition)) {
return false;
} else if (blockposition.getY() >= 0 && (enumdirection != EnumDirection.DOWN || blockposition.getY() != 0)) {
@@ -267,7 +272,13 @@ public class BlockPiston extends BlockDirectional {
return false;
}
- return !block.isTileEntity();
+ // YAPFA start
+ if(!block.isTileEntity()) {
+ return true;
+ } else {
+ return (de.tr7zw.yapfa.YapfaConfig.pushableTileEntities && isPushableBlockEntity(block));
+ }
+ // YAPFA end
} else {
return false;
}
@@ -276,6 +287,7 @@ public class BlockPiston extends BlockDirectional {
}
}
+ // YAPFA move
private boolean a(World world, BlockPosition blockposition, EnumDirection enumdirection, boolean flag) {
BlockPosition blockposition1 = blockposition.shift(enumdirection);
@@ -362,13 +374,36 @@ public class BlockPiston extends BlockDirectional {
aiblockdata[j] = iblockdata1;
}
+ // YAPFA start
+ if (de.tr7zw.yapfa.YapfaConfig.pushableTileEntities) {
+ list1_BlockEntities.set(Lists.newArrayList());
+ for (int i = 0; i < list1.size(); ++i)
+ {
+ BlockPosition blockpos = list.get(i);
+ TileEntity blockEntity = (list1.get(i).getBlock().isTileEntity()) ? world.getTileEntity(blockpos) : null;
+ list1_BlockEntities.get().add(blockEntity);
+ if (blockEntity != null)
+ {
+ //hopefully this call won't have any side effects in the future, such as dropping all the BlockEntity's items
+ //we want to place this same(!) BlockEntity object into the world later when the movement stops again
+ world.removeTileEntity(blockpos);
+ blockEntity.markDirty();
+ }
+ }
+ }
+ // YAPFA end
for (k = list.size() - 1; k >= 0; --k) {
blockposition3 = (BlockPosition) list.get(k);
iblockdata1 = world.getType(blockposition3);
blockposition3 = blockposition3.shift(enumdirection1);
map.remove(blockposition3);
world.setTypeAndData(blockposition3, (IBlockData) Blocks.MOVING_PISTON.getBlockData().set(BlockPiston.FACING, enumdirection), 68);
- world.setTileEntity(blockposition3, BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false));
+ // YAPFA start
+ TileEntity blockEntityPiston = BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false);
+ if (de.tr7zw.yapfa.YapfaConfig.pushableTileEntities)
+ ((TileEntityPiston) blockEntityPiston).setCarriedTileEntity(list1_BlockEntities.get().get(k));
+ world.setTileEntity(blockposition3, blockEntityPiston);
+ // YAPFA end
--j;
aiblockdata[j] = iblockdata1;
}
@@ -452,4 +487,18 @@ public class BlockPiston extends BlockDirectional {
public boolean a(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition, PathMode pathmode) {
return false;
}
+
+ // YAPFA start
+ private ThreadLocal<List<TileEntity>> list1_BlockEntities = new ThreadLocal<>(); //Unneccessary ThreadLocal if client and server use different PistonBlock instances
+
+ private static boolean isPushableBlockEntity(Block block)
+ {
+ //Making PISTON_EXTENSION (BlockPistonMoving) pushable would not work as its createNewTileEntity()-method returns null
+ return block != Blocks.ENDER_CHEST && block != Blocks.ENCHANTING_TABLE &&
+ block != Blocks.END_GATEWAY && block != Blocks.END_PORTAL && block != Blocks.MOVING_PISTON &&
+ block != Blocks.SPAWNER;
+ }
+
+ // YAPFA end
+
}
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
index de1c98cca..92f183995 100644
--- a/src/main/java/net/minecraft/server/PistonExtendsChecker.java
+++ b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
@@ -29,6 +29,7 @@ public class PistonExtendsChecker {
}
+ // YAPFA calculatePush
public boolean a() {
this.f.clear();
this.g.clear();
@@ -46,7 +47,11 @@ public class PistonExtendsChecker {
} else {
for (int i = 0; i < this.f.size(); ++i) {
BlockPosition blockposition = (BlockPosition) this.f.get(i);
-
+ // YAPFA start
+ if(!stickToStickySide(blockposition)){
+ return false;
+ }
+ // YAPFA end
if (a(this.a.getType(blockposition).getBlock()) && !this.a(blockposition)) {
return false;
}
@@ -56,6 +61,7 @@ public class PistonExtendsChecker {
}
}
+ // YAPFA isBlockSticky
private static boolean a(Block block) {
return block == Blocks.SLIME_BLOCK || block == Blocks.HONEY_BLOCK;
}
@@ -64,6 +70,7 @@ public class PistonExtendsChecker {
return block == Blocks.HONEY_BLOCK && block1 == Blocks.SLIME_BLOCK ? false : (block == Blocks.SLIME_BLOCK && block1 == Blocks.HONEY_BLOCK ? false : a(block) || a(block1));
}
+ // YAPFA in fabric this is 'tryMove'
private boolean a(BlockPosition blockposition, EnumDirection enumdirection) {
IBlockData iblockdata = this.a.getType(blockposition);
Block block = iblockdata.getBlock();
@@ -82,7 +89,7 @@ public class PistonExtendsChecker {
if (i + this.f.size() > de.tr7zw.yapfa.YapfaConfig.pistonPushLimit) { // YAPFA
return false;
} else {
- while (a(block)) {
+ while (customIsBlockSticky(block, iblockdata)) { // YAPFA
BlockPosition blockposition1 = blockposition.shift(this.e.opposite(), i);
Block block1 = block;
@@ -118,7 +125,11 @@ public class PistonExtendsChecker {
for (int i1 = 0; i1 <= l + j; ++i1) {
BlockPosition blockposition3 = (BlockPosition) this.f.get(i1);
-
+ // YAPFA start
+ if(!stickToStickySide(blockposition3)){
+ return false;
+ }
+ // YAPFA end
if (a(this.a.getType(blockposition3).getBlock()) && !this.a(blockposition3)) {
return false;
}
@@ -195,4 +206,83 @@ public class PistonExtendsChecker {
public List<BlockPosition> getBrokenBlocks() {
return this.g;
}
+
+ // YAPFA start
+
+ private World getWorld() {
+ return a;
+ }
+
+ private EnumDirection getDirection() {
+ return h;
+ }
+
+ private boolean customIsBlockSticky(Block block, IBlockData data) {
+ if (de.tr7zw.yapfa.YapfaConfig.pushableTileEntities && isStickyOnSide(data, getDirection().opposite()))
+ return true;
+ return a(block);
+ }
+
+ /**
+ * Handles blocks besides the slimeblock that are sticky. Currently only supports blocks that are sticky on one side.
+ * Currently the only additional sticky block is the double chest, which sticks to its other chest half.
+ * @param BlockPosition_1 location of a block that moves and needs to stick other blocks to it
+ * @author 2No2Name
+ */
+ private boolean stickToStickySide(BlockPosition BlockPosition_1){
+ if(!de.tr7zw.yapfa.YapfaConfig.pushableTileEntities)
+ return true;
+
+ IBlockData IBlockData_1 = getWorld().getType(BlockPosition_1);
+ Block block = IBlockData_1.getBlock();
+ EnumDirection stickyEnumDirection = null;
+ if(block == Blocks.CHEST || block == Blocks.TRAPPED_CHEST) {
+ stickyEnumDirection = getEnumDirectionToOtherChestHalf(IBlockData_1);
+ }
+
+ //example how you could make sticky pistons have a sticky side:
+ //else if(block == Blocks.STICKY_PISTON){
+ // stickyEnumDirection = IBlockData_1.get(FacingBlock.FACING);
+ //}
+
+ return stickyEnumDirection == null || this.a(BlockPosition_1.shift(stickyEnumDirection), stickyEnumDirection);
+ }
+
+ //if more helpers like this start existing, move this to Chest class
+ /**
+ * @param IBlockData IBlockData of one double chest half block
+ * @return EnumDirection towards the other block of the double chest, null if the IBlockData is not a double chest
+ * @author 2No2Name
+ */
+ private EnumDirection getEnumDirectionToOtherChestHalf(IBlockData IBlockData){
+ BlockPropertyChestType chestType;
+ try{
+ chestType = IBlockData.get(BlockChest.c);
+ }catch(IllegalArgumentException e){return null;}
+ if(chestType == BlockPropertyChestType.SINGLE)
+ return null;
+ return BlockChest.i(IBlockData);
+ }
+
+ /**
+ * Returns true if there is a modification making this IBlockData sticky on the given face. Vanilla stickyness of SLIME_BLOCK is not affected.
+ * @param IBlockData IBlockData to determine the stickyness of
+ * @param EnumDirection EnumDirection in which the stickyness is to be found
+ * @return boolean whether block is not SLIME_BLOCK and is sticky in the given EnumDirection
+ * @author 2No2Name
+ */
+ private boolean isStickyOnSide(IBlockData IBlockData, EnumDirection EnumDirection) {
+ Block block = IBlockData.getBlock();
+ if(block == Blocks.CHEST || block == Blocks.TRAPPED_CHEST)
+ //Make chests be sticky on the side to
+ return getEnumDirectionToOtherChestHalf(IBlockData) == EnumDirection;
+
+ //example how you could make sticky pistons have a sticky side:
+ //if(block == Blocks.STICKY_PISTON)
+ // return IBlockData.get(FacingBlock.FACING) == EnumDirection.getOpposite();
+ return false;
+ }
+
+
+ // YAPFA end
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index a8e64dfda..f23cd98b0 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -252,4 +252,10 @@ public abstract class TileEntity implements KeyedObject { // Paper
return null;
}
// CraftBukkit end
+
+ // YAPFA start
+ public void markDirty() {
+ this.g = true;
+ }
+ // YAPFA end
}
diff --git a/src/main/java/net/minecraft/server/TileEntityPiston.java b/src/main/java/net/minecraft/server/TileEntityPiston.java
new file mode 100644
index 000000000..b32f23198
--- /dev/null
+++ b/src/main/java/net/minecraft/server/TileEntityPiston.java
@@ -0,0 +1,369 @@
+package net.minecraft.server;
+
+import java.util.Iterator;
+import java.util.List;
+
+public class TileEntityPiston extends TileEntity implements ITickable {
+ private IBlockData a;
+ private EnumDirection b;
+ private boolean c;
+ private boolean g;
+ private static final ThreadLocal<EnumDirection> h = ThreadLocal.withInitial(() -> null);
+ private float i;
+ private float j;
+ private long k;
+
+ // YAPFA start
+ private TileEntity carriedTileEntity;
+ // YAPFA end
+
+ public TileEntityPiston() {
+ super(TileEntityTypes.PISTON);
+ }
+
+ // YAPFA start
+ /**
+ * @author 2No2Name
+ */
+ public TileEntity getCarriedTileEntity() {
+ return carriedTileEntity;
+ }
+
+ public void setCarriedTileEntity(TileEntity TileEntity) {
+ this.carriedTileEntity = TileEntity;
+ if (this.carriedTileEntity != null) {
+ this.carriedTileEntity.setPosition(this.getPosition());
+ carriedTileEntity.r();
+ }
+ }
+ // YAPFA end
+
+ public TileEntityPiston(IBlockData var0, EnumDirection var1, boolean var2, boolean var3) {
+ this();
+ this.a = var0;
+ this.b = var1;
+ this.c = var2;
+ this.g = var3;
+ }
+
+ public NBTTagCompound b() {
+ return this.save(new NBTTagCompound());
+ }
+
+ public boolean d() {
+ return this.c;
+ }
+
+ public EnumDirection f() {
+ return this.b;
+ }
+
+ public boolean h() {
+ return this.g;
+ }
+
+ public float a(float var0) {
+ if (var0 > 1.0f) {
+ var0 = 1.0f;
+ }
+ return MathHelper.g((float) var0, (float) this.j, (float) this.i);
+ }
+
+ private float e(float var0) {
+ return this.c ? var0 - 1.0f : 1.0f - var0;
+ }
+
+ private IBlockData x() {
+ if (!this.d() && this.h() && this.a.getBlock() instanceof BlockPiston) {
+ return (IBlockData) ((IBlockData) Blocks.PISTON_HEAD.getBlockData().set(
+ (IBlockState) BlockPistonExtension.TYPE,
+ (Comparable) (this.a.getBlock() == Blocks.STICKY_PISTON ? BlockPropertyPistonType.STICKY
+ : BlockPropertyPistonType.DEFAULT))).set((IBlockState) BlockPistonExtension.FACING,
+ this.a.get((IBlockState) BlockPiston.FACING));
+ }
+ return this.a;
+ }
+
+ private void f(float var0) {
+ EnumDirection var1 = this.j();
+ double var2 = var0 - this.i;
+ VoxelShape var4 = this.x().getCollisionShape((IBlockAccess) this.world, this.getPosition());
+ if (var4.isEmpty()) {
+ return;
+ }
+ List var5 = var4.d();
+ AxisAlignedBB var6 = this.a(this.a(var5));
+ List<Entity> var7 = this.world.getEntities(null,
+ PistonUtil.a((AxisAlignedBB) var6, (EnumDirection) var1, (double) var2).b(var6));
+ if (var7.isEmpty()) {
+ return;
+ }
+ boolean var8 = this.a.getBlock() == Blocks.SLIME_BLOCK;
+ for (Entity var10 : var7) {
+ AxisAlignedBB var15;
+ AxisAlignedBB var14;
+ AxisAlignedBB var16;
+ if (var10.getPushReaction() == EnumPistonReaction.IGNORE)
+ continue;
+ if (var8) {
+ Vec3D var11 = var10.getMot();
+ double var12 = var11.x;
+ double var142 = var11.y;
+ double var162 = var11.z;
+ switch (var1.m()) {
+ case X: {
+ var12 = var1.getAdjacentX();
+ break;
+ }
+ case Y: {
+ var142 = var1.getAdjacentY();
+ break;
+ }
+ case Z: {
+ var162 = var1.getAdjacentZ();
+ }
+ }
+ var10.setMot(var12, var142, var162);
+ }
+ double var11 = 0.0;
+ Iterator iterator = var5.iterator();
+ while (iterator.hasNext()
+ && (!(var15 = PistonUtil.a((AxisAlignedBB) this.a(var14 = (AxisAlignedBB) iterator.next()),
+ (EnumDirection) var1, (double) var2)).c(var16 = var10.getBoundingBox())
+ || (var11 = Math.max(var11, TileEntityPiston.a(var15, var1, var16))) < var2)) {
+ }
+ if (var11 <= 0.0)
+ continue;
+ var11 = Math.min(var11, var2) + 0.01;
+ TileEntityPiston.a(var1, var10, var11, var1);
+ if (this.c || !this.g)
+ continue;
+ this.a(var10, var1, var2);
+ }
+ }
+
+ private static void a(EnumDirection var0, Entity var1, double var2, EnumDirection var4) {
+ h.set(var0);
+ var1.move(EnumMoveType.PISTON, new Vec3D(var2 * (double) var4.getAdjacentX(),
+ var2 * (double) var4.getAdjacentY(), var2 * (double) var4.getAdjacentZ()));
+ h.set(null);
+ }
+
+ private void g(float var0) {
+ if (!this.y()) {
+ return;
+ }
+ EnumDirection var12 = this.j();
+ if (!var12.m().c()) {
+ return;
+ }
+ double var2 = this.a.getCollisionShape((IBlockAccess) this.world, this.position).c(EnumDirection.EnumAxis.Y);
+ AxisAlignedBB var4 = this.a(new AxisAlignedBB(0.0, var2, 0.0, 1.0, 1.5000000999999998, 1.0));
+ double var5 = var0 - this.i;
+ List<Entity> var7 = this.world.getEntities((Entity) null, var4, var1 -> TileEntityPiston.a(var4, var1));
+ for (Entity var9 : var7) {
+ TileEntityPiston.a(var12, var9, var5, var12);
+ }
+ }
+
+ private static boolean a(AxisAlignedBB var0, Entity var1) {
+ return var1.getPushReaction() == EnumPistonReaction.NORMAL && var1.onGround && var1.locX() >= var0.minX
+ && var1.locX() <= var0.maxX && var1.locZ() >= var0.minZ && var1.locZ() <= var0.maxZ;
+ }
+
+ private boolean y() {
+ return this.a.getBlock() == Blocks.HONEY_BLOCK;
+ }
+
+ public EnumDirection j() {
+ return this.c ? this.b : this.b.opposite();
+ }
+
+ private AxisAlignedBB a(List<AxisAlignedBB> var0) {
+ double var1 = 0.0;
+ double var3 = 0.0;
+ double var5 = 0.0;
+ double var7 = 1.0;
+ double var9 = 1.0;
+ double var11 = 1.0;
+ for (AxisAlignedBB var14 : var0) {
+ var1 = Math.min(var14.minX, var1);
+ var3 = Math.min(var14.minY, var3);
+ var5 = Math.min(var14.minZ, var5);
+ var7 = Math.max(var14.maxX, var7);
+ var9 = Math.max(var14.maxY, var9);
+ var11 = Math.max(var14.maxZ, var11);
+ }
+ return new AxisAlignedBB(var1, var3, var5, var7, var9, var11);
+ }
+
+ private static double a(AxisAlignedBB var0, EnumDirection var1, AxisAlignedBB var2) {
+ switch (var1) {
+ case EAST: {
+ return var0.maxX - var2.minX;
+ }
+ case WEST: {
+ return var2.maxX - var0.minX;
+ }
+ default: {
+ return var0.maxY - var2.minY;
+ }
+ case DOWN: {
+ return var2.maxY - var0.minY;
+ }
+ case SOUTH: {
+ return var0.maxZ - var2.minZ;
+ }
+ case NORTH:
+ }
+ return var2.maxZ - var0.minZ;
+ }
+
+ private AxisAlignedBB a(AxisAlignedBB var0) {
+ double var1 = this.e(this.i);
+ return var0.d((double) this.position.getX() + var1 * (double) this.b.getAdjacentX(),
+ (double) this.position.getY() + var1 * (double) this.b.getAdjacentY(),
+ (double) this.position.getZ() + var1 * (double) this.b.getAdjacentZ());
+ }
+
+ private void a(Entity var0, EnumDirection var1, double var2) {
+ double var9;
+ AxisAlignedBB var5;
+ EnumDirection var6;
+ double var7;
+ AxisAlignedBB var4 = var0.getBoundingBox();
+ if (var4.c(var5 = VoxelShapes.b().getBoundingBox().a(this.position))
+ && Math.abs((var7 = TileEntityPiston.a(var5, var6 = var1.opposite(), var4) + 0.01)
+ - (var9 = TileEntityPiston.a(var5, var6, var4.a(var5)) + 0.01)) < 0.01) {
+ var7 = Math.min(var7, var2) + 0.01;
+ TileEntityPiston.a(var1, var0, var7, var6);
+ }
+ }
+
+ public IBlockData k() {
+ return this.a;
+ }
+
+ // YAPFA finish
+ public void l() {
+ if (this.j < 1.0f && this.world != null) {
+ this.j = this.i = 1.0f;
+ this.world.removeTileEntity(this.position);
+ this.ab_();
+ if (this.world.getType(this.position).getBlock() == Blocks.MOVING_PISTON) {
+ IBlockData var0 = this.g ? Blocks.AIR.getBlockData()
+ : Block.b((IBlockData) this.a, (GeneratorAccess) this.world, (BlockPosition) this.position);
+ this.world.setTypeAndData(this.position, var0, 3);
+ // YAPFA start
+ if(carriedTileEntity != null) {
+ carriedTileEntity.r();
+ this.world.setTileEntity(position, carriedTileEntity);
+ carriedTileEntity = null;
+ }
+ // YAPFA end
+ this.world.a(this.position, var0.getBlock(), this.position);
+ }
+ }
+ // YAPFA start
+ if (this.carriedTileEntity != null && this.world.getType(this.position).getBlock() == Blocks.AIR)
+ {
+ IBlockData var0 = this.g ? Blocks.AIR.getBlockData()
+ : Block.b((IBlockData) this.a, (GeneratorAccess) this.world, (BlockPosition) this.position);
+ this.world.setTypeAndData(this.position, var0, 3);
+ this.world.setTileEntity(position, carriedTileEntity);
+ this.world.a(this.position, false, null); // destroy
+ }
+ // YAPFA end
+ }
+
+ public void tick() {
+ this.k = this.world.getTime();
+ this.j = this.i;
+ if (this.j >= 1.0f) {
+ this.world.removeTileEntity(this.position);
+ this.ab_();
+ if (this.a != null && this.world.getType(this.position).getBlock() == Blocks.MOVING_PISTON) {
+ IBlockData var0 = Block.b((IBlockData) this.a, (GeneratorAccess) this.world,
+ (BlockPosition) this.position);
+ if (var0.isAir()) {
+ this.world.setTypeAndData(this.position, this.a, 84);
+ // YAPFA start
+ if(carriedTileEntity != null) {
+ carriedTileEntity.r();
+ this.world.setTileEntity(position, carriedTileEntity);
+ }
+ // YAPFA end
+ Block.a((IBlockData) this.a, (IBlockData) var0, (GeneratorAccess) this.world,
+ (BlockPosition) this.position, (int) 3);
+ } else {
+ if (var0.b((IBlockState) BlockProperties.C)
+ && ((Boolean) var0.get((IBlockState) BlockProperties.C)).booleanValue()) {
+ var0 = (IBlockData) var0.set((IBlockState) BlockProperties.C,
+ (Comparable) Boolean.valueOf(false));
+ }
+ this.world.setTypeAndData(this.position, var0, 67);
+ // YAPFA start
+ if(carriedTileEntity != null) {
+ carriedTileEntity.r();
+ this.world.setTileEntity(position, carriedTileEntity);
+ }
+ // YAPFA end
+ this.world.a(this.position, var0.getBlock(), this.position);
+ }
+ }
+ return;
+ }
+ float var0 = this.i + 0.5f;
+ this.f(var0);
+ this.g(var0);
+ this.i = var0;
+ if (this.i >= 1.0f) {
+ this.i = 1.0f;
+ }
+ }
+
+ public void load(NBTTagCompound var0) {
+ super.load(var0);
+ this.a = GameProfileSerializer.d((NBTTagCompound) var0.getCompound("blockState"));
+ this.b = EnumDirection.fromType1((int) var0.getInt("facing"));
+ this.j = this.i = var0.getFloat("progress");
+ this.c = var0.getBoolean("extending");
+ this.g = var0.getBoolean("source");
+ }
+
+ public NBTTagCompound save(NBTTagCompound var0) {
+ super.save(var0);
+ var0.set("blockState", (NBTBase) GameProfileSerializer.a((IBlockData) this.a));
+ var0.setInt("facing", this.b.b());
+ var0.setFloat("progress", this.j);
+ var0.setBoolean("extending", this.c);
+ var0.setBoolean("source", this.g);
+ return var0;
+ }
+
+ public VoxelShape a(IBlockAccess var0, BlockPosition var1) {
+ VoxelShape var2 = !this.c && this.g
+ ? ((IBlockData) this.a.set((IBlockState) BlockPiston.EXTENDED, (Comparable) Boolean.valueOf(true)))
+ .getCollisionShape(var0, var1)
+ : VoxelShapes.a();
+ EnumDirection var3 = h.get();
+ if ((double) this.i < 1.0 && var3 == this.j()) {
+ return var2;
+ }
+ IBlockData var4 = this.h() ? (IBlockData) ((IBlockData) Blocks.PISTON_HEAD.getBlockData()
+ .set((IBlockState) BlockPistonExtension.FACING, (Comparable) this.b)).set(
+ (IBlockState) BlockPistonExtension.SHORT,
+ (Comparable) Boolean.valueOf(this.c != 1.0f - this.i < 4.0f))
+ : this.a;
+ float var5 = this.e(this.i);
+ double var6 = (float) this.b.getAdjacentX() * var5;
+ double var8 = (float) this.b.getAdjacentY() * var5;
+ double var10 = (float) this.b.getAdjacentZ() * var5;
+ return VoxelShapes.a((VoxelShape) var2, (VoxelShape) var4.getCollisionShape(var0, var1).a(var6, var8, var10));
+ }
+
+ public long m() {
+ return this.k;
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9338e090c..7f1faba2a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -711,6 +711,13 @@ public class WorldServer extends World {
if (type instanceof ITileEntity) {
TileEntity replacement = ((ITileEntity) type).createTile(this);
+ // YAPFA start - Better handeling of missplaced tiles, moving_piston returns null!
+ if(replacement == null) {
+ this.setAir(pos);
+ this.removeTileEntity(pos);
+ return null;
+ }
+ // YAPFA end
replacement.world = this;
this.setTileEntity(pos, replacement);
return replacement;
--
2.25.1.windows.1

View File

@ -1,4 +1,4 @@
From 381ad90bef07ef98b91bd95a736fc3f911380bf7 Mon Sep 17 00:00:00 2001
From a6f3af7f18b15bf4392e981295142edeef218c35 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Sat, 4 Apr 2020 23:23:04 +0200
Subject: [PATCH] Player saving async FileIO
@ -183,19 +183,19 @@ index c1e8ff6ab..db4f62883 100644
nbttagcompound.set("ShoulderEntityLeft", this.getShoulderEntityLeft());
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ada082e67..86f8b4899 100644
index 54f6dfcaa..cbd2486a4 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -16,6 +16,8 @@ import java.util.Map;
import java.util.Optional;
@@ -17,6 +17,8 @@ import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.TimeUnit;
+
import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -1206,6 +1208,28 @@ public abstract class PlayerList {
@@ -1209,6 +1211,28 @@ public abstract class PlayerList {
if (team != null) scoreboard.removeTeam(team);
}
// Paper end
@ -224,7 +224,7 @@ index ada082e67..86f8b4899 100644
}
// Paper end
@@ -1245,13 +1269,13 @@ public abstract class PlayerList {
@@ -1248,13 +1272,13 @@ public abstract class PlayerList {
File file = new File(this.server.getWorldServer(DimensionManager.OVERWORLD).getDataManager().getDirectory(), "stats");
File file1 = new File(file, uuid + ".json");

View File

@ -1,4 +1,4 @@
From cea161325b86031c1d3229dc11328941700c7e4c Mon Sep 17 00:00:00 2001
From 72d490aa3f032ded718782998e49bb1f643f06ad Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 6 Apr 2020 01:05:08 +0200
Subject: [PATCH] Stop a pathfinder method to call itself more than once
@ -9,7 +9,7 @@ This miiiight help to fix the pathfinder from going nuts. Only time will tell.
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java
index 61e4dbcd47..f406abd84d 100644
index 61e4dbcd4..f406abd84 100644
--- a/src/main/java/net/minecraft/server/PathfinderNormal.java
+++ b/src/main/java/net/minecraft/server/PathfinderNormal.java
@@ -96,49 +96,49 @@ public class PathfinderNormal extends PathfinderAbstract {

View File

@ -1,4 +1,4 @@
From 9c2208b1035d9f2f5da33bee4c1b5c4f6a185769 Mon Sep 17 00:00:00 2001
From dabf3420b3a516c764c3343cfe7a6f30be40e65e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
<tsao-chi@the-lingo.org>
Date: Thu, 2 Apr 2020 11:29:08 +0800
@ -9,7 +9,7 @@ Subject: [PATCH] Akarin Avoid double I/O operation on load player file
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index c80673770c..65813c84ed 100644
index c80673770..65813c84e 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -178,7 +178,8 @@ public class WorldNBTStorage implements IPlayerFileData {

View File

@ -1,4 +1,4 @@
From b56e3888e3299753be500f4799c7a5dc32c7cbdb Mon Sep 17 00:00:00 2001
From fa2e86c54f1a5db2b91cdecbc68e72e6ff4c915f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
<tsao-chi@the-lingo.org>
Date: Thu, 2 Apr 2020 11:16:18 +0800
@ -9,7 +9,7 @@ Subject: [PATCH] Akarin Save json list async
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java
index c97be42dd7..370841cad0 100644
index c97be42dd..370841cad 100644
--- a/src/main/java/net/minecraft/server/JsonList.java
+++ b/src/main/java/net/minecraft/server/JsonList.java
@@ -168,6 +168,7 @@ public class JsonList<K, V extends JsonListEntry<K>> {

View File

@ -1,4 +1,4 @@
From 1e62c1ed66f9c3a9497d0f3c51b25271ea588d45 Mon Sep 17 00:00:00 2001
From 62ed379eabc323d0c955c3c792542ca61cdb2983 Mon Sep 17 00:00:00 2001
From: Sotr <i@omc.hk>
Date: Wed, 15 Apr 2020 03:51:50 +0700
Subject: [PATCH] Akarin Optimize door interact with pathfinding
@ -12,7 +12,7 @@ Subject: [PATCH] Akarin Optimize door interact with pathfinding
diff --git a/src/main/java/io/akarin/server/IndexedBlockPosition.java b/src/main/java/io/akarin/server/IndexedBlockPosition.java
new file mode 100644
index 0000000000..83bf1d4cab
index 000000000..83bf1d4ca
--- /dev/null
+++ b/src/main/java/io/akarin/server/IndexedBlockPosition.java
@@ -0,0 +1,35 @@
@ -52,7 +52,7 @@ index 0000000000..83bf1d4cab
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BehaviorInteractDoor.java b/src/main/java/net/minecraft/server/BehaviorInteractDoor.java
index 01d9c2d92c..3db22c5f4d 100644
index 01d9c2d92..3db22c5f4 100644
--- a/src/main/java/net/minecraft/server/BehaviorInteractDoor.java
+++ b/src/main/java/net/minecraft/server/BehaviorInteractDoor.java
@@ -1,7 +1,9 @@
@ -153,7 +153,7 @@ index 01d9c2d92c..3db22c5f4d 100644
if (worldserver.getWorldProvider().getDimensionManager() != globalpos.getDimensionManager()) {
iterator.remove();
diff --git a/src/main/java/net/minecraft/server/BehaviorSleep.java b/src/main/java/net/minecraft/server/BehaviorSleep.java
index dfe0f66500..46eb633084 100644
index dfe0f6650..46eb63308 100644
--- a/src/main/java/net/minecraft/server/BehaviorSleep.java
+++ b/src/main/java/net/minecraft/server/BehaviorSleep.java
@@ -57,7 +57,7 @@ public class BehaviorSleep extends Behavior<EntityLiving> {

View File

@ -1,4 +1,4 @@
From cb01e1afbb3ff769bacb39ed09259fb6f7b96777 Mon Sep 17 00:00:00 2001
From 752ab77de709b86bd24552f24b54cce8bf6aca38 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 21 Feb 2020 17:04:51 -0600
Subject: [PATCH] Purpur MC-125757 Fix - Always increment arrow despawn counter
@ -8,7 +8,7 @@ Subject: [PATCH] Purpur MC-125757 Fix - Always increment arrow despawn counter
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 4dc53d3fa1..3b1b133f90 100644
index 4dc53d3fa..3b1b133f9 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -147,6 +147,8 @@ public abstract class EntityArrow extends Entity implements IProjectile {

View File

@ -1,4 +1,4 @@
From 4dbb41cee7a4eb0ba828e5d654daedcc5b706061 Mon Sep 17 00:00:00 2001
From f9c1e2d385c6f03e1c7353b41f1252d84ec28fa9 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 4 Apr 2020 03:07:59 -0500
Subject: [PATCH] Purpur Skip events if there's no listeners
@ -8,7 +8,7 @@ Subject: [PATCH] Purpur Skip events if there's no listeners
1 file changed, 2 insertions(+)
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
index 2d512aa4f9..2c8ef6dd6c 100644
index 2d512aa4f..2c8ef6dd6 100644
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
@@ -274,6 +274,7 @@ public class CommandDispatcher {

View File

@ -1,4 +1,4 @@
From 710ef3d3ebe847d4e1015d4c9c5f561c4c6b2746 Mon Sep 17 00:00:00 2001
From b08c2a63bf65c07064d52744eb1ca2354ffd0f77 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Tue, 21 Apr 2020 15:49:52 +0200
Subject: [PATCH] Purpur Add more timings timers
@ -12,7 +12,7 @@ Subject: [PATCH] Purpur Add more timings timers
5 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
index abf4b221c..037da236c 100644
index 2966c5731..ae5586737 100644
--- a/src/main/java/co/aikar/timings/MinecraftTimings.java
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -45,6 +45,28 @@ public final class MinecraftTimings {
@ -200,10 +200,10 @@ index a68fc11ec..95dde6653 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7f1faba2a..3d4080e32 100644
index 8d2a937ca..688747170 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1307,7 +1307,9 @@ public class WorldServer extends World {
@@ -1301,7 +1301,9 @@ public class WorldServer extends World {
return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString();
});
gameprofilerfiller.c("tickPassenger");

View File

@ -1,4 +1,4 @@
From 4d55ef86e15a287658b58b0fa5b058791e9f7ab3 Mon Sep 17 00:00:00 2001
From e3a40a230fbd580397b5367362f884b0d258dd52 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Tue, 21 Apr 2020 16:14:10 +0200
Subject: [PATCH] Modify default configs
@ -9,7 +9,7 @@ Subject: [PATCH] Modify default configs
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index e0d7832c3a..fd3e4dcb7d 100644
index f0284e81d..575d664a5 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -202,7 +202,7 @@ public class PaperConfig {
@ -22,10 +22,10 @@ index e0d7832c3a..fd3e4dcb7d 100644
TimingsManager.privacy = getBoolean("timings.server-name-privacy", false);
TimingsManager.hiddenConfigs = getList("timings.hidden-config-entries", Lists.newArrayList("database", "settings.bungeecord-addresses"));
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 5c8a946d5c..4f9c4651d0 100644
index ecacb72b9..340502d92 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -650,7 +650,7 @@ public class PaperWorldConfig {
@@ -648,7 +648,7 @@ public class PaperWorldConfig {
}
public boolean cooldownHopperWhenFull = true;

View File

@ -1,4 +1,4 @@
From 4096b884f96bd13f9a599f92397957f2b40c3179 Mon Sep 17 00:00:00 2001
From 39fc939864582d47aa67fad36fcdcff33ddc51b8 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 11 May 2020 21:00:44 +0200
Subject: [PATCH] lithium MixinDirection
@ -8,7 +8,7 @@ Subject: [PATCH] lithium MixinDirection
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
index 3b7bb296dc..b4258ec78a 100644
index 3b7bb296d..b4258ec78 100644
--- a/src/main/java/net/minecraft/server/EnumDirection.java
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
@@ -17,13 +17,13 @@ public enum EnumDirection implements INamable {

View File

@ -1,4 +1,4 @@
From d3a648658991704e1f296e197c63dc661f47a3cf Mon Sep 17 00:00:00 2001
From e206188201a0cddf8a68148ebeec4702b3931451 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 11 May 2020 21:02:57 +0200
Subject: [PATCH] lithium MixinBox

View File

@ -1,4 +1,4 @@
From bb00210c5e4ea99bfa0e2b8a208bb3e40c2a7f82 Mon Sep 17 00:00:00 2001
From c039767145f9433af59eb08bf2626977d772cd21 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 11 May 2020 21:37:44 +0200
Subject: [PATCH] lithium enum_values
@ -10,7 +10,7 @@ Subject: [PATCH] lithium enum_values
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
index 86c760f40d..149cba4613 100644
index 8cfe54791..b6df5256b 100644
--- a/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
@@ -138,8 +138,9 @@ public class BlockPiston extends BlockDirectional {
@ -40,7 +40,7 @@ index 86c760f40d..149cba4613 100644
if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) {
return true;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 418fe5909d..441696182b 100644
index 1d66afe9b..2b3e264ed 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2499,9 +2499,13 @@ public abstract class EntityLiving extends Entity {
@ -59,10 +59,10 @@ index 418fe5909d..441696182b 100644
for (int l = 0; l < k; ++l) {
EnumItemSlot enumitemslot = aenumitemslot[l];
diff --git a/src/main/java/net/minecraft/server/PistonExtendsChecker.java b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
index 92f1839953..0b1a1274fc 100644
index de1c98cca..1ac3e5a37 100644
--- a/src/main/java/net/minecraft/server/PistonExtendsChecker.java
+++ b/src/main/java/net/minecraft/server/PistonExtendsChecker.java
@@ -178,9 +178,11 @@ public class PistonExtendsChecker {
@@ -167,9 +167,11 @@ public class PistonExtendsChecker {
this.f.addAll(list2);
}

View File

@ -1,4 +1,4 @@
From cbc39d3d1cf9d7983d1d1d2941a626503ed1f519 Mon Sep 17 00:00:00 2001
From e3fccee2e50a3688084616b1b025455e8f16b911 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 11 May 2020 21:50:18 +0200
Subject: [PATCH] lithium MixinAxisCycleDirection
@ -10,7 +10,7 @@ Subject: [PATCH] lithium MixinAxisCycleDirection
diff --git a/src/main/java/net/minecraft/server/EnumAxisCycle.java b/src/main/java/net/minecraft/server/EnumAxisCycle.java
new file mode 100644
index 0000000000..d05cddcc90
index 000000000..d05cddcc9
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EnumAxisCycle.java
@@ -0,0 +1,90 @@

View File

@ -1,4 +1,4 @@
From 5b5bc715350f2e0c7e44323b34a58b755ab23183 Mon Sep 17 00:00:00 2001
From b3ea987f57c3d3fcf72d9ee14d84c4cb33ccb6d9 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 11 May 2020 22:07:17 +0200
Subject: [PATCH] lithium MixinGoalSelector
@ -9,7 +9,7 @@ Only replaces the set type, might want to also port the logic rewrite in the fut
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
index 95dde66531..8c0c93197f 100644
index 95dde6653..8c0c93197 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
@@ -1,7 +1,8 @@

View File

@ -1,4 +1,4 @@
From 76896121c3334c3a64d39ae7d99307597e38f08b Mon Sep 17 00:00:00 2001
From 11bf200704bdb29ad198eaa55e04d52ac083afd6 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Mon, 11 May 2020 22:56:27 +0200
Subject: [PATCH] lithium MixinLandPathNodeMaker
@ -8,7 +8,7 @@ Subject: [PATCH] lithium MixinLandPathNodeMaker
1 file changed, 55 insertions(+), 11 deletions(-)
diff --git a/src/main/java/net/minecraft/server/PathfinderNormal.java b/src/main/java/net/minecraft/server/PathfinderNormal.java
index f406abd84d..cbe9b64390 100644
index f406abd84..cbe9b6439 100644
--- a/src/main/java/net/minecraft/server/PathfinderNormal.java
+++ b/src/main/java/net/minecraft/server/PathfinderNormal.java
@@ -1,6 +1,10 @@

View File

@ -1,4 +1,4 @@
From 711fc967058b9944b020a43c664ee9911a855539 Mon Sep 17 00:00:00 2001
From d11583d7190ef92f6fede391d2c7c726011e2279 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Tue, 12 May 2020 00:38:31 +0200
Subject: [PATCH] lithium MixinBiome

View File

@ -1,4 +1,4 @@
From 236c588b3558e74e5072a3529279c7991cd73ad9 Mon Sep 17 00:00:00 2001
From ced57e7913ed54cc8b442742d119e7f22bca7e26 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Tue, 12 May 2020 01:16:14 +0200
Subject: [PATCH] lithium MixinTypeFilterableList
@ -10,7 +10,7 @@ Subject: [PATCH] lithium MixinTypeFilterableList
diff --git a/src/main/java/net/minecraft/server/EntitySlice.java b/src/main/java/net/minecraft/server/EntitySlice.java
new file mode 100644
index 0000000000..e61f53a15e
index 000000000..e61f53a15
--- /dev/null
+++ b/src/main/java/net/minecraft/server/EntitySlice.java
@@ -0,0 +1,97 @@