Skip to content

Commit

Permalink
1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Blast-MC committed May 19, 2024
1 parent 3a24768 commit 4c2ae38
Show file tree
Hide file tree
Showing 42 changed files with 413 additions and 465 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
java: [17]
java: [21]
fail-fast: true

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
java: [17]
java: [21]
fail-fast: true

steps:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
./gradlew applyPatches
./gradlew createReobfPaperclipJar
./gradlew createMojmapBundlerJar
./gradlew :parchment-api:publishMavenPublicationToEdenSnapshotsRepository
./gradlew publishDevBundlePublicationToEdenSnapshotsRepository -PpublishDevBundle
Expand Down
17 changes: 8 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.papermc.paperweight.patcher") version "1.5.11"
id("io.papermc.paperweight.patcher") version "1.7.1"
}

repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/") {
maven("https://repo.papermc.io/repository/maven-public/") {
content { onlyForConfigurations(PAPERCLIP_CONFIG) }
}
}

dependencies {
remapper("net.fabricmc:tiny-remapper:0.8.10:fat")
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
remapper("net.fabricmc:tiny-remapper:0.10.2:fat")
decompiler("org.vineflower:vineflower:1.10.1")
paperclip("io.papermc:paperclip:3.0.3")
}

Expand All @@ -26,15 +26,15 @@ allprojects {

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
}
}

subprojects {
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
options.release.set(21)
}
tasks.withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
Expand All @@ -45,7 +45,7 @@ subprojects {

repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://sonatype.projecteden.gg/repository/maven-public/")
}
}
Expand Down Expand Up @@ -82,12 +82,11 @@ paperweight {

tasks.generateDevelopmentBundle {
apiCoordinates.set("gg.projecteden.parchment:parchment-api")
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
libraryRepositories.set(
listOf(
"https://repo.maven.apache.org/maven2/",
"https://libraries.minecraft.net/",
"https://papermc.io/repo/repository/maven-public/",
"https://repo.papermc.io/repository/maven-public/",
"https://maven.quiltmc.org/repository/release/",
"https://sonatype.projecteden.gg/repository/maven-public/"
)
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
group = gg.projecteden.parchment
version = 1.20.4-R0.1-SNAPSHOT
version = 1.20.6-R0.1-SNAPSHOT

mcVersion = 1.20.4
paperRef = 3841722fe1ed1cc48c489265967bd39bc2984dc1
mcVersion = 1.20.6
paperRef = 0ad09de75bfb1db2a84bb760cdee09b06d609bb3
edenVersion = 2.2.8-SNAPSHOT

updatingMinecraft=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions patches/api/0001-Build-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Subject: [PATCH] Build changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 50dd795c67557c7d2668068af0bba87a1ec8dc43..c0e062779a36e152e3b520101a8c7a4601dd2cfc 100644
index fd39ed209b20c927054b8482c400beeeeab460a3..f7786d4034afae1926bb249e282f3f204e09ba1a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -14,6 +14,9 @@ val bungeeCordChatVersion = "1.20-R0.2"
val adventureVersion = "4.15.0"
val adventureVersion = "4.17.0"
val slf4jVersion = "2.0.9"
val log4jVersion = "2.17.1"
+
Expand All @@ -23,6 +23,6 @@ index 50dd795c67557c7d2668068af0bba87a1ec8dc43..c0e062779a36e152e3b520101a8c7a46

dependencies {
+ api("gg.projecteden:eden-interfaces:$edenVersion") // Parchment
api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:32.1.2-jre")
api("com.google.code.gson:gson:2.10.1")
145 changes: 73 additions & 72 deletions patches/api/0002-Add-Getter-interfaces.patch

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,35 @@ Subject: [PATCH] Add origin location to EntityDamageByBlockEvent


diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
index ab18f35b686ec79551c307dde9e43c7dfad1b182..47c522e31d704d6c36fbfe128c97cba234932bc7 100644
index 148c4aad384ae8e3b8b22d264a84bddfbcafdf1e..61fcdd178fa5a8f13c889a78f431d2a5529c8c43 100644
--- a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
@@ -17,6 +17,7 @@ import org.jetbrains.annotations.Nullable;
@@ -20,6 +20,7 @@ import org.jetbrains.annotations.Nullable;
public class EntityDamageByBlockEvent extends EntityDamageEvent {
private final Block damager;
private final org.bukkit.block.BlockState damagerBlockState; // Paper
private final BlockState damagerState;
+ private final org.bukkit.Location location; // Parchment

@Deprecated(forRemoval = true)
public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) {
// Paper start
@@ -28,21 +29,41 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent {
super(damagee, cause, damage);
@@ -30,19 +31,40 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent {
super(damagee, cause, damageSource, damage);
this.damager = damager;
this.damagerBlockState = damagerBlockState; // Paper
this.damagerState = damagerState;
+ this.location = damager != null ? damager.getLocation() : null; // Parchment
}

@Deprecated(forRemoval = true)
public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
// Paper start
- this(damager, damagee, cause, modifiers, modifierFunctions, null);
+ this(damager, damagee, cause, modifiers, modifierFunctions, null, null);
- this(damager, (damager != null) ? damager.getState() : null, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions);
+ this(damager, (damager != null) ? damager.getState() : null, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions, null);
}

@org.jetbrains.annotations.ApiStatus.Internal
- public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions, final @Nullable org.bukkit.block.BlockState damagerBlockState) {
+ public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions, final @Nullable org.bukkit.block.BlockState damagerBlockState, @Nullable final org.bukkit.Location damageLocation) { // Parchment
// Paper end
super(damagee, cause, modifiers, modifierFunctions);
- public EntityDamageByBlockEvent(@Nullable final Block damager, @Nullable final BlockState damagerState, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
+ public EntityDamageByBlockEvent(@Nullable final Block damager, @Nullable final BlockState damagerState, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions, @Nullable final org.bukkit.Location damageLocation) { // Parchment
super(damagee, cause, damageSource, modifiers, modifierFunctions);
this.damager = damager;
this.damagerBlockState = damagerBlockState; // Paper
this.damagerState = damagerState;
+ // Parchment start
+ if (damageLocation != null)
+ this.location = damageLocation;
Expand All @@ -56,6 +54,7 @@ index ab18f35b686ec79551c307dde9e43c7dfad1b182..47c522e31d704d6c36fbfe128c97cba2
+ return location;
+ }
+ // Parchment end
+
+
/**
* Returns the block that damaged the player.
Expand Down
17 changes: 5 additions & 12 deletions patches/api/0007-Add-UnsafeValues-canPlaceItemOn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,13 @@ Subject: [PATCH] Add UnsafeValues#canPlaceItemOn


diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 923d8655a84e26960d35d8dc6e4ebc0b10c295d5..325f53f2a052d6cc4e53e16f00d10713682540ff 100644
index 0857a65ecbc36e0e4b8a7d0cda52be35f238f660..1a3151814ef669db1c8530c7afaa810be99ca267 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -261,6 +261,7 @@ public interface UnsafeValues {
String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic);
// Paper end
@@ -282,4 +282,19 @@ public interface UnsafeValues {
// Paper end - lifecycle event API

+
// Paper start - spawn egg color visibility
/**
* Obtains the underlying color informating for a spawn egg of a given
@@ -273,4 +274,18 @@ public interface UnsafeValues {
*/
@Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer);
// Paper end - spawn egg color visibility
@NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
+
+ // Parchment start
+ /**
Expand All @@ -33,5 +25,6 @@ index 923d8655a84e26960d35d8dc6e4ebc0b10c295d5..325f53f2a052d6cc4e53e16f00d10713
+ */
+ java.util.concurrent.CompletableFuture<Boolean> canPlaceItemOn(@org.jetbrains.annotations.NotNull ItemStack item, @org.jetbrains.annotations.Nullable gg.projecteden.parchment.OptionalHumanEntity player, @org.jetbrains.annotations.NotNull org.bukkit.block.Block block, @org.jetbrains.annotations.NotNull org.bukkit.block.BlockFace face);
+ // Parchment end
+
+
}
4 changes: 2 additions & 2 deletions patches/api/0008-Expose-MCUtil-Executors.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Expose MCUtil Executors


diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9af4bc16da09e59009c47911219e99450cdf2aa5..ed897ec092c10ac5e5e0b645849c696c2f09b597 100644
index c8595ffcfcbdd79794d464415287d46acef72b72..e018920520c8d747fb10e8365d4dd0326b04c50c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2170,6 +2170,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2229,6 +2229,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull
UnsafeValues getUnsafe();

Expand Down
4 changes: 2 additions & 2 deletions patches/api/0010-Add-Furnace-Recipe-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ index 0000000000000000000000000000000000000000..ea17d99c7a1d70d88e2c439399cdb376
+ }
+}
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 5eb3521f5f91b0684b4beebf4f7ba2c795b41c42..c8a3e139fd462a184fac9ff472048451372229de 100644
index 97f97ea5c6aa513c439f86a9c82821e0f7d9cd1e..64c1287b7a668680e19f8c4c1a678abb0eb5d88e 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -50,6 +50,36 @@ import org.jetbrains.annotations.Nullable;
@@ -52,6 +52,36 @@ import org.jetbrains.annotations.Nullable;
*/
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper

Expand Down
8 changes: 4 additions & 4 deletions patches/api/0012-Add-Player-getHiddenEntities-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Subject: [PATCH] Add Player#getHiddenEntities API


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c2581dee5e2fc07cb551d609cef31c589a845ca1..d16a1b5459f153d401806bdf22596850bac062ce 100644
index 42e186ffdb421ccea61c4325f4b9800d55f624a8..8b2380241dbf40bd03941250a66e0a7b4a2282ec 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1992,6 +1992,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ApiStatus.Experimental
@@ -2092,6 +2092,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean canSee(@NotNull Entity entity);

+ // Parchment start
Expand All @@ -19,9 +19,9 @@ index c2581dee5e2fc07cb551d609cef31c589a845ca1..d16a1b5459f153d401806bdf22596850
+ * @param plugin Plugin that has hidden entities
+ * @return a view of hidden entity UUIDs
+ */
+ @ApiStatus.Experimental
+ public java.util.@NotNull Set<java.util.UUID> getHiddenEntities(@NotNull Plugin plugin);
+ // Parchment end
+
+
// Paper start
/**
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0014-Expanded-Insomnia-API-methods.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Expanded Insomnia API methods


diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e59cac883dc83186e0977a73b03636993696b37e..e4df334e6ceba43144114c1ad84cb5710b71030e 100644
index 8b2380241dbf40bd03941250a66e0a7b4a2282ec..d86f8f80e0873dccd24b186d4860d1e5dbe2f450 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -62,6 +62,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -66,6 +66,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@Override
@NotNull Player getPlayer();
Expand Down
12 changes: 6 additions & 6 deletions patches/api/0015-Add-NPC-to-EntityType.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Subject: [PATCH] Add NPC to EntityType


diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index 4aaf268f58038cd5d4101ec3fbfdc20b544d6678..29aa9227a57b4ea458379402ccfce3334d9325d8 100644
index 1d1315262737d99bf9f5aabc0ae66eee4645cc65..825ad446bcee169c4735955d226dae18b512d7e3 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/src/main/java/org/bukkit/entity/EntityType.java
@@ -303,6 +303,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
*/
LIGHTNING("lightning_bolt", LightningStrike.class, -1, false),
PLAYER("player", Player.class, -1, false),
+ NPC("npc", NPC.class, -1, true),
@@ -317,6 +317,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
/**
* An unknown entity without an Entity Class
*/
+ NPC("npc", NPC.class, -1, true),
UNKNOWN(null, null, -1, false);

private final String name;
6 changes: 3 additions & 3 deletions patches/api/0016-Revert-BungeeChat-Deprecation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Revert BungeeChat Deprecation


diff --git a/build.gradle.kts b/build.gradle.kts
index c0e062779a36e152e3b520101a8c7a4601dd2cfc..a970742ac1632af0203cca28cee52979e2cad937 100644
index f7786d4034afae1926bb249e282f3f204e09ba1a..f689a22e535bb007089b981fe803f1a6af4911c2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -35,7 +35,7 @@ dependencies {
@@ -36,7 +36,7 @@ dependencies {
api("com.google.guava:guava:32.1.2-jre")
api("com.google.code.gson:gson:2.10.1")
// Paper start - adventure
Expand All @@ -17,7 +17,7 @@ index c0e062779a36e152e3b520101a8c7a4601dd2cfc..a970742ac1632af0203cca28cee52979
exclude("com.google.guava", "guava")
}
// Paper - adventure
@@ -133,7 +133,7 @@ tasks.withType<Javadoc> {
@@ -154,7 +154,7 @@ tasks.withType<Javadoc> {
"https://guava.dev/releases/32.1.2-jre/api/docs/",
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0020-Entity-Data-Storage.patch
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ index 0000000000000000000000000000000000000000..c9f9c0d235f33925ee247ba4af56bf9f
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index fb108c194483ef104f323eb2e0aa73451c843292..e0fdf6d2550a6f331c5ccc82443a9065eca48072 100644
index 8f35e0c9e778d98ca191d45eec76a7a74d51959a..f865c4dbdf29e3cd718de7a325d478252895d940 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -1107,4 +1107,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@@ -1155,4 +1155,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
@NotNull String getScoreboardEntryName();
// Paper end - entity scoreboard name
Expand Down
Loading

0 comments on commit 4c2ae38

Please sign in to comment.