From 87dc3a514de746c4e326041c05f2676e05d93651 Mon Sep 17 00:00:00 2001 From: Malfrador Date: Sun, 30 Jun 2024 20:04:38 +0200 Subject: [PATCH] It runs now --- build-data/dev-imports.txt | 10 - build-data/paper.at | 9 - gradle.properties | 8 +- gradle/wrapper/gradle-wrapper.jar | Bin 61608 -> 43462 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 29 +- patches/api/0001-combat-changes.patch | 13 + patches/server/0001-Branding-changes.patch | 95 +- patches/server/0002-misc-qol.patch | 217 +- patches/server/0003-combat-changes.patch | 212 +- patches/server/0004-Spellbook.patch | 2144 +++++++++--------- patches/server/removed/0005-Hephaestus.patch | 1653 -------------- settings.gradle.kts | 4 + test-plugin/build.gradle.kts | 15 - test-plugin/src/main/resources/plugin.yml | 9 - 15 files changed, 1228 insertions(+), 3193 deletions(-) delete mode 100644 build-data/dev-imports.txt delete mode 100644 build-data/paper.at delete mode 100644 patches/server/removed/0005-Hephaestus.patch delete mode 100644 test-plugin/build.gradle.kts delete mode 100644 test-plugin/src/main/resources/plugin.yml diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt deleted file mode 100644 index f35428a..0000000 --- a/build-data/dev-imports.txt +++ /dev/null @@ -1,10 +0,0 @@ -# You can use this file to import files from minecraft libraries into the project -# format: -# -# both fully qualified and a file based syntax are accepted for : -# authlib com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java -# datafixerupper com.mojang.datafixers.DataFixerBuilder -# datafixerupper com/mojang/datafixers/util/Either.java -# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId: -# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter -# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java \ No newline at end of file diff --git a/build-data/paper.at b/build-data/paper.at deleted file mode 100644 index 5f45287..0000000 --- a/build-data/paper.at +++ /dev/null @@ -1,9 +0,0 @@ -# You can use this file to change the access modifiers on a member -# This line would make the field rollAmount public in Bee -#public net.minecraft.world.entity.animal.Bee rollAmount -# This line would make the field public and remove the final modifier -#public-f net.minecraft.network.protocol.game.ClientboundChatPacket sender -# Leave out the member and it will apply to the class itself -# More info, see here https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers - -public-f net.minecraft.world.damagesource.CombatTracker entries; \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 8499016..e97071f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ group=de.erethon.papyrus -version=1.20.4-R0.1-SNAPSHOT -mcVersion=1.20.4 +version = 1.21-R0.1-SNAPSHOT +mcVersion = 1.21 -pufferfishRef=fb16f9c80feb9ddacd94b4b6b99d6ad903bcdf9a +paperCommit = dd49fba8c534d48c3693a751075ecb5836a9d458 org.gradle.jvmargs=-Xmx8G org.gradle.caching=true org.gradle.parallel=true -org.gradle.vfs.watch=false +org.gradle.vfs.watch=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba7710deaf9f98673a68957ea02138b60d0a..d64cd4917707c1f8861d8cb53dd15194d4248596 100644 GIT binary patch literal 43462 zcma&NWl&^owk(X(xVyW%ySuwf;qI=D6|RlDJ2cR^yEKh!@I- zp9QeisK*rlxC>+~7Dk4IxIRsKBHqdR9b3+fyL=ynHmIDe&|>O*VlvO+%z5;9Z$|DJ zb4dO}-R=MKr^6EKJiOrJdLnCJn>np?~vU-1sSFgPu;pthGwf}bG z(1db%xwr#x)r+`4AGu$j7~u2MpVs3VpLp|mx&;>`0p0vH6kF+D2CY0fVdQOZ@h;A` z{infNyvmFUiu*XG}RNMNwXrbec_*a3N=2zJ|Wh5z* z5rAX$JJR{#zP>KY**>xHTuw?|-Rg|o24V)74HcfVT;WtQHXlE+_4iPE8QE#DUm%x0 zEKr75ur~W%w#-My3Tj`hH6EuEW+8K-^5P62$7Sc5OK+22qj&Pd1;)1#4tKihi=~8C zHiQSst0cpri6%OeaR`PY>HH_;CPaRNty%WTm4{wDK8V6gC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lOS^c>Z^^n^0I|FH^@^`ZR`{H=$ zjO0_$cnpBM7Zcm?H_RXIu-Lu~qweDSV|tEZBZh!e6hQy->}e;d#osZ1hQj{HhHkC0 zJ|F-HKmeTGgDe979ogBz24;@<|I7;TU!IXb@oWMsMECIETmQy`zPtM`|NP}PjzR_u zKMG1Z{%1kWeMfEf(10U#w!clmQ2)JC8zm(Fv!H4dUHQHCFLikID?hrd{0>kCQt?kP zdqn2ZG0}ytcQJ7t_B3s0ZvH3PYjkjQ`Q%;jV@?MK-+z3etBCGGo4f4`y^|AdCs!DH zThTQ;cL5dM{|tB_1y6K3bVa^hx_<9J(}5`2SDz1^0bT!Vm*JV;9~t&{IC{$DUAVV* z{|E=#yN{wNdTY@$6z{_KNA3&%w|vFu1n9XRcM0Ak>`UW!lQ`ah3D4r%}Z diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3499ded..a441313 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ 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.8-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d4..1aa94a4 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/patches/api/0001-combat-changes.patch b/patches/api/0001-combat-changes.patch index d705d9c..eee2786 100644 --- a/patches/api/0001-combat-changes.patch +++ b/patches/api/0001-combat-changes.patch @@ -4,6 +4,19 @@ Date: Sun, 12 Jun 2022 21:43:09 +0200 Subject: [PATCH] combat changes +diff --git a/build.gradle.kts b/build.gradle.kts +index fd39ed209b20c927054b8482c400beeeeab460a3..6298692b62df945d74b848c77eec40ea69cdea72 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -94,7 +94,7 @@ sourceSets { + } + // Paper end + // Paper start - brigadier API +-val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements", "javadocElements") ++val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements") // Papyrus + configurations { + val outgoing = outgoingVariants.map { named(it) } + for (config in outgoing) { diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java index 947874c0172b690e7752e49b7bec64e0c0308515..50199c1879152a5c4e272a09201f4d2a91e8d3c0 100644 --- a/src/main/java/org/bukkit/attribute/Attribute.java diff --git a/patches/server/0001-Branding-changes.patch b/patches/server/0001-Branding-changes.patch index 917d38b..d3258c8 100644 --- a/patches/server/0001-Branding-changes.patch +++ b/patches/server/0001-Branding-changes.patch @@ -5,88 +5,87 @@ Subject: [PATCH] Branding changes diff --git a/build.gradle.kts b/build.gradle.kts -index 0dab873b52e718ffb83c655b6467abe53c8fdb1d..b3855e333315d782d2c4dc90429db714226cca3a 100644 +index 1a734293c9416f13324bb0edf8f950c9029f8bc4..a26ff240bb68379f00f3e1ec5e058c3b7be929d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { val alsoShade: Configuration by configurations.creating dependencies { -- implementation(project(":pufferfish-api")) // Pufferfish // Paper -+ implementation(project(":papyrus-api")) //Papyrus // Pufferfish // Paper - // Pufferfish start - implementation("io.papermc.paper:paper-mojangapi:1.19.2-R0.1-SNAPSHOT") { - exclude("io.papermc.paper", "paper-api") -@@ -90,7 +90,7 @@ tasks.jar { +- implementation(project(":paper-api")) ++ implementation(project(":papyrus-api")) // Papyrus + // Paper start + implementation("org.jline:jline-terminal-jansi:3.21.0") + implementation("net.minecrell:terminalconsoleappender:1.3.0") +@@ -72,24 +72,18 @@ tasks.jar { + + manifest { + val git = Git(rootProject.layout.projectDirectory.path) +- val mcVersion = rootProject.providers.gradleProperty("mcVersion").get() +- val build = System.getenv("BUILD_NUMBER") ?: null + val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim() +- val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash" ++ val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\"" + val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper + val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper attributes( "Main-Class" to "org.bukkit.craftbukkit.Main", - "Implementation-Title" to "CraftBukkit", -- "Implementation-Version" to "git-Pufferfish-$implementationVersion", // Pufferfish -+ "Implementation-Version" to "git-Papyrus-$implementationVersion", // Papyrus // Pufferfish +- "Implementation-Title" to "Paper", +- "Implementation-Version" to implementationVersion, ++ "Implementation-Title" to "CraftBukkit", ++ "Implementation-Version" to "git-Paper-$implementationVersion", "Implementation-Vendor" to date, // Paper - "Specification-Title" to "Bukkit", +- "Specification-Title" to "Paper", ++ "Specification-Title" to "Bukkit", "Specification-Version" to project.version, -diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java -index 6799a729f08991b2faabfdaf2a5d919e71621e98..e9c3d0ad0147353bbe22d7beabe72749c3fbbc95 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java -@@ -1,10 +1,11 @@ - package net.minecraft.network.protocol.game; - --import java.util.Optional; - import net.minecraft.network.FriendlyByteBuf; - import net.minecraft.network.chat.Component; - import net.minecraft.network.protocol.Packet; - -+import java.util.Optional; -+ - public class ClientboundServerDataPacket implements Packet { - private final Component motd; - private final Optional iconBytes; -@@ -26,7 +27,7 @@ public class ClientboundServerDataPacket implements Packet // Paper -+ return "Papyrus"; // Papyrus - Papyrus > // Pufferfish - Pufferfish > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! +- return io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper ++ //return io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper ++ return "Papyrus"; // Papyrus - Papyrus > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! } public SystemReport fillSystemReport(SystemReport details) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9f5a6398a7dca841570a895054cee969dc96bca4..d122cb85aa720244a2bc1f62f5e2bb1c086ea237 100644 +index caf6ff33b42472d30f28629470e12889f50490cc..dab7ddf04b8609d75fc06f6cf12c2cde3fdbd7e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -266,7 +266,7 @@ import javax.annotation.Nullable; // Paper +@@ -266,7 +266,8 @@ import javax.annotation.Nullable; // Paper import javax.annotation.Nonnull; // Paper public final class CraftServer implements Server { -- private final String serverName = "Pufferfish"; // Paper // Pufferfish +- private final String serverName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper ++ //private final String serverName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper + private final String serverName = "Papyrus"; // Papyrus // Paper // Pufferfish private final String serverVersion; private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -index 80553face9c70c2a3d897681e7761df85b22d464..efeee36665ddf6e76186452bf2e7bac069d1cc6b 100644 +index 774556a62eb240da42e84db4502e2ed43495be17..990e41084ee68e3e000ba6cd4e2032045a0db021 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -@@ -11,7 +11,7 @@ public final class Versioning { +@@ -10,8 +10,8 @@ import org.bukkit.Bukkit; + public final class Versioning { public static String getBukkitVersion() { String result = "Unknown-Version"; - -- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/gg.pufferfish.pufferfish/pufferfish-api/pom.properties"); // Pufferfish +- +- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.papermc.paper/paper-api/pom.properties"); ++ //InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.papermc.paper/paper-api/pom.properties"); + InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/de.erethon.papyrus/papyrus-api/pom.properties"); // Pufferfish Properties properties = new Properties(); diff --git a/patches/server/0002-misc-qol.patch b/patches/server/0002-misc-qol.patch index 4a827a3..be53b91 100644 --- a/patches/server/0002-misc-qol.patch +++ b/patches/server/0002-misc-qol.patch @@ -144,7 +144,7 @@ index 0000000000000000000000000000000000000000..a62ac149e0133f232128e6965d28f8c7 + } +} diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 2ae08b21c63490bbf8cd870f9585d82ed131f815..c9808178e8b5a075ffdf14c8d45253a255f8d163 100644 +index 90a2c61c42cba7e38f167eccdd7a951a947963c4..6abe17797036c86115d17f87c4f2da17e9151f8e 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -4,6 +4,8 @@ import com.google.common.base.Suppliers; @@ -156,7 +156,7 @@ index 2ae08b21c63490bbf8cd870f9585d82ed131f815..c9808178e8b5a075ffdf14c8d45253a2 import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelException; -@@ -291,7 +293,14 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -303,7 +305,14 @@ public class Connection extends SimpleChannelInboundHandler> { // Paper end - packet limiter if (packetlistener.shouldHandleMessage(packet)) { try { @@ -171,8 +171,8 @@ index 2ae08b21c63490bbf8cd870f9585d82ed131f815..c9808178e8b5a075ffdf14c8d45253a2 + Connection.genericsFtw(event.getPacket(), packetlistener); } catch (RunningOnDifferentThreadException cancelledpackethandleexception) { ; - } catch (RejectedExecutionException rejectedexecutionexception) { -@@ -384,7 +393,14 @@ public class Connection extends SimpleChannelInboundHandler> { + } catch (io.papermc.paper.util.ServerStopRejectedExecutionException ignored) { // Paper - do not prematurely disconnect players on stop +@@ -449,7 +458,14 @@ public class Connection extends SimpleChannelInboundHandler> { if (!connected && !this.preparing) { return; } @@ -188,24 +188,11 @@ index 2ae08b21c63490bbf8cd870f9585d82ed131f815..c9808178e8b5a075ffdf14c8d45253a2 packet.onPacketDispatch(this.getPlayer()); if (connected && (InnerUtil.canSendImmediate(this, packet) || (io.papermc.paper.util.MCUtil.isMainThread() && packet.isReady() && this.pendingActions.isEmpty() -diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java -index e9c3d0ad0147353bbe22d7beabe72749c3fbbc95..faf6e44710cd5e823d7806f77fc384e8ad4d2113 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundServerDataPacket.java -@@ -27,7 +27,7 @@ public class ClientboundServerDataPacket implements Packet 0.0F && target instanceof LivingEntity) { -- ((LivingEntity) target).knockback((double) (f1 * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot())) * 0.017453292F, this, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // CraftBukkit -+ if (knockback > 0.0F && target instanceof LivingEntity) { -+ ((LivingEntity) target).knockback((double) (knockback * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper - this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D)); - } - diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java b/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java -index 80a83bb6123bbacadcd84674686235f322910779..89acc14db04496b4273ce4db8d2cd37cd998e72c 100644 +index da56b9704ce486f4c5956cc044a73b10fd2db140..4930eef744cdb9f1855502a3186235cf483358b9 100644 --- a/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java +++ b/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java -@@ -6,21 +6,49 @@ import net.minecraft.core.registries.BuiltInRegistries; - - public class Attributes { - -+ - public static final Attribute ARMOR = Attributes.register("generic.armor", (new RangedAttribute("attribute.name.generic.armor", 0.0D, 0.0D, 30.0D)).setSyncable(true)); - public static final Attribute ARMOR_TOUGHNESS = Attributes.register("generic.armor_toughness", (new RangedAttribute("attribute.name.generic.armor_toughness", 0.0D, 0.0D, 20.0D)).setSyncable(true)); -- public static final Attribute ATTACK_DAMAGE = Attributes.register("generic.attack_damage", new RangedAttribute("attribute.name.generic.attack_damage", 2.0D, 0.0D, org.spigotmc.SpigotConfig.attackDamage)); -+ public static final Attribute MAX_HEALTH = Attributes.register("generic.max_health", (new RangedAttribute("attribute.name.generic.max_health", 20.0D, 1.0D, org.spigotmc.SpigotConfig.maxHealth)).setSyncable(true)); -+ public static final Attribute FOLLOW_RANGE = Attributes.register("generic.follow_range", new RangedAttribute("attribute.name.generic.follow_range", 32.0D, 0.0D, 2048.0D)); -+ public static final Attribute KNOCKBACK_RESISTANCE = Attributes.register("generic.knockback_resistance", new RangedAttribute("attribute.name.generic.knockback_resistance", 0.0D, 0.0D, 1.0D)); -+ public static final Attribute MOVEMENT_SPEED = Attributes.register("generic.movement_speed", (new RangedAttribute("attribute.name.generic.movement_speed", 0.699999988079071D, 0.0D, org.spigotmc.SpigotConfig.movementSpeed)).setSyncable(true)); -+ public static final Attribute FLYING_SPEED = Attributes.register("generic.flying_speed", (new RangedAttribute("attribute.name.generic.flying_speed", 0.4000000059604645D, 0.0D, 1024.0D)).setSyncable(true)); -+ public static final Attribute ATTACK_DAMAGE = Attributes.register("generic.attack_damage", new RangedAttribute("attribute.name.generic.attack_damage", 20.0D, 0.0D, org.spigotmc.SpigotConfig.attackDamage)); - public static final Attribute ATTACK_KNOCKBACK = Attributes.register("generic.attack_knockback", new RangedAttribute("attribute.name.generic.attack_knockback", 0.0D, 0.0D, 5.0D)); - public static final Attribute ATTACK_SPEED = Attributes.register("generic.attack_speed", (new RangedAttribute("attribute.name.generic.attack_speed", 4.0D, 0.0D, 1024.0D)).setSyncable(true)); -- public static final Attribute FLYING_SPEED = Attributes.register("generic.flying_speed", (new RangedAttribute("attribute.name.generic.flying_speed", 0.4000000059604645D, 0.0D, 1024.0D)).setSyncable(true)); -- public static final Attribute FOLLOW_RANGE = Attributes.register("generic.follow_range", new RangedAttribute("attribute.name.generic.follow_range", 32.0D, 0.0D, 2048.0D)); - public static final Attribute JUMP_STRENGTH = Attributes.register("horse.jump_strength", (new RangedAttribute("attribute.name.horse.jump_strength", 0.7D, 0.0D, 2.0D)).setSyncable(true)); -- public static final Attribute KNOCKBACK_RESISTANCE = Attributes.register("generic.knockback_resistance", new RangedAttribute("attribute.name.generic.knockback_resistance", 0.0D, 0.0D, 1.0D)); - public static final Attribute LUCK = Attributes.register("generic.luck", (new RangedAttribute("attribute.name.generic.luck", 0.0D, -1024.0D, 1024.0D)).setSyncable(true)); - public static final Attribute MAX_ABSORPTION = Attributes.register("generic.max_absorption", new RangedAttribute("attribute.name.generic.max_absorption", 0.0D, 0.0D, 2048.0D)).setSyncable(true); -- public static final Attribute MAX_HEALTH = Attributes.register("generic.max_health", (new RangedAttribute("attribute.name.generic.max_health", 20.0D, 1.0D, org.spigotmc.SpigotConfig.maxHealth)).setSyncable(true)); -- public static final Attribute MOVEMENT_SPEED = Attributes.register("generic.movement_speed", (new RangedAttribute("attribute.name.generic.movement_speed", 0.699999988079071D, 0.0D, org.spigotmc.SpigotConfig.movementSpeed)).setSyncable(true)); - public static final Attribute SPAWN_REINFORCEMENTS_CHANCE = Attributes.register("zombie.spawn_reinforcements", new RangedAttribute("attribute.name.zombie.spawn_reinforcements", 0.0D, 0.0D, 1.0D)); - +@@ -39,6 +39,30 @@ public class Attributes { + public static final Holder SUBMERGED_MINING_SPEED = Attributes.register("player.submerged_mining_speed", (new RangedAttribute("attribute.name.player.submerged_mining_speed", 0.2D, 0.0D, 20.0D)).setSyncable(true)); + public static final Holder SWEEPING_DAMAGE_RATIO = Attributes.register("player.sweeping_damage_ratio", (new RangedAttribute("attribute.name.player.sweeping_damage_ratio", 0.0D, 0.0D, 1.0D)).setSyncable(true)); + public static final Holder WATER_MOVEMENT_EFFICIENCY = Attributes.register("generic.water_movement_efficiency", (new RangedAttribute("attribute.name.generic.water_movement_efficiency", 0.0D, 0.0D, 1.0D)).setSyncable(true)); + // Papyrus start - combat changes + // Element resistance -+ public static final Attribute RES_PURE = Attributes.register("resistance.pure", new RangedAttribute("attribute.name.resistance.pure", 0, 0, 4096)); -+ public static final Attribute RES_PHYSICAL = Attributes.register("resistance.physical", new RangedAttribute("attribute.name.resistance.physical", 0, 0, 4096)); -+ public static final Attribute RES_MAGIC = Attributes.register("resistance.magic", new RangedAttribute("attribute.name.resistance.magic", 0, 0, 4096)); -+ public static final Attribute RES_AIR = Attributes.register("resistance.air", new RangedAttribute("attribute.name.resistance.air", 0, 0, 4096)); -+ public static final Attribute RES_EARTH = Attributes.register("resistance.earth", new RangedAttribute("attribute.name.resistance.earth", 0, 0, 4096)); -+ public static final Attribute RES_FIRE = Attributes.register("resistance.fire", new RangedAttribute("attribute.name.resistance.fire", 0, 0, 4096)); -+ public static final Attribute RES_WATER = Attributes.register("resistance.water", new RangedAttribute("attribute.name.resistance.water", 0, 0, 4096)); -+ // Element advantage -+ public static final Attribute ADV_PURE = Attributes.register("advantage.pure", new RangedAttribute("attribute.name.advantage.pure", 0, 0, 4096)); -+ public static final Attribute ADV_PHYSICAL = Attributes.register("advantage.physical", new RangedAttribute("attribute.name.advantage.physical", 0, 0, 4096)); -+ public static final Attribute ADV_MAGIC = Attributes.register("advantage.magic", new RangedAttribute("attribute.name.advantage.magic", 0, 0, 4096)); -+ public static final Attribute ADV_AIR = Attributes.register("advantage.air", new RangedAttribute("attribute.name.advantage.air", 0, 0, 4096)); -+ public static final Attribute ADV_EARTH = Attributes.register("advantage.earth", new RangedAttribute("attribute.name.advantage.earth", 0, 0, 4096)); -+ public static final Attribute ADV_FIRE = Attributes.register("advantage.fire", new RangedAttribute("attribute.name.advantage.fire", 0, 0, 4096)); -+ public static final Attribute ADV_WATER = Attributes.register("advantage.water", new RangedAttribute("attribute.name.advantage.water", 0, 0, 4096)); -+ // Stats -+ public static final Attribute STAT_CRITCHANCE = Attributes.register("stat.crit.chance", new RangedAttribute("attribute.name.stat.crit.chance", 0, 0, 4096)); -+ public static final Attribute STAT_CRITDMG = Attributes.register("stat.crit.dmg", new RangedAttribute("attribute.name.stat.crit.dmg", 0, 0, 4096)); -+ public static final Attribute STAT_ATTACKSPEED= Attributes.register("stat.attackspeed", new RangedAttribute("attribute.name.stat.attackspeed", 0, 0, 4096)); -+ public static final Attribute STAT_CDR = Attributes.register("stat.cooldownreduction", new RangedAttribute("attribute.name.stat.cooldownreduction", 0, 0, 4096)); -+ // Combat -+ public static final Attribute COMBAT_HURTINVUL= Attributes.register("combat.hurtinvul", new RangedAttribute("attribute.name.combat.hurtinvul", 5, 0, 4096)); -+ -+ // Papyrus end -+ ++ public static final Holder RES_PURE = Attributes.register("resistance.pure", new RangedAttribute("attribute.name.resistance.pure", 0, 0, 4096)).setSyncable(false); ++ public static final Holder RES_PHYSICAL = Attributes.register("resistance.physical", new RangedAttribute("attribute.name.resistance.physical", 0, 0, 4096)).setSyncable(false); ++ public static final Holder RES_MAGIC = Attributes.register("resistance.magic", new RangedAttribute("attribute.name.resistance.magic", 0, 0, 4096)).setSyncable(false); ++ public static final Holder RES_AIR = Attributes.register("resistance.air", new RangedAttribute("attribute.name.resistance.air", 0, 0, 4096)).setSyncable(false); ++ public static final Holder RES_EARTH = Attributes.register("resistance.earth", new RangedAttribute("attribute.name.resistance.earth", 0, 0, 4096)).setSyncable(false); ++ public static final Holder RES_FIRE = Attributes.register("resistance.fire", new RangedAttribute("attribute.name.resistance.fire", 0, 0, 4096)).setSyncable(false); ++ public static final Holder RES_WATER = Attributes.register("resistance.water", new RangedAttribute("attribute.name.resistance.water", 0, 0, 4096)).setSyncable(false); ++ // Element advantageHolder ++ public static final Holder ADV_PURE = Attributes.register("advantage.pure", new RangedAttribute("attribute.name.advantage.pure", 0, 0, 4096)).setSyncable(false); ++ public static final Holder ADV_PHYSICAL = Attributes.register("advantage.physical", new RangedAttribute("attribute.name.advantage.physical", 0, 0, 4096)).setSyncable(false); ++ public static final Holder ADV_MAGIC = Attributes.register("advantage.magic", new RangedAttribute("attribute.name.advantage.magic", 0, 0, 4096)).setSyncable(false); ++ public static final Holder ADV_AIR = Attributes.register("advantage.air", new RangedAttribute("attribute.name.advantage.air", 0, 0, 4096)).setSyncable(false); ++ public static final Holder ADV_EARTH = Attributes.register("advantage.earth", new RangedAttribute("attribute.name.advantage.earth", 0, 0, 4096)).setSyncable(false); ++ public static final Holder ADV_FIRE = Attributes.register("advantage.fire", new RangedAttribute("attribute.name.advantage.fire", 0, 0, 4096)).setSyncable(false); ++ public static final Holder ADV_WATER = Attributes.register("advantage.water", new RangedAttribute("attribute.name.advantage.water", 0, 0, 4096)).setSyncable(false); ++ // StatsHolder ++ public static final Holder STAT_CRITCHANCE = Attributes.register("stat.crit.chance", new RangedAttribute("attribute.name.stat.crit.chance", 0, 0, 4096)).setSyncable(false); ++ public static final Holder STAT_CRITDMG = Attributes.register("stat.crit.dmg", new RangedAttribute("attribute.name.stat.crit.dmg", 0, 0, 4096)).setSyncable(false); ++ public static final Holder STAT_ATTACKSPEED= Attributes.register("stat.attackspeed", new RangedAttribute("attribute.name.stat.attackspeed", 0, 0, 4096)).setSyncable(false); ++ public static final Holder STAT_CDR = Attributes.register("stat.cooldownreduction", new RangedAttribute("attribute.name.stat.cooldownreduction", 0, 0, 4096)).setSyncable(false); ++ // CombatHolder ++ public static final Holder COMBAT_HURTINVUL= Attributes.register("combat.hurtinvul", new RangedAttribute("attribute.name.combat.hurtinvul", 5, 0, 4096)).setSyncable(false); + public Attributes() {} - private static Attribute register(String id, Attribute attribute) { diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec98b61217 100644 +index 54ba25632c2a9e1c93a5b3a0b92e5280864c49d6..9f0b9b51e36b96f935a96df92754afdf929dab9b 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -7,15 +7,7 @@ import com.mojang.authlib.GameProfile; +@@ -7,16 +7,8 @@ import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; import com.mojang.logging.LogUtils; import com.mojang.serialization.DataResult; @@ -251,15 +175,16 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec -import java.util.Optional; -import java.util.OptionalInt; -import java.util.function.Predicate; + import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import de.erethon.papyrus.DamageType; import net.minecraft.Util; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.core.BlockPos; -@@ -24,11 +16,7 @@ import net.minecraft.core.GlobalPos; - import net.minecraft.core.particles.ParticleOptions; +@@ -24,11 +16,7 @@ import net.minecraft.core.Direction; + import net.minecraft.core.GlobalPos; + import net.minecraft.core.Holder; import net.minecraft.core.particles.ParticleTypes; - import net.minecraft.core.registries.Registries; -import net.minecraft.nbt.CompoundTag; -import net.minecraft.nbt.ListTag; -import net.minecraft.nbt.NbtOps; @@ -269,7 +194,7 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec import net.minecraft.network.chat.ClickEvent; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -@@ -49,27 +37,12 @@ import net.minecraft.tags.DamageTypeTags; +@@ -50,11 +38,7 @@ import net.minecraft.tags.EntityTypeTags; import net.minecraft.tags.FluidTags; import net.minecraft.util.Mth; import net.minecraft.util.Unit; @@ -282,24 +207,23 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffectUtil; - import net.minecraft.world.effect.MobEffects; --import net.minecraft.world.entity.Entity; +@@ -62,15 +46,6 @@ import net.minecraft.world.effect.MobEffects; + import net.minecraft.world.entity.Entity; + import net.minecraft.world.entity.EntityAttachment; + import net.minecraft.world.entity.EntityAttachments; -import net.minecraft.world.entity.EntityDimensions; -import net.minecraft.world.entity.EntityType; -import net.minecraft.world.entity.EquipmentSlot; -import net.minecraft.world.entity.HumanoidArm; -import net.minecraft.world.entity.LivingEntity; --import net.minecraft.world.entity.Mob; --import net.minecraft.world.entity.MobType; -import net.minecraft.world.entity.MoverType; -import net.minecraft.world.entity.Pose; -import net.minecraft.world.entity.SlotAccess; -import net.minecraft.world.entity.TamableAnimal; -+import net.minecraft.world.entity.*; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Parrot; -@@ -84,12 +57,7 @@ import net.minecraft.world.inventory.AbstractContainerMenu; +@@ -88,12 +63,7 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ClickAction; import net.minecraft.world.inventory.InventoryMenu; import net.minecraft.world.inventory.PlayerEnderChestContainer; @@ -311,9 +235,9 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec -import net.minecraft.world.item.SwordItem; +import net.minecraft.world.item.*; import net.minecraft.world.item.crafting.RecipeHolder; + import net.minecraft.world.item.enchantment.EnchantmentEffectComponents; import net.minecraft.world.item.enchantment.EnchantmentHelper; - import net.minecraft.world.item.trading.MerchantOffers; -@@ -111,7 +79,6 @@ import net.minecraft.world.phys.AABB; +@@ -113,7 +83,6 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.PlayerTeam; import net.minecraft.world.scores.Scoreboard; @@ -321,8 +245,8 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.util.CraftVector; -@@ -122,6 +89,11 @@ import org.bukkit.event.entity.EntityExhaustionEvent; - import org.bukkit.event.entity.EntityKnockbackEvent; +@@ -125,6 +94,11 @@ import org.bukkit.event.entity.EntityKnockbackEvent; + import org.bukkit.event.entity.EntityRemoveEvent; import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerVelocityEvent; +import org.slf4j.Logger; @@ -333,8 +257,8 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec // CraftBukkit end public abstract class Player extends LivingEntity { -@@ -130,7 +102,7 @@ public abstract class Player extends LivingEntity { - public static final int MAX_NAME_LENGTH = 16; +@@ -132,7 +106,7 @@ public abstract class Player extends LivingEntity { + private static final Logger LOGGER = LogUtils.getLogger(); public static final HumanoidArm DEFAULT_MAIN_HAND = HumanoidArm.RIGHT; public static final int DEFAULT_MODEL_CUSTOMIZATION = 0; - public static final int MAX_HEALTH = 20; @@ -342,18 +266,8 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec public static final int SLEEP_DURATION = 100; public static final int WAKE_UP_DURATION = 10; public static final int ENDER_SLOT_OFFSET = 200; -@@ -221,7 +193,8 @@ public abstract class Player extends LivingEntity { - } - - public static AttributeSupplier.Builder createAttributes() { -- return LivingEntity.createLivingAttributes().add(Attributes.ATTACK_DAMAGE, 1.0D).add(Attributes.MOVEMENT_SPEED, 0.10000000149011612D).add(Attributes.ATTACK_SPEED).add(Attributes.LUCK); -+ return LivingEntity.createLivingAttributes().add(Attributes.ATTACK_DAMAGE, 1.0D).add(Attributes.MOVEMENT_SPEED, 0.10000000149011612D).add(Attributes.ATTACK_SPEED).add(Attributes.LUCK) -+ .add(Attributes.MAX_HEALTH, 500); - } - - @Override -@@ -1241,6 +1214,15 @@ public abstract class Player extends LivingEntity { - return this.onGround() || this.fallDistance < this.maxUpStep() && !this.level().noCollision(this, this.getBoundingBox().move(0.0D, (double) (this.fallDistance - this.maxUpStep()), 0.0D)); +@@ -1264,6 +1238,15 @@ public abstract class Player extends LivingEntity { + return this.level().noCollision(this, new AABB(axisalignedbb.minX + offsetX, axisalignedbb.minY - (double) f - 9.999999747378752E-6D, axisalignedbb.minZ + offsetZ, axisalignedbb.maxX + offsetX, axisalignedbb.minY, axisalignedbb.maxZ + offsetZ)); } + // Papyrus - combat rework @@ -368,7 +282,7 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec public void attack(Entity target) { // Paper start - PlayerAttackEntityEvent boolean willAttack = target.isAttackable() && !target.skipAttackInteraction(this); // Vanilla logic -@@ -1460,7 +1442,7 @@ public abstract class Player extends LivingEntity { +@@ -1500,7 +1483,7 @@ public abstract class Player extends LivingEntity { @Override protected void doAutoAttackOnTouch(LivingEntity target) { @@ -378,10 +292,10 @@ index 5ca1f834f311a87323ced2578535e66efa14e47f..21af79bbfca6bde1a28fe7c815fabfec @io.papermc.paper.annotation.DoNotUse @Deprecated // Paper - Add PlayerShieldDisableEvent diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 206520f6f20b2e48b1eefdd4edb26510b88e4c92..e6f84caea6bb446ec28049e31f43106561fa3979 100644 +index 7eea190ce8a62960ecc42ff56a4ef71b754184fb..972f935699bdda6af68f7a2664dbf5d19be2254c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -191,8 +191,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -204,8 +204,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private final Set unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player private static final WeakHashMap> pluginWeakReferences = new WeakHashMap<>(); private int hash = 0; diff --git a/patches/server/0004-Spellbook.patch b/patches/server/0004-Spellbook.patch index f993ef6..513897d 100644 --- a/patches/server/0004-Spellbook.patch +++ b/patches/server/0004-Spellbook.patch @@ -1,18 +1,31 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: malfrador -Date: Fri, 5 Aug 2022 22:03:37 +0200 +From: Malfrador +Date: Sun, 30 Jun 2024 18:10:06 +0200 Subject: [PATCH] Spellbook +diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java +index 0715514c8bb49c805b04f42ff37903a7d590aaa8..e29f734dd81b839492f6304fcf5ec7870e127a5c 100644 +--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java ++++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java +@@ -1874,6 +1874,7 @@ public final class NewChunkHolder { + } + } catch (final Throwable thr) { + LOGGER.error("Failed to save entity data (" + this.chunkX + "," + this.chunkZ + ") in world '" + WorldUtil.getWorldName(this.world) + "'"); ++ thr.printStackTrace(); // Papyrus - actual useful error + } + + return true; diff --git a/src/main/java/de/erethon/papyrus/ContainerLoadEvent.java b/src/main/java/de/erethon/papyrus/ContainerLoadEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..e672340310a8863a627c083cbea2c08a8d6049b9 +index 0000000000000000000000000000000000000000..573a606ed3f9d42e205dee492228044783613847 --- /dev/null +++ b/src/main/java/de/erethon/papyrus/ContainerLoadEvent.java -@@ -0,0 +1,32 @@ +@@ -0,0 +1,30 @@ +package de.erethon.papyrus; + +import net.minecraft.core.NonNullList; ++import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; @@ -22,14 +35,11 @@ index 0000000000000000000000000000000000000000..e672340310a8863a627c083cbea2c08a + + private static final HandlerList handlers = new HandlerList(); + -+ private NonNullList itemStacks; ++ public NonNullList stacks; + -+ public ContainerLoadEvent(NonNullList items) { -+ this.itemStacks = items; -+ } -+ -+ public NonNullList getItemStacks() { -+ return itemStacks; ++ public ContainerLoadEvent(NonNullList stacks, boolean async) { ++ super(async); ++ this.stacks = stacks; + } + + @NotNull @@ -42,62 +52,67 @@ index 0000000000000000000000000000000000000000..e672340310a8863a627c083cbea2c08a + return handlers; + } +} -diff --git a/src/main/java/de/erethon/papyrus/CraftDamageType.java b/src/main/java/de/erethon/papyrus/CraftDamageType.java +diff --git a/src/main/java/de/erethon/papyrus/CraftPDamageType.java b/src/main/java/de/erethon/papyrus/CraftPDamageType.java new file mode 100644 -index 0000000000000000000000000000000000000000..72c957ec2298bab987709de1bc1caa46bbc9600e +index 0000000000000000000000000000000000000000..ce45935c8502c9b95a57129f915a707d17b84157 --- /dev/null -+++ b/src/main/java/de/erethon/papyrus/CraftDamageType.java -@@ -0,0 +1,52 @@ ++++ b/src/main/java/de/erethon/papyrus/CraftPDamageType.java +@@ -0,0 +1,57 @@ +package de.erethon.papyrus; + ++ ++import net.minecraft.core.Holder; +import net.minecraft.world.entity.ai.attributes.Attribute; +import net.minecraft.world.entity.ai.attributes.Attributes; + -+import java.util.Arrays; -+ -+public enum CraftDamageType { ++public enum CraftPDamageType { + -+ AIR(Attributes.ADV_AIR, Attributes.RES_AIR, Attributes.PEN_MAGICAL, PDamageType.AIR), ++ AIR(Attributes.ADV_AIR, Attributes.RES_AIR, Attributes.PEN_MAGICAL, PDamageType.AIR), + EARTH(Attributes.ADV_EARTH, Attributes.RES_EARTH, Attributes.PEN_MAGICAL, PDamageType.EARTH), -+ FIRE(Attributes.ADV_FIRE, Attributes.RES_FIRE, Attributes.PEN_MAGICAL,PDamageType.FIRE), -+ MAGIC(Attributes.ADV_MAGIC, Attributes.RES_MAGIC, Attributes.PEN_MAGICAL,PDamageType.MAGIC), ++ FIRE(Attributes.ADV_FIRE, Attributes.RES_FIRE, Attributes.PEN_MAGICAL, PDamageType.FIRE), ++ MAGIC(Attributes.ADV_MAGIC, Attributes.RES_MAGIC, Attributes.PEN_MAGICAL, PDamageType.MAGIC), + PHYSICAL(Attributes.ADV_PHYSICAL, Attributes.RES_PHYSICAL, Attributes.PEN_PHYSICAL,PDamageType.PHYSICAL), -+ WATER(Attributes.ADV_WATER, Attributes.RES_WATER, Attributes.PEN_MAGICAL,PDamageType.WATER), ++ WATER(Attributes.ADV_WATER, Attributes.RES_WATER, Attributes.PEN_MAGICAL, PDamageType.WATER), + PURE(Attributes.ADV_PURE, Attributes.RES_PURE, Attributes.PEN_PHYSICAL, PDamageType.PURE); + -+ private final Attribute advAttr; -+ private final Attribute resAttr; -+ -+ private final Attribute penAttribute; -+ private final PDamageType apiDamageType; -+ -+ CraftDamageType(Attribute advAttr, Attribute resAttr, Attribute penAttribute, PDamageType apiDamageType) { -+ this.advAttr = advAttr; -+ this.resAttr = resAttr; -+ this.penAttribute = penAttribute; -+ this.apiDamageType = apiDamageType; -+ } -+ -+ public Attribute getAdvAttr() { -+ return this.advAttr; -+ } -+ ++ public final Holder advantage; ++ public final Holder res; ++ public final Holder pen; ++ public final PDamageType apiType; + -+ public Attribute getResAttr() { -+ return this.resAttr; -+ } + -+ public Attribute getPenAttribute() { -+ return this.penAttribute; ++ CraftPDamageType(Holder advantage, Holder res, Holder pen, PDamageType apiType) { ++ this.advantage = advantage; ++ this.res = res; ++ this.pen = pen; ++ this.apiType = apiType; + } + -+ -+ public static CraftDamageType ofAPI(PDamageType type) { -+ return Arrays.stream(values()).filter(crafttype -> crafttype.apiDamageType == type).findFirst().orElse(null); -+ } -+ -+ public PDamageType getApiDamageType() { -+ return apiDamageType; ++ public static CraftPDamageType ofAPI(PDamageType apiType) { ++ switch (apiType) { ++ case AIR -> { ++ return CraftPDamageType.AIR; ++ } ++ case EARTH -> { ++ return CraftPDamageType.EARTH; ++ } ++ case FIRE -> { ++ return CraftPDamageType.FIRE; ++ } ++ case MAGIC -> { ++ return CraftPDamageType.MAGIC; ++ } ++ case PHYSICAL -> { ++ return CraftPDamageType.PHYSICAL; ++ } ++ case WATER -> { ++ return CraftPDamageType.WATER; ++ } ++ case PURE -> { ++ return CraftPDamageType.PURE; ++ } ++ } ++ return CraftPDamageType.PURE; + } +} diff --git a/src/main/java/de/erethon/papyrus/DamageType.java b/src/main/java/de/erethon/papyrus/DamageType.java @@ -138,40 +153,118 @@ index 0cbc67c143dbbe8d8bc1ebf2ea384f6851cf8658..00000000000000000000000000000000 - return this.resAttr; - } -} -diff --git a/src/main/java/de/erethon/papyrus/EntityAttachment.java b/src/main/java/de/erethon/papyrus/EntityAttachment.java +diff --git a/src/main/java/de/erethon/papyrus/MobSpawnEntityCreateEvent.java b/src/main/java/de/erethon/papyrus/MobSpawnEntityCreateEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..6650bb2ffb961035a7e598990097621c80b2c7ae +index 0000000000000000000000000000000000000000..e089787a94d60840792ad0ee31e464744b445170 --- /dev/null -+++ b/src/main/java/de/erethon/papyrus/EntityAttachment.java -@@ -0,0 +1,22 @@ ++++ b/src/main/java/de/erethon/papyrus/MobSpawnEntityCreateEvent.java +@@ -0,0 +1,42 @@ +package de.erethon.papyrus; + -+import net.minecraft.world.entity.Entity; ++import net.minecraft.core.BlockPos; ++import net.minecraft.server.level.ServerLevel; ++import net.minecraft.world.entity.Mob; ++import net.minecraft.world.entity.SpawnGroupData; ++import net.minecraft.world.entity.player.Player; ++import net.minecraft.world.level.biome.MobSpawnSettings; ++import org.bukkit.event.Event; ++import org.bukkit.event.HandlerList; ++import org.jetbrains.annotations.NotNull; + -+public class EntityAttachment { ++public class MobSpawnEntityCreateEvent extends Event { + -+ public String id; -+ public double dx; -+ public double dy; -+ public double dz; -+ public float dyaw; -+ public float dpitch; -+ public Entity entity; ++ private static final HandlerList handlers = new HandlerList(); + -+ public EntityAttachment(double dx, double dy, double dz, Entity entity, String id) { -+ this.dx = dx; -+ this.dy = dy; -+ this.dz = dz; -+ this.entity = entity; -+ this.id = id; ++ public Mob mob; ++ public ServerLevel level; ++ public MobSpawnSettings.SpawnerData spawnerData; ++ public BlockPos.MutableBlockPos pos; ++ public Player player; ++ public SpawnGroupData groupData; ++ ++ public MobSpawnEntityCreateEvent(Mob mob, ServerLevel level, MobSpawnSettings.SpawnerData spawnerData, BlockPos.MutableBlockPos pos, Player nearest, SpawnGroupData groupData) { ++ this.mob = mob; ++ this.level = level; ++ this.spawnerData = spawnerData; ++ this.pos = pos; ++ this.player = player; ++ this.groupData = groupData; ++ } ++ ++ @NotNull ++ @Override ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; ++ } ++} +diff --git a/src/main/java/de/erethon/papyrus/MobSpawnSettingsEvent.java b/src/main/java/de/erethon/papyrus/MobSpawnSettingsEvent.java +new file mode 100644 +index 0000000000000000000000000000000000000000..b9c5ed60d39facb2ef54d408941d88a8d041e151 +--- /dev/null ++++ b/src/main/java/de/erethon/papyrus/MobSpawnSettingsEvent.java +@@ -0,0 +1,52 @@ ++package de.erethon.papyrus; ++ ++import net.minecraft.core.BlockPos; ++import net.minecraft.core.Holder; ++import net.minecraft.server.level.ServerLevel; ++import net.minecraft.util.random.WeightedRandomList; ++import net.minecraft.world.entity.Mob; ++import net.minecraft.world.entity.MobCategory; ++import net.minecraft.world.entity.SpawnGroupData; ++import net.minecraft.world.entity.player.Player; ++import net.minecraft.world.level.StructureManager; ++import net.minecraft.world.level.biome.Biome; ++import net.minecraft.world.level.biome.MobSpawnSettings; ++import net.minecraft.world.level.chunk.ChunkGenerator; ++import org.bukkit.event.Event; ++import org.bukkit.event.HandlerList; ++import org.jetbrains.annotations.NotNull; ++ ++import javax.annotation.Nullable; ++ ++public class MobSpawnSettingsEvent extends Event { ++ ++ private static final HandlerList handlers = new HandlerList(); ++ ++ public ServerLevel level; ++ public StructureManager structureAccessor; ++ public ChunkGenerator chunkGenerator; ++ public MobCategory spawnGroup; ++ public BlockPos pos; ++ public Holder biomeEntry; ++ public WeightedRandomList spawnerData; ++ ++ ++ public MobSpawnSettingsEvent(ServerLevel level, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, BlockPos pos, @Nullable Holder biomeEntry) { ++ this.level = level; ++ this.structureAccessor = structureAccessor; ++ this.chunkGenerator = chunkGenerator; ++ this.spawnGroup = spawnGroup; ++ this.pos = pos; ++ this.biomeEntry = biomeEntry; ++ } ++ ++ @NotNull ++ @Override ++ public HandlerList getHandlers() { ++ return handlers; ++ } ++ ++ public static HandlerList getHandlerList() { ++ return handlers; + } +} diff --git a/src/main/java/de/erethon/papyrus/PlayerInventoryLoadEvent.java b/src/main/java/de/erethon/papyrus/PlayerInventoryLoadEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..b2b41831a9513f7ad60b0817a9d2175f6c224cfd +index 0000000000000000000000000000000000000000..7d90eab2af9b1714b18be16bc65d78c54853cd65 --- /dev/null +++ b/src/main/java/de/erethon/papyrus/PlayerInventoryLoadEvent.java -@@ -0,0 +1,51 @@ +@@ -0,0 +1,35 @@ +package de.erethon.papyrus; + +import net.minecraft.core.NonNullList; @@ -185,32 +278,16 @@ index 0000000000000000000000000000000000000000..b2b41831a9513f7ad60b0817a9d2175f + + private static final HandlerList handlers = new HandlerList(); + -+ private Player player; -+ private NonNullList items; -+ private NonNullList armor; -+ private NonNullList offhand; ++ public Player player; ++ public NonNullList items; ++ public NonNullList armor; ++ public NonNullList offHand; + -+ public PlayerInventoryLoadEvent(Player player, NonNullList itemStacks, NonNullList armor, NonNullList offhand) { ++ public PlayerInventoryLoadEvent(Player player, NonNullList items, NonNullList armor, NonNullList offHand) { + this.player = player; -+ this.items = itemStacks; ++ this.items = items; + this.armor = armor; -+ this.offhand = offhand; -+ } -+ -+ public Player getPlayer() { -+ return player; -+ } -+ -+ public NonNullList getItems() { -+ return items; -+ } -+ -+ public NonNullList getArmor() { -+ return armor; -+ } -+ -+ public NonNullList getOffhand() { -+ return offhand; ++ this.offHand = offHand; + } + + @NotNull @@ -224,20 +301,19 @@ index 0000000000000000000000000000000000000000..b2b41831a9513f7ad60b0817a9d2175f + } +} diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java -index 0dd611aed9749ebed64e74fc4c2599c3c7f3ff2c..c43bf052b4a3e6cf693fad9b08526dc396d4dfef 100644 +index 1a5e73fd97781f3903e5ef13aa0352c64fbc2cc1..6f57b2d15bc3f6775050abb86c8984eb3dda1fe8 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java -@@ -5,6 +5,8 @@ import net.minecraft.core.BlockPos; - import net.minecraft.core.registries.BuiltInRegistries; - import net.minecraft.network.FriendlyByteBuf; - import net.minecraft.network.protocol.Packet; -+import net.minecraft.resources.ResourceKey; -+import net.minecraft.resources.ResourceLocation; - import net.minecraft.util.Mth; +@@ -13,6 +13,7 @@ import net.minecraft.util.Mth; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; -@@ -15,7 +17,7 @@ public class ClientboundAddEntityPacket implements Packet { + public static final StreamCodec STREAM_CODEC = Packet.codec( +@@ -22,7 +23,7 @@ public class ClientboundAddEntityPacket implements Packet type; @@ -245,43 +321,57 @@ index 0dd611aed9749ebed64e74fc4c2599c3c7f3ff2c..c43bf052b4a3e6cf693fad9b08526dc3 private final double x; private final double y; private final double z; -@@ -27,19 +29,22 @@ public class ClientboundAddEntityPacket implements Packet entityType, int entityData, Vec3 velocity, double headYaw) { +- public ClientboundAddEntityPacket( +- int id, UUID uuid, double x, double y, double z, float pitch, float yaw, EntityType entityType, int entityData, Vec3 velocity, double headYaw +- ) { + public ClientboundAddEntityPacket(int id, UUID uuid, double x, double y, double z, float pitch, float yaw, EntityType entityType, int entityData, Vec3 velocity, double headYaw, Entity entity) { this.id = id; this.uuid = uuid; this.x = x; -@@ -53,6 +58,9 @@ public class ClientboundAddEntityPacket implements Packet 20) { // Paper - this will greatly screw with clients with > 1000ms RTT - this.awaitingTeleportTime = this.tickCount; -@@ -1434,6 +1433,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1383,6 +1383,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot()); return; } @@ -356,155 +487,56 @@ index d6f8d572cb0692e27c5410e0de17c1c77487d2c2..e1fddb62172d7c3c55cde3c58bc751c5 } } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 91feb12732564c90656da487664dbc12e55397fc..6914adb7d3c195c07dfa2b4286ca866bf5b0c5c8 100644 +index ef177f21d654d69c128f3f39ea58f2d8ee598628..744e119e519106727a0dbf6f337a380bb72eb378 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -8,23 +8,7 @@ import com.mojang.authlib.GameProfile; - import com.mojang.logging.LogUtils; - import com.mojang.serialization.DataResult; - import com.mojang.serialization.Dynamic; --import java.io.File; --import java.net.SocketAddress; --import java.nio.file.Path; --import java.text.SimpleDateFormat; --import java.time.Instant; --import java.util.Collection; --import java.util.EnumSet; --import java.util.Iterator; --import java.util.List; --import java.util.Map; --import java.util.Objects; --import java.util.Optional; --import java.util.Set; --import java.util.UUID; --import java.util.function.Function; --import java.util.function.Predicate; --import javax.annotation.Nullable; +@@ -25,6 +25,8 @@ import java.util.UUID; + import java.util.function.Function; + import java.util.function.Predicate; + import javax.annotation.Nullable; ++ +import de.erethon.papyrus.PlayerSwitchProfileEvent; import net.minecraft.ChatFormatting; import net.minecraft.FileUtil; import net.minecraft.commands.CommandSourceStack; -@@ -33,43 +17,17 @@ import net.minecraft.core.LayeredRegistryAccess; - import net.minecraft.nbt.CompoundTag; - import net.minecraft.nbt.NbtOps; - import net.minecraft.network.Connection; --import net.minecraft.network.chat.ChatType; --import net.minecraft.network.chat.Component; --import net.minecraft.network.chat.MutableComponent; --import net.minecraft.network.chat.OutgoingChatMessage; --import net.minecraft.network.chat.PlayerChatMessage; -+import net.minecraft.network.chat.*; - import net.minecraft.network.protocol.Packet; - import net.minecraft.network.protocol.common.ClientboundUpdateTagsPacket; --import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket; --import net.minecraft.network.protocol.game.ClientboundEntityEventPacket; --import net.minecraft.network.protocol.game.ClientboundGameEventPacket; --import net.minecraft.network.protocol.game.ClientboundInitializeBorderPacket; --import net.minecraft.network.protocol.game.ClientboundLoginPacket; --import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket; --import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket; --import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket; --import net.minecraft.network.protocol.game.ClientboundRespawnPacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderCenterPacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderLerpSizePacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDelayPacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePacket; --import net.minecraft.network.protocol.game.ClientboundSetCarriedItemPacket; --import net.minecraft.network.protocol.game.ClientboundSetChunkCacheRadiusPacket; --import net.minecraft.network.protocol.game.ClientboundSetDefaultSpawnPositionPacket; --import net.minecraft.network.protocol.game.ClientboundSetExperiencePacket; --import net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket; --import net.minecraft.network.protocol.game.ClientboundSetSimulationDistancePacket; --import net.minecraft.network.protocol.game.ClientboundSetTimePacket; --import net.minecraft.network.protocol.game.ClientboundSoundPacket; --import net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket; --import net.minecraft.network.protocol.game.ClientboundUpdateRecipesPacket; -+import net.minecraft.network.protocol.game.*; - import net.minecraft.network.protocol.status.ServerStatus; - import net.minecraft.resources.ResourceKey; - import net.minecraft.server.MinecraftServer; - import net.minecraft.server.PlayerAdvancements; - import net.minecraft.server.RegistryLayer; - import net.minecraft.server.ServerScoreboard; -+import net.minecraft.server.dedicated.DedicatedServer; - import net.minecraft.server.level.ClientInformation; - import net.minecraft.server.level.ServerLevel; - import net.minecraft.server.level.ServerPlayer; -@@ -100,25 +58,26 @@ import net.minecraft.world.phys.Vec3; - import net.minecraft.world.scores.DisplaySlot; - import net.minecraft.world.scores.Objective; - import net.minecraft.world.scores.PlayerTeam; --import org.slf4j.Logger; -- --// CraftBukkit start --import java.util.stream.Collectors; --import net.minecraft.server.dedicated.DedicatedServer; - import org.bukkit.Location; - import org.bukkit.craftbukkit.CraftServer; - import org.bukkit.craftbukkit.CraftWorld; - import org.bukkit.craftbukkit.entity.CraftPlayer; --import org.bukkit.craftbukkit.util.CraftChatMessage; - import org.bukkit.craftbukkit.util.CraftLocation; - import org.bukkit.entity.Player; --import org.bukkit.event.player.PlayerChangedWorldEvent; --import org.bukkit.event.player.PlayerJoinEvent; --import org.bukkit.event.player.PlayerLoginEvent; --import org.bukkit.event.player.PlayerQuitEvent; --import org.bukkit.event.player.PlayerRespawnEvent; -+import org.bukkit.event.player.*; - import org.bukkit.event.player.PlayerRespawnEvent.RespawnReason; --import org.bukkit.event.player.PlayerSpawnChangeEvent; -+import org.slf4j.Logger; -+ -+import javax.annotation.Nullable; -+import java.io.File; -+import java.net.SocketAddress; -+import java.nio.file.Path; -+import java.text.SimpleDateFormat; -+import java.time.Instant; -+import java.util.*; -+import java.util.function.Function; -+import java.util.function.Predicate; -+import java.util.stream.Collectors; - // CraftBukkit end - - public abstract class PlayerList { -@@ -560,6 +519,11 @@ public abstract class PlayerList { +@@ -552,7 +554,12 @@ public abstract class PlayerList { + }); + } - @Nullable - public CompoundTag load(ServerPlayer player) { +- public Optional load(ServerPlayer player) { ++ @Nullable ++ public Optional load(ServerPlayer player) { + return load(player, 0); + } + -+ @Nullable -+ public CompoundTag load(ServerPlayer player, int profileID) { ++ public Optional load(ServerPlayer player, int profileID) { CompoundTag nbttagcompound = this.server.getWorldData().getLoadedPlayerTag(); - CompoundTag nbttagcompound1; + Optional optional; -@@ -568,7 +532,7 @@ public abstract class PlayerList { +@@ -561,7 +568,7 @@ public abstract class PlayerList { player.load(nbttagcompound); PlayerList.LOGGER.debug("loading single player"); } else { -- nbttagcompound1 = this.playerIo.load(player); -+ nbttagcompound1 = this.playerIo.load(player, profileID); +- optional = this.playerIo.load(player); ++ optional = this.playerIo.load(player, profileID); } - return nbttagcompound1; -@@ -577,7 +541,7 @@ public abstract class PlayerList { + return optional; +@@ -569,7 +576,7 @@ public abstract class PlayerList { + protected void save(ServerPlayer player) { if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit - player.lastSave = MinecraftServer.currentTick; // Paper - Incremental chunk and player saving - this.playerIo.save(player); + this.playerIo.save(player, player.selectedProfileID); ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit if (serverstatisticmanager != null) { -@@ -1598,4 +1562,14 @@ public abstract class PlayerList { - public boolean isAllowCheatsForAllPlayers() { - return this.allowCheatsForAllPlayers; +@@ -1538,4 +1545,15 @@ public abstract class PlayerList { + public boolean isAllowCommandsForAllPlayers() { + return this.allowCommandsForAllPlayers; } + ++ // Papyrus + public void switchProfile(ServerPlayer player, int newID) { + save(player); + int oldID = player.selectedProfileID; @@ -516,37 +548,37 @@ index 91feb12732564c90656da487664dbc12e55397fc..6914adb7d3c195c07dfa2b4286ca866b + } } diff --git a/src/main/java/net/minecraft/world/ContainerHelper.java b/src/main/java/net/minecraft/world/ContainerHelper.java -index 4092c7a8c2b0d9d26e6f4d97386735236300d132..01063c3bc672eecdf8fe1c5b5a89fbf576c940f3 100644 +index 2eb2eae92a62d302965d30e07bbe38d4309430a4..4208bf07af7bf97274fd77b9a4fa2b831fe6a895 100644 --- a/src/main/java/net/minecraft/world/ContainerHelper.java +++ b/src/main/java/net/minecraft/world/ContainerHelper.java -@@ -2,10 +2,13 @@ package net.minecraft.world; - - import java.util.List; - import java.util.function.Predicate; -+ -+import de.erethon.papyrus.ContainerLoadEvent; - import net.minecraft.core.NonNullList; +@@ -7,6 +7,8 @@ import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.world.item.ItemStack; +import org.bukkit.Bukkit; ++import de.erethon.papyrus.ContainerLoadEvent; public class ContainerHelper { - public static ItemStack removeItem(List stacks, int slot, int amount) { -@@ -50,6 +53,8 @@ public class ContainerHelper { - stacks.set(j, ItemStack.of(compoundTag)); + public static final String TAG_ITEMS = "Items"; +@@ -34,6 +36,13 @@ public class ContainerHelper { + listTag.add(itemStack.save(registries, compoundTag)); } } -+ ContainerLoadEvent loadEvent = new ContainerLoadEvent(stacks); -+ Bukkit.getPluginManager().callEvent(loadEvent); - - } ++ ContainerLoadEvent loadEvent = new ContainerLoadEvent(stacks, false); ++ try { ++ Bukkit.getPluginManager().callEvent(loadEvent); ++ } catch (IllegalStateException e) { // This really only happens during feature placement which shouldn't happen in production anyways ++ loadEvent = new ContainerLoadEvent(stacks, true); ++ Bukkit.getPluginManager().callEvent(loadEvent); ++ } + if (!listTag.isEmpty() || setIfEmpty) { + nbt.put("Items", listTag); diff --git a/src/main/java/net/minecraft/world/damagesource/CombatTracker.java b/src/main/java/net/minecraft/world/damagesource/CombatTracker.java -index 9c99b2e365aacb8309f29acb9025faccd2c676b3..dd8fa9b1f8fd91176cad118b23078322b805bd2d 100644 +index 99a7e9eb75231c15bd8bb24fbb4e296bc9fdedff..21a9e11b673faf200a2022b00180d9f7cae0a02e 100644 --- a/src/main/java/net/minecraft/world/damagesource/CombatTracker.java +++ b/src/main/java/net/minecraft/world/damagesource/CombatTracker.java -@@ -15,10 +15,10 @@ import net.minecraft.world.entity.LivingEntity; +@@ -16,12 +16,12 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; public class CombatTracker { @@ -554,25 +586,27 @@ index 9c99b2e365aacb8309f29acb9025faccd2c676b3..dd8fa9b1f8fd91176cad118b23078322 - public static final int RESET_COMBAT_STATUS_TIME = 300; + public static final int RESET_DAMAGE_STATUS_TIME = 200; // Papyrus + public static final int RESET_COMBAT_STATUS_TIME = 600; // Papyrus - private static final Style INTENTIONAL_GAME_DESIGN_STYLE = Style.EMPTY.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://bugs.mojang.com/browse/MCPE-28723")).withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Component.literal("MCPE-28723"))); + private static final Style INTENTIONAL_GAME_DESIGN_STYLE = Style.EMPTY + .withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://bugs.mojang.com/browse/MCPE-28723")) + .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Component.literal("MCPE-28723"))); - private final List entries = Lists.newArrayList(); + public List entries = Lists.newArrayList(); // Papyrus private final LivingEntity mob; private int lastDamageTime; private int combatStartTime; diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index 1561b85a45f52a8162f43553f8485bfe084b8f1f..9b8ca0702fe186be1a9bf42a00ae5c66daee17bc 100644 +index bb1a60180e58c1333e7bb33e8acf1b0225eda8a8..9fbe8516c6b55da958c106e67b4c41d8f69e7a85 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -@@ -21,6 +21,7 @@ public class DamageSource { +@@ -31,6 +31,7 @@ public class DamageSource { + private boolean poison = false; @Nullable - private final Vec3 damageSourcePosition; - public org.bukkit.block.BlockState explodedBlockState; // Paper - add exploded state -+ public long time; // Papyrus - damage source timestamp - // CraftBukkit start - @Nullable - private org.bukkit.block.Block directBlock; // The block that caused the damage. damageSourcePosition is not used for all block damages -@@ -115,6 +116,7 @@ public class DamageSource { + private Entity customEventDamager = null; // This field is a helper for when causing entity damage is not set by vanilla // Paper - fix DamageSource API ++ public long time; + + public DamageSource sweep() { + this.sweep = true; +@@ -138,6 +139,7 @@ public class DamageSource { this.causingEntity = attacker; this.directEntity = source; this.damageSourcePosition = position; @@ -581,139 +615,38 @@ index 1561b85a45f52a8162f43553f8485bfe084b8f1f..9b8ca0702fe186be1a9bf42a00ae5c66 public DamageSource(Holder type, @Nullable Entity source, @Nullable Entity attacker) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d60e7bdc7044190466f80bc5f8707f8484c0b4a1..e36ac60b3ec646b98eb0e0e2fac793e64b86af1e 100644 +index caa98e46b02698c4b21256d5266a1e198f1e897c..4ca0de33570aeb934cceaa02b64a32ebf1e6e3a4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -7,7 +7,8 @@ import com.google.common.collect.Lists; +@@ -6,11 +6,12 @@ import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.common.collect.UnmodifiableIterator; import com.mojang.logging.LogUtils; ++import de.erethon.papyrus.CraftPDamageType; ++import de.erethon.papyrus.PDamageType; + import it.unimi.dsi.fastutil.doubles.DoubleList; + import it.unimi.dsi.fastutil.doubles.DoubleListIterator; + import it.unimi.dsi.fastutil.floats.FloatArraySet; + import it.unimi.dsi.fastutil.floats.FloatArrays; -import de.erethon.papyrus.DamageType; -+import de.erethon.papyrus.CraftDamageType; -+import de.erethon.papyrus.EntityAttachment; import it.unimi.dsi.fastutil.objects.Object2DoubleArrayMap; import it.unimi.dsi.fastutil.objects.Object2DoubleMap; - import java.util.Arrays; -@@ -427,6 +428,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - public boolean activatedPriorityReset = false; // Pufferfish - DAB - public int activatedPriority = gg.pufferfish.pufferfish.PufferfishConfig.maximumActivationPrio; // Pufferfish - DAB (golf score) - public final BlockPos.MutableBlockPos cachedBlockPos = new BlockPos.MutableBlockPos(); // Pufferfish - reduce entity allocations + import java.util.ArrayList; +@@ -430,6 +431,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + private UUID originWorld; + public boolean freezeLocked = false; // Paper - Freeze Tick Lock API + public boolean fixedPose = false; // Paper - Expand Pose API ++ + public EntityType displayEntityType; // Papyrus -+ -+ public Set attachedEntities = new HashSet<>(); // Papyrus - Entity attachments public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -706,6 +710,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - - public void remove(Entity.RemovalReason reason) { - this.setRemoved(reason); -+ for (EntityAttachment attachment : attachedEntities) { -+ attachment.entity.remove(reason); -+ } - } - - public void onClientRemoval() {} -@@ -775,6 +782,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - - this.setYRot(yaw % 360.0F); - this.setXRot(pitch % 360.0F); -+ // Papyrus - Attachments -+ for (EntityAttachment attached : attachedEntities) { -+ attached.entity.setYRot((yaw + attached.dyaw) % 360.0F); -+ attached.entity.setXRot((pitch + attached.dpitch) % 360.0F); -+ } - } - - public final void setPos(Vec3 pos) { -@@ -818,6 +830,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - } - // Pufferfish end - entity TTL - this.baseTick(); -+ for (EntityAttachment attached : attachedEntities) { -+ attached.entity.tick(); -+ } - } - - // CraftBukkit start -@@ -892,6 +907,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - - this.firstTick = false; - this.level().getProfiler().pop(); -+ for (EntityAttachment attached : attachedEntities) { -+ attached.entity.baseTick(); -+ } - } - - public void setSharedFlagOnFire(boolean onFire) { -@@ -1095,6 +1113,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - this.moveStartZ = this.getZ(); - this.moveVector = movement; - } -+ // Papyrus - attachments -+ for (EntityAttachment attached : attachedEntities) { -+ Vec3 rel = new Vec3(movement.x + attached.dx, movement.y + attached.dy, movement.z + attached.dz); -+ attached.entity.move(movementType, rel); -+ } - try { - // Paper end - detailed watchdog information - if (this.noPhysics) { -@@ -2005,6 +2028,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - Vec3 vec3d1 = Entity.getInputVector(movementInput, speed, this.getYRot()); - - this.setDeltaMovement(this.getDeltaMovement().add(vec3d1)); -+ // Papyrus - Attachments -+ for (EntityAttachment attached : attachedEntities) { -+ attached.entity.setDeltaMovement(this.getDeltaMovement().add(vec3d1)); -+ } - } - - private static Vec3 getInputVector(Vec3 movementInput, float speed, float yaw) { -@@ -2034,6 +2061,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - this.yRotO = this.getYRot(); - this.xRotO = this.getXRot(); - this.setYHeadRot(yaw); // Paper - Update head rotation -+ // Papyrus - Attachments -+ for (EntityAttachment attached : attachedEntities) { -+ attached.entity.absMoveTo(x + attached.dx, y + attached.dy, z + attached.dz, yaw + attached.dyaw, pitch + attached.dpitch); -+ } - } - - public void absMoveTo(double x, double y, double z) { -@@ -2045,6 +2076,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - this.zo = d4; - this.setPos(d3, y, d4); - if (this.valid) this.level.getChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4); // CraftBukkit -+ // Papyrus - Attachments -+ for (EntityAttachment attached : attachedEntities) { -+ attached.entity.absMoveTo(x + attached.dx, y + attached.dy, z + attached.dz); -+ } - } - - public void moveTo(Vec3 pos) { -@@ -2073,6 +2108,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - this.setOldPosAndRot(); - this.reapplyPosition(); - this.setYHeadRot(yaw); // Paper - Update head rotation -+ // Papyrus - Attachments -+ for (EntityAttachment attached : attachedEntities) { -+ attached.entity.moveTo(x + attached.dx, y + attached.dy, z + attached.dz, yaw + attached.dyaw, pitch + attached.dpitch); -+ } - } - - public final void setOldPosAndRot() { -@@ -2183,17 +2222,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - return false; - } else { - this.markHurt(); -- return false; -+ return true; - } +@@ -2144,12 +2147,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Papyrus - combat rework - public boolean hurt(DamageSource source, float amount, DamageType type) { -+ public boolean hurt(DamageSource source, float amount, CraftDamageType type) { ++ public boolean hurt(DamageSource source, float amount, CraftPDamageType type) { if (this.isInvulnerableTo(source)) { return false; } else { @@ -724,269 +657,187 @@ index d60e7bdc7044190466f80bc5f8707f8484c0b4a1..e36ac60b3ec646b98eb0e0e2fac793e6 } } -@@ -4984,4 +5024,72 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S - return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); - } - // Paper end - Expose entity id counter -+ // Paper end -+ -+ // Papyrus start -+ public void addAttachment(Entity entity, String id) { -+ entity.noPhysics = true; -+ entity.setInvulnerable(true); -+ entity.setSilent(true); -+ if (entity instanceof net.minecraft.world.entity.LivingEntity living) { -+ living.collides = false; -+ if (living instanceof Mob mob) { -+ mob.setNoAi(true); -+ } -+ } -+ EntityAttachment attachment = new EntityAttachment(0, 0, 0, entity, id); -+ attachedEntities.add(attachment); -+ } -+ -+ public void addAttachment(Entity entity, String id, double dx, double dy, double dz) { -+ entity.noPhysics = true; -+ entity.setInvulnerable(true); -+ entity.setSilent(true); -+ if (entity instanceof net.minecraft.world.entity.LivingEntity living) { -+ living.collides = false; -+ if (living instanceof Mob mob) { -+ mob.setNoAi(true); -+ } -+ } -+ EntityAttachment attachment = new EntityAttachment(dx, dy, dz, entity, id); -+ attachedEntities.add(attachment); -+ } -+ -+ public void removeAttachment(Entity entity) { -+ Iterator itr = attachedEntities.iterator(); -+ while (itr.hasNext()) { -+ EntityAttachment attachment = itr.next(); -+ if (attachment.entity == entity) { -+ itr.remove(); -+ } -+ } -+ } -+ -+ public void removeAttachment(String id) { -+ Iterator itr = attachedEntities.iterator(); -+ while (itr.hasNext()) { -+ EntityAttachment attachment = itr.next(); -+ if (attachment.id.equals(id)) { -+ itr.remove(); -+ } -+ } -+ } +diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java +index cb61462d4691a055a4b25f7b953609d8a154fdfe..73ccb55889de521c65c76c7e15bbd6d112665e3a 100644 +--- a/src/main/java/net/minecraft/world/entity/EntityType.java ++++ b/src/main/java/net/minecraft/world/entity/EntityType.java +@@ -2,9 +2,8 @@ package net.minecraft.world.entity; + + import com.google.common.collect.ImmutableSet; + import com.mojang.logging.LogUtils; +-import java.util.List; +-import java.util.Optional; +-import java.util.Spliterator; + -+ public EntityAttachment getAttachment(Entity entity) { -+ for (EntityAttachment attached : attachedEntities) { -+ if (attached.entity == entity) { -+ return attached; ++import java.util.*; + import java.util.function.Consumer; + import java.util.function.Function; + import java.util.stream.Stream; +@@ -169,6 +168,7 @@ import net.minecraft.world.phys.Vec3; + import net.minecraft.world.phys.shapes.Shapes; + import net.minecraft.world.phys.shapes.VoxelShape; + import org.bukkit.event.entity.CreatureSpawnEvent; ++import org.bukkit.plugin.Plugin; + import org.slf4j.Logger; + + public class EntityType implements FeatureElement, EntityTypeTest { +@@ -326,6 +326,8 @@ public class EntityType implements FeatureElement, EntityTypeT + private final float spawnDimensionsScale; + private final FeatureFlagSet requiredFeatures; + ++ public static final Map>> customEntities = new HashMap<>(); // Papyrus - Custom Entities ++ + private static EntityType register(String id, EntityType.Builder type) { // CraftBukkit - decompile error + return (EntityType) Registry.register(BuiltInRegistries.ENTITY_TYPE, id, (EntityType) type.build(id)); // CraftBukkit - decompile error + } +@@ -598,6 +600,19 @@ public class EntityType implements FeatureElement, EntityTypeT + public static Optional create(CompoundTag nbt, Level world, boolean generation) { + // Paper end - Don't fire sync event during generation + return Util.ifElse(EntityType.by(nbt).map((entitytypes) -> { ++ // Papyrus start - Custom entities ++ if (nbt.contains("papyrus-entity-id")) { ++ String customEntityId = nbt.getString("papyrus-entity-id"); ++ if (customEntities.containsKey(customEntityId)) { ++ Map.Entry> entityEntry = customEntities.get(customEntityId); ++ if (entitytypes.getBaseClass().isAssignableFrom(entityEntry.getValue())) { ++ return EntityType.createCustomEntity(entityEntry.getValue(), entitytypes, entityEntry.getKey(), world); ++ } else { ++ LOGGER.warn("Entity type {} is not assignable from custom entity class {}", entitytypes, entityEntry.getValue()); ++ } ++ } + } ++ // Papyrus end + return entitytypes.create(world); + }), (entity) -> { + if (generation) entity.generation = true; // Paper - Don't fire sync event during generation +@@ -607,6 +622,18 @@ public class EntityType implements FeatureElement, EntityTypeT + }); + } + ++ // Papyrus start - Custom entities ++ public static Entity createCustomEntity(Class customEntityClass, EntityType type, Plugin plugin, Level world) { ++ try { ++ return customEntityClass.getConstructor(EntityType.class, Level.class).newInstance(type, world); ++ } catch (Exception e) { ++ LOGGER.warn("Failed to create custom entity", e); ++ e.printStackTrace(); ++ return type.create(world); + } -+ return null; + } ++ // Papyrus end + -+ public EntityAttachment getAttachment(String id) { -+ for (EntityAttachment attached : attachedEntities) { -+ if (attached.id.equals(id)) { -+ return attached; -+ } -+ } -+ return null; -+ } - } + public AABB getSpawnAABB(double x, double y, double z) { + float f = this.spawnDimensionsScale * this.getWidth() / 2.0F; + float f1 = this.spawnDimensionsScale * this.getHeight(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a370ca9faba 100644 +index e980c8c356b30d25e2fc5a73b91ad2c6edd4fe05..1f3b3b8226e6eb6bb481e3ddeda20b6b0df9ad07 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1,5 +1,6 @@ - package net.minecraft.world.entity; -- -+import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent; // Paper -+import com.google.common.base.Function; - import com.google.common.base.Objects; - import com.google.common.collect.ImmutableList; - import com.google.common.collect.ImmutableMap; -@@ -9,15 +10,8 @@ import com.mojang.datafixers.util.Pair; +@@ -11,6 +11,9 @@ import com.mojang.datafixers.util.Pair; import com.mojang.logging.LogUtils; import com.mojang.serialization.DataResult; import com.mojang.serialization.Dynamic; --import java.util.Collection; --import java.util.ConcurrentModificationException; --import java.util.Iterator; --import java.util.List; --import java.util.Map; --import java.util.Optional; --import java.util.UUID; --import java.util.function.Predicate; --import javax.annotation.Nullable; -+import de.erethon.papyrus.CraftDamageType; -+import net.kyori.adventure.text.Component; - import net.minecraft.BlockUtil; - import net.minecraft.advancements.CriteriaTriggers; - import net.minecraft.commands.arguments.EntityAnchorArgument; -@@ -28,19 +22,8 @@ import net.minecraft.core.NonNullList; - import net.minecraft.core.particles.BlockParticleOption; - import net.minecraft.core.particles.ItemParticleOption; - import net.minecraft.core.particles.ParticleTypes; --import net.minecraft.nbt.CompoundTag; --import net.minecraft.nbt.FloatTag; --import net.minecraft.nbt.IntTag; --import net.minecraft.nbt.ListTag; --import net.minecraft.nbt.NbtOps; --import net.minecraft.nbt.Tag; --import net.minecraft.network.protocol.game.ClientboundAddEntityPacket; --import net.minecraft.network.protocol.game.ClientboundAnimatePacket; --import net.minecraft.network.protocol.game.ClientboundEntityEventPacket; --import net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket; --import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; --import net.minecraft.network.protocol.game.ClientboundTakeItemEntityPacket; --import net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket; -+import net.minecraft.nbt.*; -+import net.minecraft.network.protocol.game.*; - import net.minecraft.network.syncher.EntityDataAccessor; - import net.minecraft.network.syncher.EntityDataSerializers; - import net.minecraft.network.syncher.SynchedEntityData; -@@ -52,12 +35,7 @@ import net.minecraft.sounds.SoundEvent; - import net.minecraft.sounds.SoundEvents; - import net.minecraft.sounds.SoundSource; - import net.minecraft.stats.Stats; --import net.minecraft.tags.BlockTags; --import net.minecraft.tags.DamageTypeTags; --import net.minecraft.tags.EntityTypeTags; --import net.minecraft.tags.FluidTags; --import net.minecraft.tags.ItemTags; --import net.minecraft.tags.TagKey; -+import net.minecraft.tags.*; - import net.minecraft.util.Mth; - import net.minecraft.util.RandomSource; - import net.minecraft.world.Difficulty; -@@ -70,27 +48,14 @@ import net.minecraft.world.effect.MobEffectInstance; - import net.minecraft.world.effect.MobEffectUtil; - import net.minecraft.world.effect.MobEffects; - import net.minecraft.world.entity.ai.Brain; --import net.minecraft.world.entity.ai.attributes.Attribute; --import net.minecraft.world.entity.ai.attributes.AttributeInstance; --import net.minecraft.world.entity.ai.attributes.AttributeMap; --import net.minecraft.world.entity.ai.attributes.AttributeModifier; --import net.minecraft.world.entity.ai.attributes.AttributeSupplier; --import net.minecraft.world.entity.ai.attributes.Attributes; --import net.minecraft.world.entity.ai.attributes.DefaultAttributes; -+import net.minecraft.world.entity.ai.attributes.*; - import net.minecraft.world.entity.ai.targeting.TargetingConditions; - import net.minecraft.world.entity.animal.FlyingAnimal; --import net.minecraft.world.entity.animal.Wolf; - import net.minecraft.world.entity.boss.wither.WitherBoss; - import net.minecraft.world.entity.item.ItemEntity; - import net.minecraft.world.entity.projectile.AbstractArrow; - import net.minecraft.world.food.FoodProperties; --import net.minecraft.world.item.AxeItem; --import net.minecraft.world.item.ElytraItem; --import net.minecraft.world.item.Equipable; --import net.minecraft.world.item.Item; --import net.minecraft.world.item.ItemStack; --import net.minecraft.world.item.Items; --import net.minecraft.world.item.UseAnim; -+import net.minecraft.world.item.*; - import net.minecraft.world.item.alchemy.PotionUtils; - import net.minecraft.world.item.enchantment.EnchantmentHelper; - import net.minecraft.world.item.enchantment.Enchantments; -@@ -98,13 +63,7 @@ import net.minecraft.world.item.enchantment.FrostWalkerEnchantment; - import net.minecraft.world.level.ClipContext; - import net.minecraft.world.level.GameRules; - import net.minecraft.world.level.Level; --import net.minecraft.world.level.block.BedBlock; --import net.minecraft.world.level.block.Blocks; --import net.minecraft.world.level.block.HoneyBlock; --import net.minecraft.world.level.block.LadderBlock; --import net.minecraft.world.level.block.PowderSnowBlock; --import net.minecraft.world.level.block.SoundType; --import net.minecraft.world.level.block.TrapDoorBlock; -+import net.minecraft.world.level.block.*; - import net.minecraft.world.level.block.state.BlockState; - import net.minecraft.world.level.entity.EntityTypeTest; - import net.minecraft.world.level.gameevent.GameEvent; -@@ -119,27 +78,21 @@ import net.minecraft.world.phys.EntityHitResult; - import net.minecraft.world.phys.HitResult; ++import de.erethon.papyrus.CraftPDamageType; ++import de.erethon.papyrus.PDamageType; ++import io.papermc.paper.event.entity.EntityKnockbackEvent; + import it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePair; + import it.unimi.dsi.fastutil.objects.Reference2ObjectArrayMap; + import it.unimi.dsi.fastutil.objects.Reference2ObjectMap; +@@ -132,6 +135,8 @@ import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.PlayerTeam; --import org.slf4j.Logger; -- --// CraftBukkit start --import java.util.ArrayList; --import java.util.HashSet; --import java.util.Set; --import com.google.common.base.Function; + import net.minecraft.world.scores.Scoreboard; +import org.bukkit.Bukkit; - import org.bukkit.Location; - import org.bukkit.craftbukkit.attribute.CraftAttributeMap; ++import org.bukkit.event.entity.*; + import org.slf4j.Logger; + + // CraftBukkit start +@@ -145,15 +150,7 @@ import org.bukkit.craftbukkit.attribute.CraftAttributeMap; import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.Player; -import org.bukkit.event.entity.ArrowBodyCountChangeEvent; -import org.bukkit.event.entity.EntityDamageEvent; -+import org.bukkit.event.entity.*; import org.bukkit.event.entity.EntityDamageEvent.DamageModifier; - import org.bukkit.event.entity.EntityKnockbackEvent; +-import org.bukkit.event.entity.EntityKnockbackEvent; -import org.bukkit.event.entity.EntityPotionEffectEvent; -import org.bukkit.event.entity.EntityRegainHealthEvent; +-import org.bukkit.event.entity.EntityRemoveEvent; -import org.bukkit.event.entity.EntityResurrectEvent; -import org.bukkit.event.entity.EntityTeleportEvent; import org.bukkit.event.player.PlayerItemConsumeEvent; -+import org.slf4j.Logger; -+ -+import javax.annotation.Nullable; -+import java.util.*; -+import java.util.function.Predicate; // CraftBukkit end +@@ -286,6 +283,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper + public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event + public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API ++ public boolean syncAttributes = true; // Papyrus - for custom entities -@@ -274,6 +227,8 @@ public abstract class LivingEntity extends Entity implements Attackable { + @Override + public float getBukkitYaw() { +@@ -299,6 +297,8 @@ public abstract class LivingEntity extends Entity implements Attackable { ++this.noActionTime; // Above all the floats } // Spigot end + // Papyrus start -+ public CraftDamageType attackDamageType = CraftDamageType.PHYSICAL; ++ public PDamageType attackDamageType = PDamageType.PHYSICAL; protected LivingEntity(EntityType type, Level world) { super(type, world); -@@ -334,7 +289,32 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -361,7 +361,50 @@ public abstract class LivingEntity extends Entity implements Attackable { } public static AttributeSupplier.Builder createLivingAttributes() { -- return AttributeSupplier.builder().add(Attributes.MAX_HEALTH).add(Attributes.KNOCKBACK_RESISTANCE).add(Attributes.MOVEMENT_SPEED).add(Attributes.ARMOR).add(Attributes.ARMOR_TOUGHNESS).add(Attributes.MAX_ABSORPTION); -+ return AttributeSupplier.builder().add(Attributes.MAX_HEALTH).add(Attributes.KNOCKBACK_RESISTANCE).add(Attributes.MOVEMENT_SPEED).add(Attributes.ARMOR).add(Attributes.ARMOR_TOUGHNESS) -+ .add(Attributes.ADV_AIR) -+ .add(Attributes.ADV_EARTH) -+ .add(Attributes.ADV_FIRE) -+ .add(Attributes.ADV_WATER) -+ .add(Attributes.ADV_MAGIC) -+ .add(Attributes.ADV_PURE) -+ .add(Attributes.ADV_PHYSICAL) -+ .add(Attributes.RES_AIR) -+ .add(Attributes.RES_EARTH) -+ .add(Attributes.RES_FIRE) -+ .add(Attributes.RES_WATER) -+ .add(Attributes.RES_MAGIC) -+ .add(Attributes.RES_PURE) -+ .add(Attributes.RES_PHYSICAL) -+ .add(Attributes.PEN_PHYSICAL) -+ .add(Attributes.PEN_MAGICAL) -+ .add(Attributes.STAT_CDR) -+ .add(Attributes.STAT_CRITDMG) -+ .add(Attributes.STAT_CRITCHANCE) -+ .add(Attributes.STAT_TENACITY) -+ .add(Attributes.STAT_ENERGYREGEN) -+ .add(Attributes.STAT_ENERGY) -+ .add(Attributes.STAT_HEALINGPOWER) -+ .add(Attributes.STAT_HEALTHREGEN) -+ .add(Attributes.COMBAT_HURTINVUL); +- return AttributeSupplier.builder().add(Attributes.MAX_HEALTH).add(Attributes.KNOCKBACK_RESISTANCE).add(Attributes.MOVEMENT_SPEED).add(Attributes.ARMOR).add(Attributes.ARMOR_TOUGHNESS).add(Attributes.MAX_ABSORPTION).add(Attributes.STEP_HEIGHT).add(Attributes.SCALE).add(Attributes.GRAVITY).add(Attributes.SAFE_FALL_DISTANCE).add(Attributes.FALL_DAMAGE_MULTIPLIER).add(Attributes.JUMP_STRENGTH).add(Attributes.OXYGEN_BONUS).add(Attributes.BURNING_TIME).add(Attributes.EXPLOSION_KNOCKBACK_RESISTANCE).add(Attributes.WATER_MOVEMENT_EFFICIENCY).add(Attributes.MOVEMENT_EFFICIENCY).add(Attributes.ATTACK_KNOCKBACK); ++ return AttributeSupplier.builder() ++ .add(Attributes.MAX_HEALTH) ++ .add(Attributes.KNOCKBACK_RESISTANCE) ++ .add(Attributes.MOVEMENT_SPEED) ++ .add(Attributes.ARMOR) ++ .add(Attributes.ARMOR_TOUGHNESS) ++ .add(Attributes.MAX_ABSORPTION) ++ .add(Attributes.STEP_HEIGHT) ++ .add(Attributes.SCALE) ++ .add(Attributes.GRAVITY) ++ .add(Attributes.SAFE_FALL_DISTANCE) ++ .add(Attributes.FALL_DAMAGE_MULTIPLIER) ++ .add(Attributes.JUMP_STRENGTH) ++ .add(Attributes.OXYGEN_BONUS) ++ .add(Attributes.BURNING_TIME) ++ .add(Attributes.EXPLOSION_KNOCKBACK_RESISTANCE) ++ .add(Attributes.WATER_MOVEMENT_EFFICIENCY) ++ .add(Attributes.MOVEMENT_EFFICIENCY) ++ .add(Attributes.ATTACK_KNOCKBACK) ++ .add(Attributes.ADV_AIR) ++ .add(Attributes.ADV_EARTH) ++ .add(Attributes.ADV_FIRE) ++ .add(Attributes.ADV_WATER) ++ .add(Attributes.ADV_MAGIC) ++ .add(Attributes.ADV_PURE) ++ .add(Attributes.ADV_PHYSICAL) ++ .add(Attributes.RES_AIR) ++ .add(Attributes.RES_EARTH) ++ .add(Attributes.RES_FIRE) ++ .add(Attributes.RES_WATER) ++ .add(Attributes.RES_MAGIC) ++ .add(Attributes.RES_PURE) ++ .add(Attributes.RES_PHYSICAL) ++ .add(Attributes.PEN_PHYSICAL) ++ .add(Attributes.PEN_MAGICAL) ++ .add(Attributes.STAT_CDR) ++ .add(Attributes.STAT_CRITDMG) ++ .add(Attributes.STAT_CRITCHANCE) ++ .add(Attributes.STAT_TENACITY) ++ .add(Attributes.STAT_ENERGYREGEN) ++ .add(Attributes.STAT_ENERGY) ++ .add(Attributes.STAT_HEALINGPOWER) ++ .add(Attributes.STAT_HEALTHREGEN) ++ .add(Attributes.COMBAT_HURTINVUL); } @Override -@@ -500,6 +480,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -540,6 +583,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.tickEffects(); @@ -994,13 +845,13 @@ index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a37 this.animStepO = this.animStep; this.yBodyRotO = this.yBodyRot; this.yHeadRotO = this.yHeadRot; -@@ -1422,8 +1403,97 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1408,8 +1452,95 @@ public abstract class LivingEntity extends Entity implements Attackable { + return this.getHealth() <= 0.0F; } - // Pufferfish end + // Papyrus start + @Override -+ public boolean hurt(DamageSource source, float amount, CraftDamageType type) { ++ public boolean hurt(DamageSource source, float amount, CraftPDamageType type) { + if (isInvulnerable() || isRemoved() || dead || getHealth() <= 0F || isInvulnerableTo(source) || level().isClientSide) { + return false; + } @@ -1010,10 +861,10 @@ index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a37 + } + Entity attacker = source.getEntity(); + double finalDmg = amount; -+ double resistance = getAttributeValue(type.getResAttr()); ++ double resistance = getAttributeValue(type.res); + if (attacker != null) { + if (attacker instanceof LivingEntity living) { -+ resistance = resistance - living.getAttributeValue(type.getPenAttribute()); // Remove the value of the attackers penetration attribute from the victims resistance ++ resistance = resistance - living.getAttributeValue(type.pen); // Remove the value of the attackers penetration attribute from the victims resistance + } + finalDmg = amount - resistance; + EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(getBukkitEntity(), attacker.getBukkitEntity(), EntityDamageEvent.DamageCause.ENTITY_ATTACK, finalDmg); // TODO: Add type back @@ -1021,8 +872,8 @@ index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a37 + if (event.isCancelled()) { + return false; + } -+ if (event.getDamageType() != type.getApiDamageType()) { -+ type = CraftDamageType.ofAPI(event.getDamageType()); ++ if (event.getDamageType() != type.apiType) { ++ type = CraftPDamageType.ofAPI(event.getDamageType()); + } + finalDmg = event.getDamage(); + if (source.getEntity() instanceof net.minecraft.world.entity.player.Player player) { @@ -1032,20 +883,16 @@ index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a37 + } + if (isDamageSourceBlocked(source)) { // TODO: Maybe change isDamageSourceBlocked logic + hurtCurrentlyUsedShield(amount); -+ if (source.isIndirect()) { ++ if (!source.isDirect()) { + Entity entity = source.getEntity(); + if (entity instanceof LivingEntity && entity.distanceToSqr(this) <= (200.0D * 200.0D)) { + blockUsingShield((LivingEntity) entity); + } + } -+ finalDmg = finalDmg - getAttributeValue(type.getResAttr()); ++ finalDmg = finalDmg - getAttributeValue(type.res); + if (useItem.is(Items.SHIELD)) { + // Use the HEAD slot modifier from shields for the damage -+ double attrRes = 0; -+ for (AttributeModifier modifier : useItem.getAttributeModifiers(EquipmentSlot.HEAD).get(type.getResAttr())) { -+ attrRes = attrRes + modifier.getAmount(); -+ } -+ finalDmg = finalDmg - attrRes; ++ finalDmg -= useItem.get(DataComponents.ATTRIBUTE_MODIFIERS).compute(1, EquipmentSlot.HEAD); + } + } + // TODO: This is a mess @@ -1056,20 +903,20 @@ index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a37 + x = (Math.random() - Math.random()) * 0.01D; + } + -+ this.knockback(0.4000000059604645D, x, z, attacker, null); ++ this.knockback(0.4000000059604645D, x, z, attacker, EntityKnockbackEvent.Cause.DAMAGE); + indicateDamage(x, z); + markHurt(); + + if (attacker instanceof LivingEntity living) { + org.bukkit.entity.LivingEntity attackerBukkit = living.getBukkitLivingEntity(); -+ finalDmg = getBukkitLivingEntity().onDamage(attackerBukkit, finalDmg, type.getApiDamageType()); ++ finalDmg = getBukkitLivingEntity().onDamage(attackerBukkit, finalDmg, type.apiType); + } + + if (finalDmg <= 0) { + return false; + } + if (attacker instanceof LivingEntity living) { -+ living.getBukkitEntity().sendActionBar(Component.text(type + ": " + amount + " | Res: " + getAttributeValue(type.getResAttr()) + " | Pen: " + living.getAttributeValue(type.getPenAttribute()) + " | = " + finalDmg)); ++ //living.getBukkitEntity().sendActionBar(Component.text(type + ": " + amount + " | Res: " + getAttributeValue(type.res) + " | Pen: " + living.getAttributeValue(type.pen) + " | = " + finalDmg)); + } + } + invulnerableTime = (int) getAttribute(Attributes.COMBAT_HURTINVUL).getValue(); @@ -1086,13 +933,15 @@ index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a37 + @Override public boolean hurt(DamageSource source, float amount) { -+ return hurt(source, amount, CraftDamageType.PURE); ++ return hurt(source, amount, CraftPDamageType.PURE); + } + /* ++ ++ if (this.isInvulnerableTo(source)) { return false; } else if (this.level().isClientSide) { -@@ -1593,7 +1663,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1592,7 +1723,7 @@ public abstract class LivingEntity extends Entity implements Attackable { return flag2; } @@ -1101,116 +950,143 @@ index aa9696facf7780313c322d01928aab7e6c92cc99..fd2e35bef6e726c70e372d5816b46a37 protected void blockUsingShield(LivingEntity attacker) { attacker.blockedByShield(this); -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.javaDVl8e7 b/src/main/java/net/minecraft/world/entity/LivingEntity.javaDVl8e7 -new file mode 100644 -index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 +@@ -3068,6 +3199,10 @@ public abstract class LivingEntity extends Entity implements Attackable { + } + + public boolean doHurtTarget(Entity target) { ++ return doHurtTarget(target, CraftPDamageType.PHYSICAL); ++ } ++ ++ public boolean doHurtTarget(Entity target, CraftPDamageType damageType) { + this.setLastHurtMob(target); + return false; + } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index a3edd410dc0eb0723bad98fe9cbddee9572b8a9e..fd57e1e8fe868fd43a7f7ea0b536b8b3b92432f2 100644 +index 7b93c6a04cca2ac31d137f06ef83bb08559b10bf..ef75af302a684b2f03e5bd79a0714812328c0c85 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -11,7 +11,8 @@ import java.util.UUID; +@@ -13,6 +13,8 @@ import java.util.Optional; + import java.util.Set; import java.util.function.Predicate; import javax.annotation.Nullable; - --import de.erethon.papyrus.DamageType; -+import de.erethon.papyrus.CraftDamageType; -+import de.erethon.spellbook.api.SpellCaster; ++ ++import de.erethon.papyrus.CraftPDamageType; import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; import net.minecraft.core.Vec3i; -@@ -80,12 +81,7 @@ import net.minecraft.world.level.pathfinder.BlockPathTypes; - import net.minecraft.world.phys.AABB; - import org.bukkit.craftbukkit.event.CraftEventFactory; - import org.bukkit.craftbukkit.entity.CraftLivingEntity; --import org.bukkit.event.entity.CreatureSpawnEvent; --import org.bukkit.event.entity.EntityCombustByEntityEvent; --import org.bukkit.event.entity.EntityTargetLivingEntityEvent; --import org.bukkit.event.entity.EntityTargetEvent; --import org.bukkit.event.entity.EntityTransformEvent; --import org.bukkit.event.entity.EntityUnleashEvent; -+import org.bukkit.event.entity.*; - import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason; - // CraftBukkit end - -@@ -173,7 +169,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -184,7 +186,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void registerGoals() {} public static AttributeSupplier.Builder createMobAttributes() { -- return LivingEntity.createLivingAttributes().add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.ATTACK_KNOCKBACK); -+ return LivingEntity.createLivingAttributes().add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.ATTACK_KNOCKBACK).add(Attributes.ATTACK_SPEED, 80.0); +- return LivingEntity.createLivingAttributes().add(Attributes.FOLLOW_RANGE, 16.0D); ++ return LivingEntity.createLivingAttributes().add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.ATTACK_SPEED, 80.0); } protected PathNavigation createNavigation(Level world) { -@@ -1674,7 +1670,7 @@ public abstract class Mob extends LivingEntity implements Targeting { - return doHurtTarget(target, attackDamageType); - } +@@ -1404,6 +1406,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + if (!attributemodifiable.hasModifier(Mob.RANDOM_SPAWN_BONUS_ID)) { + attributemodifiable.addPermanentModifier(new AttributeModifier(Mob.RANDOM_SPAWN_BONUS_ID, randomsource.triangle(0.0D, 0.11485000000000001D), AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); + } ++ if (getAttribute(Attributes.MAX_HEALTH) != null) { ++ this.getAttribute(Attributes.MAX_HEALTH).addPermanentModifier(new AttributeModifier(ResourceLocation.parse("papyrus:randomspawnbonus"), randomsource.triangle(0.0D, 0.33D), AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); ++ } ++ if (getAttribute(Attributes.ATTACK_DAMAGE) != null && getAttribute(Attributes.ADV_PHYSICAL) != null && getAttribute(Attributes.RES_PHYSICAL) != null) { ++ this.getAttribute(Attributes.ATTACK_DAMAGE).addPermanentModifier(new AttributeModifier(ResourceLocation.parse("papyrus:randomspawnbonus"), randomsource.triangle(0.0D, 0.2D), AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); ++ this.getAttribute(Attributes.ADV_PHYSICAL).addPermanentModifier(new AttributeModifier(ResourceLocation.parse("papyrus:randomspawnbonus"), randomsource.triangle(0.0D, 0.33D), AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); ++ this.getAttribute(Attributes.RES_PHYSICAL).addPermanentModifier(new AttributeModifier(ResourceLocation.parse("papyrus:randomspawnbonus"), randomsource.triangle(0.0D, 0.33D), AttributeModifier.Operation.ADD_MULTIPLIED_BASE)); ++ } -- public boolean doHurtTarget(Entity target, DamageType type) { -+ public boolean doHurtTarget(Entity target, CraftDamageType type) { - float dmg = (float) this.getAttributeValue(Attributes.ATTACK_DAMAGE); - float knockback = (float) this.getAttributeValue(Attributes.ATTACK_KNOCKBACK); + this.setLeftHanded(randomsource.nextFloat() < 0.05F); + return entityData; +@@ -1712,16 +1722,23 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab + } -@@ -1696,11 +1692,18 @@ public abstract class Mob extends LivingEntity implements Targeting { - // CraftBukkit end - } - dmg = (float) (dmg + getAttributeValue(type.getAdvAttr())); -- boolean flag = target.hurt(DamageSource.mobAttack(this), dmg, type); + @Override +- public boolean doHurtTarget(Entity target) { +- float f = (float) this.getAttributeValue(Attributes.ATTACK_DAMAGE); ++ public boolean doHurtTarget(Entity target, CraftPDamageType type) { ++ float dmg = (float) getAttributeValue(type.advantage); + DamageSource damagesource = this.damageSources().mobAttack(this); + Level world = this.level(); + + if (world instanceof ServerLevel worldserver) { +- f = EnchantmentHelper.modifyDamage(worldserver, this.getWeaponItem(), target, damagesource, f); ++ dmg = EnchantmentHelper.modifyDamage(worldserver, this.getWeaponItem(), target, damagesource, dmg); ++ } + if (target instanceof LivingEntity entity) { -+ dmg = (float) getBukkitLivingEntity().onAttack(entity.getBukkitLivingEntity(), dmg, type.getApiDamageType()); ++ dmg = (float) getBukkitLivingEntity().onAttack(entity.getBukkitLivingEntity(), dmg, type.apiType); + } + int crit = random.nextIntBetweenInclusive(0, 100); + if (crit < getAttributeValue(Attributes.STAT_CRITCHANCE)) { + dmg = (float) (dmg + getAttributeValue(Attributes.STAT_CRITDMG)); -+ } -+ boolean flag = target.hurt(damageSources().mobAttack(this), dmg, type); + } ++ boolean flag = target.hurt(damagesource, dmg); - if (flag) { - if (knockback > 0.0F && target instanceof LivingEntity) { -- ((LivingEntity) target).knockback((double) (knockback * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this); // Paper -+ ((LivingEntity) target).knockback((double) (knockback * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this, EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // Paper - this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D)); - } +- boolean flag = target.hurt(damagesource, f); + if (flag) { + float f1 = this.getKnockback(target, damagesource); diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java b/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java -index 89acc14db04496b4273ce4db8d2cd37cd998e72c..e6a017b69c7c7a81da853feeaed39a2403db63ad 100644 +index 4930eef744cdb9f1855502a3186235cf483358b9..8490fc7977901ac41e6634c4d48185634ae9812a 100644 --- a/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java +++ b/src/main/java/net/minecraft/world/entity/ai/attributes/Attributes.java -@@ -3,6 +3,7 @@ package net.minecraft.world.entity.ai.attributes; - - import net.minecraft.core.Registry; - import net.minecraft.core.registries.BuiltInRegistries; -+import org.checkerframework.checker.units.qual.A; - - public class Attributes { - -@@ -39,11 +40,22 @@ public class Attributes { - public static final Attribute ADV_EARTH = Attributes.register("advantage.earth", new RangedAttribute("attribute.name.advantage.earth", 0, 0, 4096)); - public static final Attribute ADV_FIRE = Attributes.register("advantage.fire", new RangedAttribute("attribute.name.advantage.fire", 0, 0, 4096)); - public static final Attribute ADV_WATER = Attributes.register("advantage.water", new RangedAttribute("attribute.name.advantage.water", 0, 0, 4096)); -+ -+ public static final Attribute PEN_PHYSICAL = Attributes.register("penetration.physical", new RangedAttribute("attribute.name.penetration.physical", 0, 0, 4096)); -+ public static final Attribute PEN_MAGICAL = Attributes.register("penetration.magical", new RangedAttribute("attribute.name.penetration.magical", 0, 0, 4096)); - // Stats - public static final Attribute STAT_CRITCHANCE = Attributes.register("stat.crit.chance", new RangedAttribute("attribute.name.stat.crit.chance", 0, 0, 4096)); -- public static final Attribute STAT_CRITDMG = Attributes.register("stat.crit.dmg", new RangedAttribute("attribute.name.stat.crit.dmg", 0, 0, 4096)); -- public static final Attribute STAT_ATTACKSPEED= Attributes.register("stat.attackspeed", new RangedAttribute("attribute.name.stat.attackspeed", 0, 0, 4096)); -- public static final Attribute STAT_CDR = Attributes.register("stat.cooldownreduction", new RangedAttribute("attribute.name.stat.cooldownreduction", 0, 0, 4096)); -+ public static final Attribute STAT_CRITDMG = Attributes.register("stat.crit.dmg", new RangedAttribute("attribute.name.stat.crit.dmg", 0, -4096, 4096)); -+ public static final Attribute STAT_CDR = Attributes.register("stat.cooldownreduction", new RangedAttribute("attribute.name.stat.cooldownreduction", 0, -4096, 4096)); -+ public static final Attribute STAT_HEALTHREGEN = Attributes.register("stat.healthregen", new RangedAttribute("attribute.name.stat.healthregen", 0, 0, 4096)); -+ public static final Attribute STAT_ENERGYREGEN = Attributes.register("stat.energyregen", new RangedAttribute("attribute.name.stat.energyregen", 0, 0, 4096)); -+ public static final Attribute STAT_ENERGY= Attributes.register("stat.energy", new RangedAttribute("attribute.name.stat.energy", 0, 0, 4096)); -+ public static final Attribute STAT_HEALINGPOWER= Attributes.register("stat.healingpower", new RangedAttribute("attribute.name.stat.healingpower", 0, 0, 4096)); -+ -+ public static final Attribute STAT_TENACITY = Attributes.register("stat.tenacity", new RangedAttribute("attribute.name.stat.tenacity", 0, 0, 4096)); -+ -+ -+ - // Combat - public static final Attribute COMBAT_HURTINVUL= Attributes.register("combat.hurtinvul", new RangedAttribute("attribute.name.combat.hurtinvul", 5, 0, 4096)); +@@ -41,28 +41,34 @@ public class Attributes { + public static final Holder WATER_MOVEMENT_EFFICIENCY = Attributes.register("generic.water_movement_efficiency", (new RangedAttribute("attribute.name.generic.water_movement_efficiency", 0.0D, 0.0D, 1.0D)).setSyncable(true)); + // Papyrus start - combat changes + // Element resistance +- public static final Holder RES_PURE = Attributes.register("resistance.pure", new RangedAttribute("attribute.name.resistance.pure", 0, 0, 4096)).setSyncable(false); +- public static final Holder RES_PHYSICAL = Attributes.register("resistance.physical", new RangedAttribute("attribute.name.resistance.physical", 0, 0, 4096)).setSyncable(false); +- public static final Holder RES_MAGIC = Attributes.register("resistance.magic", new RangedAttribute("attribute.name.resistance.magic", 0, 0, 4096)).setSyncable(false); +- public static final Holder RES_AIR = Attributes.register("resistance.air", new RangedAttribute("attribute.name.resistance.air", 0, 0, 4096)).setSyncable(false); +- public static final Holder RES_EARTH = Attributes.register("resistance.earth", new RangedAttribute("attribute.name.resistance.earth", 0, 0, 4096)).setSyncable(false); +- public static final Holder RES_FIRE = Attributes.register("resistance.fire", new RangedAttribute("attribute.name.resistance.fire", 0, 0, 4096)).setSyncable(false); +- public static final Holder RES_WATER = Attributes.register("resistance.water", new RangedAttribute("attribute.name.resistance.water", 0, 0, 4096)).setSyncable(false); ++ public static final Holder RES_PURE = Attributes.register("resistance.pure", new RangedAttribute("attribute.name.resistance.pure", 0, 0, 4096).setSyncable(false)); ++ public static final Holder RES_PHYSICAL = Attributes.register("resistance.physical", new RangedAttribute("attribute.name.resistance.physical", 0, 0, 4096).setSyncable(false)); ++ public static final Holder RES_MAGIC = Attributes.register("resistance.magic", new RangedAttribute("attribute.name.resistance.magic", 0, 0, 4096).setSyncable(false)); ++ public static final Holder RES_AIR = Attributes.register("resistance.air", new RangedAttribute("attribute.name.resistance.air", 0, 0, 4096).setSyncable(false)); ++ public static final Holder RES_EARTH = Attributes.register("resistance.earth", new RangedAttribute("attribute.name.resistance.earth", 0, 0, 4096).setSyncable(false)); ++ public static final Holder RES_FIRE = Attributes.register("resistance.fire", new RangedAttribute("attribute.name.resistance.fire", 0, 0, 4096).setSyncable(false)); ++ public static final Holder RES_WATER = Attributes.register("resistance.water", new RangedAttribute("attribute.name.resistance.water", 0, 0, 4096).setSyncable(false)); + // Element advantageHolder +- public static final Holder ADV_PURE = Attributes.register("advantage.pure", new RangedAttribute("attribute.name.advantage.pure", 0, 0, 4096)).setSyncable(false); +- public static final Holder ADV_PHYSICAL = Attributes.register("advantage.physical", new RangedAttribute("attribute.name.advantage.physical", 0, 0, 4096)).setSyncable(false); +- public static final Holder ADV_MAGIC = Attributes.register("advantage.magic", new RangedAttribute("attribute.name.advantage.magic", 0, 0, 4096)).setSyncable(false); +- public static final Holder ADV_AIR = Attributes.register("advantage.air", new RangedAttribute("attribute.name.advantage.air", 0, 0, 4096)).setSyncable(false); +- public static final Holder ADV_EARTH = Attributes.register("advantage.earth", new RangedAttribute("attribute.name.advantage.earth", 0, 0, 4096)).setSyncable(false); +- public static final Holder ADV_FIRE = Attributes.register("advantage.fire", new RangedAttribute("attribute.name.advantage.fire", 0, 0, 4096)).setSyncable(false); +- public static final Holder ADV_WATER = Attributes.register("advantage.water", new RangedAttribute("attribute.name.advantage.water", 0, 0, 4096)).setSyncable(false); ++ public static final Holder ADV_PURE = Attributes.register("advantage.pure", new RangedAttribute("attribute.name.advantage.pure", 0, 0, 4096).setSyncable(false)); ++ public static final Holder ADV_PHYSICAL = Attributes.register("advantage.physical", new RangedAttribute("attribute.name.advantage.physical", 0, 0, 4096).setSyncable(false)); ++ public static final Holder ADV_MAGIC = Attributes.register("advantage.magic", new RangedAttribute("attribute.name.advantage.magic", 0, 0, 4096).setSyncable(false)); ++ public static final Holder ADV_AIR = Attributes.register("advantage.air", new RangedAttribute("attribute.name.advantage.air", 0, 0, 4096).setSyncable(false)); ++ public static final Holder ADV_EARTH = Attributes.register("advantage.earth", new RangedAttribute("attribute.name.advantage.earth", 0, 0, 4096).setSyncable(false)); ++ public static final Holder ADV_FIRE = Attributes.register("advantage.fire", new RangedAttribute("attribute.name.advantage.fire", 0, 0, 4096).setSyncable(false)); ++ public static final Holder ADV_WATER = Attributes.register("advantage.water", new RangedAttribute("attribute.name.advantage.water", 0, 0, 4096).setSyncable(false)); ++ public static final Holder PEN_PHYSICAL = Attributes.register("penetration.physical", new RangedAttribute("attribute.name.penetration.physical", 0, 0, 4096).setSyncable(false)); ++ public static final Holder PEN_MAGICAL = Attributes.register("penetration.magical", new RangedAttribute("attribute.name.penetration.magical", 0, 0, 4096).setSyncable(false)); + // StatsHolder +- public static final Holder STAT_CRITCHANCE = Attributes.register("stat.crit.chance", new RangedAttribute("attribute.name.stat.crit.chance", 0, 0, 4096)).setSyncable(false); +- public static final Holder STAT_CRITDMG = Attributes.register("stat.crit.dmg", new RangedAttribute("attribute.name.stat.crit.dmg", 0, 0, 4096)).setSyncable(false); +- public static final Holder STAT_ATTACKSPEED= Attributes.register("stat.attackspeed", new RangedAttribute("attribute.name.stat.attackspeed", 0, 0, 4096)).setSyncable(false); +- public static final Holder STAT_CDR = Attributes.register("stat.cooldownreduction", new RangedAttribute("attribute.name.stat.cooldownreduction", 0, 0, 4096)).setSyncable(false); +- // CombatHolder +- public static final Holder COMBAT_HURTINVUL= Attributes.register("combat.hurtinvul", new RangedAttribute("attribute.name.combat.hurtinvul", 5, 0, 4096)).setSyncable(false); ++ public static final Holder STAT_CRITCHANCE = Attributes.register("stat.crit.chance", new RangedAttribute("attribute.name.stat.crit.chance", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_CRITDMG = Attributes.register("stat.crit.dmg", new RangedAttribute("attribute.name.stat.crit.dmg", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_ATTACKSPEED= Attributes.register("stat.attackspeed", new RangedAttribute("attribute.name.stat.attackspeed", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_CDR = Attributes.register("stat.cooldownreduction", new RangedAttribute("attribute.name.stat.cooldownreduction", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_HEALTHREGEN = Attributes.register("stat.healthregen", new RangedAttribute("attribute.name.stat.healthregen", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_ENERGYREGEN = Attributes.register("stat.energyregen", new RangedAttribute("attribute.name.stat.energyregen", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_ENERGY= Attributes.register("stat.energy", new RangedAttribute("attribute.name.stat.energy", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_HEALINGPOWER= Attributes.register("stat.healingpower", new RangedAttribute("attribute.name.stat.healingpower", 0, 0, 4096).setSyncable(false)); ++ public static final Holder STAT_TENACITY = Attributes.register("stat.tenacity", new RangedAttribute("attribute.name.stat.tenacity", 0, 0, 4096).setSyncable(false)); ++ public static final Holder COMBAT_HURTINVUL= Attributes.register("combat.hurtinvul", new RangedAttribute("attribute.name.combat.hurtinvul", 5, 0, 4096).setSyncable(false)); + + public Attributes() {} diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java -index 7d36cec7c45e6ba8dfa97263e33995fdd007db37..8a4e2b0e87fc01c8f2f2e8c2fc7aaf57bbd76847 100644 +index d59e0044db03ba30d5bab9a8c126b597b7659015..4eca4bdb446ebcb9bb6ebb290f9918c5827b39e8 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/MeleeAttackGoal.java @@ -5,6 +5,7 @@ import net.minecraft.world.InteractionHand; @@ -1230,14 +1106,14 @@ index 7d36cec7c45e6ba8dfa97263e33995fdd007db37..8a4e2b0e87fc01c8f2f2e8c2fc7aaf57 private long lastCanUseCheck; private static final long COOLDOWN_BETWEEN_CAN_USE_CHECKS = 20L; -@@ -96,6 +97,7 @@ public class MeleeAttackGoal extends Goal { +@@ -91,6 +92,7 @@ public class MeleeAttackGoal extends Goal { public void tick() { LivingEntity livingEntity = this.mob.getTarget(); if (livingEntity != null) { + attackInterval = Math.max(100 - (int) mob.getAttribute(Attributes.ATTACK_SPEED).getValue(), 0); // Papyrus - attackspeed this.mob.getLookControl().setLookAt(livingEntity, 30.0F, 30.0F); this.ticksUntilNextPathRecalculation = Math.max(this.ticksUntilNextPathRecalculation - 1, 0); - if ((this.followingTargetEvenIfNotSeen || this.mob.getSensing().hasLineOfSight(livingEntity)) && this.ticksUntilNextPathRecalculation <= 0 && (this.pathedTargetX == 0.0D && this.pathedTargetY == 0.0D && this.pathedTargetZ == 0.0D || livingEntity.distanceToSqr(this.pathedTargetX, this.pathedTargetY, this.pathedTargetZ) >= 1.0D || this.mob.getRandom().nextFloat() < 0.05F)) { + if ((this.followingTargetEvenIfNotSeen || this.mob.getSensing().hasLineOfSight(livingEntity)) @@ -132,7 +134,7 @@ public class MeleeAttackGoal extends Goal { } @@ -1256,10 +1132,10 @@ index 7d36cec7c45e6ba8dfa97263e33995fdd007db37..8a4e2b0e87fc01c8f2f2e8c2fc7aaf57 } } diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java -index 749ab8537ac30a3c6536b703989d5f22bace0f1e..d256474e099f93f03d66b7e492c637e38cb25f42 100644 +index 5633c5ee29938c0b61121c921cb82342d01329e3..d28d2389b2d819ec7031a32fc66af283d0c47b89 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/RangedCrossbowAttackGoal.java -@@ -4,6 +4,7 @@ import java.util.EnumSet; +@@ -5,6 +5,7 @@ import net.minecraft.core.component.DataComponents; import net.minecraft.util.TimeUtil; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.entity.LivingEntity; @@ -1267,8 +1143,8 @@ index 749ab8537ac30a3c6536b703989d5f22bace0f1e..d256474e099f93f03d66b7e492c637e3 import net.minecraft.world.entity.monster.CrossbowAttackMob; import net.minecraft.world.entity.monster.Monster; import net.minecraft.world.entity.monster.RangedAttackMob; -@@ -112,7 +113,7 @@ public class RangedCrossbowAttackGoal= CrossbowItem.getChargeDuration(itemStack)) { +@@ -113,7 +114,7 @@ public class RangedCrossbowAttackGoal= CrossbowItem.getChargeDuration(itemStack, this.mob)) { this.mob.releaseUsingItem(); this.crossbowState = RangedCrossbowAttackGoal.CrossbowState.CHARGED; - this.attackDelay = 20 + this.mob.getRandom().nextInt(20); @@ -1277,10 +1153,10 @@ index 749ab8537ac30a3c6536b703989d5f22bace0f1e..d256474e099f93f03d66b7e492c637e3 } } else if (this.crossbowState == RangedCrossbowAttackGoal.CrossbowState.CHARGED) { diff --git a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java -index 9eab1170cb123d3b60a02314702516704f959ab7..ad2857293944dab888b8e80b88e2ae3e01846419 100644 +index 5c2ed3c39c8eb850f3be1e2ea5b5a7ea266e16d1..2d664e57a8be949029b62593a6b05fe6b792df6d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java -@@ -56,7 +56,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM +@@ -54,7 +54,7 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM @Override protected void registerGoals() { @@ -1290,10 +1166,10 @@ index 9eab1170cb123d3b60a02314702516704f959ab7..ad2857293944dab888b8e80b88e2ae3e this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 6.0F)); this.goalSelector.addGoal(4, new RandomLookAroundGoal(this)); diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -index 6623674136b0f865d5b3d7a10d3bf05793b82f87..d3e230c882c65847dd9063682071da988df87685 100644 +index cf6a3a63b6f2b96943c0f399e8c82d293fee31ba..d5836ca256507d319ecc27a4f3a913ff21323540 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -@@ -131,7 +131,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder { diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index ea8883b0661e894a466eca24bfc247ac37f40a81..28deb6244b53ab7d31abd88c4fd3fffb47738692 100644 +index d3b4d492aee380dc17f4232d90eaae4f07bb9f86..b04fce7d9430bb4ee98c69516d097a63aaca12e5 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -111,7 +111,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -115,7 +115,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @Override protected void registerGoals() { this.goalSelector.addGoal(0, new WitherBoss.WitherDoNothingGoal()); @@ -1316,32 +1192,32 @@ index ea8883b0661e894a466eca24bfc247ac37f40a81..28deb6244b53ab7d31abd88c4fd3fffb this.goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 8.0F)); this.goalSelector.addGoal(7, new RandomLookAroundGoal(this)); diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -index 586e3e92ccc275446df6dbbff9bf010a37a9aa8f..f4e93c2d00ec1b2ab35bdd2533b9f32b21155aa5 100644 +index 3b5cf6ffb74d11bea5eb21bd66d679734ff5000c..60f0d2fcc681f7249acb65d6cbf3e9da777a4d1c 100644 --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -48,7 +48,7 @@ import net.minecraft.world.level.block.state.BlockState; - - public abstract class AbstractSkeleton extends Monster implements RangedAttackMob { +@@ -48,7 +48,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + private static final int HARD_ATTACK_INTERVAL = 20; + private static final int NORMAL_ATTACK_INTERVAL = 40; - private final RangedBowAttackGoal bowGoal = new RangedBowAttackGoal<>(this, 1.0D, 20, 15.0F); + private final RangedBowAttackGoal bowGoal = new RangedBowAttackGoal<>(this, 1.0D, Math.max(100 - (int) getAttribute(Attributes.ATTACK_SPEED).getValue(), 0), 15.0F); // Papyrus - attack speed private final MeleeAttackGoal meleeGoal = new MeleeAttackGoal(this, 1.2D, false) { @Override public void stop() { -@@ -187,7 +187,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo - b0 = 40; +@@ -182,7 +182,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + i = this.getAttackInterval(); } -- this.bowGoal.setMinAttackInterval(b0); -+ //this.bowGoal.setMinAttackInterval(b0); Papyrus - don't change interval +- this.bowGoal.setMinAttackInterval(i); ++ //this.bowGoal.setMinAttackInterval(i); Papyrus - don't this.goalSelector.addGoal(4, this.bowGoal); } else { this.goalSelector.addGoal(4, this.meleeGoal); diff --git a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java -index fb84b35e34063075e69e00e430bc00e7c3b9d62c..81188d01dcb91342d3b62a04b9aa10374ad98116 100644 +index c858556ea457931aa14e338e20672cb50cb19f0e..f9159d06f1341b34c246ae9ad429f47e843bcb8f 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java +++ b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java -@@ -66,7 +66,7 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { +@@ -64,7 +64,7 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { this.goalSelector.addGoal(1, new SpellcasterIllager.SpellcasterCastingSpellGoal()); this.goalSelector.addGoal(4, new Illusioner.IllusionerMirrorSpellGoal()); this.goalSelector.addGoal(5, new Illusioner.IllusionerBlindnessSpellGoal()); @@ -1351,10 +1227,10 @@ index fb84b35e34063075e69e00e430bc00e7c3b9d62c..81188d01dcb91342d3b62a04b9aa1037 this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 3.0F, 1.0F)); this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Mob.class, 8.0F)); diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index f9ffc5f4cbfdcf5c7351a883d2e5c26492175283..4c1ec06e3c6fa9fde9527274553724b5a195ed4f 100644 +index b8ff1e3d280171378fe383bcc7c6a855d20ae5d1..ec1eaafe7423dd8363f20328ec26ed1f07db04cb 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -67,7 +67,7 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -64,7 +64,7 @@ public class Witch extends Raider implements RangedAttackMob { }); this.attackPlayersGoal = new NearestAttackableWitchTargetGoal<>(this, Player.class, 10, true, false, (Predicate) null); this.goalSelector.addGoal(1, new FloatGoal(this)); @@ -1364,7 +1240,7 @@ index f9ffc5f4cbfdcf5c7351a883d2e5c26492175283..4c1ec06e3c6fa9fde9527274553724b5 this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 8.0F)); this.goalSelector.addGoal(3, new RandomLookAroundGoal(this)); diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java -index deabb3400ee2406a8ec179a96d8cfd86f8edbbd6..3fb978439d9345822a36ee62da4749f1880a0b6d 100644 +index 6e66141dca61f777b354854b5d0bac2570b8bf3b..35c9c70cbd393deeed92bf825c714233d2383c6b 100644 --- a/src/main/java/net/minecraft/world/entity/player/Inventory.java +++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java @@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableList; @@ -1376,7 +1252,7 @@ index deabb3400ee2406a8ec179a96d8cfd86f8edbbd6..3fb978439d9345822a36ee62da4749f1 import net.minecraft.CrashReport; import net.minecraft.CrashReportCategory; import net.minecraft.ReportedException; -@@ -27,6 +29,8 @@ import net.minecraft.world.item.ItemStack; +@@ -24,6 +26,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; // CraftBukkit start import java.util.ArrayList; @@ -1385,7 +1261,7 @@ index deabb3400ee2406a8ec179a96d8cfd86f8edbbd6..3fb978439d9345822a36ee62da4749f1 import org.bukkit.Location; import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.entity.HumanEntity; -@@ -559,7 +563,8 @@ public class Inventory implements Container, Nameable { +@@ -625,7 +629,8 @@ public class Inventory implements Container, Nameable { } } } @@ -1396,23 +1272,50 @@ index deabb3400ee2406a8ec179a96d8cfd86f8edbbd6..3fb978439d9345822a36ee62da4749f1 @Override diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 21af79bbfca6bde1a28fe7c815fabfec98b61217..9b55ba4312ee080192f23e7315e88234645b8a45 100644 +index 9f0b9b51e36b96f935a96df92754afdf929dab9b..dc04921f813caca0aa7617ea3fc0f6c9b467be4c 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -7,7 +7,7 @@ import com.mojang.authlib.GameProfile; - import com.mojang.datafixers.util.Either; +@@ -8,7 +8,9 @@ import com.mojang.datafixers.util.Either; import com.mojang.logging.LogUtils; import com.mojang.serialization.DataResult; + import javax.annotation.Nonnull; -import de.erethon.papyrus.DamageType; -+import de.erethon.papyrus.CraftDamageType; ++ ++import de.erethon.papyrus.CraftPDamageType; ++import de.erethon.papyrus.PDamageType; import net.minecraft.Util; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.core.BlockPos; -@@ -194,7 +194,28 @@ public abstract class Player extends LivingEntity { +@@ -43,9 +45,7 @@ import net.minecraft.world.damagesource.DamageSource; + import net.minecraft.world.effect.MobEffectInstance; + import net.minecraft.world.effect.MobEffectUtil; + import net.minecraft.world.effect.MobEffects; +-import net.minecraft.world.entity.Entity; +-import net.minecraft.world.entity.EntityAttachment; +-import net.minecraft.world.entity.EntityAttachments; ++import net.minecraft.world.entity.*; + import net.minecraft.world.entity.ai.attributes.AttributeSupplier; + import net.minecraft.world.entity.ai.attributes.Attributes; + import net.minecraft.world.entity.animal.Parrot; +@@ -208,9 +208,43 @@ public abstract class Player extends LivingEntity { + } + } ++ // Papyrus start - Default attributes public static AttributeSupplier.Builder createAttributes() { - return LivingEntity.createLivingAttributes().add(Attributes.ATTACK_DAMAGE, 1.0D).add(Attributes.MOVEMENT_SPEED, 0.10000000149011612D).add(Attributes.ATTACK_SPEED).add(Attributes.LUCK) -- .add(Attributes.MAX_HEALTH, 500); +- return LivingEntity.createLivingAttributes().add(Attributes.ATTACK_DAMAGE, 1.0D).add(Attributes.MOVEMENT_SPEED, 0.10000000149011612D).add(Attributes.ATTACK_SPEED).add(Attributes.LUCK).add(Attributes.BLOCK_INTERACTION_RANGE, 4.5D).add(Attributes.ENTITY_INTERACTION_RANGE, 3.0D).add(Attributes.BLOCK_BREAK_SPEED).add(Attributes.SUBMERGED_MINING_SPEED).add(Attributes.SNEAKING_SPEED).add(Attributes.MINING_EFFICIENCY).add(Attributes.SWEEPING_DAMAGE_RATIO); +- } ++ return LivingEntity.createLivingAttributes() ++ .add(Attributes.ATTACK_DAMAGE, 1.0D) ++ .add(Attributes.MOVEMENT_SPEED, 0.10000000149011612D) ++ .add(Attributes.ATTACK_SPEED).add(Attributes.LUCK) ++ .add(Attributes.BLOCK_INTERACTION_RANGE, 4.5D) ++ .add(Attributes.ENTITY_INTERACTION_RANGE, 3.0D) ++ .add(Attributes.BLOCK_BREAK_SPEED) ++ .add(Attributes.SUBMERGED_MINING_SPEED) ++ .add(Attributes.SNEAKING_SPEED) ++ .add(Attributes.MINING_EFFICIENCY) ++ .add(Attributes.SWEEPING_DAMAGE_RATIO) + .add(Attributes.MAX_HEALTH, 500) + .add(Attributes.ADV_AIR) + .add(Attributes.ADV_EARTH) @@ -1435,38 +1338,41 @@ index 21af79bbfca6bde1a28fe7c815fabfec98b61217..9b55ba4312ee080192f23e7315e88234 + .add(Attributes.STAT_ENERGYREGEN) + .add(Attributes.STAT_HEALTHREGEN) + .add(Attributes.COMBAT_HURTINVUL); - } ++ } ++ // Papyrus end @Override -@@ -1215,12 +1236,23 @@ public abstract class Player extends LivingEntity { + protected void defineSynchedData(SynchedEntityData.Builder builder) { +@@ -1239,12 +1273,23 @@ public abstract class Player extends LivingEntity { } // Papyrus - combat rework - public void attack(Entity target, DamageType type) { -+ public void attack(Entity target, CraftDamageType type) { ++ public void attack(Entity target, CraftPDamageType type) { if (!target.isAttackable()) { return; } - float damage = (float) (getAttributeValue(Attributes.ATTACK_DAMAGE) + getAttributeValue(type.getAdvAttr())); - target.hurt(damageSources().playerAttack(this), damage, type); +- float damage = (float) (getAttributeValue(Attributes.ATTACK_DAMAGE) + getAttributeValue(type.getAdvAttr())); ++ float damage = (float) (getAttributeValue(Attributes.ATTACK_DAMAGE) + getAttributeValue(type.advantage)); ++ target.hurt(damageSources().playerAttack(this), damage, type); + + damage = damage * getAttackStrengthScale(0.5f); + if (target instanceof LivingEntity entity) { -+ damage = (float) getBukkitEntity().onAttack(entity.getBukkitLivingEntity(), damage, type.getApiDamageType()); ++ damage = (float) getBukkitEntity().onAttack(entity.getBukkitLivingEntity(), damage, type.apiType); + } + int crit = random.nextIntBetweenInclusive(0, 100); + if (crit < getAttributeValue(Attributes.STAT_CRITCHANCE)) { + damage = (float) (damage + getAttributeValue(Attributes.STAT_CRITDMG)); + } -+ target.hurt(damageSources().playerAttack(this), damage, type); + target.hurt(damageSources().playerAttack(this), damage, type); + resetAttackStrengthTicker(); } public void attack(Entity target) { -@@ -1244,13 +1276,13 @@ public abstract class Player extends LivingEntity { - f1 = EnchantmentHelper.getDamageBonus(this.getMainHandItem(), MobType.UNDEFINED); - } - +@@ -1263,10 +1308,10 @@ public abstract class Player extends LivingEntity { + ItemStack itemstack = this.getWeaponItem(); + DamageSource damagesource = this.damageSources().playerAttack(this); + float f1 = this.getEnchantedDamage(target, f, damagesource) - f; - float f2 = this.getAttackStrengthScale(0.5F); + float scaled = this.getAttackStrengthScale(0.5F); @@ -1474,56 +1380,41 @@ index 21af79bbfca6bde1a28fe7c815fabfec98b61217..9b55ba4312ee080192f23e7315e88234 - f1 *= f2; + f *= 0.2F + scaled * scaled * 0.8F; + f1 *= scaled; - // this.resetAttackCooldown(); // CraftBukkit - Moved to EntityLiving to reset the cooldown after the damage is dealt + // this.resetAttackStrengthTicker(); // CraftBukkit - Moved to EntityLiving to reset the cooldown after the damage is dealt + if (target.getType().is(EntityTypeTags.REDIRECTABLE_PROJECTILE) && target instanceof Projectile) { + Projectile iprojectile = (Projectile) target; +@@ -1283,7 +1328,7 @@ public abstract class Player extends LivingEntity { + } + if (f > 0.0F || f1 > 0.0F) { - boolean flag = f2 > 0.9F; + boolean flag = scaled > 0.9F; - boolean flag1 = false; - byte b0 = 0; - int i = b0 + EnchantmentHelper.getKnockbackBonus(this); -@@ -1301,8 +1333,7 @@ public abstract class Player extends LivingEntity { - } + boolean flag1; - Vec3 vec3d = target.getDeltaMovement(); -- boolean flag5 = target.hurt(this.damageSources().playerAttack(this).critical(flag2), f); // Paper - add critical damage API -- -+ boolean flag5 = target.hurt(damageSources().playerAttack(this).critical(flag2), f, attackDamageType); // Paper - add critical damage API - if (flag5) { - if (i > 0) { - if (target instanceof LivingEntity) { -@@ -1329,8 +1360,8 @@ public abstract class Player extends LivingEntity { + if (this.isSprinting() && flag) { +@@ -1355,7 +1400,7 @@ public abstract class Player extends LivingEntity { + while (iterator.hasNext()) { + entityliving2 = (LivingEntity) iterator.next(); + if (entityliving2 != this && entityliving2 != target && !this.isAlliedTo((Entity) entityliving2) && (!(entityliving2 instanceof ArmorStand) || !((ArmorStand) entityliving2).isMarker()) && this.distanceToSqr((Entity) entityliving2) < 9.0D) { +- float f7 = this.getEnchantedDamage(entityliving2, f6, damagesource) * f2; ++ float f7 = this.getEnchantedDamage(entityliving2, f6, damagesource) * f6; - if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits -- if (entityliving.hurt(this.damageSources().playerAttack(this).sweep().critical(flag2), f4)) { // Paper - add critical damage API -- entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this, EntityKnockbackEvent.KnockbackCause.SWEEP_ATTACK); // CraftBukkit -+ if (entityliving.hurt(damageSources().playerAttack(this).sweep().critical(flag2), f4, attackDamageType)) { // Paper - add critical damage API -+ entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this, EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // Paper - } - // CraftBukkit end - } -@@ -1442,7 +1473,7 @@ public abstract class Player extends LivingEntity { + if (entityliving2.hurt(this.damageSources().playerAttack(this).sweep().critical(flag2), f7)) { // Paper - add critical damage API +@@ -1483,7 +1528,7 @@ public abstract class Player extends LivingEntity { @Override protected void doAutoAttackOnTouch(LivingEntity target) { - this.attack(target, DamageType.PHYSICAL); // Papyrus -+ this.attack(target, CraftDamageType.PHYSICAL); // Papyrus ++ this.attack(target, CraftPDamageType.PHYSICAL); // Papyrus } @io.papermc.paper.annotation.DoNotUse @Deprecated // Paper - Add PlayerShieldDisableEvent diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index d14eab0d83d629a4522bf3f7d789d2853eb84f06..3646155f7dc9da24808b77d6598ca87975124844 100644 +index ddf47dab1ab92c45e3eea09239d418a9798ed59e..a75be1f51183d78ebefe68360f560ac5c071fc8a 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -1,6 +1,7 @@ - package net.minecraft.world.entity.projectile; - - import com.google.common.collect.Lists; -+import de.erethon.papyrus.CraftDamageType; - import it.unimi.dsi.fastutil.ints.IntOpenHashSet; - import java.util.Arrays; - import java.util.Collection; -@@ -407,7 +408,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -449,7 +449,7 @@ public abstract class AbstractArrow extends Projectile { // CraftBukkit end } @@ -1533,32 +1424,23 @@ index d14eab0d83d629a4522bf3f7d789d2853eb84f06..3646155f7dc9da24808b77d6598ca879 return; } diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java -index c4ecc5faa4f61e7974e8c475762924a89615b377..97ccfaa8c15e145e87ea63befacfb6e5f50cecc3 100644 +index 3107ad04dda9f43976a385976d6952e2f2af3939..8f55ba0644c95d346ddb36f68c375546063fa1ae 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java -@@ -230,7 +230,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { - Entity entity = this.getOwner(); +@@ -181,7 +181,7 @@ public abstract class AbstractHurtingProjectile extends Projectile { int i = entity == null ? 0 : entity.getId(); + Vec3 vec3d = entityTrackerEntry.getPositionBase(); -- return new ClientboundAddEntityPacket(this.getId(), this.getUUID(), this.getX(), this.getY(), this.getZ(), this.getXRot(), this.getYRot(), this.getType(), i, new Vec3(this.xPower, this.yPower, this.zPower), 0.0D); -+ return new ClientboundAddEntityPacket(this.getId(), this.getUUID(), this.getX(), this.getY(), this.getZ(), this.getXRot(), this.getYRot(), this.getType(), i, new Vec3(this.xPower, this.yPower, this.zPower), 0.0D, this); +- return new ClientboundAddEntityPacket(this.getId(), this.getUUID(), vec3d.x(), vec3d.y(), vec3d.z(), entityTrackerEntry.getLastSentXRot(), entityTrackerEntry.getLastSentYRot(), this.getType(), i, entityTrackerEntry.getLastSentMovement(), 0.0D); ++ return super.getAddEntityPacket(entityTrackerEntry); // Papyrus - temp fix } @Override diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -index 7005b3a26e9b5d79064981a4a41bee21b65a9fc3..3af11a332cbeefefed18510318d1295773df6cd5 100644 +index 09d465947a5720e05c350d455c86002682104079..c2952eacc9761e359437abc72213ab6c4c0918fb 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -@@ -239,7 +239,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { - - if (f > 0.0F) { - if (this.attachedToEntity != null) { -- this.attachedToEntity.hurt(this.damageSources().fireworks(this, this.getOwner()), 5.0F + (float) (nbttaglist.size() * 2)); -+ this.attachedToEntity.hurt(damageSources().fireworks(this, this.getOwner()), 5.0F + (float) (nbttaglist.size() * 2), damageType); - } - - double d0 = 5.0D; -@@ -266,7 +266,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { +@@ -268,7 +268,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { if (flag) { float f1 = f * (float) Math.sqrt((5.0D - (double) this.distanceTo(entityliving)) / 5.0D); @@ -1568,89 +1450,88 @@ index 7005b3a26e9b5d79064981a4a41bee21b65a9fc3..3af11a332cbeefefed18510318d12957 } } diff --git a/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java b/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java -index 6b67eec90cd0dc1b20762514eac97f75fdbdf182..5480c3099b37c234004ff1971c029ed8059ff969 100644 +index 28a65f2a9ef441ae96a7a635e0695b14ce2ee367..6468d1535739ef354eceae6582d80a663acbc0ac 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/LargeFireball.java -@@ -51,8 +51,7 @@ public class LargeFireball extends Fireball { - if (!this.level().isClientSide) { - Entity entity = entityHitResult.getEntity(); +@@ -62,7 +62,7 @@ public class LargeFireball extends Fireball { Entity entity1 = this.getOwner(); -- -- entity.hurt(this.damageSources().fireball(this, entity1), 6.0F); -+ entity.hurt(damageSources().fireball(this, entity1), 6.0F, damageType); - if (entity1 instanceof LivingEntity) { - this.doEnchantDamageEffects((LivingEntity) entity1, entity); - } + DamageSource damagesource = this.damageSources().fireball(this, entity1); + +- entity.hurt(damagesource, 6.0F); ++ entity.hurt(damagesource, 6.0F, damageType); + EnchantmentHelper.doPostAttackEffects(worldserver, entity, damagesource); + } + } diff --git a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java -index 0bbe853f7df93f9dcd2b21d762939f8b6be069aa..c89f737fcf42e7790d66371c3dd57d5449c05f7f 100644 +index 8575941fd238750c5d56843989a48bcbde2d8a88..edf55808a76006cc53b71835a8a79fba57016c4b 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java +++ b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java -@@ -61,9 +61,7 @@ public class LlamaSpit extends Projectile { - Entity entity = this.getOwner(); +@@ -72,7 +72,7 @@ public class LlamaSpit extends Projectile { + entity = entityHitResult.getEntity(); + DamageSource damagesource = this.damageSources().spit(this, entityliving); - if (entity instanceof LivingEntity) { -- LivingEntity entityliving = (LivingEntity) entity; -- -- entityHitResult.getEntity().hurt(this.damageSources().mobProjectile(this, entityliving), 1.0F); -+ entityHitResult.getEntity().hurt(damageSources().mobProjectile(this, (LivingEntity) entity), 1.0F, damageType); - } +- if (entity.hurt(damagesource, 1.0F)) { ++ if (entity.hurt(damagesource, 1.0F, damageType)) { + Level world = this.level(); - } + if (world instanceof ServerLevel) { diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 837f68825f601971f374be47952b23108bf66ba6..1a79d68a773a69bd19557d3bca7ea3019d385398 100644 +index 5f7d152f41eb85f17bcded4bc8099b998e5a338b..656813ed4808fb36719c9525e98fbbdc0c0067c8 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -4,6 +4,8 @@ import com.google.common.base.MoreObjects; +@@ -1,10 +1,12 @@ + package net.minecraft.world.entity.projectile; + + import com.google.common.base.MoreObjects; ++import de.erethon.papyrus.CraftPDamageType; + import it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePair; import java.util.Iterator; import java.util.UUID; import javax.annotation.Nullable; + -+import de.erethon.papyrus.CraftDamageType; import net.minecraft.core.BlockPos; + import net.minecraft.core.Holder; import net.minecraft.nbt.CompoundTag; - import net.minecraft.network.protocol.Packet; -@@ -50,6 +52,10 @@ public abstract class Projectile extends Entity implements TraceableEntity { - private static int loadedTick; +@@ -48,6 +50,8 @@ public abstract class Projectile extends Entity implements TraceableEntity { + protected boolean hitCancelled = false; + // CraftBukkit end - private int loadedLifetime = 0; -+ -+ // Papyrus start -+ public CraftDamageType damageType = CraftDamageType.PHYSICAL; ++ public CraftPDamageType damageType = CraftPDamageType.PHYSICAL; // Papyrus + - @Override - public void setPos(double x, double y, double z) { - int currentTick = net.minecraft.server.MinecraftServer.currentTick; + Projectile(EntityType type, Level world) { + super(type, world); + } diff --git a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java -index da0b7ee796c335875914481a5deda5eef5ddd442..ec79d506055bcc430db9c31b372984b403045c3e 100644 +index 7fde1807640d0b02d417f48f1f6758f8ae32e04b..c5bb657862e0b7ae4c6b37cf11f04a930d5fdbca 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java -@@ -300,7 +300,7 @@ public class ShulkerBullet extends Projectile { - Entity entity = entityHitResult.getEntity(); +@@ -309,7 +309,7 @@ public class ShulkerBullet extends Projectile { Entity entity1 = this.getOwner(); LivingEntity entityliving = entity1 instanceof LivingEntity ? (LivingEntity) entity1 : null; -- boolean flag = entity.hurt(this.damageSources().mobProjectile(this, entityliving), 4.0F); -+ boolean flag = entity.hurt(damageSources().mobProjectile(this, entityliving), 4.0F, damageType); + DamageSource damagesource = this.damageSources().mobProjectile(this, entityliving); +- boolean flag = entity.hurt(damagesource, 4.0F); ++ boolean flag = entity.hurt(damagesource, 4.0F, damageType); if (flag) { - this.doEnchantDamageEffects(entityliving, entity); + Level world = this.level(); diff --git a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java -index 9d43c8520953d6fe0d0948f9dbe14e0650ee01c2..b11bfd159204743283f6ddb4c493721efadb4755 100644 +index 1711ad457e7d1233fd32edc3e9e3b9f1e3be9980..684a0e19ba395b093352fbffb0acced4780e6ea2 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java -@@ -49,7 +49,7 @@ public class SmallFireball extends Fireball { - entity.setSecondsOnFire(event.getDuration(), false); - } +@@ -59,7 +59,7 @@ public class SmallFireball extends Fireball { // CraftBukkit end -- if (!entity.hurt(this.damageSources().fireball(this, entity1), 5.0F)) { -+ if (!entity.hurt(damageSources().fireball(this, entity1), 5.0F, damageType)) { + DamageSource damagesource = this.damageSources().fireball(this, entity1); + +- if (!entity.hurt(damagesource, 5.0F)) { ++ if (!entity.hurt(damagesource, 5.0F, damageType)) { entity.setRemainingFireTicks(i); - } else if (entity1 instanceof LivingEntity) { - this.doEnchantDamageEffects((LivingEntity) entity1, entity); + } else { + EnchantmentHelper.doPostAttackEffects(worldserver, entity, damagesource); diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -index 785196e6f4677074890ca965e9add85ccfd0e6e3..995eae0b83160ba15c3f48f27f87ef0603342311 100644 +index dbd60cc8c39f5d2d4c77e2de4f2567e7fa456cd2..4b95d55cb516b723bb3c9546713e9e0d4afd95f5 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -@@ -45,7 +45,7 @@ public class ThrownEgg extends ThrowableItemProjectile { +@@ -49,7 +49,7 @@ public class ThrownEgg extends ThrowableItemProjectile { @Override protected void onHitEntity(EntityHitResult entityHitResult) { super.onHitEntity(entityHitResult); @@ -1660,10 +1541,10 @@ index 785196e6f4677074890ca965e9add85ccfd0e6e3..995eae0b83160ba15c3f48f27f87ef06 @Override diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -index 3be611e7ae35b696ba44cd361042f79b69391815..b9bec571dac2321ccdb09f5f3d68ebd09322683a 100644 +index 1aa5e57a4e6a4be60514d8808a2e6c973d93e798..601252c0ff97e27527dee710b115c6ddbb215bb4 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -@@ -42,7 +42,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +@@ -44,7 +44,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { @Override protected void onHitEntity(EntityHitResult entityHitResult) { super.onHitEntity(entityHitResult); @@ -1673,42 +1554,42 @@ index 3be611e7ae35b696ba44cd361042f79b69391815..b9bec571dac2321ccdb09f5f3d68ebd0 @Override diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java -index 51931e5cecf4c9ed8442136b18a94c7da89cf77d..a0f6ec37acc4f3c8f480f707163c6584eecd44d6 100644 +index 44c733c5b2c3e9942f28e882ad72306a24459c2c..5f2cb0b9d514a22fdfed3765c02e97ddf8c2d789 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java -@@ -137,7 +137,7 @@ public class ThrownTrident extends AbstractArrow { - this.dealtDamage = true; - SoundEvent soundeffect = SoundEvents.TRIDENT_HIT; +@@ -142,7 +142,7 @@ public class ThrownTrident extends AbstractArrow { + } + this.dealtDamage = true; - if (entity.hurt(damagesource, f)) { + if (entity.hurt(damagesource, f, damageType)) { if (entity.getType() == EntityType.ENDERMAN) { return; } diff --git a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java -index 78dd3365dc4d1265fc2102f740d75a384f5df5c5..17dfe809ae610e28cd26273ecbc200622b1cf23f 100644 +index 55fd997a4e894eeab24de269d59e486196ffbe8d..f7064a7308a374482fedbe407a6dd787d485db66 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java +++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java -@@ -62,7 +62,7 @@ public class WitherSkull extends AbstractHurtingProjectile { +@@ -68,7 +68,7 @@ public class WitherSkull extends AbstractHurtingProjectile { + if (entity1 instanceof LivingEntity entityliving) { + DamageSource damagesource = this.damageSources().witherSkull(this, entityliving); - if (entity1 instanceof LivingEntity) { - entityliving = (LivingEntity) entity1; -- flag = entity.hurt(this.damageSources().witherSkull(this, entityliving), 8.0F); -+ flag = entity.hurt(damageSources().witherSkull(this, entityliving), 8.0F, damageType); +- flag = entity.hurt(damagesource, 8.0F); ++ flag = entity.hurt(damagesource, 8.0F, damageType); if (flag) { if (entity.isAlive()) { - this.doEnchantDamageEffects(entityliving, entity); -@@ -71,7 +71,7 @@ public class WitherSkull extends AbstractHurtingProjectile { + EnchantmentHelper.doPostAttackEffects(worldserver, entity, damagesource); +@@ -77,7 +77,7 @@ public class WitherSkull extends AbstractHurtingProjectile { } } } else { -- flag = entity.hurt(this.damageSources().magic(), 5.0F); -+ flag = entity.hurt(damageSources().magic(), 5.0F, damageType); +- flag = entity.hurt(this.damageSources().magic().customEventDamager(this), 5.0F); // Paper - Fire EntityDamageByEntityEvent for unowned wither skulls // Paper - fix DamageSource API ++ flag = entity.hurt(this.damageSources().magic().customEventDamager(this), 5.0F, damageType); // Paper - Fire EntityDamageByEntityEvent for unowned wither skulls // Paper - fix DamageSource API } - if (flag && entity instanceof LivingEntity) { + if (flag && entity instanceof LivingEntity entityliving) { diff --git a/src/main/java/net/minecraft/world/item/DebugStickItem.java b/src/main/java/net/minecraft/world/item/DebugStickItem.java -index bb39241bb9951fba4dd9d9b254edaab2e8721526..dcf76b9f83ade54f5f1e2773138adc764088fcf1 100644 +index 2bb86c2d0c6b46e73a1ea191bb2be4586a85829b..3193a980131b4c241fbc1434abceec5eb776a883 100644 --- a/src/main/java/net/minecraft/world/item/DebugStickItem.java +++ b/src/main/java/net/minecraft/world/item/DebugStickItem.java @@ -1,6 +1,5 @@ @@ -1718,60 +1599,250 @@ index bb39241bb9951fba4dd9d9b254edaab2e8721526..dcf76b9f83ade54f5f1e2773138adc76 import java.util.Collection; import javax.annotation.Nullable; import net.minecraft.Util; -diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 1ad126d992d95062a3db08374db7a927f23a0cac..365945f6b2b1c4c707cdc2adb3619a8a067307ee 100644 ---- a/src/main/java/net/minecraft/world/item/ItemStack.java -+++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -161,7 +161,7 @@ public final class ItemStack { - private static final String TAG_HIDE_FLAGS = "HideFlags"; - private static final Component DISABLED_ITEM_TOOLTIP = Component.translatable("item.disabled").withStyle(ChatFormatting.RED); - private static final int DONT_HIDE_TOOLTIP = 0; -- private static final Style LORE_STYLE = Style.EMPTY.withColor(ChatFormatting.DARK_PURPLE).withItalic(true); -+ private static final Style LORE_STYLE = Style.EMPTY; //.withColor(ChatFormatting.DARK_PURPLE).withItalic(true); - Papyrus - private int count; - private int popTime; - /** @deprecated */ +diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java +index ed8032495af9ce9c23419224814b8d27e4a97c17..0ead4c040c1c0ad10d075fbfd4a19b82c58416a0 100644 +--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java ++++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java +@@ -1,6 +1,8 @@ + package net.minecraft.world.level; + + import com.mojang.logging.LogUtils; ++import de.erethon.papyrus.MobSpawnEntityCreateEvent; ++import de.erethon.papyrus.MobSpawnSettingsEvent; + import it.unimi.dsi.fastutil.objects.Object2IntMap; + import it.unimi.dsi.fastutil.objects.Object2IntMaps; + import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +@@ -23,13 +25,7 @@ import net.minecraft.util.Mth; + import net.minecraft.util.RandomSource; + import net.minecraft.util.VisibleForDebug; + import net.minecraft.util.random.WeightedRandomList; +-import net.minecraft.world.entity.Entity; +-import net.minecraft.world.entity.EntityType; +-import net.minecraft.world.entity.Mob; +-import net.minecraft.world.entity.MobCategory; +-import net.minecraft.world.entity.MobSpawnType; +-import net.minecraft.world.entity.SpawnGroupData; +-import net.minecraft.world.entity.SpawnPlacements; ++import net.minecraft.world.entity.*; + import net.minecraft.world.entity.player.Player; + import net.minecraft.world.level.biome.Biome; + import net.minecraft.world.level.biome.MobSpawnSettings; +@@ -282,8 +278,13 @@ public final class NaturalSpawner { + } + if (doSpawning == PreSpawnStatus.SUCCESS && checker.test(biomesettingsmobs_c.type, blockposition_mutableblockposition, chunk)) { + // Paper end - PreCreatureSpawnEvent +- Mob entityinsentient = NaturalSpawner.getMobForSpawn(world, biomesettingsmobs_c.type); +- ++ // Papyrus start - use our spawn method ++ MobSpawnEntityCreateEvent event = getPapyrusMobForSpawn(world, biomesettingsmobs_c, blockposition_mutableblockposition, entityhuman, groupdataentity); ++ Mob entityinsentient = event.mob; ++ biomesettingsmobs_c = event.spawnerData; ++ groupdataentity = event.groupData; ++ blockposition_mutableblockposition = event.pos; ++ // Papyrus end + if (entityinsentient == null) { + return j; // Paper - Optional per player mob spawns + } +@@ -380,14 +381,30 @@ public final class NaturalSpawner { + return null; + } + ++ private static de.erethon.papyrus.MobSpawnEntityCreateEvent getPapyrusMobForSpawn(ServerLevel level, MobSpawnSettings.SpawnerData spawnerData, BlockPos.MutableBlockPos pos, Player player, @Nullable SpawnGroupData groupData) { ++ try { ++ Entity entity = spawnerData.type.create(level); ++ if (entity instanceof Mob mob) { ++ de.erethon.papyrus.MobSpawnEntityCreateEvent event = new de.erethon.papyrus.MobSpawnEntityCreateEvent(mob, level, spawnerData, pos, player, groupData); ++ event.callEvent(); ++ return event; ++ } ++ NaturalSpawner.LOGGER.warn("Can't spawn entity of type: {}", BuiltInRegistries.ENTITY_TYPE.getKey(spawnerData.type)); ++ } catch (Exception exception) { ++ NaturalSpawner.LOGGER.warn("Failed to create mob", exception); ++ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper ++ } ++ return null; ++ } ++ + private static boolean isValidPositionForMob(ServerLevel world, Mob entity, double squaredDistance) { + return squaredDistance > (double) (entity.getType().getCategory().getDespawnDistance() * entity.getType().getCategory().getDespawnDistance()) && entity.removeWhenFarAway(squaredDistance) ? false : entity.checkSpawnRules(world, MobSpawnType.NATURAL) && entity.checkSpawnObstruction(world); + } + + private static Optional getRandomSpawnMobAt(ServerLevel world, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, RandomSource random, BlockPos pos) { + Holder holder = world.getBiome(pos); +- +- return spawnGroup == MobCategory.WATER_AMBIENT && holder.is(BiomeTags.REDUCED_WATER_AMBIENT_SPAWNS) && random.nextFloat() < 0.98F ? Optional.empty() : NaturalSpawner.mobsAt(world, structureAccessor, chunkGenerator, spawnGroup, pos, holder).getRandom(random); ++ Optional data = spawnGroup == MobCategory.WATER_AMBIENT && holder.is(BiomeTags.REDUCED_WATER_AMBIENT_SPAWNS) && random.nextFloat() < 0.98F ? Optional.empty() : NaturalSpawner.mobsAt(world, structureAccessor, chunkGenerator, spawnGroup, pos, holder).getRandom(random); ++ return data; + } + + private static boolean canSpawnMobAt(ServerLevel world, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, MobSpawnSettings.SpawnerData spawnEntry, BlockPos pos) { +@@ -395,6 +412,12 @@ public final class NaturalSpawner { + } + + private static WeightedRandomList mobsAt(ServerLevel world, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, BlockPos pos, @Nullable Holder biomeEntry) { ++ // Papyrus start ++ MobSpawnSettingsEvent event = new MobSpawnSettingsEvent(world, structureAccessor, chunkGenerator, spawnGroup, pos, biomeEntry); ++ event.callEvent(); ++ if (event.spawnerData != null) { ++ return event.spawnerData; ++ } + return NaturalSpawner.isInNetherFortressBounds(pos, world, spawnGroup, structureAccessor) ? NetherFortressStructure.FORTRESS_ENEMIES : chunkGenerator.getMobsAt(biomeEntry != null ? biomeEntry : world.getBiome(pos), structureAccessor, spawnGroup, pos); + } + +diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java +index 45704653310efe9cb755a644674b54b8722c2c84..ec4add442b8d3608f66df37c2e9bd4a5539d8d3e 100644 +--- a/src/main/java/net/minecraft/world/level/block/Block.java ++++ b/src/main/java/net/minecraft/world/level/block/Block.java +@@ -295,7 +295,7 @@ public class Block extends BlockBehaviour implements ItemLike { + public static List getDrops(BlockState state, ServerLevel world, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity entity, ItemStack stack) { + LootParams.Builder lootparams_a = (new LootParams.Builder(world)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(pos)).withParameter(LootContextParams.TOOL, stack).withOptionalParameter(LootContextParams.THIS_ENTITY, entity).withOptionalParameter(LootContextParams.BLOCK_ENTITY, blockEntity); + +- return state.getDrops(lootparams_a); ++ return state. getDrops(lootparams_a); + } + + public static void dropResources(BlockState state, Level world, BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -index a541dc3a6e373b30fff0abf5305e77854c190f10..a189b27a9f7baf0a79014c1624b152751e82d2c9 100644 +index 1d82cfe7af0dc42f88901fb0c44896771fdf8a93..55d41fff605fac1a6eb34e2e96ab0ae5f62b0fb6 100644 --- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -@@ -110,6 +110,7 @@ public class NoteBlock extends Block { +@@ -111,11 +111,13 @@ public class NoteBlock extends Block { @Override - public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { -+ if (true) return InteractionResult.PASS; // Papyrus - allow block placing - ItemStack itemstack = player.getItemInHand(hand); + protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { ++ if (true) return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; // Papyrus - allow block placing + return stack.is(ItemTags.NOTE_BLOCK_TOP_INSTRUMENTS) && hit.getDirection() == Direction.UP ? ItemInteractionResult.SKIP_DEFAULT_BLOCK_INTERACTION : super.useItemOn(stack, state, world, pos, player, hand, hit); + } - if (itemstack.is(ItemTags.NOTE_BLOCK_TOP_INSTRUMENTS) && hit.getDirection() == Direction.UP) { -@@ -127,6 +128,7 @@ public class NoteBlock extends Block { + @Override + protected InteractionResult useWithoutItem(BlockState state, Level world, BlockPos pos, Player player, BlockHitResult hit) { ++ if (true) return InteractionResult.PASS; // Papyrus - allow block placing + if (world.isClientSide) { + return InteractionResult.SUCCESS; + } else { +@@ -129,6 +131,7 @@ public class NoteBlock extends Block { @Override - public void attack(BlockState state, Level world, BlockPos pos, Player player) { + protected void attack(BlockState state, Level world, BlockPos pos, Player player) { + if (true) return; // Papyrus - disable sound if (!world.isClientSide) { this.playNote(player, state, world, pos); player.awardStat(Stats.PLAY_NOTEBLOCK); -@@ -139,6 +141,7 @@ public class NoteBlock extends Block { +@@ -141,6 +144,7 @@ public class NoteBlock extends Block { @Override - public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { + protected boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { + if (true) return false; // Papyrus - disable sound NoteBlockInstrument blockpropertyinstrument = (NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT); // Paper start - move NotePlayEvent call to fix instrument/note changes org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, blockpropertyinstrument, state.getValue(NOTE)); +diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +index 8ab7ca373a885fbe658013c9c6a2e38d32d77bb2..052196cc3c9631d4c769213dc4c92bc83775e527 100644 +--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java ++++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +@@ -35,6 +35,10 @@ public class PlayerDataStorage { + } + + public void save(Player player) { ++ this.save(player, 0); ++ } ++ ++ public void save(Player player, int profileID) { + if (org.spigotmc.SpigotConfig.disablePlayerDataSaving) return; // Spigot + try { + CompoundTag nbttagcompound = player.saveWithoutId(new CompoundTag()); +@@ -71,14 +75,14 @@ public class PlayerDataStorage { + } + + // CraftBukkit start +- private Optional load(String name, String s1, String s) { // name, uuid, extension ++ private Optional load(String name, String s1, int profileID, String s) { // name, uuid, extension + // CraftBukkit end + File file = this.playerDir; + // String s1 = entityhuman.getStringUUID(); // CraftBukkit - used above +- File file1 = new File(file, s1 + s); ++ File file1 = new File(this.playerDir + "/" + s1, profileID + s); + // Spigot Start + boolean usingWrongFile = false; +- if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first ++ /*if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first + { + file1 = new File( file, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + name ).getBytes( java.nio.charset.StandardCharsets.UTF_8 ) ).toString() + s ); + if ( file1.exists() ) +@@ -86,7 +90,7 @@ public class PlayerDataStorage { + usingWrongFile = true; + org.bukkit.Bukkit.getServer().getLogger().warning( "Using offline mode UUID file for player " + name + " as it is the only copy we can find." ); + } +- } ++ }*/ // Papyrus - We dont need this + // Spigot End + + if (file1.exists() && file1.isFile()) { +@@ -108,12 +112,16 @@ public class PlayerDataStorage { + } + + public Optional load(Player player) { ++ return this.load(player, 0); ++ } ++ ++ public Optional load(Player player, int profileID) { + // CraftBukkit start +- return this.load(player.getName().getString(), player.getStringUUID()).map((nbttagcompound) -> { ++ return this.load(player.getName().getString(), player.getStringUUID(), profileID).map((nbttagcompound) -> { + if (player instanceof ServerPlayer) { + CraftPlayer player1 = (CraftPlayer) player.getBukkitEntity(); + // Only update first played if it is older than the one we have +- long modified = new File(this.playerDir, player.getStringUUID() + ".dat").lastModified(); ++ long modified = new File(this.playerDir + "/" + player.getStringUUID(), profileID + ".dat").lastModified(); + if (modified < player1.getFirstPlayed()) { + player1.setFirstPlayed(modified); + } +@@ -124,16 +132,16 @@ public class PlayerDataStorage { + }); + } + +- public Optional load(String name, String uuid) { ++ public Optional load(String name, String uuid, int profileID) { + // CraftBukkit end +- Optional optional = this.load(name, uuid, ".dat"); // CraftBukkit ++ Optional optional = this.load(name, uuid, profileID, ".dat"); // CraftBukkit + + if (optional.isEmpty()) { + this.backup(name, uuid, ".dat"); // CraftBukkit + } + + return optional.or(() -> { +- return this.load(name, uuid, ".dat_old"); // CraftBukkit ++ return this.load(name, uuid, profileID, ".dat_old"); // CraftBukkit + }).map((nbttagcompound) -> { + int i = NbtUtils.getDataVersion(nbttagcompound, -1); + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +index 9d93130f23addb18b97d7f5ec013faef17a74529..3d2d46facbad1731b68ee91288062bfd587fe633 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +@@ -207,7 +207,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa + } + + private CompoundTag getData() { +- return this.storage.load(this.profile.getName(), this.profile.getId().toString()).orElse(null); ++ return this.storage.load(this.profile.getName(), this.profile.getId().toString(), 0).orElse(null); + } + + private CompoundTag getBukkitData() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d122cb85aa720244a2bc1f62f5e2bb1c086ea237..8e452d1f008592325a79e2ab5c72fb5cee9f64c5 100644 +index dab7ddf04b8609d75fc06f6cf12c2cde3fdbd7e9..9cd8c5e54879d77c057b7b1e11a788555f4bba99 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -14,6 +14,7 @@ import com.mojang.brigadier.tree.CommandNode; - import com.mojang.brigadier.tree.LiteralCommandNode; +@@ -13,6 +13,7 @@ import com.mojang.brigadier.StringReader; + import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.serialization.Dynamic; import com.mojang.serialization.Lifecycle; +import de.erethon.spellbook.api.SpellbookAPI; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; -@@ -378,6 +379,9 @@ public final class CraftServer implements Server { +@@ -381,6 +382,9 @@ public final class CraftServer implements Server { } // Paper end - Folia reagion threading API @@ -1781,44 +1852,41 @@ index d122cb85aa720244a2bc1f62f5e2bb1c086ea237..8e452d1f008592325a79e2ab5c72fb5c static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); ConfigurationSerialization.registerClass(CraftPlayerProfile.class); -@@ -465,7 +469,14 @@ public final class CraftServer implements Server { - MapPalette.setMapColorCache(new CraftMapColorCache(this.logger)); +@@ -475,6 +479,12 @@ public final class CraftServer implements Server { } + this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper -+ spellbookAPI = new SpellbookAPI(this); // Papyrus start - Spellbook ++ spellbookAPI = new SpellbookAPI(this); + } + + @Override + public SpellbookAPI getSpellbookAPI() { + return spellbookAPI; } -+ // Papyrus end public boolean getCommandBlockOverride(String command) { - return this.overrideAllCommandBlockCommands || this.commandsConfiguration.getStringList("command-block-overrides").contains(command); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java -index 236f94348ff8da661e23e3e17b7fc1b143680da9..a4bd242fb12b51f62c2e063fc5f7ea976fecc8ff 100644 +index 591af9d0d2fdc9953415979fc97a4a00afd85885..bb30b426a84a82f309d3fb436b8df71e12bd389b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java -@@ -1,5 +1,8 @@ +@@ -1,5 +1,7 @@ package org.bukkit.craftbukkit.entity; -+import de.erethon.papyrus.CraftDamageType; -+import de.erethon.papyrus.PDamageType; ++import de.erethon.papyrus.CraftPDamageType; +import de.erethon.papyrus.PDamageType; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Projectile; -@@ -79,4 +82,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti +@@ -79,4 +81,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti return this.getHandle().ownerUUID; } // Paper end - More projectile API + public void setDamageType(PDamageType type) { -+ ((net.minecraft.world.entity.projectile.Projectile) getHandle()).damageType = CraftDamageType.ofAPI(type); ++ ((net.minecraft.world.entity.projectile.Projectile) getHandle()).damageType = CraftPDamageType.ofAPI(type); + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java -index cc4194ac9d7501b5d15655674dade14d59cb6733..9a5dcd83c02b1068bf0e798f9325c58ce2efc253 100644 +index 33ae03b78b01c005a291a343b42507fb539e81a6..e0b798cebcfbd70ef3692de1ec1fdb4f8435a3b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java @@ -1,5 +1,7 @@ @@ -1852,7 +1920,7 @@ index cc4194ac9d7501b5d15655674dade14d59cb6733..9a5dcd83c02b1068bf0e798f9325c58c public double getHealth() { return this.getParent().getHealth(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index f1e4dfd203d455ec089cd2b5679c4083400dbc7f..424bdbed51407fdc74b7c3c2d9c15632cdfc31ca 100644 +index d2bb0831394c03b620b2cbd8306cb82b621f34f7..94ce41b96bc2ed6bbe4a78c8e16ab27046d58e01 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -3,12 +3,16 @@ package org.bukkit.craftbukkit.entity; @@ -1868,7 +1936,7 @@ index f1e4dfd203d455ec089cd2b5679c4083400dbc7f..424bdbed51407fdc74b7c3c2d9c15632 + +import java.util.*; + -+import de.erethon.papyrus.CraftDamageType; ++import de.erethon.papyrus.CraftPDamageType; +import de.erethon.papyrus.PDamageType; +import de.erethon.spellbook.api.SpellData; +import de.erethon.spellbook.api.SpellEffect; @@ -1900,19 +1968,19 @@ index f1e4dfd203d455ec089cd2b5679c4083400dbc7f..424bdbed51407fdc74b7c3c2d9c15632 public CraftLivingEntity(final CraftServer server, final net.minecraft.world.entity.LivingEntity entity) { super(server, entity); -@@ -390,6 +409,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -413,6 +432,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.damage(amount, this.getHandle().damageSources().generic()); } + @Override + public void damage(double amount, PDamageType type) { -+ entity.hurt(entity.damageSources().generic(), (float) amount, CraftDamageType.ofAPI(type)); ++ entity.hurt(entity.damageSources().generic(), (float) amount, CraftPDamageType.ofAPI(type)); + } + @Override public void damage(double amount, org.bukkit.entity.Entity source) { DamageSource reason = this.getHandle().damageSources().generic(); -@@ -417,6 +441,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -440,6 +464,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.entity.hurt(damageSource, (float) amount); } @@ -1925,21 +1993,16 @@ index f1e4dfd203d455ec089cd2b5679c4083400dbc7f..424bdbed51407fdc74b7c3c2d9c15632 + } else if (source instanceof LivingEntity) { + reason = this.getHandle().damageSources().mobAttack(((CraftLivingEntity) source).getHandle()); + } -+ entity.hurt(reason, (float) amount, CraftDamageType.ofAPI(type)); ++ entity.hurt(reason, (float) amount, CraftPDamageType.ofAPI(type)); + } + @Override public Location getEyeLocation() { Location loc = this.getLocation(); -@@ -1154,6 +1190,99 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - public void knockback(double strength, double directionX, double directionZ) { - Preconditions.checkArgument(strength > 0, "Knockback strength must be > 0"); - getHandle().knockback(strength, directionX, directionZ); -- }; -- // Paper end -+ } -+ -+ +@@ -1189,4 +1225,96 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + return this.getHandle().canUseSlot(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot)); + } + // Paper end - Expose canUseSlot + // Papyrus start - Spellbook + @Override + public void sendParsedActionBar(String text) { @@ -1962,8 +2025,8 @@ index f1e4dfd203d455ec089cd2b5679c4083400dbc7f..424bdbed51407fdc74b7c3c2d9c15632 + + @Override + public Set getEffects() { -+ return effects; -+ } ++ return effects; ++ } + + @Override + public Set getPassiveSpells() { @@ -1972,12 +2035,12 @@ index f1e4dfd203d455ec089cd2b5679c4083400dbc7f..424bdbed51407fdc74b7c3c2d9c15632 + + @Override + public Set getActiveSpells() { -+ return activeSpells; ++ return activeSpells; + } + + @Override + public Set getUnlockedSpells() { -+ return unlockedSpellData; ++ return unlockedSpellData; + } + + @Override @@ -2034,171 +2097,10 @@ index f1e4dfd203d455ec089cd2b5679c4083400dbc7f..424bdbed51407fdc74b7c3c2d9c15632 + // Papyrus end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e6f84caea6bb446ec28049e31f43106561fa3979..2e26ed2faed5851812d0e1f6216ddf38cc596aa9 100644 +index 972f935699bdda6af68f7a2664dbf5d19be2254c..786ce5cc472908e803f76385cc49d90113449c97 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -8,30 +8,7 @@ import com.mojang.authlib.GameProfile; - import com.mojang.datafixers.util.Pair; - import it.unimi.dsi.fastutil.shorts.ShortArraySet; - import it.unimi.dsi.fastutil.shorts.ShortSet; --import java.io.ByteArrayOutputStream; --import java.io.IOException; --import java.lang.ref.WeakReference; --import java.net.InetAddress; --import java.net.InetSocketAddress; --import java.net.SocketAddress; --import java.nio.charset.StandardCharsets; --import java.time.Duration; --import java.time.Instant; --import java.util.ArrayList; --import java.util.Collection; --import java.util.Date; --import java.util.HashMap; --import java.util.HashSet; --import java.util.LinkedHashMap; --import java.util.List; --import java.util.Map; --import java.util.Optional; --import java.util.Set; --import java.util.UUID; --import java.util.WeakHashMap; --import java.util.logging.Level; --import java.util.logging.Logger; --import javax.annotation.Nullable; -+import net.md_5.bungee.api.chat.BaseComponent; - import net.minecraft.advancements.AdvancementProgress; - import net.minecraft.core.BlockPos; - import net.minecraft.core.Holder; -@@ -44,37 +21,7 @@ import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket; - import net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket; - import net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket; - import net.minecraft.network.protocol.common.custom.CustomPacketPayload; --import net.minecraft.network.protocol.game.ClientboundBlockDestructionPacket; --import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket; --import net.minecraft.network.protocol.game.ClientboundClearTitlesPacket; --import net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket; --import net.minecraft.network.protocol.game.ClientboundGameEventPacket; --import net.minecraft.network.protocol.game.ClientboundHurtAnimationPacket; --import net.minecraft.network.protocol.game.ClientboundLevelEventPacket; --import net.minecraft.network.protocol.game.ClientboundLevelParticlesPacket; --import net.minecraft.network.protocol.game.ClientboundMapItemDataPacket; --import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket; --import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket; --import net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket; --import net.minecraft.network.protocol.game.ClientboundSectionBlocksUpdatePacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderCenterPacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderLerpSizePacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDelayPacket; --import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePacket; --import net.minecraft.network.protocol.game.ClientboundSetDefaultSpawnPositionPacket; --import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; --import net.minecraft.network.protocol.game.ClientboundSetExperiencePacket; --import net.minecraft.network.protocol.game.ClientboundSetHealthPacket; --import net.minecraft.network.protocol.game.ClientboundSetSubtitleTextPacket; --import net.minecraft.network.protocol.game.ClientboundSetTitleTextPacket; --import net.minecraft.network.protocol.game.ClientboundSetTitlesAnimationPacket; --import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket; --import net.minecraft.network.protocol.game.ClientboundSoundPacket; --import net.minecraft.network.protocol.game.ClientboundStopSoundPacket; --import net.minecraft.network.protocol.game.ClientboundTabListPacket; --import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket; --import net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket; -+import net.minecraft.network.protocol.game.*; - import net.minecraft.resources.ResourceLocation; - import net.minecraft.server.PlayerAdvancements; - import net.minecraft.server.level.ChunkMap; -@@ -97,23 +44,7 @@ import net.minecraft.world.level.border.BorderChangeListener; - import net.minecraft.world.level.saveddata.maps.MapDecoration; - import net.minecraft.world.level.saveddata.maps.MapItemSavedData; - import net.minecraft.world.phys.Vec3; --import org.bukkit.BanEntry; --import org.bukkit.BanList; --import org.bukkit.Bukkit; --import org.bukkit.DyeColor; --import org.bukkit.Effect; --import org.bukkit.GameMode; --import org.bukkit.Instrument; --import org.bukkit.Location; --import org.bukkit.Material; --import org.bukkit.NamespacedKey; --import org.bukkit.Note; --import org.bukkit.OfflinePlayer; --import org.bukkit.Particle; --import org.bukkit.Sound; --import org.bukkit.Statistic; --import org.bukkit.WeatherType; --import org.bukkit.WorldBorder; -+import org.bukkit.*; - import org.bukkit.ban.IpBanList; - import org.bukkit.ban.ProfileBanList; - import org.bukkit.block.Block; -@@ -126,15 +57,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; - import org.bukkit.conversations.Conversation; - import org.bukkit.conversations.ConversationAbandonedEvent; - import org.bukkit.conversations.ManuallyAbandonedConversationCanceller; --import org.bukkit.craftbukkit.CraftEffect; --import org.bukkit.craftbukkit.CraftEquipmentSlot; --import org.bukkit.craftbukkit.CraftOfflinePlayer; --import org.bukkit.craftbukkit.CraftParticle; --import org.bukkit.craftbukkit.CraftServer; --import org.bukkit.craftbukkit.CraftSound; --import org.bukkit.craftbukkit.CraftStatistic; --import org.bukkit.craftbukkit.CraftWorld; --import org.bukkit.craftbukkit.CraftWorldBorder; -+import org.bukkit.craftbukkit.*; - import org.bukkit.craftbukkit.advancement.CraftAdvancement; - import org.bukkit.craftbukkit.advancement.CraftAdvancementProgress; - import org.bukkit.craftbukkit.block.CraftBlockEntityState; -@@ -148,7 +71,6 @@ import org.bukkit.craftbukkit.map.CraftMapView; - import org.bukkit.craftbukkit.map.RenderData; - import org.bukkit.craftbukkit.potion.CraftPotionEffectType; - import org.bukkit.craftbukkit.potion.CraftPotionUtil; --import org.bukkit.craftbukkit.profile.CraftPlayerProfile; - import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; - import org.bukkit.craftbukkit.util.CraftChatMessage; - import org.bukkit.craftbukkit.util.CraftLocation; -@@ -157,13 +79,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; - import org.bukkit.entity.EntityType; - import org.bukkit.entity.LivingEntity; - import org.bukkit.entity.Player; --import org.bukkit.event.player.PlayerExpCooldownChangeEvent; --import org.bukkit.event.player.PlayerHideEntityEvent; --import org.bukkit.event.player.PlayerRegisterChannelEvent; --import org.bukkit.event.player.PlayerShowEntityEvent; --import org.bukkit.event.player.PlayerSpawnChangeEvent; --import org.bukkit.event.player.PlayerTeleportEvent; --import org.bukkit.event.player.PlayerUnregisterChannelEvent; -+import org.bukkit.event.player.*; - import org.bukkit.inventory.EquipmentSlot; - import org.bukkit.inventory.InventoryView.Property; - import org.bukkit.inventory.ItemStack; -@@ -174,11 +90,22 @@ import org.bukkit.plugin.Plugin; - import org.bukkit.plugin.messaging.StandardMessenger; - import org.bukkit.potion.PotionEffect; - import org.bukkit.potion.PotionEffectType; --import org.bukkit.profile.PlayerProfile; - import org.bukkit.scoreboard.Scoreboard; - import org.jetbrains.annotations.NotNull; - --import net.md_5.bungee.api.chat.BaseComponent; // Spigot -+import javax.annotation.Nullable; -+import java.io.ByteArrayOutputStream; -+import java.io.IOException; -+import java.lang.ref.WeakReference; -+import java.net.InetAddress; -+import java.net.InetSocketAddress; -+import java.net.SocketAddress; -+import java.nio.charset.StandardCharsets; -+import java.time.Duration; -+import java.time.Instant; -+import java.util.*; -+import java.util.logging.Level; -+import java.util.logging.Logger; - - @DelegateDeserialization(CraftOfflinePlayer.class) - public class CraftPlayer extends CraftHumanEntity implements Player { -@@ -339,14 +266,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -428,14 +428,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().connection.send(packet); } @@ -2213,7 +2115,7 @@ index e6f84caea6bb446ec28049e31f43106561fa3979..2e26ed2faed5851812d0e1f6216ddf38 @Deprecated public void sendActionBar(char alternateChar, String message) { if (message == null || message.isEmpty()) return; -@@ -1431,7 +1356,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1532,7 +1530,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void saveData() { @@ -2223,13 +2125,13 @@ index e6f84caea6bb446ec28049e31f43106561fa3979..2e26ed2faed5851812d0e1f6216ddf38 @Deprecated diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java -index 4f1fa7dec78970bdfc184d3c1f1632dc9d75a574..2bcddcda67c99335ef9668c7c43e460b6e113cd3 100644 +index 4f1fa7dec78970bdfc184d3c1f1632dc9d75a574..60d462ba77a08f1f0aac1e58437d593c5fa1558e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java @@ -1,5 +1,7 @@ package org.bukkit.craftbukkit.entity; -+import de.erethon.papyrus.CraftDamageType; ++import de.erethon.papyrus.CraftPDamageType; +import de.erethon.papyrus.PDamageType; import net.minecraft.world.entity.LivingEntity; import org.bukkit.craftbukkit.CraftServer; @@ -2241,11 +2143,11 @@ index 4f1fa7dec78970bdfc184d3c1f1632dc9d75a574..2bcddcda67c99335ef9668c7c43e460b + + @Override + public void setDamageType(PDamageType type) { -+ getHandle().damageType = CraftDamageType.ofAPI(type); ++ getHandle().damageType = CraftPDamageType.ofAPI(type); + } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d677759ac6b6d3cfe5a2af76dc1f0034b216ac2d..163f74a4fd6b7fcc8c9abc9c3da1949911b306a7 100644 +index bd6fee3e3ad9116802ff8bb57bfa741b881c4057..223eac899ec9db777a39e6108f228dcd7ef34e2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -15,6 +15,8 @@ import java.util.Map; @@ -2257,7 +2159,7 @@ index d677759ac6b6d3cfe5a2af76dc1f0034b216ac2d..163f74a4fd6b7fcc8c9abc9c3da19499 import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.protocol.game.ServerboundContainerClosePacket; -@@ -1181,9 +1183,9 @@ public class CraftEventFactory { +@@ -1183,9 +1185,9 @@ public class CraftEventFactory { private static EntityDamageEvent callEntityDamageEvent(Entity damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map modifiers, Map> modifierFunctions, boolean cancelled, boolean critical) { // Paper - add critical damage API EntityDamageEvent event; if (damager != null) { diff --git a/patches/server/removed/0005-Hephaestus.patch b/patches/server/removed/0005-Hephaestus.patch deleted file mode 100644 index 429d466..0000000 --- a/patches/server/removed/0005-Hephaestus.patch +++ /dev/null @@ -1,1653 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Malfrador -Date: Fri, 12 Jan 2024 13:22:05 +0100 -Subject: [PATCH] Hephaestus - - -diff --git a/src/main/java/de/erethon/hephaestus/HBukkitHandler.java b/src/main/java/de/erethon/hephaestus/HBukkitHandler.java -new file mode 100644 -index 0000000000000000000000000000000000000000..b30d9ecee3736c1311893bde357b9dc0a2a485b8 ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/HBukkitHandler.java -@@ -0,0 +1,189 @@ -+package de.erethon.hephaestus; -+ -+import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent; -+import de.erethon.spellbook.api.SpellCastEvent; -+import org.bukkit.Bukkit; -+import org.bukkit.Material; -+import org.bukkit.craftbukkit.inventory.CraftItemStack; -+import org.bukkit.entity.Item; -+import org.bukkit.entity.LivingEntity; -+import org.bukkit.entity.Player; -+import org.bukkit.event.EventHandler; -+import org.bukkit.event.Listener; -+import org.bukkit.event.block.BlockDropItemEvent; -+import org.bukkit.event.entity.EntityDamageByEntityEvent; -+import org.bukkit.event.entity.EntityDropItemEvent; -+import org.bukkit.event.entity.EntityPickupItemEvent; -+import org.bukkit.event.inventory.InventoryClickEvent; -+import org.bukkit.event.player.PlayerAttemptPickupItemEvent; -+import org.bukkit.event.player.PlayerDropItemEvent; -+import org.bukkit.event.player.PlayerInteractEvent; -+import org.bukkit.event.server.ServerLoadEvent; -+import org.bukkit.inventory.ItemStack; -+import org.bukkit.plugin.Plugin; -+import org.bukkit.plugin.java.JavaPlugin; -+ -+import static net.minecraft.server.MinecraftServer.LOGGER; -+ -+public class HBukkitHandler implements Listener { -+ -+ private final Plugin plugin; -+ private final ItemLibrary lib; -+ -+ public HBukkitHandler(JavaPlugin pl, ItemLibrary library) { -+ this.lib = library; -+ this.plugin = pl; -+ Bukkit.getPluginManager().registerEvents(this, plugin); -+ LOGGER.info("Initialised HBukkitHandler using " + plugin.getName()); -+ } -+ -+ @EventHandler -+ private void onInvClick(InventoryClickEvent event) { -+ if (event.getCurrentItem() == null) { -+ return; -+ } -+ HItemStack item = ItemLibrary.getHItemFromBukkit(event.getCurrentItem()); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onInventoryClick(CraftItemStack.unwrap(event.getCurrentItem()), (Player) event.getWhoClicked(), event.getClick(), event.getAction(), event); -+ } -+ } -+ -+ @EventHandler -+ private void onDamage(EntityDamageByEntityEvent event) { -+ if (event.getEntity() instanceof LivingEntity living && living.getEquipment() != null) { -+ ItemStack mainHand = living.getEquipment().getItemInMainHand(); -+ HItemStack item = ItemLibrary.getHItemFromBukkit(mainHand); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onDamaged(CraftItemStack.unwrap(mainHand), living, event); -+ } -+ ItemStack offHand = living.getEquipment().getItemInOffHand(); -+ item = ItemLibrary.getHItemFromBukkit(mainHand); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onDamaged(CraftItemStack.unwrap(offHand), living, event); -+ } -+ for (ItemStack armor : living.getEquipment().getArmorContents()) { -+ if (armor == null) { -+ continue; -+ } -+ item = ItemLibrary.getHItemFromBukkit(armor); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onDamaged(CraftItemStack.unwrap(armor), living, event); -+ } -+ } -+ } -+ } -+ -+ @EventHandler -+ private void onDamage(SpellCastEvent event) { -+ LivingEntity living = event.getCaster(); -+ if (living.getEquipment() != null) { -+ ItemStack mainHand = living.getEquipment().getItemInMainHand(); -+ HItemStack item = ItemLibrary.getHItemFromBukkit(mainHand); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onSpellCast(CraftItemStack.unwrap(mainHand), living, event); -+ } -+ ItemStack offHand = living.getEquipment().getItemInOffHand(); -+ item = ItemLibrary.getHItemFromBukkit(mainHand); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onSpellCast(CraftItemStack.unwrap(offHand), living, event); -+ } -+ for (ItemStack armor : living.getEquipment().getArmorContents()) { -+ if (armor == null) { -+ continue; -+ } -+ item = ItemLibrary.getHItemFromBukkit(armor); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onSpellCast(CraftItemStack.unwrap(armor), living, event); -+ } -+ } -+ } -+ } -+ -+ @EventHandler -+ private void onPlayerDrop(PlayerDropItemEvent event) { -+ ItemStack stack = event.getItemDrop().getItemStack(); -+ HItemStack item = ItemLibrary.getHItemFromBukkit(stack); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onPlayerDrop(CraftItemStack.unwrap(stack), event.getPlayer(), event); -+ } -+ } -+ -+ @EventHandler -+ private void onEntityDrop(EntityDropItemEvent event) { -+ ItemStack stack = event.getItemDrop().getItemStack(); -+ HItemStack item = ItemLibrary.getHItemFromBukkit(stack); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onEntityDrop(CraftItemStack.unwrap(stack), event.getEntity(), event); -+ } -+ } -+ -+ @EventHandler -+ private void onBlockDrop(BlockDropItemEvent event) { -+ for (Item stack : event.getItems()) { -+ HItemStack item = ItemLibrary.getHItemFromBukkit(stack.getItemStack()); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onBlockDrop(CraftItemStack.unwrap(stack.getItemStack()), event.getPlayer(), event); -+ } -+ } -+ } -+ -+ @EventHandler -+ private void onPickup(PlayerAttemptPickupItemEvent event) { -+ ItemStack stack = event.getItem().getItemStack(); -+ HItemStack item = ItemLibrary.getHItemFromBukkit(stack); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onPickup(CraftItemStack.unwrap(stack), event.getPlayer(), event); -+ } -+ } -+ -+ @EventHandler -+ private void onEntityPickup(EntityPickupItemEvent event) { -+ ItemStack stack = event.getItem().getItemStack(); -+ HItemStack item = ItemLibrary.getHItemFromBukkit(stack); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onEntityPickup(CraftItemStack.unwrap(stack), event.getEntity(), event); -+ } -+ } -+ -+ @EventHandler -+ private void onInteract(PlayerInteractEvent event) { -+ if (!event.hasItem()) { -+ return; -+ } -+ HItemStack item = ItemLibrary.getHItemFromBukkit(event.getItem()); -+ if (event.getAction().isRightClick()) { -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onRightClick(CraftItemStack.unwrap(event.getItem()), event.getPlayer(), event); -+ } -+ } -+ if (event.getAction().isLeftClick()) { -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onLeftClick(CraftItemStack.unwrap(event.getItem()), event.getPlayer(), event); -+ } -+ } -+ } -+ -+ @EventHandler -+ private void onEquip(PlayerArmorChangeEvent event) { -+ if (event.getNewItem() == event.getOldItem()) { -+ return; -+ } -+ ItemStack stack = event.getNewItem(); -+ HItemStack item = ItemLibrary.getHItemFromBukkit(stack); -+ if (item != null && item.getBehaviour() != null && stack.getType() != Material.AIR) { -+ item.getBehaviour().onEquip(CraftItemStack.unwrap(stack), event.getPlayer(), event); -+ return; -+ } -+ stack = event.getOldItem(); -+ item = ItemLibrary.getHItemFromBukkit(stack); -+ if (item != null && item.getBehaviour() != null) { -+ item.getBehaviour().onUnequip(CraftItemStack.unwrap(stack), event.getPlayer(), event); -+ } -+ } -+ -+ @EventHandler -+ private void onServerStartFinish(ServerLoadEvent event) { -+ lib.readyBehaviours(); -+ } -+ -+} -diff --git a/src/main/java/de/erethon/hephaestus/HItem.java b/src/main/java/de/erethon/hephaestus/HItem.java -new file mode 100644 -index 0000000000000000000000000000000000000000..62cc2fc771aec42e9203e831d5a30e5da8b9c206 ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/HItem.java -@@ -0,0 +1,280 @@ -+package de.erethon.hephaestus; -+ -+import io.papermc.paper.adventure.PaperAdventure; -+import net.kyori.adventure.text.Component; -+import net.kyori.adventure.text.minimessage.MiniMessage; -+import net.minecraft.core.registries.BuiltInRegistries; -+import net.minecraft.resources.ResourceLocation; -+import net.minecraft.server.Main; -+import net.minecraft.world.entity.EquipmentSlot; -+import net.minecraft.world.entity.ai.attributes.AttributeModifier; -+import net.minecraft.world.item.Item; -+import net.minecraft.world.item.ItemStack; -+import org.bukkit.Bukkit; -+import org.bukkit.Material; -+import org.bukkit.configuration.InvalidConfigurationException; -+import org.bukkit.configuration.file.YamlConfiguration; -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.plugin.Plugin; -+import org.checkerframework.checker.nullness.qual.Nullable; -+import org.jetbrains.annotations.NotNull; -+ -+import java.io.File; -+import java.io.IOException; -+import java.lang.reflect.InvocationTargetException; -+import java.util.List; -+import java.util.Map; -+import java.util.logging.Level; -+ -+import static net.minecraft.server.MinecraftServer.LOGGER; -+ -+public class HItem extends YamlConfiguration { -+ -+ private final MiniMessage mm = MiniMessage.miniMessage(); -+ -+ private ResourceLocation id; -+ private Item baseItem; -+ private HItemBehaviour behaviour; -+ private Component displayName; -+ private List lore; -+ private String mojangID; -+ private int modelData; -+ private Map modifierMap; -+ private int maxStackSize; -+ private int maxDurability; -+ private String classURL; -+ private boolean hasBehaviour = false; -+ private String pluginName; -+ private Plugin plugin; -+ private Class behaviourClass; -+ private ClassLoader classLoader; -+ -+ private boolean isEnabled = true; -+ private HItemStack replaceWith = null; -+ -+ public HItem(Plugin plugin) { -+ } -+ -+ public HItem(File file) { -+ super(); -+ try { -+ load(file); -+ } catch (IOException | InvalidConfigurationException e) { -+ Bukkit.getLogger().log(Level.WARNING, "[Hephaestus] Failed to load " + file.getName()); -+ Bukkit.getLogger().log(Level.WARNING, e.getMessage()); -+ throw new RuntimeException(e); -+ } -+ } -+ -+ public ResourceLocation getId() { -+ return id; -+ } -+ -+ public void setId(ResourceLocation location) { -+ this.id = location; -+ } -+ -+ public Component getDisplayName() { -+ return displayName; -+ } -+ -+ public List getLore() { -+ return lore; -+ } -+ -+ public String getMojangID() { -+ return mojangID; -+ } -+ -+ public void setMojangID(String mojangID) { -+ this.mojangID = mojangID; -+ } -+ -+ public Item getBaseItem() { -+ return baseItem; -+ } -+ -+ public void setClassURL(String url) { -+ this.classURL = url; -+ } -+ -+ public int getModelData() { -+ return modelData; -+ } -+ -+ public Map getModifierMap() { -+ return modifierMap; -+ } -+ -+ public int getMaxStackSize() { -+ return maxStackSize; -+ } -+ -+ public int getMaxDurability() { -+ return maxDurability; -+ } -+ -+ public boolean isEnabled() { -+ return isEnabled; -+ } -+ -+ public HItemStack getReplaceWith() { -+ return replaceWith; -+ } -+ -+ public @Nullable String getClassURL() { -+ return classURL; -+ } -+ -+ public String getOwningPlugin() { -+ return pluginName; -+ } -+ -+ public void setOwningPlugin(String name) { -+ pluginName = name; -+ } -+ -+ public boolean hasBehaviour() { -+ return hasBehaviour; -+ } -+ -+ public HItemBehaviour getBehaviour() { -+ return behaviour; -+ } -+ -+ public void setBehaviour(HItemBehaviour behaviour) { -+ this.behaviour = behaviour; -+ } -+ -+ public void setPlugin(Plugin plugin) { -+ this.plugin = plugin; -+ } -+ -+ public HItemStack getItem() { -+ return getItem(1); -+ } -+ -+ public HItemStack getItem(int count) { -+ HItemStack item = prepareNewStack().hItemStack; -+ item.getStack().setCount(count); -+ return item; -+ } -+ -+ private ItemStack prepareNewStack() { -+ ItemStack baseItem = new ItemStack(BuiltInRegistries.ITEM.get(new ResourceLocation(getMojangID()))); -+ for (EquipmentSlot slot : EquipmentSlot.values()) { -+ // baseItem.getAttributeModifiers(slot).clear(); this is immutable apparently -+ } -+ baseItem.hItemStack = new HItemStack(baseItem, this); -+ baseItem.getOrCreateTag().putInt("CustomModelData", getModelData()); -+ baseItem.getOrCreateTag().putString("HephaestusID", id.toString()); -+ baseItem.setHoverName(PaperAdventure.asVanilla(displayName)); -+ baseItem.getBukkitStack().editMeta(m -> m.lore(lore)); // Annoying but oh well. -+ return baseItem; -+ } -+ -+ public void loadBehaviour() { -+ if (plugin == null) { -+ plugin = Bukkit.getPluginManager().getPlugin(pluginName); -+ if (plugin == null) { -+ LOGGER.info("Failed to find plugin " + pluginName + " for item " + id.toString()); -+ } -+ } -+ classLoader = plugin.getClass().getClassLoader(); -+ try { -+ behaviourClass = ((Class) Class.forName(getClassURL(), true, classLoader)); -+ } catch (ClassNotFoundException e) { -+ throw new RuntimeException(e); -+ } -+ try { -+ behaviour = behaviourClass.getDeclaredConstructor(HItem.class).newInstance(this); -+ } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { -+ throw new RuntimeException(e); -+ } -+ LOGGER.info("Loaded behaviour for " + id + ": " + behaviour.getClass().getName()); -+ hasBehaviour = true; -+ } -+ -+ @Override -+ public void load(@NotNull File file) throws IOException, InvalidConfigurationException { -+ super.load(file); -+ id = ResourceLocation.tryParse(getString("id", "minecraft:stone")); -+ if (contains("class")) { -+ classURL = getString("class"); -+ pluginName = getString("owningPlugin"); -+ hasBehaviour = true; -+ } -+ isEnabled = getBoolean("enabled", true); -+ displayName = mm.deserialize(getString("displayName", "")); -+ for (String string : getStringList("lore")) { -+ lore.add(mm.deserialize(string)); -+ } -+ mojangID = getString("mojangID", "minecraft:stone"); -+ baseItem = BuiltInRegistries.ITEM.get(new ResourceLocation(mojangID)); -+ modelData = getInt("modelData", 0); -+ maxStackSize = getInt("maxStackSize", 1); -+ maxDurability = getInt("maxDurability", 0); -+ if (contains("modifiers")) { -+ for (String slot : getConfigurationSection("modifiers").getKeys(false)) { -+ EquipmentSlot equipmentSlot = EquipmentSlot.byName(slot); -+ AttributeModifier modifier = new AttributeModifier( -+ getString("modifiers." + slot + ".name", "HephaestusModifier"), -+ getDouble("modifiers." + slot + ".amount", 0), -+ AttributeModifier.Operation.valueOf(getString("modifiers." + slot + ".operation", "ADD_NUMBER"))); -+ modifierMap.put(equipmentSlot, modifier); -+ } -+ } -+ } -+ -+ -+ public void save(File file) { -+ set("id", id.toString()); -+ set("owningPlugin", pluginName); -+ set("class", classURL); -+ set("enabled", isEnabled); -+ set("mojangID", mojangID); -+ try { -+ super.save(file); -+ } catch (IOException e) { -+ throw new RuntimeException(e); -+ } -+ } -+ -+ public static class Builder { -+ private final HItem item; -+ private final Plugin plugin; -+ private HItemBehaviour behaviour; -+ -+ public Builder(Plugin plugin, ResourceLocation location) { -+ this.item = new HItem(plugin); -+ this.plugin = plugin; -+ item.setId(location); -+ } -+ -+ public Builder behaviour(HItemBehaviour behaviour) { -+ this.behaviour = behaviour; -+ item.setClassURL(behaviour.getClass().getName()); -+ item.setOwningPlugin(plugin.getName()); -+ item.setPlugin(plugin); -+ return this; -+ } -+ public Builder baseItem(Material material) { -+ Item item1 = CraftMagicNumbers.getItem(material); -+ item.setMojangID(BuiltInRegistries.ITEM.getKey(item1).toString()); -+ return this; -+ } -+ -+ public HItem register() { -+ Main.itemLibrary.registerItem(plugin, item); -+ File folder = Main.itemLibrary.getFolder(); -+ File saveFolder = new File(folder, item.getId().getNamespace()); -+ if (!saveFolder.exists()) { -+ saveFolder.mkdirs(); -+ } -+ File saveFile = new File(saveFolder, item.getId().getPath() + ".yml"); -+ item.save(saveFile); -+ return item; -+ } -+ } -+ -+} -diff --git a/src/main/java/de/erethon/hephaestus/HItemBehaviour.java b/src/main/java/de/erethon/hephaestus/HItemBehaviour.java -new file mode 100644 -index 0000000000000000000000000000000000000000..f5c220a6142d60db52a9035c9c665641f02e2d82 ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/HItemBehaviour.java -@@ -0,0 +1,88 @@ -+package de.erethon.hephaestus; -+ -+import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent; -+import de.erethon.spellbook.api.SpellCastEvent; -+import net.minecraft.core.BlockPos; -+import net.minecraft.world.InteractionHand; -+import net.minecraft.world.InteractionResult; -+import net.minecraft.world.entity.LivingEntity; -+import net.minecraft.world.entity.player.Player; -+import net.minecraft.world.item.ItemStack; -+import net.minecraft.world.level.Level; -+import net.minecraft.world.level.block.state.BlockState; -+import org.bukkit.entity.Entity; -+import org.bukkit.event.block.BlockDropItemEvent; -+import org.bukkit.event.entity.EntityDamageByEntityEvent; -+import org.bukkit.event.entity.EntityDropItemEvent; -+import org.bukkit.event.entity.EntityPickupItemEvent; -+import org.bukkit.event.inventory.ClickType; -+import org.bukkit.event.inventory.InventoryAction; -+import org.bukkit.event.inventory.InventoryClickEvent; -+import org.bukkit.event.player.PlayerAttemptPickupItemEvent; -+import org.bukkit.event.player.PlayerDropItemEvent; -+import org.bukkit.event.player.PlayerInteractEvent; -+ -+public class HItemBehaviour { -+ -+ protected HItem item; -+ -+ public HItemBehaviour(HItem item) { -+ this.item = item; -+ } -+ -+ public void onLeftClick(ItemStack stack, org.bukkit.entity.Player player, PlayerInteractEvent event) { -+ } -+ -+ public void onRightClick(ItemStack stack, org.bukkit.entity.Player player, PlayerInteractEvent event) { -+ } -+ -+ public void onPlayerDrop(ItemStack stack, org.bukkit.entity.Player player, PlayerDropItemEvent event) { -+ } -+ -+ public void onEntityDrop(ItemStack stack, org.bukkit.entity.Entity entity, EntityDropItemEvent event) { -+ } -+ -+ public void onBlockDrop(ItemStack stack, org.bukkit.entity.Player player, BlockDropItemEvent event) { -+ } -+ -+ public void onPickup(ItemStack stack, org.bukkit.entity.Player player, PlayerAttemptPickupItemEvent event) { -+ } -+ -+ public void onEntityPickup(ItemStack stack, org.bukkit.entity.Entity entity, EntityPickupItemEvent event) { -+ } -+ -+ public void onEquip(ItemStack stack, org.bukkit.entity.Player player, PlayerArmorChangeEvent event) { -+ } -+ -+ public void onUnequip(ItemStack stack, org.bukkit.entity.Player player, PlayerArmorChangeEvent event) { -+ } -+ -+ public boolean onAttack(ItemStack stack, LivingEntity target, Player attacker) { -+ return true; -+ } -+ -+ public void onDamaged(ItemStack stack, org.bukkit.entity.LivingEntity damaged, EntityDamageByEntityEvent event) { -+ } -+ -+ public int onItemHurt(ItemStack stack, int amount) { -+ return amount; -+ } -+ -+ public boolean onMine(ItemStack stack, Level world, BlockState state, BlockPos pos, Player miner) { -+ return true; -+ } -+ -+ public InteractionResult onInteractLiving(ItemStack stack, Player player, LivingEntity living, InteractionHand hand) { -+ return stack.getItem().interactLivingEntity(stack, player, living, hand); -+ } -+ -+ public void onSpellCast(ItemStack stack, org.bukkit.entity.LivingEntity damaged, SpellCastEvent event) { -+ } -+ -+ public void onTick(ItemStack stack, Entity entity, int slot, boolean selected) { -+ } -+ -+ public void onInventoryClick(ItemStack stack, org.bukkit.entity.Player player, ClickType type, InventoryAction action, InventoryClickEvent event) { -+ } -+ -+} -diff --git a/src/main/java/de/erethon/hephaestus/HItemStack.java b/src/main/java/de/erethon/hephaestus/HItemStack.java -new file mode 100644 -index 0000000000000000000000000000000000000000..d62a4a41b88f38d808882d55640c480a40ee6189 ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/HItemStack.java -@@ -0,0 +1,80 @@ -+package de.erethon.hephaestus; -+ -+import net.minecraft.resources.ResourceLocation; -+import net.minecraft.world.item.ItemStack; -+ -+import java.util.ArrayList; -+import java.util.List; -+ -+import static net.minecraft.server.MinecraftServer.LOGGER; -+ -+public class HItemStack { -+ -+ private HItem item; -+ private ItemStack stack; -+ private int level = 0; -+ private HRarity rarity = HRarity.COMMON; -+ private List slotted = new ArrayList<>(); -+ -+ -+ public HItemStack(ItemStack stack, HItem config) { -+ this.stack = stack; -+ this.item = config; -+ } -+ -+ public HItemStack(ItemStack stack, HItem config, int level) { -+ this.stack = stack; -+ this.item = config; -+ this.level = level; -+ } -+ -+ public HItemStack(ItemStack stack, HItem config, int level, HRarity rarity) { -+ this.stack = stack; -+ this.item = config; -+ this.level = level; -+ this.rarity = rarity; -+ } -+ -+ public ResourceLocation getId() { -+ return item.getId(); -+ } -+ -+ public boolean needsUpdating(ItemStack stack) { -+ return !ItemStack.matches(stack, this.stack); -+ } -+ -+ public ItemStack getStack() { -+ return stack; -+ } -+ -+ public org.bukkit.inventory.ItemStack getBukkitStack() { -+ return stack.getBukkitStack(); -+ } -+ -+ public HItemBehaviour getBehaviour() { -+ return item.getBehaviour(); -+ } -+ -+ public HItem config() { -+ return item; -+ } -+ -+ public boolean isEnabled() { -+ return item.isEnabled(); -+ } -+ -+ public boolean isVanilla() { -+ return item.getId().getNamespace().equals("minecraft"); -+ } -+ -+ public HItemStack replaceWith() { -+ return item.getReplaceWith(); -+ } -+ -+ public void setStack(ItemStack stack) { -+ this.stack = stack; -+ } -+ -+ public void validate() { -+ } -+} -diff --git a/src/main/java/de/erethon/hephaestus/HRarity.java b/src/main/java/de/erethon/hephaestus/HRarity.java -new file mode 100644 -index 0000000000000000000000000000000000000000..524fae53d99642ca35837db8a7bbb34616058fa1 ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/HRarity.java -@@ -0,0 +1,20 @@ -+package de.erethon.hephaestus; -+ -+ -+import net.kyori.adventure.text.format.NamedTextColor; -+import net.kyori.adventure.text.format.TextColor; -+ -+public enum HRarity { -+ TRASH(NamedTextColor.GRAY), -+ COMMON(NamedTextColor.WHITE), -+ UNCOMMON(NamedTextColor.GREEN), -+ RARE(NamedTextColor.BLUE), -+ EPIC(NamedTextColor.DARK_PURPLE), -+ LEGENDARY(NamedTextColor.GOLD); -+ -+ private TextColor color; -+ -+ HRarity(TextColor color) { -+ this.color = color; -+ } -+} -diff --git a/src/main/java/de/erethon/hephaestus/ItemLibrary.java b/src/main/java/de/erethon/hephaestus/ItemLibrary.java -new file mode 100644 -index 0000000000000000000000000000000000000000..8ef09800709175c8844fb6979708e56be62d03fd ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/ItemLibrary.java -@@ -0,0 +1,171 @@ -+package de.erethon.hephaestus; -+ -+import de.erethon.spellbook.api.SpellLibrary; -+import net.minecraft.core.registries.BuiltInRegistries; -+import net.minecraft.resources.ResourceLocation; -+import net.minecraft.world.item.Item; -+import org.bukkit.Bukkit; -+import org.bukkit.Material; -+import org.bukkit.configuration.file.YamlConfiguration; -+import org.bukkit.craftbukkit.inventory.CraftItemStack; -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.inventory.ItemStack; -+import org.bukkit.plugin.Plugin; -+import org.bukkit.plugin.java.JavaPlugin; -+import org.jetbrains.annotations.Nullable; -+ -+import java.io.File; -+import java.io.IOException; -+import java.util.HashMap; -+import java.util.HashSet; -+import java.util.Set; -+import java.util.logging.Level; -+ -+import static net.minecraft.server.MinecraftServer.LOGGER; -+ -+public class ItemLibrary { -+ -+ private final File folder; -+ -+ private final HashMap items = new HashMap<>(); -+ private final HashMap vanillaMaterials = new HashMap<>(); -+ private final Set itemsWithBehaviour = new HashSet<>(); -+ private HBukkitHandler bukkitHandler = null; -+ -+ public ItemLibrary(File folder) { -+ this.folder = new File(folder + "/plugins/Hephaestus/items"); -+ if (!folder.exists()) { -+ folder.mkdirs(); -+ } -+ generateVanillaItemFiles(); -+ loadItems(); -+ } -+ -+ public boolean has(ResourceLocation key) { -+ return items.containsKey(key); -+ } -+ -+ @Nullable -+ public HItem get(ResourceLocation key) { -+ return items.get(key); -+ } -+ -+ @Nullable -+ public HItem get(Material material) { -+ return vanillaMaterials.get(material); -+ } -+ -+ @Nullable -+ public HItem get(ItemStack bukkitStack) { -+ CraftItemStack craftItemStack = (CraftItemStack) bukkitStack; -+ if (craftItemStack.handle.hItemStack == null) { -+ return null; -+ } -+ return craftItemStack.handle.hItemStack.config(); -+ } -+ -+ @Nullable -+ public HItem get(net.minecraft.world.item.ItemStack stack) { -+ return stack.hItemStack.config(); -+ } -+ -+ public boolean registerItem(Plugin plugin, HItem item) { -+ if (bukkitHandler == null) { // Use the first plugin we get to register the bukkit handler, because we need a Plugin for listeners. -+ bukkitHandler = new HBukkitHandler((JavaPlugin) plugin, this); -+ } -+ if (item.getId().getNamespace().equals("minecraft")) { -+ throw new RuntimeException(plugin.getName() + " tried registering a custom item in the vanilla namespace: " + item.getId().toString()); -+ } -+ if (items.containsKey(item.getId())) { -+ Bukkit.getLogger().log(Level.WARNING, "[Hephaestus] Item with ID " + item.getId() + " is already registered."); -+ return false; -+ } -+ item.setPlugin(plugin); -+ items.put(item.getId(), item); -+ return true; -+ } -+ -+ public boolean overrideVanillaBehaviour(Plugin plugin, HItem item) { -+ if (bukkitHandler == null) { -+ bukkitHandler = new HBukkitHandler((JavaPlugin) plugin, this); -+ } -+ item.setPlugin(plugin); -+ return true; -+ } -+ -+ -+ public boolean unregisterItem(HItem item) { -+ if (!items.containsKey(item.getId())) { -+ Bukkit.getLogger().log(Level.WARNING, "[Hephaestus] Item with ID " + item.getId() + " is not registered."); -+ return false; -+ } -+ if (item.getId().getNamespace().equals("minecraft")) { -+ throw new RuntimeException("Vanilla items can not be unregistered."); -+ } -+ items.remove(item.getId()); -+ return true; -+ } -+ -+ private void generateVanillaItemFiles() { -+ for (Item item : BuiltInRegistries.ITEM.stream().toList()) { -+ File vanillaFolder = new File(folder, "vanilla"); -+ if (!vanillaFolder.exists()) { -+ vanillaFolder.mkdirs(); -+ } -+ YamlConfiguration configuration = new YamlConfiguration(); -+ ResourceLocation location = BuiltInRegistries.ITEM.getKey(item); -+ configuration.set("id", location.toString()); -+ configuration.set("mojangID", location.toString()); -+ configuration.set("maxStackSize", item.getMaxStackSize()); -+ configuration.set("maxDurability", item.getMaxDamage()); -+ File file = new File(vanillaFolder, location.getPath() + ".yml"); -+ if (file.exists()) { -+ return; -+ } -+ try { -+ configuration.save(file); -+ } catch (IOException e) { -+ throw new RuntimeException(e); -+ } -+ } -+ } -+ -+ private void loadItems() { -+ for (File file : SpellLibrary.getFilesForFolder(folder)) { -+ if (!file.getName().contains(".yml")) { -+ continue; -+ } -+ HItem config = new HItem(file); -+ items.put(config.getId(), config); -+ vanillaMaterials.put(CraftMagicNumbers.getMaterial(config.getBaseItem()), config); -+ if (config.hasBehaviour()) { -+ itemsWithBehaviour.add(config); -+ } -+ } -+ LOGGER.info("[Hephaestus] Loaded " + items.keySet().size() + " items."); -+ } -+ -+ public File getFolder() { -+ return folder; -+ } -+ -+ public void readyBehaviours() { -+ for (HItem item : itemsWithBehaviour) { -+ item.loadBehaviour(); -+ } -+ } -+ -+ public void enableHandler(Plugin plugin) { -+ if (bukkitHandler == null) { // Use the first plugin we get to register the bukkit handler, because we need a Plugin for listeners. -+ bukkitHandler = new HBukkitHandler((JavaPlugin) plugin, this); -+ } -+ } -+ -+ public static @Nullable HItemStack getHItemFromBukkit(ItemStack stack) { -+ CraftItemStack craftItemStack = CraftItemStack.asCraftCopy(stack); -+ if (craftItemStack.handle == null) { // why in the fuck are there craft stacks that have no nms stack??? -+ return null; -+ } -+ return craftItemStack.handle.hItemStack; -+ } -+} -diff --git a/src/main/java/de/erethon/hephaestus/Slotable.java b/src/main/java/de/erethon/hephaestus/Slotable.java -new file mode 100644 -index 0000000000000000000000000000000000000000..1f9cad66d1e138f568825055509433b6c2dd903a ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/Slotable.java -@@ -0,0 +1,8 @@ -+package de.erethon.hephaestus; -+ -+import java.util.Set; -+ -+public class Slotable { -+ -+ -+} -diff --git a/src/main/java/de/erethon/hephaestus/events/MobSpawnEntityCreateEvent.java b/src/main/java/de/erethon/hephaestus/events/MobSpawnEntityCreateEvent.java -new file mode 100644 -index 0000000000000000000000000000000000000000..53d1624375afb11f487bad0b52166ebe899f97a2 ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/events/MobSpawnEntityCreateEvent.java -@@ -0,0 +1,46 @@ -+package de.erethon.hephaestus.events; -+ -+import net.minecraft.core.BlockPos; -+import net.minecraft.core.Holder; -+import net.minecraft.server.level.ServerLevel; -+import net.minecraft.world.entity.EntityType; -+import net.minecraft.world.entity.Mob; -+import net.minecraft.world.entity.SpawnGroupData; -+import net.minecraft.world.entity.player.Player; -+import net.minecraft.world.level.biome.Biome; -+import net.minecraft.world.level.biome.MobSpawnSettings; -+import org.bukkit.event.Event; -+import org.bukkit.event.HandlerList; -+import org.jetbrains.annotations.NotNull; -+import org.jetbrains.annotations.Nullable; -+ -+public class MobSpawnEntityCreateEvent extends Event { -+ private static final HandlerList handlers = new HandlerList(); -+ -+ public ServerLevel world; -+ public MobSpawnSettings.SpawnerData spawnerData; -+ public Mob mob; -+ public BlockPos.MutableBlockPos pos; -+ public Player nearestPlayer; -+ public SpawnGroupData data; -+ -+ public MobSpawnEntityCreateEvent(Mob mob, ServerLevel world, MobSpawnSettings.SpawnerData spawnerData, BlockPos.MutableBlockPos pos, Player player, @Nullable SpawnGroupData data) { -+ this.mob = mob; -+ this.world = world; -+ this.spawnerData = spawnerData; -+ this.pos = pos; -+ this.nearestPlayer = player; -+ this.data = data; -+ } -+ -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} -diff --git a/src/main/java/de/erethon/hephaestus/events/MobSpawnSettingsEvent.java b/src/main/java/de/erethon/hephaestus/events/MobSpawnSettingsEvent.java -new file mode 100644 -index 0000000000000000000000000000000000000000..3827cd2200bfa3434555e973b9a6b7ea9d1ff12c ---- /dev/null -+++ b/src/main/java/de/erethon/hephaestus/events/MobSpawnSettingsEvent.java -@@ -0,0 +1,52 @@ -+package de.erethon.hephaestus.events; -+ -+import net.minecraft.core.BlockPos; -+import net.minecraft.core.Holder; -+import net.minecraft.server.level.ServerLevel; -+import net.minecraft.util.RandomSource; -+import net.minecraft.util.random.WeightedRandomList; -+import net.minecraft.world.entity.MobCategory; -+import net.minecraft.world.level.StructureManager; -+import net.minecraft.world.level.biome.Biome; -+import net.minecraft.world.level.biome.MobSpawnSettings; -+import net.minecraft.world.level.chunk.ChunkGenerator; -+import org.bukkit.event.Event; -+import org.bukkit.event.HandlerList; -+import org.jetbrains.annotations.NotNull; -+ -+import javax.annotation.Nullable; -+import java.util.Optional; -+ -+public class MobSpawnSettingsEvent extends Event { -+ -+ private static final HandlerList handlers = new HandlerList(); -+ -+ public Holder biomeHolder; -+ public WeightedRandomList spawnerData; -+ public ServerLevel world; -+ public StructureManager structureAccessor; -+ public ChunkGenerator chunkGenerator; -+ public MobCategory spawnGroup; -+ public RandomSource random; -+ public BlockPos pos; -+ -+ public MobSpawnSettingsEvent(ServerLevel world, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, BlockPos pos, @Nullable Holder biomeEntry) { -+ this.biomeHolder = biomeEntry; -+ this.world = world; -+ this.structureAccessor = structureAccessor; -+ this.chunkGenerator = chunkGenerator; -+ this.spawnGroup = spawnGroup; -+ this.pos = pos; -+ this.spawnerData = null; -+ } -+ -+ @NotNull -+ @Override -+ public HandlerList getHandlers() { -+ return handlers; -+ } -+ -+ public static HandlerList getHandlerList() { -+ return handlers; -+ } -+} -diff --git a/src/main/java/de/erethon/papyrus/ContainerLoadEvent.java b/src/main/java/de/erethon/papyrus/ContainerLoadEvent.java -index e672340310a8863a627c083cbea2c08a8d6049b9..b6e1158585a4a8971a2fcc5fcea55e9d467b03e6 100644 ---- a/src/main/java/de/erethon/papyrus/ContainerLoadEvent.java -+++ b/src/main/java/de/erethon/papyrus/ContainerLoadEvent.java -@@ -12,7 +12,12 @@ public class ContainerLoadEvent extends Event { - - private NonNullList itemStacks; - -- public ContainerLoadEvent(NonNullList items) { -+ /** -+ * Note: This event may be triggered async during feature placement. -+ * This shouldn't happen on Erethon, but who knows. -+ */ -+ public ContainerLoadEvent(NonNullList items, boolean async) { -+ super(async); - this.itemStacks = items; - } - -diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -index b66a7d4aab887309579154815a0d4abf9de506b0..daa036030b93fbb388f55c265cac22defae6b917 100644 ---- a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -@@ -1943,6 +1943,7 @@ public final class NewChunkHolder { - throw death; - } catch (final Throwable thr) { - LOGGER.error("Failed to save entity data (" + this.chunkX + "," + this.chunkZ + ") in world '" + this.world.getWorld().getName() + "'"); -+ thr.printStackTrace(); // Papyrus - actual useful error - } - - return true; -diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java -index c43bf052b4a3e6cf693fad9b08526dc396d4dfef..97758e18ce3c10e8bf9c955ed2c8ccf06bf5dcfa 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundAddEntityPacket.java -@@ -58,11 +58,29 @@ public class ClientboundAddEntityPacket implements Packet entityType, int entityData, Vec3 velocity, double headYaw) { -+ this.id = id; -+ this.uuid = uuid; -+ this.x = x; -+ this.y = y; -+ this.z = z; -+ this.xRot = (byte)Mth.floor(pitch * 256.0F / 360.0F); -+ this.yRot = (byte)Mth.floor(yaw * 256.0F / 360.0F); -+ this.yHeadRot = (byte)Mth.floor(headYaw * 256.0 / 360.0); -+ this.type = entityType; -+ this.data = entityData; -+ this.xa = (int)(Mth.clamp(velocity.x, -3.9, 3.9) * 8000.0); -+ this.ya = (int)(Mth.clamp(velocity.y, -3.9, 3.9) * 8000.0); -+ this.za = (int)(Mth.clamp(velocity.z, -3.9, 3.9) * 8000.0); -+ } -+ - public ClientboundAddEntityPacket(FriendlyByteBuf buf) { - this.id = buf.readVarInt(); - this.uuid = buf.readUUID(); -diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java -index 438ae006a8e7da0e5124415b8350ebfd45ac6a10..c718e726c449d26e2aca3c193ac680c95e4f24fb 100644 ---- a/src/main/java/net/minecraft/server/Bootstrap.java -+++ b/src/main/java/net/minecraft/server/Bootstrap.java -@@ -1,7 +1,10 @@ - package net.minecraft.server; - - import com.mojang.logging.LogUtils; -+ -+import java.io.File; - import java.io.PrintStream; -+import java.nio.file.Paths; - import java.time.Duration; - import java.time.Instant; - import java.util.Set; -@@ -9,6 +12,8 @@ import java.util.TreeSet; - import java.util.concurrent.atomic.AtomicLong; - import java.util.function.Function; - import java.util.function.Supplier; -+ -+import de.erethon.hephaestus.ItemLibrary; - import net.minecraft.SharedConstants; - import net.minecraft.commands.Commands; - import net.minecraft.commands.arguments.selector.options.EntitySelectorOptions; -@@ -69,6 +74,7 @@ public class Bootstrap { - } else { - FireBlock.bootStrap(); - ComposterBlock.bootStrap(); -+ Main.itemLibrary = new ItemLibrary(new File(Paths.get("").toUri())); // Papyrus - if (EntityType.getKey(EntityType.PLAYER) == null) { - throw new IllegalStateException("Failed loading EntityTypes"); - } else { -diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 61840cfd64caba6595dfc99c91c76a195638d4ee..8e6ea4f1e4421a2ff4ad75eacf5bb118503d2b1d 100644 ---- a/src/main/java/net/minecraft/server/Main.java -+++ b/src/main/java/net/minecraft/server/Main.java -@@ -16,6 +16,8 @@ import java.nio.file.Paths; - import java.util.Optional; - import java.util.function.BooleanSupplier; - import javax.annotation.Nullable; -+ -+import de.erethon.hephaestus.ItemLibrary; - import joptsimple.NonOptionArgumentSpec; - import joptsimple.OptionParser; - import joptsimple.OptionSet; -@@ -71,6 +73,7 @@ import org.bukkit.configuration.file.YamlConfiguration; - public class Main { - - private static final Logger LOGGER = LogUtils.getLogger(); -+ public static ItemLibrary itemLibrary; // Papyrus - - public Main() {} - -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fcb84dcc725894857b7a7ef366f49de81d691d9e..60b54d6d5dfa8ee85d82670d1844823cd6344bb9 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -14,6 +14,7 @@ import com.mojang.authlib.GameProfileRepository; - import com.mojang.authlib.minecraft.MinecraftSessionService; - import com.mojang.datafixers.DataFixer; - import com.mojang.logging.LogUtils; -+import de.erethon.hephaestus.ItemLibrary; - import it.unimi.dsi.fastutil.longs.LongIterator; - import it.unimi.dsi.fastutil.objects.ObjectArrayList; - import java.awt.image.BufferedImage; -diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index db55ad9aaabfa1ea998754f3ac352d1698936696..b472c1efe884630d7d4bd5aa34fc4a4102d25815 100644 ---- a/src/main/java/net/minecraft/server/level/ServerEntity.java -+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -320,7 +320,9 @@ public class ServerEntity { - // CraftBukkit end - - if (!collection.isEmpty()) { -- sender.accept(new ClientboundUpdateAttributesPacket(this.entity.getId(), collection)); -+ if (((LivingEntity) this.entity).syncAttributes) { // Papyrus - custom entities -+ sender.accept(new ClientboundUpdateAttributesPacket(this.entity.getId(), collection)); -+ } - } - - if (((LivingEntity) this.entity).isFallFlying()) { -@@ -394,7 +396,9 @@ public class ServerEntity { - ((ServerPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(set, false); - } - // CraftBukkit end -- this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), set)); -+ if (((LivingEntity) this.entity).syncAttributes) { // Papyrus - custom entities -+ this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), set)); -+ } - } - - set.clear(); -diff --git a/src/main/java/net/minecraft/world/ContainerHelper.java b/src/main/java/net/minecraft/world/ContainerHelper.java -index 01063c3bc672eecdf8fe1c5b5a89fbf576c940f3..949207f366aa0659c563fa123047112d30b6a4ec 100644 ---- a/src/main/java/net/minecraft/world/ContainerHelper.java -+++ b/src/main/java/net/minecraft/world/ContainerHelper.java -@@ -53,8 +53,13 @@ public class ContainerHelper { - stacks.set(j, ItemStack.of(compoundTag)); - } - } -- ContainerLoadEvent loadEvent = new ContainerLoadEvent(stacks); -- Bukkit.getPluginManager().callEvent(loadEvent); -+ ContainerLoadEvent loadEvent = new ContainerLoadEvent(stacks, false); -+ try { -+ Bukkit.getPluginManager().callEvent(loadEvent); -+ } catch (IllegalStateException e) { // This really only happens during feature placement which shouldn't happen in production anyways -+ loadEvent = new ContainerLoadEvent(stacks, true); -+ Bukkit.getPluginManager().callEvent(loadEvent); -+ } - - } - -diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index dc11683ee4d8a6b7a1c42bcae36dc6e8105cd994..05224c89c9ca30f7e927db66f444c71e1903bfa2 100644 ---- a/src/main/java/net/minecraft/world/entity/EntityType.java -+++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -2,10 +2,8 @@ package net.minecraft.world.entity; - - import com.google.common.collect.ImmutableSet; - import com.mojang.logging.LogUtils; --import java.util.List; --import java.util.Optional; --import java.util.Spliterator; --import java.util.UUID; -+ -+import java.util.*; - import java.util.function.Consumer; - import java.util.function.Function; - import java.util.stream.Stream; -@@ -161,6 +159,7 @@ import net.minecraft.world.phys.AABB; - import net.minecraft.world.phys.shapes.Shapes; - import net.minecraft.world.phys.shapes.VoxelShape; - import org.bukkit.event.entity.CreatureSpawnEvent; -+import org.bukkit.plugin.Plugin; - import org.slf4j.Logger; - - public class EntityType implements FeatureElement, EntityTypeTest { -@@ -316,6 +315,8 @@ public class EntityType implements FeatureElement, EntityTypeT - private final EntityDimensions dimensions; - private final FeatureFlagSet requiredFeatures; - -+ public static final Map>> customEntities = new HashMap<>(); // Papyrus - Custom Entities -+ - private static EntityType register(String id, EntityType.Builder type) { // CraftBukkit - decompile error - return (EntityType) Registry.register(BuiltInRegistries.ENTITY_TYPE, id, (EntityType) type.build(id)); // CraftBukkit - decompile error - } -@@ -592,6 +593,19 @@ public class EntityType implements FeatureElement, EntityTypeT - public static Optional create(CompoundTag nbt, Level world, boolean generation) { - // Paper end - Don't fire sync event during generation - return Util.ifElse(EntityType.by(nbt).map((entitytypes) -> { -+ // Papyrus start - Custom entities -+ if (nbt.contains("papyrus-entity-id")) { -+ String customEntityId = nbt.getString("papyrus-entity-id"); -+ if (customEntities.containsKey(customEntityId)) { -+ Map.Entry> entityEntry = customEntities.get(customEntityId); -+ if (entitytypes.getBaseClass().isAssignableFrom(entityEntry.getValue())) { -+ return EntityType.createCustomEntity(entityEntry.getValue(), entitytypes, entityEntry.getKey(), world); -+ } else { -+ LOGGER.warn("Entity type {} is not assignable from custom entity class {}", entitytypes, entityEntry.getValue()); -+ } -+ } -+ } -+ // Papyrus end - return entitytypes.create(world); - }), (entity) -> { - if (generation) entity.generation = true; // Paper - Don't fire sync event during generation -@@ -601,6 +615,18 @@ public class EntityType implements FeatureElement, EntityTypeT - }); - } - -+ // Papyrus start - Custom entities -+ public static Entity createCustomEntity(Class customEntityClass, EntityType type, Plugin plugin, Level world) { -+ try { -+ return customEntityClass.getConstructor(EntityType.class, Level.class).newInstance(type, world); -+ } catch (Exception e) { -+ LOGGER.warn("Failed to create custom entity", e); -+ e.printStackTrace(); -+ return type.create(world); -+ } -+ } -+ // Papyrus end -+ - public AABB getAABB(double feetX, double feetY, double feetZ) { - float f = this.getWidth() / 2.0F; - -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index fd2e35bef6e726c70e372d5816b46a370ca9faba..66ce0aa93e9624f7cd836613192ea08d2a9c337f 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -214,6 +214,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper - public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event - public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API -+ public boolean syncAttributes = true; // Papyrus - for custom entities - - @Override - public float getBukkitYaw() { -diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index fd57e1e8fe868fd43a7f7ea0b536b8b3b92432f2..dcae1f0b7f3d8aa55f86c915357658c0e7169b10 100644 ---- a/src/main/java/net/minecraft/world/entity/Mob.java -+++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -169,7 +169,7 @@ public abstract class Mob extends LivingEntity implements Targeting { - protected void registerGoals() {} - - public static AttributeSupplier.Builder createMobAttributes() { -- return LivingEntity.createLivingAttributes().add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.ATTACK_KNOCKBACK).add(Attributes.ATTACK_SPEED, 80.0); -+ return LivingEntity.createLivingAttributes().add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.ATTACK_KNOCKBACK).add(Attributes.ATTACK_SPEED, 80.0).add(Attributes.ATTACK_DAMAGE, 128); - } - - protected PathNavigation createNavigation(Level world) { -@@ -1274,6 +1274,12 @@ public abstract class Mob extends LivingEntity implements Targeting { - RandomSource randomsource = world.getRandom(); - - this.getAttribute(Attributes.FOLLOW_RANGE).addPermanentModifier(new AttributeModifier("Random spawn bonus", randomsource.triangle(0.0D, 0.11485000000000001D), AttributeModifier.Operation.MULTIPLY_BASE)); -+ // Papyrus -+ this.getAttribute(Attributes.MAX_HEALTH).addPermanentModifier(new AttributeModifier("Papyrus Random spawn bonus", randomsource.triangle(0.0D, 0.33D), AttributeModifier.Operation.MULTIPLY_BASE)); -+ this.getAttribute(Attributes.ATTACK_DAMAGE).addPermanentModifier(new AttributeModifier("Papyrus Random spawn bonus", randomsource.triangle(0.0D, 0.2D), AttributeModifier.Operation.MULTIPLY_BASE)); -+ this.getAttribute(Attributes.ADV_PHYSICAL).addPermanentModifier(new AttributeModifier("Papyrus Random spawn bonus", randomsource.triangle(0.0D, 0.33D), AttributeModifier.Operation.MULTIPLY_BASE)); -+ this.getAttribute(Attributes.RES_PHYSICAL).addPermanentModifier(new AttributeModifier("Papyrus Random spawn bonus", randomsource.triangle(0.0D, 0.33D), AttributeModifier.Operation.MULTIPLY_BASE)); -+ - if (randomsource.nextFloat() < 0.05F) { - this.setLeftHanded(true); - } else { -diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 365945f6b2b1c4c707cdc2adb3619a8a067307ee..d635c0f499c1b354e1d1f4e737a57081cbc73332 100644 ---- a/src/main/java/net/minecraft/world/item/ItemStack.java -+++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -23,12 +23,15 @@ import java.util.function.Predicate; - import java.util.stream.Collectors; - import java.util.stream.Stream; - import javax.annotation.Nullable; -+ -+import de.erethon.hephaestus.HItemStack; -+import de.erethon.hephaestus.HItemBehaviour; -+import de.erethon.hephaestus.HItem; - import net.minecraft.ChatFormatting; - import net.minecraft.Util; - import net.minecraft.advancements.CriteriaTriggers; - import net.minecraft.commands.arguments.blocks.BlockStateParser; - import net.minecraft.core.BlockPos; --import net.minecraft.core.Direction; - import net.minecraft.core.Holder; - import net.minecraft.core.HolderSet; - import net.minecraft.core.Registry; -@@ -45,8 +48,8 @@ import net.minecraft.network.chat.ComponentUtils; - import net.minecraft.network.chat.HoverEvent; - import net.minecraft.network.chat.MutableComponent; - import net.minecraft.network.chat.Style; --import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket; - import net.minecraft.resources.ResourceLocation; -+import net.minecraft.server.Main; - import net.minecraft.tags.TagKey; - import net.minecraft.util.ExtraCodecs; - import net.minecraft.util.RandomSource; -@@ -84,7 +87,7 @@ import org.slf4j.Logger; - // CraftBukkit start - import com.mojang.serialization.Dynamic; - import java.util.Map; --import java.util.Objects; -+ - import net.minecraft.server.MinecraftServer; - import net.minecraft.server.level.ServerLevel; - import net.minecraft.server.level.ServerPlayer; -@@ -235,6 +238,9 @@ public final class ItemStack { - return net.minecraft.nbt.StringTag.valueOf(org.bukkit.craftbukkit.util.CraftChatMessage.toJSON(component)); - } - // Paper end -+ // Papyrus start -+ public HItemStack hItemStack; -+ public HItemBehaviour behaviour; - - public ItemStack(ItemLike item) { - this(item, 1); -@@ -259,7 +265,6 @@ public final class ItemStack { - if (this.item.canBeDepleted()) { - this.setDamageValue(this.getDamageValue()); - } -- - } - - private ItemStack(@Nullable Void v) { -@@ -290,7 +295,33 @@ public final class ItemStack { - if (this.getItem().canBeDepleted()) { - this.setDamageValue(this.getDamageValue()); - } -- -+ if (is(Items.AIR)) { -+ return; -+ } -+ if (tag != null && tag.contains("HephaestusID")) { // Papyrus - Hephaestus -+ String id = tag.getString("HephaestusID"); -+ HItem hConfig = Main.itemLibrary.get(new ResourceLocation(id)); -+ if (hConfig != null) { -+ hItemStack = new HItemStack(this, hConfig); -+ hItemStack.setStack(this); -+ if (hItemStack.getBehaviour() != null) { -+ behaviour = hItemStack.getBehaviour(); -+ } -+ } else { -+ LOGGER.info("[Hephaestus] Unable to find hItem for " + id); -+ } -+ } else { -+ HItem hConfig = Main.itemLibrary.get(BuiltInRegistries.ITEM.getKey(item.asItem())); -+ if (hConfig != null) { -+ hItemStack = new HItemStack(this, hConfig); -+ hItemStack.setStack(this); -+ if (hItemStack.getBehaviour() != null) { -+ behaviour = hItemStack.getBehaviour(); -+ } -+ } else { -+ LOGGER.info("[Hephaestus] Unable to find vanilla hItem for " + item.asItem().toString()); -+ } -+ } - } - - private ItemStack(CompoundTag nbt) { -@@ -312,7 +343,10 @@ public final class ItemStack { - } - - public boolean isItemEnabled(FeatureFlagSet enabledFeatures) { -- return this.isEmpty() || this.getItem().isEnabled(enabledFeatures); -+ if (hItemStack != null) { -+ return hItemStack.isEnabled() || isEmpty(); -+ } -+ return this.isEmpty() || (this.getItem().isEnabled(enabledFeatures)); - } - - public ItemStack split(int amount) { -@@ -585,14 +619,20 @@ public final class ItemStack { - nbt.putString("id", minecraftkey == null ? "minecraft:air" : minecraftkey.toString()); - nbt.putByte("Count", (byte) this.count); - if (this.tag != null) { -+ if (hItemStack != null && !hItemStack.isVanilla()) { // Papyrus -+ tag.putString("HephaestusID", hItemStack.getId().toString()); -+ LOGGER.info("Saved item." + tag.toString()); -+ } - nbt.put("tag", this.tag.copy()); - } -- - return nbt; - } - - public int getMaxStackSize() { -- return this.getItem().getMaxStackSize(); -+ if (hItemStack == null) { -+ return getItem().getMaxStackSize(); -+ } -+ return hItemStack.config().getMaxStackSize(); // Papyrus - } - - public boolean isStackable() { -@@ -622,7 +662,10 @@ public final class ItemStack { - } - - public int getMaxDamage() { -- return this.getItem().getMaxDamage(); -+ if (hItemStack == null) { -+ return getItem().getMaxDamage(); -+ } -+ return hItemStack.config().getMaxDurability(); - } - - public boolean hurt(int amount, RandomSource random, @Nullable LivingEntity player) { // Paper - Add EntityDamageItemEvent -@@ -676,6 +719,9 @@ public final class ItemStack { - } - - j = this.getDamageValue() + amount; -+ if (behaviour != null) { -+ j = behaviour.onItemHurt(this, j); -+ } - this.setDamageValue(j); - return j >= this.getMaxDamage(); - } -@@ -728,7 +774,7 @@ public final class ItemStack { - public void hurtEnemy(LivingEntity target, net.minecraft.world.entity.player.Player attacker) { - Item item = this.getItem(); - -- if (item.hurtEnemy(this, target, attacker)) { -+ if (item.hurtEnemy(this, target, attacker) && (behaviour != null && behaviour.onAttack(this, target, attacker)) ) { - attacker.awardStat(Stats.ITEM_USED.get(item)); - } - -@@ -737,7 +783,7 @@ public final class ItemStack { - public void mineBlock(Level world, net.minecraft.world.level.block.state.BlockState state, BlockPos pos, net.minecraft.world.entity.player.Player miner) { - Item item = this.getItem(); - -- if (item.mineBlock(this, world, state, pos, miner)) { -+ if (item.mineBlock(this, world, state, pos, miner) && (behaviour != null && behaviour.onMine(this, world, state, pos, miner))) { - miner.awardStat(Stats.ITEM_USED.get(item)); - } - -@@ -748,6 +794,9 @@ public final class ItemStack { - } - - public InteractionResult interactLivingEntity(net.minecraft.world.entity.player.Player user, LivingEntity entity, InteractionHand hand) { -+ if (behaviour != null) { -+ return behaviour.onInteractLiving(this, user, entity, hand); -+ } - return this.getItem().interactLivingEntity(this, user, entity, hand); - } - -@@ -767,6 +816,9 @@ public final class ItemStack { - if (this.tag != null) { - itemstack.tag = this.tag.copy(); - } -+ if (hItemStack != null) { -+ itemstack.hItemStack = hItemStack; -+ } - - return itemstack; - } -@@ -812,6 +864,9 @@ public final class ItemStack { - - if (this.getItem() != null) { - this.getItem().inventoryTick(this, world, entity, slot, selected); -+ if (behaviour != null) { -+ behaviour.onTick(this, entity.getBukkitEntity(), slot, selected); -+ } - } - - } -@@ -927,6 +982,33 @@ public final class ItemStack { - - if (nbt != null) { - this.getItem().verifyTagAfterLoad(nbt); -+ if (is(Items.AIR)) { -+ return; -+ } -+ if (tag != null && tag.contains("HephaestusID")) { // Papyrus - Hephaestus -+ String id = tag.getString("HephaestusID"); -+ HItem hConfig = Main.itemLibrary.get(new ResourceLocation(id)); -+ if (hConfig != null) { -+ hItemStack = new HItemStack(this, hConfig); -+ hItemStack.setStack(this); -+ if (hItemStack.getBehaviour() != null) { -+ behaviour = hItemStack.getBehaviour(); -+ } -+ } else { -+ LOGGER.info("[Hephaestus] Unable to find hItem for " + id); -+ } -+ } else { -+ HItem hConfig = Main.itemLibrary.get(BuiltInRegistries.ITEM.getKey(item.asItem())); -+ if (hConfig != null) { -+ hItemStack = new HItemStack(this, hConfig); -+ hItemStack.setStack(this); -+ if (hItemStack.getBehaviour() != null) { -+ behaviour = hItemStack.getBehaviour(); -+ } -+ } else { -+ LOGGER.info("[Hephaestus] Unable to find vanilla hItem for " + item.asItem().toString()); -+ } -+ } - } - - } -diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 661acdf4b1f33d150b0caf179e925d3162d7be35..07b9366f10a35fb5f6d44e8572912c1a221d0ac6 100644 ---- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java -+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -@@ -1,6 +1,8 @@ - package net.minecraft.world.level; - - import com.mojang.logging.LogUtils; -+import de.erethon.hephaestus.events.MobSpawnEntityCreateEvent; -+import de.erethon.hephaestus.events.MobSpawnSettingsEvent; - import it.unimi.dsi.fastutil.objects.Object2IntMap; - import it.unimi.dsi.fastutil.objects.Object2IntMaps; - import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; -@@ -25,13 +27,7 @@ import net.minecraft.util.Mth; - import net.minecraft.util.RandomSource; - import net.minecraft.util.VisibleForDebug; - import net.minecraft.util.random.WeightedRandomList; --import net.minecraft.world.entity.Entity; --import net.minecraft.world.entity.EntityType; --import net.minecraft.world.entity.Mob; --import net.minecraft.world.entity.MobCategory; --import net.minecraft.world.entity.MobSpawnType; --import net.minecraft.world.entity.SpawnGroupData; --import net.minecraft.world.entity.SpawnPlacements; -+import net.minecraft.world.entity.*; - import net.minecraft.world.entity.player.Player; - import net.minecraft.world.level.biome.Biome; - import net.minecraft.world.level.biome.MobSpawnSettings; -@@ -287,8 +283,13 @@ public final class NaturalSpawner { - } - if (doSpawning == PreSpawnStatus.SUCCESS && checker.test(biomesettingsmobs_c.type, blockposition_mutableblockposition, chunk)) { - // Paper end - PreCreatureSpawnEvent -- Mob entityinsentient = NaturalSpawner.getMobForSpawn(world, biomesettingsmobs_c.type); -- -+ // Papyrus start - use our spawn method -+ MobSpawnEntityCreateEvent event = getPapyrusMobForSpawn(world, biomesettingsmobs_c, blockposition_mutableblockposition, entityhuman, groupdataentity); -+ Mob entityinsentient = event.mob; -+ biomesettingsmobs_c = event.spawnerData; -+ groupdataentity = event.data; -+ blockposition_mutableblockposition = event.pos; -+ // Papyrus end - if (entityinsentient == null) { - return j; // Paper - Optional per player mob spawns - } -@@ -397,14 +398,30 @@ public final class NaturalSpawner { - return null; - } - -+ private static MobSpawnEntityCreateEvent getPapyrusMobForSpawn(ServerLevel level, MobSpawnSettings.SpawnerData spawnerData, BlockPos.MutableBlockPos pos, Player player, @Nullable SpawnGroupData groupData) { -+ try { -+ Entity entity = spawnerData.type.create(level); -+ if (entity instanceof Mob mob) { -+ MobSpawnEntityCreateEvent event = new MobSpawnEntityCreateEvent(mob, level, spawnerData, pos, player, groupData); -+ event.callEvent(); -+ return event; -+ } -+ NaturalSpawner.LOGGER.warn("Can't spawn entity of type: {}", BuiltInRegistries.ENTITY_TYPE.getKey(spawnerData.type)); -+ } catch (Exception exception) { -+ NaturalSpawner.LOGGER.warn("Failed to create mob", exception); -+ com.destroystokyo.paper.exception.ServerInternalException.reportInternalException(exception); // Paper -+ } -+ return null; -+ } -+ - private static boolean isValidPositionForMob(ServerLevel world, Mob entity, double squaredDistance) { - return squaredDistance > (double) (entity.getType().getCategory().getDespawnDistance() * entity.getType().getCategory().getDespawnDistance()) && entity.removeWhenFarAway(squaredDistance) ? false : entity.checkSpawnRules(world, MobSpawnType.NATURAL) && entity.checkSpawnObstruction(world); - } - - private static Optional getRandomSpawnMobAt(ServerLevel world, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, RandomSource random, BlockPos pos) { - Holder holder = world.getBiome(pos); -- -- return spawnGroup == MobCategory.WATER_AMBIENT && holder.is(BiomeTags.REDUCED_WATER_AMBIENT_SPAWNS) && random.nextFloat() < 0.98F ? Optional.empty() : NaturalSpawner.mobsAt(world, structureAccessor, chunkGenerator, spawnGroup, pos, holder).getRandom(random); -+ Optional data = spawnGroup == MobCategory.WATER_AMBIENT && holder.is(BiomeTags.REDUCED_WATER_AMBIENT_SPAWNS) && random.nextFloat() < 0.98F ? Optional.empty() : NaturalSpawner.mobsAt(world, structureAccessor, chunkGenerator, spawnGroup, pos, holder).getRandom(random); -+ return data; - } - - private static boolean canSpawnMobAt(ServerLevel world, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, MobSpawnSettings.SpawnerData spawnEntry, BlockPos pos) { -@@ -412,6 +429,12 @@ public final class NaturalSpawner { - } - - private static WeightedRandomList mobsAt(ServerLevel world, StructureManager structureAccessor, ChunkGenerator chunkGenerator, MobCategory spawnGroup, BlockPos pos, @Nullable Holder biomeEntry) { -+ // Papyrus start -+ MobSpawnSettingsEvent event = new MobSpawnSettingsEvent(world, structureAccessor, chunkGenerator, spawnGroup, pos, biomeEntry); -+ event.callEvent(); -+ if (event.spawnerData != null) { -+ return event.spawnerData; -+ } - return NaturalSpawner.isInNetherFortressBounds(pos, world, spawnGroup, structureAccessor) ? NetherFortressStructure.FORTRESS_ENEMIES : chunkGenerator.getMobsAt(biomeEntry != null ? biomeEntry : world.getBiome(pos), structureAccessor, spawnGroup, pos); - } - -diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java -index efca73d4de33028cf9df944f36e51b7b50f7a4c5..e28347cf823578ac9e002332c3ac9ffd59a4bf6f 100644 ---- a/src/main/java/net/minecraft/world/level/biome/Biome.java -+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java -@@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList; - import com.mojang.serialization.Codec; - import com.mojang.serialization.MapCodec; - import com.mojang.serialization.codecs.RecordCodecBuilder; -+import de.erethon.hephaestus.events.MobSpawnSettingsEvent; - import it.unimi.dsi.fastutil.longs.Long2FloatLinkedOpenHashMap; - import java.util.Optional; - import javax.annotation.Nullable; -diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 22036ed3ea0629bc12981a8d91a03e55cc2117d6..6a426e6120f68f79cea70dd15d171d6d7896a767 100644 ---- a/src/main/java/net/minecraft/world/level/block/Block.java -+++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -304,7 +304,7 @@ public class Block extends BlockBehaviour implements ItemLike { - public static List getDrops(BlockState state, ServerLevel world, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity entity, ItemStack stack) { - LootParams.Builder lootparams_a = (new LootParams.Builder(world)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(pos)).withParameter(LootContextParams.TOOL, stack).withOptionalParameter(LootContextParams.THIS_ENTITY, entity).withOptionalParameter(LootContextParams.BLOCK_ENTITY, blockEntity); - -- return state.getDrops(lootparams_a); -+ return state. getDrops(lootparams_a); - } - - public static void dropResources(BlockState state, Level world, BlockPos pos) { -diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java -index a907b79fd8291a0e92db138f37239d17424188a1..aeaf6a32a06d375c3e5fd0f88c23d9503d78758a 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java -+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java -@@ -139,7 +139,7 @@ public class ChunkStatus { - }); - public static final ChunkStatus SPAWN = ChunkStatus.registerSimple("spawn", ChunkStatus.LIGHT, 0, ChunkStatus.POST_FEATURES, ChunkStatus.ChunkType.PROTOCHUNK, (chunkstatus, worldserver, chunkgenerator, list, ichunkaccess) -> { - if (!ichunkaccess.isUpgrading()) { -- chunkgenerator.spawnOriginalMobs(new WorldGenRegion(worldserver, list, chunkstatus, -1)); -+ // chunkgenerator.spawnOriginalMobs(new WorldGenRegion(worldserver, list, chunkstatus, -1)); Papyrus - disable mob spawn during chunk gen - } - - }); -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8e452d1f008592325a79e2ab5c72fb5cee9f64c5..2623cd183f01c007847c14ea3550fc6e0693652b 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -14,6 +14,7 @@ import com.mojang.brigadier.tree.CommandNode; - import com.mojang.brigadier.tree.LiteralCommandNode; - import com.mojang.serialization.Dynamic; - import com.mojang.serialization.Lifecycle; -+import de.erethon.hephaestus.ItemLibrary; - import de.erethon.spellbook.api.SpellbookAPI; - import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; - import java.awt.image.BufferedImage; diff --git a/settings.gradle.kts b/settings.gradle.kts index e6b1ead..e17947e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,6 +7,10 @@ pluginManagement { } } +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} + rootProject.name = "papyrus" for (name in listOf("papyrus-api", "papyrus-server")) { val projName = name.toLowerCase(Locale.ENGLISH) diff --git a/test-plugin/build.gradle.kts b/test-plugin/build.gradle.kts deleted file mode 100644 index e22f5ce..0000000 --- a/test-plugin/build.gradle.kts +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - id("java") -} - -group = "de.erethon.papyrus" -version = "1.0" - -repositories { - mavenLocal(); -} - -dependencies { - compileOnly(project(":papyrus-server")) - compileOnly(project(":papyrus-api")) -} \ No newline at end of file diff --git a/test-plugin/src/main/resources/plugin.yml b/test-plugin/src/main/resources/plugin.yml deleted file mode 100644 index 20df45e..0000000 --- a/test-plugin/src/main/resources/plugin.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: TestPlugin -version: 1.0 -main: de.erethon.PapyrusTestPlugin -api-version: '1.20' -commands: - test: - description: test - usage: test test - permission: test.test \ No newline at end of file