Skip to content

Commit

Permalink
Update upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Malfrador committed Feb 26, 2024
1 parent f8cdfdb commit 5e5284b
Show file tree
Hide file tree
Showing 8 changed files with 548 additions and 263 deletions.
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ paperweight {
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
serverOutputDir.set(layout.projectDirectory.dir("papyrus-server"))
}
// Maybe paperweight automatically does this for forks in the future, but currently we have to do it manually
patchTasks.register("generatedApi") {
isBareDirectory = true
upstreamDirPath = "paper-api-generator/generated"
patchDir = layout.projectDirectory.dir("patches/generated-api")
outputDir = layout.projectDirectory.dir("paper-api-generator/generated")
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ group=de.erethon.papyrus
version=1.20.4-R0.1-SNAPSHOT
mcVersion=1.20.4

pufferfishRef=8d20921df60fde9dc26cf73dbf48ce6c50cd2ac3
pufferfishRef=fb16f9c80feb9ddacd94b4b6b99d6ad903bcdf9a

org.gradle.jvmargs=-Xmx8G
org.gradle.caching=true
Expand Down
34 changes: 17 additions & 17 deletions patches/api/0003-Spellbook.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ index 0000000000000000000000000000000000000000..8b72dba1a152833a89730155ff166328
+ }
+}
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9af4bc16da09e59009c47911219e99450cdf2aa5..4b8ea9554c3bc05225d62dadac317145091d4a50 100644
index b4f8281d3797ec825a7671f38077cd65d5a1d76e..6c703f4d0e506faa42d357be9b1091d90917c15c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -14,6 +14,7 @@ import java.util.Set;
Expand All @@ -2017,7 +2017,7 @@ index 9af4bc16da09e59009c47911219e99450cdf2aa5..4b8ea9554c3bc05225d62dadac317145
import org.bukkit.Warning.WarningState;
import org.bukkit.advancement.Advancement;
import org.bukkit.block.data.BlockData;
@@ -2481,4 +2482,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2497,4 +2498,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
// Paper end - Folia region threading API
Expand Down Expand Up @@ -2057,36 +2057,36 @@ index 896eccf8d0c4df01acc2e76d8952e369fa615a49..e5e1cfa661eaff8dbd135c2d8af7c683
COMBAT_HURTINVUL("combat.hurtinvul");

diff --git a/src/main/java/org/bukkit/entity/Damageable.java b/src/main/java/org/bukkit/entity/Damageable.java
index fc4d3bcd9b16097086fef7975274d825b65adb10..0ada5e125ee88a606399b6437baa1af45ae25b19 100644
index c4537080ee1875e984356eee42337a1342f4c9a3..01b179822b7b405b07695d60269bd315f6117e56 100644
--- a/src/main/java/org/bukkit/entity/Damageable.java
+++ b/src/main/java/org/bukkit/entity/Damageable.java
@@ -1,5 +1,6 @@
package org.bukkit.entity;

+import de.erethon.papyrus.DamageType;
import org.bukkit.attribute.Attribute;
import org.jetbrains.annotations.Nullable;

@@ -13,6 +14,8 @@ public interface Damageable extends Entity {
import org.bukkit.damage.DamageSource;
import org.jetbrains.annotations.ApiStatus;
@@ -16,6 +17,8 @@ public interface Damageable extends Entity {
* @param amount Amount of damage to deal
*/
void damage(double amount);
+ void damage(double amount, DamageType type);
+

/**
* Deals the given amount of damage to this entity, from a specified
@@ -23,6 +26,8 @@ public interface Damageable extends Entity {
* Deals the given amount of damage to this entity from a specified
@@ -26,6 +29,8 @@ public interface Damageable extends Entity {
*/
void damage(double amount, @Nullable Entity source);

+ void damage(double amount, Entity source, DamageType type);
+
/**
* Gets the entity's health from 0 to {@link #getMaxHealth()}, where 0 is dead.
*
* Deals the given amount of damage to this entity from a specified
* {@link DamageSource}.
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 47b0154928b3d36e2602da202df07defbcf82108..a30feb13568cb6ee5d63fe23912be7dc958c8dfd 100644
index e67455efc84f1e06d3396291d104ce65fee4591b..4b844cc406bd75704d76dfc94f6d2379138d5ec5 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -4,6 +4,9 @@ import java.util.Collection;
Expand All @@ -2108,15 +2108,15 @@ index 47b0154928b3d36e2602da202df07defbcf82108..a30feb13568cb6ee5d63fe23912be7dc

/**
* Gets the height of the living entity's eyes above its Location.
@@ -1222,7 +1225,6 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1256,7 +1259,6 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param slot the slot
*/
void broadcastSlotBreak(org.bukkit.inventory.@NotNull EquipmentSlot slot);
-
/**
* Notifies specified players that the item in the slot
* of this entity broke.
@@ -1276,4 +1278,8 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1310,4 +1312,8 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setBodyYaw(float bodyYaw);
// Paper end
Expand All @@ -2126,10 +2126,10 @@ index 47b0154928b3d36e2602da202df07defbcf82108..a30feb13568cb6ee5d63fe23912be7dc
+ void sendParsedMessage(String text);
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index ae61a39b25267b84fe0b8766e4b12d9b24b44ded..cd9afc6654f2078c11666fa3c5af46f02bc1656f 100644
index 254a02ddb5dc867c9dd6c2086791f7ab94247fd3..a43685b3582c61fea5d41fcae0e60e9f7a90f706 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1338,30 +1338,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1407,30 +1407,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an Action Bar message to the client.
*
Expand Down Expand Up @@ -2160,7 +2160,7 @@ index ae61a39b25267b84fe0b8766e4b12d9b24b44ded..cd9afc6654f2078c11666fa3c5af46f0
* @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
*/
@Deprecated
@@ -1394,7 +1370,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1463,7 +1439,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an array of components as a single message to the specified screen position of this player
*
Expand All @@ -2169,7 +2169,7 @@ index ae61a39b25267b84fe0b8766e4b12d9b24b44ded..cd9afc6654f2078c11666fa3c5af46f0
* @param position the screen position
* @param components the components to send
*/
@@ -3379,6 +3355,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3492,6 +3468,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an array of components as a single message to the specified screen position of this player
*
Expand Down
Loading

0 comments on commit 5e5284b

Please sign in to comment.