Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58e39bc650 | ||
|
|
d456e7a116 | ||
|
|
d547242824 | ||
|
|
3edba7dac4 | ||
|
|
402652c29d | ||
|
|
7a0b6cc24f | ||
|
|
3397936ab4 | ||
|
|
8f27eca2e3 | ||
|
|
0bbed6029c | ||
|
|
883620f828 | ||
|
|
61a11d791c | ||
|
|
f8028c508e | ||
|
|
7646770baa | ||
|
|
d3a3626a73 |
@@ -3,8 +3,8 @@ import io.papermc.paperweight.util.constants.*
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
|
||||
id("io.papermc.paperweight.patcher") version "1.4.1"
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||
id("io.papermc.paperweight.patcher") version "1.5.3"
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -16,8 +16,8 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.605.1")
|
||||
paperclip("io.papermc:paperclip:3.0.2")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
||||
paperclip("io.papermc:paperclip:3.0.3")
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
group = gg.projecteden.parchment
|
||||
version = 1.19.3-R0.1-SNAPSHOT
|
||||
version = 1.20-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion = 1.19.3
|
||||
paperRef = 214a8c54a4a173c9f5791045ba7a8914a3a8ffa4
|
||||
mcVersion = 1.20
|
||||
paperRef = de19eb8c4a490ff4f427e9ad8b8bbe181c368cc1
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
org.gradle.vfs.watch=false
|
||||
org.gradle.warning.mode=none
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
269
gradlew
vendored
269
gradlew
vendored
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,67 +17,101 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# 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"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
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.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
@@ -106,80 +140,95 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
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.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
@@ -128,7 +128,7 @@ index 9be64a95c2345433b6142d611077dedadcef9f5d..e3cea810881868fb5869de72f331733e
|
||||
@NotNull private final String buffer;
|
||||
private final boolean isCommand;
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java
|
||||
index 89e132525cfae0ce979e37b3e2793df781e47227..f14635ae3112862c1337398bf5f5f56a7f87d90f 100644
|
||||
index 2faef4cb358ec65e32a6aba6426f0dd7ddf90d2a..640a01478be687b089aeddad422e4bba2bea19b6 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java
|
||||
@@ -8,7 +8,7 @@ import static com.google.common.base.Preconditions.*;
|
||||
@@ -427,7 +427,7 @@ index 12163a7b0591a7d022dc7eb9ee6608a1b6c39d9b..d81c7307127b135417e06a3b244416be
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Player player;
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 6bbf8468bc47e82b0aeb164e49cdb73d93bae87b..1d7077f3a1be8068747aaf0665a1dee797bb4088 100644
|
||||
index 1a60a18e15780128a1914826daa952ffacb92e9e..b7b881a66536b9f31cad5d00baebea83dcb834bc 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -30,7 +30,7 @@ import org.bukkit.entity.Player;
|
||||
@@ -454,19 +454,20 @@ index 6bbf8468bc47e82b0aeb164e49cdb73d93bae87b..1d7077f3a1be8068747aaf0665a1dee7
|
||||
* Sets the world that this location resides in
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
index 69b50eee42e8c52063033705bd23a5ef5231ed83..f61ddf47ce33a4a1708e7000bb43b303e3b1a503 100644
|
||||
index 72175dcae49f75b494ab70958053ed994a8828f4..4b7ff7a624e94f9bd3a251976b33e289de084f04 100644
|
||||
--- a/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
@@ -10,7 +10,7 @@ import org.bukkit.profile.PlayerProfile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -15,7 +15,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
* player that is stored on the disk and can, thus, be retrieved without the
|
||||
* player needing to be online.
|
||||
*/
|
||||
-public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable {
|
||||
+public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable, gg.projecteden.parchment.HasOfflinePlayer, gg.projecteden.parchment.OptionalPlayer { // Parchment
|
||||
+public interface OfflinePlayer extends ServerOperator, AnimalTamer, ConfigurationSerializable, gg.projecteden.parchment.HasOfflinePlayer, gg.projecteden.parchment.OptionalPlayer, gg.projecteden.api.interfaces.HasUniqueId { // Parchment
|
||||
+
|
||||
|
||||
/**
|
||||
* Checks if this player is currently online
|
||||
@@ -139,6 +139,13 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
@@ -144,6 +145,13 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
@Nullable
|
||||
public Player getPlayer();
|
||||
|
||||
@@ -520,15 +521,15 @@ index d124768378d6f0c5573f28ee815ea3886fe74868..11a00998b1cb5ee582e225553f15b1b7
|
||||
private final UUID uuid;
|
||||
private final String name;
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index aba40431c5a1ae43106a678445483e0653e130d1..62e40e08980faf5b5b4f1f66e943934256698e6f 100644
|
||||
index 1c3f54382d66549dc881d4577c7104be6673a274..dbc7e9c460cc23b08778934cbe400eb1e1ed88b8 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* (i.e. lighting and power) may not be able to be safely accessed during world
|
||||
* generation when used in cases like BlockPhysicsEvent!!!!
|
||||
*/
|
||||
-public interface Block extends Metadatable, net.kyori.adventure.translation.Translatable { // Paper - translatable
|
||||
+public interface Block extends Metadatable, net.kyori.adventure.translation.Translatable, gg.projecteden.parchment.HasLocation { // Paper - translatable
|
||||
-public interface Block extends Metadatable, Translatable, net.kyori.adventure.translation.Translatable { // Paper - translatable
|
||||
+public interface Block extends Metadatable, Translatable, net.kyori.adventure.translation.Translatable, gg.projecteden.parchment.HasLocation { // Paper - translatable
|
||||
|
||||
/**
|
||||
* Gets the metadata for this block
|
||||
@@ -572,10 +573,10 @@ index 2e17b2d4f759531fbe9ee8e9b00c839186af09ca..8f4a293c131cb8b63c31b410ffa211bd
|
||||
/**
|
||||
* This is the name of the specified AnimalTamer.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index cdbc7329cf5f67d66e31eb31e83b9e7997040f72..851b1b42ababc802b1d3d716b7480acab5211250 100644
|
||||
index a2a423d4e4c2702ba5967223cab0432dd7d04732..88704047f596440bd9c68fb4f61417b2bde09757 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a base entity in the world
|
||||
*/
|
||||
@@ -585,7 +586,7 @@ index cdbc7329cf5f67d66e31eb31e83b9e7997040f72..851b1b42ababc802b1d3d716b7480aca
|
||||
/**
|
||||
* Gets the entity's current position
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 3b204144e2d245098b3dc23b8779f9ed817bb6d1..2d5a09bb8f31d6234ca8a3f343d45eee81cc1dd4 100644
|
||||
index 8b0d04d5b39ee817555a36adddc39b18fc6f0d02..28935c1ff3de9fc2e15e2bca0d254c0e805ed3ce 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -20,7 +20,15 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -606,7 +607,7 @@ index 3b204144e2d245098b3dc23b8779f9ed817bb6d1..2d5a09bb8f31d6234ca8a3f343d45eee
|
||||
// Paper start
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index de960716478477ce199526b8f860cfafa1541ee9..5687a53c4dff34109aeb17db3112e9ba6fc8b059 100644
|
||||
index 1e5e757b1e3bd02e595020704d14244330555bf0..d4235e9633eeacc35f45530a63b43a4c0e07c5ea 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -42,7 +42,17 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -707,7 +708,7 @@ index 6dcd9f828c6c40e48593b0bad5a44a656eb01645..0651bdd983e90e0e1e8a3565dcb5d97c
|
||||
private final IgniteCause cause;
|
||||
private final Entity ignitingEntity;
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java b/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java
|
||||
index be0a2d1f234d8265d98e54e518a994957b1f3ab7..54cd6735fbcad009330927d760f8bd93ea9c51ec 100644
|
||||
index 4e3c406ba883aae553e8d69b6b719b872cd6096c..d0a92dc9eba0f61b596e9a388f3aa4076ef2bc65 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -720,10 +721,10 @@ index be0a2d1f234d8265d98e54e518a994957b1f3ab7..54cd6735fbcad009330927d760f8bd93
|
||||
protected boolean cancel;
|
||||
protected boolean canBuild;
|
||||
diff --git a/src/main/java/org/bukkit/event/block/SignChangeEvent.java b/src/main/java/org/bukkit/event/block/SignChangeEvent.java
|
||||
index 1268066e30ddb0cd3792ea4b3de894eb04196669..1e20629da438651d3987258b93cf9caf9eff9452 100644
|
||||
index d944d67f544494355f03c5bc9afd8ea7726e6412..800db8e63bdb8c05ffdc88c3a3b0f1f268a1357e 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/SignChangeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/block/SignChangeEvent.java
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* <p>
|
||||
* If a Sign Change event is cancelled, the sign will not be changed.
|
||||
*/
|
||||
@@ -775,12 +776,12 @@ index 59aab10c2d27247eb77bd71d75b5f9126aa0fb12..b42465617e83d3413ab647cd9c78212b
|
||||
/**
|
||||
* Gets the amount of ticks that the animal will fall in love for.
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
index 10d0e18dfd423b108fe381e8142867eb10399359..7f9f266057de42261fa06e4874d7bec5388c90c7 100644
|
||||
index 099efafa14c10910e4ed04abb1823f0c1a96b6a6..382602ca4a9a33cf238f982f77865053d38bd285 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Called when an entity explodes
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
|
||||
* is disabled as no block interaction will occur.
|
||||
*/
|
||||
-public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
+public class EntityExplodeEvent extends EntityEvent implements Cancellable, gg.projecteden.parchment.HasLocation { // Parchment
|
||||
@@ -788,7 +789,7 @@ index 10d0e18dfd423b108fe381e8142867eb10399359..7f9f266057de42261fa06e4874d7bec5
|
||||
private boolean cancel;
|
||||
private final Location location;
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java b/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java
|
||||
index 327876e0ad7dcfeb71d9d22afe1c04bcd71c3bf9..466a54c4e30a7886e7383f43f9b6c389a5bdba7c 100644
|
||||
index 71d664dd89995f088c47d17b38547d530319470c..d931ece8f35c8f01748c59d01617fd59b287030e 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java
|
||||
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -892,12 +893,12 @@ index 21ad8888c0e403bfc63518502577d651c02dda05..1c59335a8f0a40162190f6fb73ffbfef
|
||||
// Paper start
|
||||
private final Reason reason;
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java
|
||||
index 9013d043503d175004ad276799e5935b7fa59dc4..4095ca19e6ceff2432e0cbd372e9475f748278a7 100644
|
||||
index ceae092eb782698803c6c3df41267dde20ba62b2..23e35e7e65bdf2e758dc8dc980b9427b7e4163a9 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Represents a player related inventory event
|
||||
* Called when a player opens an inventory
|
||||
*/
|
||||
-public class InventoryOpenEvent extends InventoryEvent implements Cancellable {
|
||||
+public class InventoryOpenEvent extends InventoryEvent implements Cancellable, gg.projecteden.parchment.HasHumanEntity { // Parchment
|
||||
@@ -905,7 +906,7 @@ index 9013d043503d175004ad276799e5935b7fa59dc4..4095ca19e6ceff2432e0cbd372e9475f
|
||||
private boolean cancelled;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
index 635b8787fc235b61c0d5677def034656e4ec4cef..6f15f4adfa552e2f5960464663ee126282086bb1 100644
|
||||
index fc2d9e85b65347b90bde3b0b13ccae759e33d466..6b2e64fa9c0f3c0af88797d63557c333edf69a5d 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -1010,7 +1011,7 @@ index 7af8d6e51c824cf0592b722b834f1d4986e3cc08..c28d62fc3dc359f9ebcf926094198ee3
|
||||
private boolean cancelled = false;
|
||||
private final Location location;
|
||||
diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
index c574bb94b21eb27974b40c839fce52c6ac4b54b4..0172bed7917ea1199c34438385be4bceac9cfaa4 100644
|
||||
index 0d519813c12d98b28d62e6d01d7ec6e8c2dba3c3..469b9cc0c4b77844ba0317af51bd9ad873915967 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -1023,7 +1024,7 @@ index c574bb94b21eb27974b40c839fce52c6ac4b54b4..0172bed7917ea1199c34438385be4bce
|
||||
/**
|
||||
* Returns the size of the inventory
|
||||
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
index 2448e70d75ae7a678c6befac4506c103edb78875..65ca144618f74bc8e317a4b9c2732ad5ed13a208 100644
|
||||
index 77a0cd901038405ed0e267f0432f13deccae3ab5..abe9b0d97d24e9e2ef1a61e34249895eb35b800f 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -6,19 +6,20 @@ Subject: [PATCH] Expanded Adventure support
|
||||
Adds support for Adventure in a few places where it was previously missing.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
|
||||
index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489642245c2 100644
|
||||
index ea4ceb643239c26851bacbf45fc3f2efef3bb4be..eea8e60c363b6dc14383fb7758cbf41469f76425 100644
|
||||
--- a/src/main/java/org/bukkit/ChatColor.java
|
||||
+++ b/src/main/java/org/bukkit/ChatColor.java
|
||||
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -11,8 +11,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* All supported color values for chat
|
||||
*/
|
||||
-@Deprecated // Paper
|
||||
-public enum ChatColor {
|
||||
+public enum ChatColor implements net.kyori.adventure.text.format.StyleBuilderApplicable, net.kyori.adventure.text.format.TextFormat { // Parchment
|
||||
/**
|
||||
* Represents black
|
||||
*/
|
||||
@@ -181,6 +181,13 @@ public enum ChatColor {
|
||||
@@ -182,6 +181,13 @@ public enum ChatColor {
|
||||
public net.md_5.bungee.api.ChatColor asBungee() {
|
||||
return net.md_5.bungee.api.ChatColor.MAGIC;
|
||||
}
|
||||
@@ -32,7 +33,7 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489
|
||||
},
|
||||
/**
|
||||
* Makes the text bold.
|
||||
@@ -191,6 +198,13 @@ public enum ChatColor {
|
||||
@@ -192,6 +198,13 @@ public enum ChatColor {
|
||||
public net.md_5.bungee.api.ChatColor asBungee() {
|
||||
return net.md_5.bungee.api.ChatColor.BOLD;
|
||||
}
|
||||
@@ -46,7 +47,7 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489
|
||||
},
|
||||
/**
|
||||
* Makes a line appear through the text.
|
||||
@@ -201,6 +215,13 @@ public enum ChatColor {
|
||||
@@ -202,6 +215,13 @@ public enum ChatColor {
|
||||
public net.md_5.bungee.api.ChatColor asBungee() {
|
||||
return net.md_5.bungee.api.ChatColor.STRIKETHROUGH;
|
||||
}
|
||||
@@ -60,7 +61,7 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489
|
||||
},
|
||||
/**
|
||||
* Makes the text appear underlined.
|
||||
@@ -211,6 +232,13 @@ public enum ChatColor {
|
||||
@@ -212,6 +232,13 @@ public enum ChatColor {
|
||||
public net.md_5.bungee.api.ChatColor asBungee() {
|
||||
return net.md_5.bungee.api.ChatColor.UNDERLINE;
|
||||
}
|
||||
@@ -74,7 +75,7 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489
|
||||
},
|
||||
/**
|
||||
* Makes the text italic.
|
||||
@@ -221,6 +249,13 @@ public enum ChatColor {
|
||||
@@ -222,6 +249,13 @@ public enum ChatColor {
|
||||
public net.md_5.bungee.api.ChatColor asBungee() {
|
||||
return net.md_5.bungee.api.ChatColor.ITALIC;
|
||||
}
|
||||
@@ -88,7 +89,7 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489
|
||||
},
|
||||
/**
|
||||
* Resets all previous chat colors or formats.
|
||||
@@ -231,6 +266,16 @@ public enum ChatColor {
|
||||
@@ -232,6 +266,16 @@ public enum ChatColor {
|
||||
public net.md_5.bungee.api.ChatColor asBungee() {
|
||||
return net.md_5.bungee.api.ChatColor.RESET;
|
||||
}
|
||||
@@ -105,7 +106,7 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -263,6 +308,13 @@ public enum ChatColor {
|
||||
@@ -264,6 +308,13 @@ public enum ChatColor {
|
||||
return net.md_5.bungee.api.ChatColor.RESET;
|
||||
};
|
||||
|
||||
@@ -120,20 +121,20 @@ index f6eb30f53dad684f156102cf7147b2f00c82c71e..1b4e9840f0e829be533ad0bd1c918489
|
||||
* Gets the char value associated with this color
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Color.java b/src/main/java/org/bukkit/Color.java
|
||||
index d2f8f5a8e49f60422b6a41e51248a6710251d61b..40b09a861ba365b126c2b28bb7f18c8fb8b3e5b5 100644
|
||||
index e088390ec3fb87eeabc73dfe90e3544980c02e5b..5d4fbb08832fd0490a9375580f909beaf941e8fa 100644
|
||||
--- a/src/main/java/org/bukkit/Color.java
|
||||
+++ b/src/main/java/org/bukkit/Color.java
|
||||
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* but subject to change.
|
||||
*/
|
||||
@SerializableAs("Color")
|
||||
-public final class Color implements ConfigurationSerializable {
|
||||
+public final class Color implements ConfigurationSerializable, net.kyori.adventure.text.format.TextColor { // Parchment
|
||||
private static final int BIT_MASK = 0xff;
|
||||
private static final int DEFAULT_ALPHA = 255;
|
||||
|
||||
/**
|
||||
@@ -244,6 +244,13 @@ public final class Color implements ConfigurationSerializable {
|
||||
return getRed() << 16 | getGreen() << 8 | getBlue() << 0;
|
||||
@@ -309,6 +309,13 @@ public final class Color implements ConfigurationSerializable {
|
||||
return getAlpha() << 24 | getRed() << 16 | getGreen() << 8 | getBlue();
|
||||
}
|
||||
|
||||
+ // Parchment start
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add UnsafeValues#canPlaceItemOn
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 854be548e5a645e7312e6e9390d5255f8b1d61e6..9fdcb933788cb78306dc066b3bf6ed01a6316cd3 100644
|
||||
index c661eab343ae76488de701630424e2d589f44fc0..b0ba8331fa43f4584eac1b1d9f4c3cad9d47b872 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -271,4 +271,17 @@ public interface UnsafeValues {
|
||||
@@ -250,4 +250,17 @@ public interface UnsafeValues {
|
||||
*/
|
||||
void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey);
|
||||
// Paper end
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose MCUtil Executors
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 2204336d8800311b65e894739ab1b27273e7c6f2..2c35578c85be5f47c2b2a11f1df16db51e31cc41 100644
|
||||
index 1d1a1d087dabc9794e0062a064da2cced4062309..bf0ceb5b59a5ab63e618984ec82e9830c228fa75 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2139,4 +2139,20 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2162,4 +2162,20 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull org.bukkit.potion.PotionBrewer getPotionBrewer();
|
||||
// Paper end
|
||||
@@ -64,10 +64,10 @@ index 0000000000000000000000000000000000000000..28c01caa9d6379046f6af6612719b404
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e8c0c853eb52d1473c20231660355f77b1f7e016..60172dd594e51351c8253446f6d8c1347920b2a0 100644
|
||||
index 72f1576b8ce5b55b50f053f346ce42c52db4b568..edc65af5cc0593a04c2f7fede69de0781a31ee97 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3985,6 +3985,36 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -3974,6 +3974,36 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public DragonBattle getEnderDragonBattle();
|
||||
|
||||
@@ -102,5 +102,5 @@ index e8c0c853eb52d1473c20231660355f77b1f7e016..60172dd594e51351c8253446f6d8c134
|
||||
+ // Parchment end
|
||||
+
|
||||
/**
|
||||
* Represents various map environment types that a world may be
|
||||
*/
|
||||
* Get all {@link FeatureFlag} enabled in this world.
|
||||
*
|
||||
@@ -5,12 +5,12 @@ Subject: [PATCH] Add Player#getHiddenEntities API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 5687a53c4dff34109aeb17db3112e9ba6fc8b059..6f90b12e442ddbec64ab75cbad9e4a5744943147 100644
|
||||
index d4235e9633eeacc35f45530a63b43a4c0e07c5ea..aba730b762d6a0df8a5f115186f2faaf7a2cb75d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1493,6 +1493,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||
public boolean canSee(@NotNull Entity entity);
|
||||
@@ -1649,6 +1649,18 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean canSee(@NotNull Player player);
|
||||
|
||||
+ // Parchment start
|
||||
+ /**
|
||||
@@ -20,9 +20,10 @@ index 5687a53c4dff34109aeb17db3112e9ba6fc8b059..6f90b12e442ddbec64ab75cbad9e4a57
|
||||
+ * @return a view of hidden entity UUIDs
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental
|
||||
+ public java.util.@NotNull Set<UUID> getHiddenEntities(@NotNull Plugin plugin);
|
||||
+ public java.util.@NotNull Set<java.util.UUID> getHiddenEntities(@NotNull Plugin plugin);
|
||||
+ // Parchment end
|
||||
+
|
||||
+
|
||||
/**
|
||||
* Checks to see if this player is currently flying or not.
|
||||
* Visually hides an entity from this player.
|
||||
*
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add Timings Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||||
index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..90f8f7a0996cf1a6f6b3e9eef0243b2d629a1214 100644
|
||||
index 9812d668ad945aba486fbf6d5bf83c4292cb5d03..91429282ed8f30abbb969b426b34826c6e28b75d 100644
|
||||
--- a/src/main/java/co/aikar/timings/Timings.java
|
||||
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||||
@@ -23,6 +23,8 @@
|
||||
@@ -17,7 +17,7 @@ index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..90f8f7a0996cf1a6f6b3e9eef0243b2d
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.EvictingQueue;
|
||||
import com.google.common.collect.Lists;
|
||||
@@ -135,7 +137,24 @@ public final class Timings {
|
||||
@@ -145,8 +147,25 @@ public final class Timings {
|
||||
* @param enabled Should timings be reported
|
||||
*/
|
||||
public static void setTimingsEnabled(boolean enabled) {
|
||||
@@ -34,6 +34,7 @@ index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..90f8f7a0996cf1a6f6b3e9eef0243b2d
|
||||
+ */
|
||||
+ public static void setTimingsEnabled(boolean enabled, CommandSender sender) {
|
||||
timingsEnabled = enabled;
|
||||
warnAboutDeprecationOnEnable();
|
||||
+ if (sender != null) {
|
||||
+ if (!new co.aikar.timings.event.TimingsModifyEvent(sender, Action.RESET).callEvent()) {
|
||||
+ return;
|
||||
@@ -43,10 +44,10 @@ index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..90f8f7a0996cf1a6f6b3e9eef0243b2d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
index 3132dc98d26c54c5e46162e53aaed195d7335c8d..f44ec5789bc98d5558eee6cff39770b4192c3e3c 100644
|
||||
index e801e79fa57c44b2e5d359647c920f88064826f1..0cbb970c42c3a71602ccd311a13e1f874067e2ae 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
@@ -59,12 +59,14 @@ public class TimingsCommand extends BukkitCommand {
|
||||
@@ -63,12 +63,14 @@ public class TimingsCommand extends BukkitCommand {
|
||||
}
|
||||
final String arg = args[0];
|
||||
if ("on".equalsIgnoreCase(arg)) {
|
||||
@@ -65,7 +66,7 @@ index 3132dc98d26c54c5e46162e53aaed195d7335c8d..f44ec5789bc98d5558eee6cff39770b4
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -75,20 +77,22 @@ public class TimingsCommand extends BukkitCommand {
|
||||
@@ -79,20 +81,22 @@ public class TimingsCommand extends BukkitCommand {
|
||||
|
||||
long now = System.currentTimeMillis();
|
||||
if ("verbon".equalsIgnoreCase(arg)) {
|
||||
@@ -96,10 +97,10 @@ index 3132dc98d26c54c5e46162e53aaed195d7335c8d..f44ec5789bc98d5558eee6cff39770b4
|
||||
} else if (
|
||||
"paste".equalsIgnoreCase(arg) ||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
index 34f4c02c3bdbe571a7efb1f8c61d8924b0c81268..093c1bc755061dc6f54e5dce1ef68fd027fc43a6 100644
|
||||
index 3af5b8ea795311582044c712de50d29412024b77..b509aa8d2b05e913277713308e2eea46e631a5df 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
@@ -58,7 +58,9 @@ public class TimingsReportListener implements net.kyori.adventure.audience.Forwa
|
||||
@@ -59,7 +59,9 @@ public class TimingsReportListener implements net.kyori.adventure.audience.Forwa
|
||||
|
||||
@Override
|
||||
public void sendMessage(final @NotNull net.kyori.adventure.identity.Identity source, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) {
|
||||
@@ -110,7 +111,7 @@ index 34f4c02c3bdbe571a7efb1f8c61d8924b0c81268..093c1bc755061dc6f54e5dce1ef68fd0
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -69,7 +71,9 @@ public class TimingsReportListener implements net.kyori.adventure.audience.Forwa
|
||||
@@ -70,7 +72,9 @@ public class TimingsReportListener implements net.kyori.adventure.audience.Forwa
|
||||
|
||||
@Override
|
||||
public void sendMessage(@NotNull String message) {
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Expanded Insomnia API methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 7f4827819fc241866edb571f05e9b14d0955c0c4..1e7c5b991939e984d3448a5f9e0859857d04ce63 100644
|
||||
index aba730b762d6a0df8a5f115186f2faaf7a2cb75d..77db3f6bc082cc92c27775bd804fb678b377107e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -52,6 +52,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add NPC to EntityType
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
index b507b715f9b28b98e32f6589344a5066d1009f64..2841bee3f3e4e24a485a693fa7e5879246d7052f 100644
|
||||
index 6cf14afd2c1b8018c67c6cac302ae28bb12ab5a5..9ab641d268cd10a2c9bd888732d4754d520c56c7 100644
|
||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
@@ -289,6 +289,7 @@ public enum EntityType implements Keyed, net.kyori.adventure.translation.Transla
|
||||
@@ -295,6 +295,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
|
||||
*/
|
||||
LIGHTNING("lightning_bolt", LightningStrike.class, -1, false),
|
||||
PLAYER("player", Player.class, -1, false),
|
||||
28
patches/api/0015-Revert-BungeeChat-Deprecation.patch
Normal file
28
patches/api/0015-Revert-BungeeChat-Deprecation.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-MC <cjblanton2@gmail.com>
|
||||
Date: Wed, 15 Mar 2023 01:05:09 -0400
|
||||
Subject: [PATCH] Revert BungeeChat Deprecation
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 4b2330bac734cd07f8798ceeb6d9c67bd3f3521d..3c4eaa792da395db739f554bea69faba46a7bd12 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -27,7 +27,7 @@ dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
api("com.google.guava:guava:31.1-jre")
|
||||
api("com.google.code.gson:gson:2.10")
|
||||
- api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.9") // Paper
|
||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4") // Paper // Parchment - revert
|
||||
api("org.yaml:snakeyaml:2.0")
|
||||
api("org.joml:joml:1.10.5")
|
||||
// Paper start
|
||||
@@ -108,7 +108,7 @@ tasks.withType<Javadoc> {
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
// Paper start
|
||||
- //"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat // Parchment - revert
|
||||
"https://jd.advntr.dev/api/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-minimessage/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
|
||||
73
patches/api/0016-Add-PreEntityShootBowEvent.patch
Normal file
73
patches/api/0016-Add-PreEntityShootBowEvent.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-MC <cjblanton2@gmail.com>
|
||||
Date: Thu, 16 Mar 2023 23:10:47 -0400
|
||||
Subject: [PATCH] Add PreEntityShootBowEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/gg/projecteden/parchment/event/entity/PreEntityShootBowEvent.java b/src/main/java/gg/projecteden/parchment/event/entity/PreEntityShootBowEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..7368e7b039882dd629d187502c5c90d74471590e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/projecteden/parchment/event/entity/PreEntityShootBowEvent.java
|
||||
@@ -0,0 +1,61 @@
|
||||
+package gg.projecteden.parchment.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+public class PreEntityShootBowEvent extends EntityEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ private final ItemStack bow;
|
||||
+ private final ItemStack arrow;
|
||||
+ boolean relative = true;
|
||||
+ boolean cancelled = false;
|
||||
+
|
||||
+ public PreEntityShootBowEvent(Entity entity, ItemStack bow, ItemStack arrow) {
|
||||
+ super(entity);
|
||||
+ this.bow = bow;
|
||||
+ this.arrow = arrow;
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack getBow() {
|
||||
+ return this.bow;
|
||||
+ }
|
||||
+
|
||||
+ public ItemStack getArrow() {
|
||||
+ return this.arrow;
|
||||
+ }
|
||||
+
|
||||
+ public boolean isRelative() {
|
||||
+ return this.relative;
|
||||
+ }
|
||||
+
|
||||
+ public void setRelative(boolean relative) {
|
||||
+ this.relative = relative;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-MC <cjblanton2@gmail.com>
|
||||
Date: Wed, 15 Mar 2023 01:05:09 -0400
|
||||
Subject: [PATCH] Revert BungeeChat Deprecation
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 3c4dd6ebc2289c44c2f5723e7920aadffdc51884..1d7d810de20536fee67bf6073aab3ff24f01c55d 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -25,7 +25,7 @@ dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
api("com.google.guava:guava:31.1-jre")
|
||||
api("com.google.code.gson:gson:2.10")
|
||||
- api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.6") // Paper
|
||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4") // Parchment
|
||||
api("org.yaml:snakeyaml:1.33")
|
||||
// Paper start
|
||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
@@ -104,7 +104,7 @@ tasks.withType<Javadoc> {
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
||||
// Paper start
|
||||
- //"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/", // don't link to bungee chat
|
||||
"https://jd.adventure.kyori.net/api/$adventureVersion/",
|
||||
"https://jd.adventure.kyori.net/text-minimessage/$adventureVersion/",
|
||||
"https://jd.adventure.kyori.net/text-serializer-gson/$adventureVersion/",
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose NMS ordinals
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 9fdcb933788cb78306dc066b3bf6ed01a6316cd3..606ae769ea443853c0d236f5bac5429467190778 100644
|
||||
index 3ed52d016314c01293530fa760fa5faaf59586ed..f93672ebb76664c5a71030b72966c6b13e107246 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -283,5 +283,12 @@ public interface UnsafeValues {
|
||||
@@ -257,5 +257,12 @@ public interface UnsafeValues {
|
||||
* @return if the item can be placed
|
||||
*/
|
||||
java.util.concurrent.CompletableFuture<Boolean> canPlaceItemOn(@org.jetbrains.annotations.NotNull ItemStack item, @org.jetbrains.annotations.Nullable gg.projecteden.parchment.OptionalHumanEntity player, @org.jetbrains.annotations.NotNull org.bukkit.block.Block block, @org.jetbrains.annotations.NotNull org.bukkit.block.BlockFace face);
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose EntityType Ordinals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 4589f7db68f7a72065c85c0a50216c6d02658f1e..86e31d14858bd32993059b39af64f74d9d65c84f 100644
|
||||
index ceacc0d383e2ee674783d3c0a7df0a951595faca..72b5ce4c93c021ca2f3f1d65b45fdd8cd50d71f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -161,6 +161,8 @@ import org.slf4j.Logger;
|
||||
@@ -162,6 +162,8 @@ import org.slf4j.Logger;
|
||||
|
||||
public class EntityType<T extends Entity> implements FeatureElement, EntityTypeTest<Entity, T> {
|
||||
|
||||
@@ -17,7 +17,7 @@ index 4589f7db68f7a72065c85c0a50216c6d02658f1e..86e31d14858bd32993059b39af64f74d
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final String ENTITY_TAG = "EntityTag";
|
||||
private final Holder.Reference<EntityType<?>> builtInRegistryHolder;
|
||||
@@ -303,9 +305,32 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -310,9 +312,32 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
private final FeatureFlagSet requiredFeatures;
|
||||
|
||||
private static <T extends Entity> EntityType<T> register(String id, EntityType.Builder type) { // CraftBukkit - decompile error
|
||||
@@ -52,10 +52,10 @@ index 4589f7db68f7a72065c85c0a50216c6d02658f1e..86e31d14858bd32993059b39af64f74d
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(type);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 9e7df62dde2f0b526efc4f14e690e592ba80dea4..7d467404416007cd0682eefec7eff8886299fb98 100644
|
||||
index be2739875ba1ba1a973c4a45c7e6a6996f0daf31..a6eab579c0f4cc6039bdd9914dd770c796b75d3c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -669,6 +669,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -665,6 +665,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
final net.minecraft.world.item.context.BlockPlaceContext ctx = context;
|
||||
return future.completeAsync(() -> blockItem.canPlace(ctx, blockState), io.papermc.paper.util.MCUtil.MAIN_EXECUTOR);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-MC <cjblanton2@gmail.com>
|
||||
Date: Sun, 19 Mar 2023 17:32:26 -0400
|
||||
Subject: [PATCH] Lookup plugin dependencies during runtime
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/entrypoint/dependency/DependencyUtil.java b/src/main/java/io/papermc/paper/plugin/entrypoint/dependency/DependencyUtil.java
|
||||
index bfa258faf17ca6118aeddfa4e95bbd082bcd1390..c106c26ccd673e46c5ae9415096923b66efd8af2 100644
|
||||
--- a/src/main/java/io/papermc/paper/plugin/entrypoint/dependency/DependencyUtil.java
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/entrypoint/dependency/DependencyUtil.java
|
||||
@@ -2,6 +2,7 @@ package io.papermc.paper.plugin.entrypoint.dependency;
|
||||
|
||||
import com.google.common.graph.MutableGraph;
|
||||
import io.papermc.paper.plugin.configuration.PluginMeta;
|
||||
+import io.papermc.paper.plugin.manager.PaperPluginManagerImpl;
|
||||
import io.papermc.paper.plugin.provider.PluginProvider;
|
||||
import io.papermc.paper.plugin.provider.configuration.LoadOrderConfiguration;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
@@ -65,7 +66,7 @@ public class DependencyUtil {
|
||||
public static List<String> validateSimple(PluginMeta meta, Map<String, PluginProvider<?>> toLoad) {
|
||||
List<String> missingDependencies = new ArrayList<>();
|
||||
for (String hardDependency : meta.getPluginDependencies()) {
|
||||
- if (!toLoad.containsKey(hardDependency)) {
|
||||
+ if (!toLoad.containsKey(hardDependency) && !PaperPluginManagerImpl.getInstance().isPluginEnabled(hardDependency)) {
|
||||
missingDependencies.add(hardDependency);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,10 +39,10 @@ index 0000000000000000000000000000000000000000..44245b61f64e4e2eb21ac4f5e540aa9a
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
index 01e424792f68bac73ec41726031ebbb53df13da7..3a1968baf415d0fe6586c45749810878d3359c9e 100644
|
||||
index 3dc613116c086444ece88bcb0a569eeea953074f..c454ed979e4a2ef36bf0a8c7bd1bb64a62f59a5f 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
@@ -325,6 +325,32 @@ public final class PaperAdventure {
|
||||
@@ -335,6 +335,33 @@ public final class PaperAdventure {
|
||||
return asVanilla(source);
|
||||
}
|
||||
|
||||
@@ -72,17 +72,19 @@ index 01e424792f68bac73ec41726031ebbb53df13da7..3a1968baf415d0fe6586c45749810878
|
||||
+ }
|
||||
+ // Parchment end
|
||||
+
|
||||
// NBT
|
||||
|
||||
public static @Nullable BinaryTagHolder asBinaryTagHolder(final @Nullable CompoundTag tag) {
|
||||
+
|
||||
public static Packet<?> asSoundPacket(final Sound sound, final double x, final double y, final double z, final long seed, @Nullable BiConsumer<Packet<?>, Float> packetConsumer) {
|
||||
final ResourceLocation name = asVanilla(sound.name());
|
||||
final Optional<SoundEvent> soundEvent = BuiltInRegistries.SOUND_EVENT.getOptional(name);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 54c2b7fba83d6f06dba95b1bb5b487a02048d6e6..8b4ec0947de1bbfa5c8eb2634c1138cf91019456 100644
|
||||
index 18aac3da3c88f33b1a71a5920a8daa27e9723913..f8da87074468b34b18c774fba6868373ecb8a8a7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1719,6 +1719,43 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.neighborUpdater.neighborChanged(state, pos, sourceBlock, sourcePos, notify);
|
||||
@@ -2818,4 +2818,41 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return this.server.getPlayerList().getPlayer(uuid);
|
||||
}
|
||||
|
||||
// Paper end
|
||||
+
|
||||
+ public void playSeededSound(@org.jetbrains.annotations.Nullable Player except, double x, double y, double z, SoundEvent sound, SoundSource category, float volume, float pitch, long seed) {
|
||||
+ // Parchment start - sound event
|
||||
+ CraftEventFactory.playSoundEvent(new gg.projecteden.parchment.event.sound.SoundEvent(
|
||||
@@ -101,7 +103,6 @@ index 54c2b7fba83d6f06dba95b1bb5b487a02048d6e6..8b4ec0947de1bbfa5c8eb2634c1138cf
|
||||
+ // Parchment end
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void playSeededSound(@org.jetbrains.annotations.Nullable Player except, Entity entity, SoundEvent sound, SoundSource category, float volume, float pitch, long seed) {
|
||||
+ // Parchment start - sound event
|
||||
+ CraftEventFactory.playSoundEvent(new gg.projecteden.parchment.event.sound.SoundEvent(
|
||||
@@ -120,14 +121,12 @@ index 54c2b7fba83d6f06dba95b1bb5b487a02048d6e6..8b4ec0947de1bbfa5c8eb2634c1138cf
|
||||
+ // Parchment end
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
public void broadcastEntityEvent(Entity entity, byte status) {
|
||||
this.getChunkSource().broadcastAndSend(entity, new ClientboundEntityEventPacket(entity, status));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 7d6d3c8556033d289fdadc489e73fba478fce41a..9bf14867aada68e68e5931170a3bd7231215178a 100644
|
||||
index 5fad40fa88f697108e42461c41012d5964ed7d75..26857b67e403d650387cf789f3778bbced7ea0a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2273,7 +2273,19 @@ public class ServerPlayer extends Player {
|
||||
@@ -2328,7 +2328,19 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public void playNotifySound(SoundEvent event, SoundSource category, float volume, float pitch) {
|
||||
@@ -141,7 +140,7 @@ index 7d6d3c8556033d289fdadc489e73fba478fce41a..9bf14867aada68e68e5931170a3bd723
|
||||
+ volume,
|
||||
+ pitch
|
||||
+ ),
|
||||
+ gg.projecteden.parchment.event.sound.ParchmentSoundEvent.createEmitter(level, getX(), getY(), getZ()),
|
||||
+ gg.projecteden.parchment.event.sound.ParchmentSoundEvent.createEmitter(this.level(), getX(), getY(), getZ()),
|
||||
+ this.random.nextLong(), sound -> 0d, soundEvent -> java.util.Collections.singletonList(getBukkitEntity())
|
||||
+ ));
|
||||
+ // Parchment end
|
||||
@@ -149,25 +148,25 @@ index 7d6d3c8556033d289fdadc489e73fba478fce41a..9bf14867aada68e68e5931170a3bd723
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index a01654bb553c00459e64f16e5ccc91b70cc84444..f67d6207083811f651dc0939da4e3b7a8d683e13 100644
|
||||
index 683b5d78f9e3dc34e40c54683f64be32317797ac..96b79fbd763fe981862d5e1d73a3dd71f5da445f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -923,7 +923,7 @@ public abstract class PlayerList {
|
||||
if (flag2 && !isLocAltered) {
|
||||
@@ -946,7 +946,7 @@ public abstract class PlayerList {
|
||||
BlockState data = worldserver1.getBlockState(blockposition);
|
||||
worldserver1.setBlock(blockposition, data.setValue(net.minecraft.world.level.block.RespawnAnchorBlock.CHARGE, data.getValue(net.minecraft.world.level.block.RespawnAnchorBlock.CHARGE) - 1), 3);
|
||||
}
|
||||
- entityplayer1.connection.send(new ClientboundSoundPacket(SoundEvents.RESPAWN_ANCHOR_DEPLETE, SoundSource.BLOCKS, (double) location.getX(), (double) location.getY(), (double) location.getZ(), 1.0F, 1.0F, worldserver1.getRandom().nextLong()));
|
||||
+ entityplayer1.playNotifySound(SoundEvents.RESPAWN_ANCHOR_DEPLETE.value(), SoundSource.BLOCKS, 1.0F, 1.0F); // Parchment - use existing play sound method
|
||||
// Paper end
|
||||
}
|
||||
// Added from changeDimension
|
||||
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 61597ebe2f9faff43994c475074b87d11905e582..07f8e2bfabd9292b9f594bf408d40fc939497a1c 100644
|
||||
index 58152160d609d0e9d105153aeb166a56a7955603..66866e1dabe79a78df255fc17842bdb36988d86f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1890,7 +1890,21 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1918,7 +1918,21 @@ public abstract class Player extends LivingEntity {
|
||||
private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) {
|
||||
fromEntity.level.playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself
|
||||
fromEntity.level().playSound(fromEntity, x, y, z, soundEffect, soundCategory, volume, pitch); // This will not send the effect to the entity himself
|
||||
if (fromEntity instanceof ServerPlayer) {
|
||||
- ((ServerPlayer) fromEntity).connection.send(new net.minecraft.network.protocol.game.ClientboundSoundPacket(net.minecraft.core.registries.BuiltInRegistries.SOUND_EVENT.wrapAsHolder(soundEffect), soundCategory, x, y, z, volume, pitch, fromEntity.random.nextLong()));
|
||||
+ // Parchment start - sound event
|
||||
@@ -179,7 +178,7 @@ index 61597ebe2f9faff43994c475074b87d11905e582..07f8e2bfabd9292b9f594bf408d40fc9
|
||||
+ volume,
|
||||
+ pitch
|
||||
+ ),
|
||||
+ gg.projecteden.parchment.event.sound.ParchmentSoundEvent.createEmitter(fromEntity.level, x, y, z),
|
||||
+ gg.projecteden.parchment.event.sound.ParchmentSoundEvent.createEmitter(fromEntity.level(), x, y, z),
|
||||
+ fromEntity.random.nextLong(),
|
||||
+ sound -> 0d,
|
||||
+ soundEvent -> java.util.Collections.singletonList(((ServerPlayer) fromEntity).getBukkitEntity())
|
||||
@@ -189,7 +188,7 @@ index 61597ebe2f9faff43994c475074b87d11905e582..07f8e2bfabd9292b9f594bf408d40fc9
|
||||
}
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raid.java b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
index 08b18428e867baf14f551beb72e3875b0c420639..898177dbdbd14d40ab87122f874b0a660ca6b54a 100644
|
||||
index f7399737548483905f3b5c08a03876b0da54b714..e668de87a5b58febf451fe4be79e47143f4eab01 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -538,7 +538,7 @@ public class Raid {
|
||||
@@ -202,13 +201,13 @@ index 08b18428e867baf14f551beb72e3875b0c420639..898177dbdbd14d40ab87122f874b0a66
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 6a52ae70b5f7fd9953b6b2605cae722f606e7fec..57fef48dbe91b881c8f75782d9dbeda9069cf8de 100644
|
||||
index a9a58f0bb19e034cffdafcc38fdc9003744a5d6c..f238fda2543d3dae4d66c83a2230f858aff822df 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1939,4 +1939,53 @@ public class CraftEventFactory {
|
||||
return event.callEvent();
|
||||
@@ -2011,4 +2011,53 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - add EntityFertilizeEggEvent
|
||||
+
|
||||
+ // Parchment start
|
||||
+ private static net.minecraft.network.protocol.@org.jetbrains.annotations.NotNull Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> handleSoundEvent(gg.projecteden.parchment.event.sound.SoundEvent event, CraftPlayer recipient) {
|
||||
|
||||
@@ -5,22 +5,26 @@ Subject: [PATCH] Add PlayerUseRespawnAnchorEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
||||
index 491ad2098e982f3c947fcae6f258f0b1aa44a562..7d33dae2617991bce244ad906df7053c22e3f515 100644
|
||||
index 2ed78cf83c0ae66a6ddba1ff307da89a24b0d0a8..15d4d703762d54ebab57814a28ad8d0e6500df6d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
|
||||
@@ -51,23 +51,48 @@ public class RespawnAnchorBlock extends Block {
|
||||
@@ -56,25 +56,47 @@ public class RespawnAnchorBlock extends Block {
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
ItemStack itemStack = player.getItemInHand(hand);
|
||||
- ItemStack itemstack = player.getItemInHand(hand);
|
||||
-
|
||||
- if (hand == InteractionHand.MAIN_HAND && !RespawnAnchorBlock.isRespawnFuel(itemstack) && RespawnAnchorBlock.isRespawnFuel(player.getItemInHand(InteractionHand.OFF_HAND))) {
|
||||
+ ItemStack itemstack = player.getItemInHand(hand);
|
||||
+
|
||||
+ // Parchment start -- PlayerUseRespawnAnchorEvent
|
||||
+ org.bukkit.entity.Player bukkitPlayer = player.getBukkitEntity() instanceof org.bukkit.entity.Player ? (org.bukkit.entity.Player) player.getBukkitEntity() : null;
|
||||
+ org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(world, pos);
|
||||
+ gg.projecteden.parchment.event.player.PlayerUseRespawnAnchorEvent.RespawnAnchorResult result;
|
||||
+ // Parchment end
|
||||
if (hand == InteractionHand.MAIN_HAND && !isRespawnFuel(itemStack) && isRespawnFuel(player.getItemInHand(InteractionHand.OFF_HAND))) {
|
||||
return InteractionResult.PASS;
|
||||
} else if (isRespawnFuel(itemStack) && canBeCharged(state)) {
|
||||
+ if (hand == InteractionHand.MAIN_HAND && !isRespawnFuel(itemstack) && isRespawnFuel(player.getItemInHand(InteractionHand.OFF_HAND))) {
|
||||
+ return InteractionResult.PASS;
|
||||
+ } else if (isRespawnFuel(itemstack) && canBeCharged(state)) {
|
||||
+ // Parchment start -- PlayerUseRespawnAnchorEvent
|
||||
+ result = gg.projecteden.parchment.event.player.PlayerUseRespawnAnchorEvent.RespawnAnchorResult.CHARGE;
|
||||
+ } else if (state.getValue(CHARGE) == 0) {
|
||||
@@ -32,26 +36,26 @@ index 491ad2098e982f3c947fcae6f258f0b1aa44a562..7d33dae2617991bce244ad906df7053c
|
||||
+ } else {
|
||||
+ return InteractionResult.SUCCESS;
|
||||
+ }
|
||||
+
|
||||
+ if (bukkitPlayer != null) {
|
||||
+ gg.projecteden.parchment.event.player.PlayerUseRespawnAnchorEvent event = new gg.projecteden.parchment.event.player.PlayerUseRespawnAnchorEvent(bukkitPlayer, block, result);
|
||||
+ event.callEvent();
|
||||
+ result = event.getResult();
|
||||
+ }
|
||||
+
|
||||
+ if (result == gg.projecteden.parchment.event.player.PlayerUseRespawnAnchorEvent.RespawnAnchorResult.NOTHING) {
|
||||
+ return InteractionResult.PASS;
|
||||
return InteractionResult.PASS;
|
||||
- } else if (RespawnAnchorBlock.isRespawnFuel(itemstack) && RespawnAnchorBlock.canBeCharged(state)) {
|
||||
- RespawnAnchorBlock.charge(player, world, pos, state);
|
||||
+ } else if (result == gg.projecteden.parchment.event.player.PlayerUseRespawnAnchorEvent.RespawnAnchorResult.CHARGE) {
|
||||
+ // Parchment end
|
||||
charge(world, pos, state);
|
||||
+ charge(player, world, pos, state);
|
||||
if (!player.getAbilities().instabuild) {
|
||||
itemStack.shrink(1);
|
||||
itemstack.shrink(1);
|
||||
}
|
||||
|
||||
return InteractionResult.sidedSuccess(world.isClientSide);
|
||||
- } else if (state.getValue(CHARGE) == 0) {
|
||||
- } else if ((Integer) state.getValue(RespawnAnchorBlock.CHARGE) == 0) {
|
||||
- return InteractionResult.PASS;
|
||||
- } else if (!canSetSpawn(world)) {
|
||||
- } else if (!RespawnAnchorBlock.canSetSpawn(world)) {
|
||||
- if (!world.isClientSide) {
|
||||
- this.explode(state, world, pos);
|
||||
- }
|
||||
@@ -64,12 +68,4 @@ index 491ad2098e982f3c947fcae6f258f0b1aa44a562..7d33dae2617991bce244ad906df7053c
|
||||
+ // Parchment end
|
||||
} else {
|
||||
if (!world.isClientSide) {
|
||||
ServerPlayer serverPlayer = (ServerPlayer)player;
|
||||
@@ -82,7 +107,6 @@ public class RespawnAnchorBlock extends Block {
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
-
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
}
|
||||
ServerPlayer entityplayer = (ServerPlayer) player;
|
||||
|
||||
@@ -4,143 +4,34 @@ Date: Fri, 18 Jun 2021 14:04:39 -0400
|
||||
Subject: [PATCH] Add origin location to EntityDamageByBlockEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/damagesource/BadRespawnPointDamage.java b/src/main/java/net/minecraft/world/damagesource/BadRespawnPointDamage.java
|
||||
index c6efd24673ba6d05266d2b45eae562749a565417..688744157a2f5302c96ef6bbdb0587161fa05f26 100644
|
||||
--- a/src/main/java/net/minecraft/world/damagesource/BadRespawnPointDamage.java
|
||||
+++ b/src/main/java/net/minecraft/world/damagesource/BadRespawnPointDamage.java
|
||||
@@ -14,6 +14,13 @@ public class BadRespawnPointDamage extends PointDamageSource {
|
||||
this.setExplosion();
|
||||
}
|
||||
|
||||
+ // Parchment start
|
||||
+ protected BadRespawnPointDamage(org.bukkit.Location location) {
|
||||
+ this(new Vec3(location.x(), location.y(), location.z()));
|
||||
+ location(location);
|
||||
+ }
|
||||
+ // Parchment end
|
||||
+
|
||||
@Override
|
||||
public Component getLocalizedDeathMessage(LivingEntity entity) {
|
||||
Component component = ComponentUtils.wrapInSquareBrackets(Component.translatable("death.attack.badRespawnPoint.link")).withStyle((style) -> {
|
||||
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
index 2848cb7c76e94d8349f042dc92daf01322a6ce5a..39aa0d0120c1e65377b17a9dca29c817c6b66e7a 100644
|
||||
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.world.entity.projectile.FireworkRocketEntity;
|
||||
import net.minecraft.world.entity.projectile.WitherSkull;
|
||||
import net.minecraft.world.level.Explosion;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
+import org.bukkit.Location;
|
||||
|
||||
public class DamageSource {
|
||||
|
||||
@@ -74,6 +75,20 @@ public class DamageSource {
|
||||
return this;
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Parchment start
|
||||
+ private @Nullable org.bukkit.Location location;
|
||||
+
|
||||
+ public @Nullable org.bukkit.Location getLocation() {
|
||||
+ return location;
|
||||
+ }
|
||||
+
|
||||
+ public DamageSource location(@Nullable org.bukkit.Location location) {
|
||||
+ this.location = location;
|
||||
+ return this;
|
||||
+ }
|
||||
+ // Parchment end
|
||||
+
|
||||
public @Nullable org.bukkit.block.BlockState explodedBlockState; // Paper - add exploded state
|
||||
|
||||
public static DamageSource fallingBlock(Entity attacker) {
|
||||
@@ -137,7 +152,7 @@ public class DamageSource {
|
||||
}
|
||||
|
||||
public static DamageSource explosion(@Nullable Explosion explosion) {
|
||||
- return explosion != null ? DamageSource.explosion(explosion.getDirectSourceEntity(), explosion.getIndirectSourceEntity()) : DamageSource.explosion((Entity) null, (Entity) null);
|
||||
+ return explosion != null ? DamageSource.explosion(explosion.getDirectSourceEntity(), explosion.getIndirectSourceEntity()).location(explosion.getBukkitLocation()) : DamageSource.explosion((Entity) null, (Entity) null);
|
||||
}
|
||||
|
||||
public static DamageSource explosion(@Nullable Entity explosion, @Nullable Entity attacker) {
|
||||
@@ -154,7 +169,8 @@ public class DamageSource {
|
||||
return badRespawnPointExplosion(pos, null);
|
||||
}
|
||||
public static DamageSource badRespawnPointExplosion(Vec3 pos, @Nullable org.bukkit.block.BlockState explodedBlockState) {
|
||||
- DamageSource source = new BadRespawnPointDamage(pos);
|
||||
+ Location loc = new Location(explodedBlockState.getWorld(), pos.x, pos.y, pos.z);
|
||||
+ DamageSource source = new BadRespawnPointDamage(loc);
|
||||
source.explodedBlockState = explodedBlockState;
|
||||
return source;
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index c7caaebfb4b9f28cbe700d88fdcf232a500e8ca7..7105fb85c0e689c9ac5201e09c0a0c614aba737c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -98,7 +98,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
private final Node[] nodes = new Node[24];
|
||||
private final int[] nodeAdjacency = new int[24];
|
||||
private final BinaryHeap openSet = new BinaryHeap();
|
||||
- private Explosion explosionSource = new Explosion(null, this, null, null, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.BlockInteraction.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
||||
+ private Explosion explosionSource;// = new Explosion(null, this, null, null, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.BlockInteraction.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource() // Parchment - moved into contructor to fix null world
|
||||
// Paper start - add var for save custom podium
|
||||
@Nullable
|
||||
private BlockPos podium;
|
||||
@@ -106,6 +106,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
|
||||
public EnderDragon(EntityType<? extends EnderDragon> entitytypes, Level world) {
|
||||
super(EntityType.ENDER_DRAGON, world);
|
||||
+ explosionSource = new Explosion(world, this, null, null, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.BlockInteraction.DESTROY); // Parchment - fix null world
|
||||
this.subEntities = new EnderDragonPart[]{this.head, this.neck, this.body, this.tail1, this.tail2, this.tail3, this.wing1, this.wing2};
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.noPhysics = true;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index a213f4098859858a73ddd601bbe8c7511972e0d5..1890942b4dd70dd64bb061a166eaecbfad24a7ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -495,6 +495,13 @@ public class Explosion {
|
||||
return this.toBlow;
|
||||
}
|
||||
|
||||
+ // Parchment start
|
||||
+ public @Nullable Location getBukkitLocation() {
|
||||
+ if (this.level == null) return null;
|
||||
+ return new Location(level.getWorld(), x, y, z);
|
||||
+ }
|
||||
+ // Parchment end
|
||||
+
|
||||
public static enum BlockInteraction {
|
||||
|
||||
KEEP, DESTROY, DESTROY_WITH_DECAY;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index d63e123b5f7c36d5010f242a273f26963ad3b4b4..29e18c86bbfc8517bae76af62fd1bd4120ec31cc 100644
|
||||
index f238fda2543d3dae4d66c83a2230f858aff822df..34849bcfcc18d547efa3141ce1ec30311988da40 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -972,7 +972,7 @@ public class CraftEventFactory {
|
||||
@@ -990,7 +990,7 @@ public class CraftEventFactory {
|
||||
CraftEventFactory.entityDamage = null;
|
||||
EntityDamageEvent event;
|
||||
if (damager == null) {
|
||||
- event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, modifiers, modifierFunctions);
|
||||
+ event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, source.getLocation(), modifiers, modifierFunctions);
|
||||
+ event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, source.getEntity().getBukkitEntity().getLocation(), modifiers, modifierFunctions);
|
||||
} else if (entity instanceof EnderDragon && /*PAIL FIXME ((EntityEnderDragon) entity).target == damager*/ false) {
|
||||
event = new EntityDamageEvent(entity.getBukkitEntity(), DamageCause.ENTITY_EXPLOSION, modifiers, modifierFunctions);
|
||||
} else {
|
||||
@@ -1012,7 +1012,7 @@ public class CraftEventFactory {
|
||||
@@ -1038,7 +1038,7 @@ public class CraftEventFactory {
|
||||
|
||||
return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API
|
||||
} else if (source == DamageSource.OUT_OF_WORLD) {
|
||||
} else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) {
|
||||
- EntityDamageEvent event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.VOID, modifiers, modifierFunctions);
|
||||
+ EntityDamageEvent event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.VOID, entity.getBukkitEntity().getLocation(), modifiers, modifierFunctions);
|
||||
event.setCancelled(cancelled);
|
||||
CraftEventFactory.callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@@ -1022,7 +1022,7 @@ public class CraftEventFactory {
|
||||
@@ -1048,7 +1048,7 @@ public class CraftEventFactory {
|
||||
}
|
||||
return event;
|
||||
} else if (source == DamageSource.LAVA) {
|
||||
} else if (source.is(DamageTypes.LAVA)) {
|
||||
- EntityDamageEvent event = (new EntityDamageByBlockEvent(CraftEventFactory.blockDamage, entity.getBukkitEntity(), DamageCause.LAVA, modifiers, modifierFunctions));
|
||||
+ EntityDamageEvent event = (new EntityDamageByBlockEvent(CraftEventFactory.blockDamage, entity.getBukkitEntity(), DamageCause.LAVA, entity.getBukkitEntity().getLocation(), modifiers, modifierFunctions));
|
||||
+ EntityDamageEvent event = (new EntityDamageByBlockEvent(CraftEventFactory.blockDamage, entity.getBukkitEntity(), DamageCause.LAVA, blockDamage.getLocation(), modifiers, modifierFunctions));
|
||||
event.setCancelled(cancelled);
|
||||
|
||||
Block damager = CraftEventFactory.blockDamage;
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add UnsafeValues#canPlaceItemOn
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 17336102d37a5ab05c3b3c93fcf46961d0ffa7e2..9e7df62dde2f0b526efc4f14e690e592ba80dea4 100644
|
||||
index b059bb46b649cbf82debdb8d58fe4ba77d040276..407d39e3c9eb8cd68f5c82ca7f4d1ff5f2c380fb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -622,6 +622,55 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -626,6 +626,55 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#setGameProfile
|
||||
|
||||
|
||||
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 07f8e2bfabd9292b9f594bf408d40fc939497a1c..6237d023fe6e449077cb53d93f003ae92dc6b4a0 100644
|
||||
index 66866e1dabe79a78df255fc17842bdb36988d86f..fd0c584d459f912a714e464e40803d4e3dca8bd8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1504,6 +1504,12 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1510,6 +1510,12 @@ public abstract class Player extends LivingEntity {
|
||||
return this.gameProfile;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose MCUtil Executors
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 71d050445caa5dc22bf9b6070db92272c7b104f6..0ac6768fea72e4c92165ca0a6d3a9dafa59b2548 100644
|
||||
index 46831bd86a010c7f0116473876fd90af5abdce4b..bdbd310a227afc59a3a5142a9408016d3bdc0582 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2938,4 +2938,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2972,4 +2972,16 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
// Paper end
|
||||
@@ -8,20 +8,23 @@ to easily get the items being dropped by any
|
||||
block instead of only blocks broken by players.
|
||||
|
||||
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 7b71073027f4cf79736546500ededdfbb83d968e..b0002a52d15a250e958aa41ddf3cc2296182363d 100644
|
||||
index 9522e646529f3d849471931b4b3c0d133e7fcfc5..622632157b0815d91a8fb807aa9122bbebb213b1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -306,7 +306,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
ServerLevel worldserver = lootContext.getLevel();
|
||||
BlockPos blockposition = new BlockPos((Vec3) lootContext.getParameter(LootContextParams.ORIGIN));
|
||||
@@ -300,9 +300,19 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
return state.getDrops(lootparams_a);
|
||||
}
|
||||
|
||||
- state.getDrops(lootContext).forEach((itemstack) -> {
|
||||
+ public static void dropResources(BlockState state, net.minecraft.world.level.storage.loot.LootParams.Builder lootContext) {
|
||||
+ ServerLevel worldserver = lootContext.getLevel();
|
||||
+ BlockPos blockposition = BlockPos.containing((net.minecraft.core.Position) lootContext.getParameter(LootContextParams.ORIGIN));
|
||||
+
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDropResourcesEvent(worldserver, blockposition, state.getDrops(lootContext)).forEach((itemstack) -> { // Parchment
|
||||
Block.popResource(worldserver, blockposition, itemstack);
|
||||
});
|
||||
state.spawnAfterBreak(worldserver, blockposition, ItemStack.EMPTY, true);
|
||||
@@ -314,7 +314,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
|
||||
+ Block.popResource(worldserver, blockposition, itemstack);
|
||||
+ });
|
||||
+ state.spawnAfterBreak(worldserver, blockposition, ItemStack.EMPTY, true);
|
||||
+ }
|
||||
+
|
||||
public static void dropResources(BlockState state, Level world, BlockPos pos) {
|
||||
if (world instanceof ServerLevel) {
|
||||
- Block.getDrops(state, (ServerLevel) world, pos, (BlockEntity) null).forEach((itemstack) -> {
|
||||
@@ -29,7 +32,7 @@ index 7b71073027f4cf79736546500ededdfbb83d968e..b0002a52d15a250e958aa41ddf3cc229
|
||||
Block.popResource(world, pos, itemstack);
|
||||
});
|
||||
state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY, true);
|
||||
@@ -324,7 +324,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -312,7 +322,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
|
||||
public static void dropResources(BlockState state, LevelAccessor world, BlockPos pos, @Nullable BlockEntity blockEntity) {
|
||||
if (world instanceof ServerLevel) {
|
||||
@@ -38,20 +41,21 @@ index 7b71073027f4cf79736546500ededdfbb83d968e..b0002a52d15a250e958aa41ddf3cc229
|
||||
Block.popResource((ServerLevel) world, pos, itemstack);
|
||||
});
|
||||
state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY, true);
|
||||
@@ -351,7 +351,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -339,7 +349,8 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
|
||||
public static void dropResources(BlockState state, Level world, BlockPos pos, @Nullable BlockEntity blockEntity, Entity entity, ItemStack stack) {
|
||||
public static void dropResources(BlockState state, Level world, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity entity, ItemStack tool) {
|
||||
if (world instanceof ServerLevel) {
|
||||
- Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, stack).forEach((itemstack1) -> {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDropResourcesEvent(world, pos, Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, stack)).forEach((itemstack1) -> { // Parchment
|
||||
- Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, tool).forEach((itemstack1) -> {
|
||||
+
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDropResourcesEvent(world, pos, Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, tool)).forEach((itemstack1) -> { // Parchment
|
||||
Block.popResource(world, pos, itemstack1);
|
||||
});
|
||||
state.spawnAfterBreak((ServerLevel) world, pos, stack, true);
|
||||
state.spawnAfterBreak((ServerLevel) world, pos, tool, true);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 2f33f32852de0ba4f175a26f30c384a7b1269c3a..c525ee0d113662a254d38e42d2b28b7f3420ff0b 100644
|
||||
index 34849bcfcc18d547efa3141ce1ec30311988da40..902cf45b1da660f1901bf334396bac50353d04e5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1987,5 +1987,19 @@ public class CraftEventFactory {
|
||||
@@ -2059,5 +2059,20 @@ public class CraftEventFactory {
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -70,4 +74,5 @@ index 2f33f32852de0ba4f175a26f30c384a7b1269c3a..c525ee0d113662a254d38e42d2b28b7f
|
||||
+ return items;
|
||||
+ }
|
||||
// Parchment end
|
||||
+
|
||||
}
|
||||
@@ -215,10 +215,10 @@ index 0000000000000000000000000000000000000000..e7114e456f818d7bdd4081620f4b9b93
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f8d321e925bf2708e51590542325c1bdc67d5964..c747c07b78f28b1fbc227148cc898826c718f943 100644
|
||||
index 89514af7f3771db496e7e2a40fa4e7fdf527f095..5e6a5b7bf9ecea3445ae3f8de1e8b826afc3ccab 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2379,4 +2379,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2430,4 +2430,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.adventure$pointers;
|
||||
}
|
||||
// Paper end
|
||||
@@ -226,7 +226,7 @@ index f8d321e925bf2708e51590542325c1bdc67d5964..c747c07b78f28b1fbc227148cc898826
|
||||
+ // Parchment start
|
||||
+ @Override
|
||||
+ public ItemStack smeltItem(ItemStack toSmelt, gg.projecteden.parchment.inventory.RecipeType recipeType) {
|
||||
+ return world.getRecipeManager().getRecipeFor(gg.projecteden.parchment.inventory.CraftRecipeType.asCookingRecipe(recipeType), new gg.projecteden.parchment.inventory.SingletonContainer(toSmelt), world).map(recipe -> recipe.getResultItem().getBukkitStack()).orElse(null);
|
||||
+ return world.getRecipeManager().getRecipeFor(gg.projecteden.parchment.inventory.CraftRecipeType.asCookingRecipe(recipeType), new gg.projecteden.parchment.inventory.SingletonContainer(toSmelt), world).map(recipe -> recipe.getResultItem(world.registryAccess()).getBukkitStack()).orElse(null);
|
||||
+ }
|
||||
+ // Parchment end
|
||||
}
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable sleep status announcements
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 09d1206170bd0257bdf24741cfed6c1774886bac..8ee9d63cbd2805d33bf0bf4ac2a1d8f2f8377e2d 100644
|
||||
index f8da87074468b34b18c774fba6868373ecb8a8a7..bbe67e33aee5dae86eda9eefe74db4ffd781cc80 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -975,7 +975,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1116,7 +1116,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
private void announceSleepStatus() {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for ticking TIME_SINCE_REST
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
index 4532f3a0d74feae0a1249b53e1bfbc18a8808b32..c66db0468a9ab09cc89805e7bf7be09e7a7a1746 100644
|
||||
index a33de97340f14219291c4175e9194914cdf441db..a6341580f9c1a163ddb9c380a2c5c1658cb5bf0d 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
@@ -259,6 +259,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -265,6 +265,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
}
|
||||
|
||||
public boolean disablePlayerCrits = false;
|
||||
@@ -17,15 +17,15 @@ index 4532f3a0d74feae0a1249b53e1bfbc18a8808b32..c66db0468a9ab09cc89805e7bf7be09e
|
||||
public PillagerPatrols pillagerPatrols;
|
||||
|
||||
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 6237d023fe6e449077cb53d93f003ae92dc6b4a0..b6da54cbb620a3ec849db912b8a6b903f0b28946 100644
|
||||
index fd0c584d459f912a714e464e40803d4e3dca8bd8..870fefca60162ca75bcdd04abf721f321ec1b745 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -288,7 +288,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -292,7 +292,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.awardStat(Stats.CROUCH_TIME);
|
||||
}
|
||||
|
||||
- if (!this.isSleeping()) {
|
||||
+ if (!this.isSleeping() && this.level.paperConfig().entities.behavior.tickTimeSinceSleep) { // Parchment
|
||||
+ if (!this.isSleeping() && this.level().paperConfig().entities.behavior.tickTimeSinceSleep) { // Parchment
|
||||
this.awardStat(Stats.TIME_SINCE_REST);
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,11 @@ Subject: [PATCH] Add HangingFrame Tick API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
index 334a47b5e0d205c57dfcbb17168cbd3f21d15606..1ffc318c12cde935aea58d6d1efff53818893bf9 100644
|
||||
index 66cf0a6cd1525ecf2615809210a26d55f445d07d..360ca6458083fa4018f11fcdade3ce930835db72 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
@@ -41,6 +41,7 @@ public abstract class HangingEntity extends Entity {
|
||||
private int checkInterval; { this.checkInterval = this.getId() % this.level.spigotConfig.hangingTickFrequency; } // Paper
|
||||
private int checkInterval; { this.checkInterval = this.getId() % this.level().spigotConfig.hangingTickFrequency; } // Paper
|
||||
public BlockPos pos;
|
||||
protected Direction direction;
|
||||
+ public boolean tick = true; // Parchment
|
||||
@@ -20,10 +20,10 @@ index 334a47b5e0d205c57dfcbb17168cbd3f21d15606..1ffc318c12cde935aea58d6d1efff538
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
- if (!this.level.isClientSide) {
|
||||
+ if (tick && !this.level.isClientSide) { // Parchment
|
||||
this.checkOutOfWorld();
|
||||
if (this.checkInterval++ == this.level.spigotConfig.hangingTickFrequency) { // Spigot
|
||||
- if (!this.level().isClientSide) {
|
||||
+ if (tick && !this.level().isClientSide) { // Parchment
|
||||
this.checkBelowWorld();
|
||||
if (this.checkInterval++ == this.level().spigotConfig.hangingTickFrequency) { // Spigot
|
||||
this.checkInterval = 0;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java
|
||||
index 62e11bf104b8d39ac73883e2a5d207e5f7393253..639bd33ae91ed818bda29fed776adb8c169458d7 100644
|
||||
@@ -5,24 +5,24 @@ Subject: [PATCH] Add Player#getHiddenEntities API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b32f44beab2c9790ee2da8403e362e8b3ecc6175..6ce67ec49d0784e44e92d8735270996be11436af 100644
|
||||
index e41f5417304f5b05fa7e2f6b6e1c0095e820f1cc..50a1a50e13f54d3db843d5f378432409e159caef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1797,6 +1797,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
registerEntity(player);
|
||||
}
|
||||
@@ -1913,6 +1913,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); // Paper
|
||||
}
|
||||
// Paper start
|
||||
+
|
||||
+ // Parchment start
|
||||
+ @Override
|
||||
+ public Set<UUID> getHiddenEntities(Plugin plugin) {
|
||||
+ return hiddenEntities.entrySet().stream()
|
||||
+ return invertedVisibilityEntities.entrySet().stream()
|
||||
+ .filter(entry -> entry.getValue().contains(CraftPlayer.getPluginWeakReference(plugin)))
|
||||
+ .map(Map.Entry::getKey)
|
||||
+ .collect(java.util.stream.Collectors.toSet());
|
||||
+ }
|
||||
+ // Parchment end
|
||||
+
|
||||
@Override
|
||||
public void setPlayerProfile(com.destroystokyo.paper.profile.PlayerProfile profile) {
|
||||
ServerPlayer self = getHandle();
|
||||
self.gameProfile = com.destroystokyo.paper.profile.CraftPlayerProfile.asAuthlibCopy(profile);
|
||||
ServerPlayer self = this.getHandle();
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Big Barrels
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
index f52487e1cfcfab1bf22ab2cb52f998283a86e340..9f8394d0348b068623b3acafe18b40a3ed0503d0 100644
|
||||
index 416aa989ebb18a8741cc9d605a1180ab830f6643..c48466a4d2115f4fa6121b6bcba87b838743af34 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
@@ -67,7 +67,7 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Timings Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index 06bff37e4c1fddd3be6343049a66787c63fb420c..b6567f558cd25698208a06513c241646e0b28341 100644
|
||||
index c07eb451a576811a39021f6f97103c77488fd001..58fd2d024a9de3a9a31cde948bb9fc8b68f461bc 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -349,6 +349,8 @@ public class TimingsExport extends Thread {
|
||||
@@ -350,6 +350,8 @@ public class TimingsExport extends Thread {
|
||||
timingsURL = con.getHeaderField("Location");
|
||||
listeners.sendMessage(text("View Timings Report: ", NamedTextColor.GREEN).append(text(timingsURL).clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, timingsURL))));
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Expanded Insomnia API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 6ce67ec49d0784e44e92d8735270996be11436af..51bb661fe3f45dbcf0c94779413fb7aabc04f9b2 100644
|
||||
index 50a1a50e13f54d3db843d5f378432409e159caef..11e4bd75b10c2f4b292d2ce3c683eb2373609a20 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -75,6 +75,7 @@ import net.minecraft.server.network.ServerGamePacketListenerImpl;
|
||||
@@ -76,6 +76,7 @@ import net.minecraft.server.network.ServerGamePacketListenerImpl;
|
||||
import net.minecraft.server.players.UserWhiteListEntry;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -16,7 +16,7 @@ index 6ce67ec49d0784e44e92d8735270996be11436af..51bb661fe3f45dbcf0c94779413fb7aa
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeMap;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
@@ -178,6 +179,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -185,6 +186,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
|
||||
private long lastSaveTime;
|
||||
// Paper end
|
||||
@@ -24,14 +24,14 @@ index 6ce67ec49d0784e44e92d8735270996be11436af..51bb661fe3f45dbcf0c94779413fb7aa
|
||||
|
||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||
super(server, entity);
|
||||
@@ -1874,6 +1876,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2033,6 +2035,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this;
|
||||
}
|
||||
|
||||
+ // Parchment start
|
||||
+ @Override
|
||||
+ public boolean isInsomniac() {
|
||||
+ return EntitySelector.isInsomniac.test(this.getHandle());
|
||||
+ return EntitySelector.IS_INSOMNIAC.test(this.getHandle());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -5,12 +5,12 @@ Subject: [PATCH] Add spam bypass permission
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3472f7f9b98d6d9c9f6465872803ef17fa67486d..70b539b115179ac32cb5c1a72a68d6bc90b5c465 100644
|
||||
index 4dd04aa5f4affd42afbce718ec3dfaf7f1fafe2f..ed35299215a8f01d7a4c53fe2a63d07bdd6d53a0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -863,16 +863,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -882,16 +882,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async
|
||||
// CraftBukkit start
|
||||
+ if (!this.getCraftPlayer().hasPermission("spam.bypass")) { // Parchment - spam bypass
|
||||
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
||||
@@ -22,14 +22,14 @@ index 3472f7f9b98d6d9c9f6465872803ef17fa67486d..70b539b115179ac32cb5c1a72a68d6bc
|
||||
+ String str = packet.getCommand();
|
||||
+ int index = -1;
|
||||
if (str.length() > 64 && ((index = str.indexOf(' ')) == -1 || index >= 64)) {
|
||||
server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - kick event cause
|
||||
server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper
|
||||
return;
|
||||
}
|
||||
+ } // Parchment - spam bypass
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
// Paper start - Don't suggest if tab-complete is disabled
|
||||
@@ -2553,6 +2556,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2562,6 +2565,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
// Spigot start - spam exclusions
|
||||
private void detectRateSpam(String s) {
|
||||
@@ -37,16 +37,16 @@ index 3472f7f9b98d6d9c9f6465872803ef17fa67486d..70b539b115179ac32cb5c1a72a68d6bc
|
||||
// CraftBukkit start - replaced with thread safe throttle
|
||||
boolean counted = true;
|
||||
for ( String exclude : org.spigotmc.SpigotConfig.spamExclusions )
|
||||
@@ -3248,10 +3252,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
||||
@@ -3284,10 +3288,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
// Paper start
|
||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
+ if (!this.getCraftPlayer().hasPermission("spam.bypass")) { // Parchment - spam bypass
|
||||
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
||||
server.scheduleOnMain(() -> this.disconnect(net.minecraft.network.chat.Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - kick event cause
|
||||
if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
||||
this.server.scheduleOnMain(() -> this.disconnect(net.minecraft.network.chat.Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - kick event cause
|
||||
return;
|
||||
}
|
||||
+ } // Parchment - spam bypass
|
||||
}
|
||||
// Paper end
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||
@@ -5,11 +5,11 @@ Subject: [PATCH] Disable set respawn message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 9bf14867aada68e68e5931170a3bd7231215178a..05bb50a0419fe12ae8791f18438951c13b1b6399 100644
|
||||
index 26857b67e403d650387cf789f3778bbced7ea0a4..e07d651cbf8730f8427114438307ce216f2fef07 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2223,10 +2223,10 @@ public class ServerPlayer extends Player {
|
||||
angle = (float) event.getLocation().getYaw();
|
||||
@@ -2278,10 +2278,10 @@ public class ServerPlayer extends Player {
|
||||
angle = event.getLocation().getYaw();
|
||||
forced = event.isForced();
|
||||
// Paper end
|
||||
-
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Make FixLight use action bar
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||
index 450bd95218852174cfbc88d4517e17daee5ffd5f..794842cb3dfa0732ccecf625b97dbc6c311a8a18 100644
|
||||
index 7784d72ddd6db00c674e22759c00c430222c4b85..b336789b74d6d6819b38e78cb2014f61de3f004b 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||
@@ -24,6 +24,7 @@ import static net.kyori.adventure.text.format.NamedTextColor.BLUE;
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Remove Hanging Entity Debug
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
index 1ffc318c12cde935aea58d6d1efff53818893bf9..7ace41bc1a215849cae36a2642aade6f676882f0 100644
|
||||
index 360ca6458083fa4018f11fcdade3ce930835db72..94f105c829d196c1526c8251527fe519a5e0180e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
|
||||
@@ -272,7 +272,7 @@ public abstract class HangingEntity extends Entity {
|
||||
151
patches/server/0023-Add-PreEntityShootBowEvent.patch
Normal file
151
patches/server/0023-Add-PreEntityShootBowEvent.patch
Normal file
@@ -0,0 +1,151 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-MC <cjblanton2@gmail.com>
|
||||
Date: Thu, 16 Mar 2023 23:11:05 -0400
|
||||
Subject: [PATCH] Add PreEntityShootBowEvent
|
||||
|
||||
|
||||
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 9ca1e9d95e62929c0015d5ca2c2f9c70e421842e..b3150821875b4dd1c3fd0f10b56b51fac40f68ff 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
@@ -199,13 +199,20 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
@Override
|
||||
public void performRangedAttack(LivingEntity target, float pullProgress) {
|
||||
ItemStack itemstack = this.getProjectile(this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW)));
|
||||
+
|
||||
+ gg.projecteden.parchment.event.entity.PreEntityShootBowEvent preEvent = new gg.projecteden.parchment.event.entity.PreEntityShootBowEvent(this.getBukkitEntity(), this.getMainHandItem().asBukkitCopy(), itemstack.asBukkitCopy());
|
||||
+ if (!preEvent.callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
AbstractArrow entityarrow = this.getArrow(itemstack, pullProgress);
|
||||
double d0 = target.getX() - this.getX();
|
||||
double d1 = target.getY(0.3333333333333333D) - entityarrow.getY();
|
||||
double d2 = target.getZ() - this.getZ();
|
||||
double d3 = Math.sqrt(d0 * d0 + d2 * d2);
|
||||
|
||||
- entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level().getDifficulty().getId() * 4));
|
||||
+ entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level().getDifficulty().getId() * 4), preEvent.isRelative());
|
||||
+
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getMainHandItem(), entityarrow.getPickupItem(), entityarrow, net.minecraft.world.InteractionHand.MAIN_HAND, 0.8F, true); // Paper
|
||||
if (event.isCancelled()) {
|
||||
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 63fce7e3d9f59f36e29bc827a46396d73143bb8b..54dfb3cbaeb37c41187185068ab5573ffb9fd793 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java
|
||||
@@ -189,13 +189,20 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob {
|
||||
@Override
|
||||
public void performRangedAttack(LivingEntity target, float pullProgress) {
|
||||
ItemStack itemstack = this.getProjectile(this.getItemInHand(ProjectileUtil.getWeaponHoldingHand(this, Items.BOW)));
|
||||
+
|
||||
+ gg.projecteden.parchment.event.entity.PreEntityShootBowEvent preEvent = new gg.projecteden.parchment.event.entity.PreEntityShootBowEvent(this.getBukkitEntity(), this.getMainHandItem().asBukkitCopy(), itemstack.asBukkitCopy());
|
||||
+ if (!preEvent.callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
AbstractArrow entityarrow = ProjectileUtil.getMobArrow(this, itemstack, pullProgress);
|
||||
double d0 = target.getX() - this.getX();
|
||||
double d1 = target.getY(0.3333333333333333D) - entityarrow.getY();
|
||||
double d2 = target.getZ() - this.getZ();
|
||||
double d3 = Math.sqrt(d0 * d0 + d2 * d2);
|
||||
|
||||
- entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level().getDifficulty().getId() * 4));
|
||||
+ entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level().getDifficulty().getId() * 4), preEvent.isRelative());
|
||||
+
|
||||
// Paper start
|
||||
org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getMainHandItem(), entityarrow.getPickupItem(), entityarrow, target.getUsedItemHand(), 0.8F, true);
|
||||
if (event.isCancelled()) {
|
||||
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 7226be19248a1ffb8ff2c89b55882529d33a6c0c..990d85daaafae8938c99ad9f389a76b1c6b7937f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -129,8 +129,8 @@ public abstract class AbstractArrow extends Projectile {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void shoot(double x, double y, double z, float speed, float divergence) {
|
||||
- super.shoot(x, y, z, speed, divergence);
|
||||
+ public void shoot(double x, double y, double z, float speed, float divergence, boolean relative) {
|
||||
+ super.shoot(x, y, z, speed, divergence, relative);
|
||||
this.life = 0;
|
||||
}
|
||||
|
||||
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 1b7cf6d06bdf36f146656727511a461f2520762e..38bb93521820a2cebdbd72b6b76373e986a0f15f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -157,9 +157,15 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
public void shoot(double x, double y, double z, float speed, float divergence) {
|
||||
+ shoot(x, y, z, speed, divergence, true);
|
||||
+ }
|
||||
+
|
||||
+ public void shoot(double x, double y, double z, float speed, float divergence, boolean relative) {
|
||||
Vec3 vec3d = (new Vec3(x, y, z)).normalize().add(this.random.triangle(0.0D, 0.0172275D * (double) divergence), this.random.triangle(0.0D, 0.0172275D * (double) divergence), this.random.triangle(0.0D, 0.0172275D * (double) divergence)).scale((double) speed);
|
||||
|
||||
- this.setDeltaMovement(vec3d);
|
||||
+ if (relative) {
|
||||
+ this.setDeltaMovement(vec3d);
|
||||
+ }
|
||||
double d3 = vec3d.horizontalDistance();
|
||||
|
||||
this.setYRot((float) (Mth.atan2(vec3d.x, vec3d.z) * 57.2957763671875D));
|
||||
@@ -169,6 +175,10 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
public void shootFromRotation(Entity shooter, float pitch, float yaw, float roll, float speed, float divergence) {
|
||||
+ this.shootFromRotation(shooter, pitch, yaw, roll, speed, divergence, true);
|
||||
+ }
|
||||
+
|
||||
+ public void shootFromRotation(Entity shooter, float pitch, float yaw, float roll, float speed, float divergence, boolean relative) {
|
||||
float f5 = -Mth.sin(yaw * 0.017453292F) * Mth.cos(pitch * 0.017453292F);
|
||||
float f6 = -Mth.sin((pitch + roll) * 0.017453292F);
|
||||
float f7 = Mth.cos(yaw * 0.017453292F) * Mth.cos(pitch * 0.017453292F);
|
||||
@@ -176,7 +186,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
|
||||
Vec3 vec3d = shooter.getDeltaMovement();
|
||||
|
||||
- if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity) this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity
|
||||
+ if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity && relative) this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity
|
||||
}
|
||||
|
||||
// CraftBukkit start - call projectile hit event
|
||||
diff --git a/src/main/java/net/minecraft/world/item/BowItem.java b/src/main/java/net/minecraft/world/item/BowItem.java
|
||||
index 08d597db1a5345a343777a01427655e6bf2c926b..789c7fa48fcf4bf6f462f0ca188518ca97c6b342 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/BowItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/BowItem.java
|
||||
@@ -42,9 +42,15 @@ public class BowItem extends ProjectileWeaponItem implements Vanishable {
|
||||
|
||||
if (!world.isClientSide) {
|
||||
ArrowItem itemarrow = (ArrowItem) (itemstack1.getItem() instanceof ArrowItem ? itemstack1.getItem() : Items.ARROW);
|
||||
+
|
||||
+ gg.projecteden.parchment.event.entity.PreEntityShootBowEvent preEvent = new gg.projecteden.parchment.event.entity.PreEntityShootBowEvent(entityhuman.getBukkitEntity(), stack.asBukkitCopy(), itemstack1.asBukkitCopy());
|
||||
+ if (!preEvent.callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
AbstractArrow entityarrow = itemarrow.createArrow(world, itemstack1, entityhuman);
|
||||
|
||||
- entityarrow.shootFromRotation(entityhuman, entityhuman.getXRot(), entityhuman.getYRot(), 0.0F, f * 3.0F, 1.0F);
|
||||
+ entityarrow.shootFromRotation(entityhuman, entityhuman.getXRot(), entityhuman.getYRot(), 0.0F, f * 3.0F, 1.0F, preEvent.isRelative());
|
||||
if (f == 1.0F) {
|
||||
entityarrow.setCritArrow(true);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
index a433910fb4d0bd8d7b6b0d66c8fc88d62a0e4879..880aa7780f577bbafc6720400768b0e055927b72 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
@@ -229,6 +229,11 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
|
||||
|
||||
private static void shootProjectile(Level world, LivingEntity shooter, InteractionHand hand, ItemStack crossbow, ItemStack projectile, float soundPitch, boolean creative, float speed, float divergence, float simulated) {
|
||||
if (!world.isClientSide) {
|
||||
+ gg.projecteden.parchment.event.entity.PreEntityShootBowEvent preEvent = new gg.projecteden.parchment.event.entity.PreEntityShootBowEvent(shooter.getBukkitEntity(), crossbow.asBukkitCopy(), projectile.asBukkitCopy());
|
||||
+ if (!preEvent.callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
boolean flag1 = projectile.is(Items.FIREWORK_ROCKET);
|
||||
Object object;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-Mc <cjblanton2@gmail.com>
|
||||
Date: Mon, 9 Jan 2023 19:21:16 -0500
|
||||
Subject: [PATCH] Remove Unneeded Override
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1bf7e21cd3b981013ff634dfc070d572af491da9..a45de4db8a73cea947c76771f9e540f6e64763bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1737,7 +1737,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Parchment end
|
||||
}
|
||||
|
||||
- @Override
|
||||
public void playSeededSound(@org.jetbrains.annotations.Nullable Player except, Entity entity, SoundEvent sound, SoundSource category, float volume, float pitch, long seed) {
|
||||
// Parchment start - sound event
|
||||
CraftEventFactory.playSoundEvent(new gg.projecteden.parchment.event.sound.SoundEvent(
|
||||
19
patches/server/0024-Return-Displays-in-getTargetEntity.patch
Normal file
19
patches/server/0024-Return-Displays-in-getTargetEntity.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-MC <cjblanton2@gmail.com>
|
||||
Date: Sun, 19 Mar 2023 20:02:00 -0400
|
||||
Subject: [PATCH] Return Displays in getTargetEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index a189461330a4d427a7450d504ef13de3605497e3..edbb3b71fb526d75eac65bb4356335c46f79b1b6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4040,7 +4040,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
Vec3 direction = this.getLookAngle();
|
||||
Vec3 end = start.add(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance);
|
||||
|
||||
- List<Entity> entityList = this.level().getEntities(this, getBoundingBox().expandTowards(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance).inflate(1.0D, 1.0D, 1.0D), EntitySelector.NO_SPECTATORS.and(Entity::isPickable));
|
||||
+ List<Entity> entityList = this.level().getEntities(this, getBoundingBox().expandTowards(direction.x * maxDistance, direction.y * maxDistance, direction.z * maxDistance).inflate(1.0D, 1.0D, 1.0D), EntitySelector.NO_SPECTATORS.and(entity -> entity.isPickable() || entity instanceof Display));
|
||||
|
||||
double distance = 0.0D;
|
||||
EntityHitResult result = null;
|
||||
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Blast-MC <cjblanton2@gmail.com>
|
||||
Date: Thu, 23 Mar 2023 18:18:43 -0400
|
||||
Subject: [PATCH] Make SynchedEntityData#packAll Public
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java b/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java
|
||||
index bf6a70a69bb695ec1a202cd1e863c468329f80fc..c3f46cba9160b5f1b1d3c882d18f7761a3ee2fdf 100644
|
||||
--- a/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java
|
||||
+++ b/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java
|
||||
@@ -267,7 +267,7 @@ public class SynchedEntityData {
|
||||
// We need to pack all as we cannot rely on "non default values" or "dirty" ones.
|
||||
// Because these values can possibly be desynced on the client.
|
||||
@Nullable
|
||||
- private List<SynchedEntityData.DataValue<?>> packAll() {
|
||||
+ public List<SynchedEntityData.DataValue<?>> packAll() {
|
||||
if (this.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user