geforkt von Mirrors/Paper
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11561)
Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b9df8e9f SPIGOT-7933: Improve custom Minecart max speed fc496179 Fix InstrumentTest 7c0ec598 PR-1075: Make Art an interface c389f5a4 PR-1074: Make Sound an interface CraftBukkit Changes: df1efc0bb SPIGOT-7945: `Bukkit#dispatchCommand` throws `UnsupportedOperationException` 285df6e85 SPIGOT-7933: Improve custom Minecart max speed a0f3d4e50 SPIGOT-7940: Recipe book errors after reload 9e0618ec2 SPIGOT-7937: Cannot spawn minecart during world generation with minecart_improvements enabled 1eb4d28da SPIGOT-7941: Fix resistance over 4 amplify causing issues in damage 52b99158a PR-1504: Make Art an interface e18ae35f1 PR-1502: Make Sound an interface Spigot Changes: e65d67a7 SPIGOT-7934: Item entities start "bouncing" under certain conditions
Dieser Commit ist enthalten in:
Ursprung
ce0a041947
Commit
c6aa61ee18
@ -0,0 +1,392 @@
|
||||
package io.papermc.paper.registry.keys;
|
||||
|
||||
import static net.kyori.adventure.key.Key.key;
|
||||
|
||||
import io.papermc.paper.generated.GeneratedFrom;
|
||||
import io.papermc.paper.registry.RegistryKey;
|
||||
import io.papermc.paper.registry.TypedKey;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import org.bukkit.Art;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}.
|
||||
*
|
||||
* @apiNote The fields provided here are a direct representation of
|
||||
* what is available from the vanilla game source. They may be
|
||||
* changed (including removals) on any Minecraft version
|
||||
* bump, so cross-version compatibility is not provided on the
|
||||
* same level as it is on most of the other API.
|
||||
*/
|
||||
@SuppressWarnings({
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class PaintingVariantKeys {
|
||||
/**
|
||||
* {@code minecraft:alban}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> ALBAN = create(key("alban"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:aztec}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> AZTEC = create(key("aztec"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:aztec2}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> AZTEC2 = create(key("aztec2"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:backyard}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BACKYARD = create(key("backyard"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:baroque}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BAROQUE = create(key("baroque"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bomb}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BOMB = create(key("bomb"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bouquet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BOUQUET = create(key("bouquet"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:burning_skull}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BURNING_SKULL = create(key("burning_skull"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:bust}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> BUST = create(key("bust"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cavebird}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> CAVEBIRD = create(key("cavebird"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:changing}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> CHANGING = create(key("changing"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:cotan}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> COTAN = create(key("cotan"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:courbet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> COURBET = create(key("courbet"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:creebet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> CREEBET = create(key("creebet"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:donkey_kong}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> DONKEY_KONG = create(key("donkey_kong"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:earth}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> EARTH = create(key("earth"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:endboss}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> ENDBOSS = create(key("endboss"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fern}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FERN = create(key("fern"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fighters}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FIGHTERS = create(key("fighters"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:finding}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FINDING = create(key("finding"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:fire}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> FIRE = create(key("fire"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:graham}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> GRAHAM = create(key("graham"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:humble}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> HUMBLE = create(key("humble"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:kebab}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> KEBAB = create(key("kebab"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:lowmist}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> LOWMIST = create(key("lowmist"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:match}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> MATCH = create(key("match"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:meditative}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> MEDITATIVE = create(key("meditative"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:orb}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> ORB = create(key("orb"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:owlemons}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> OWLEMONS = create(key("owlemons"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:passage}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PASSAGE = create(key("passage"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pigscene}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PIGSCENE = create(key("pigscene"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:plant}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PLANT = create(key("plant"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pointer}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> POINTER = create(key("pointer"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pond}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> POND = create(key("pond"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pool}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> POOL = create(key("pool"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:prairie_ride}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> PRAIRIE_RIDE = create(key("prairie_ride"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sea}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SEA = create(key("sea"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:skeleton}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SKELETON = create(key("skeleton"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:skull_and_roses}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SKULL_AND_ROSES = create(key("skull_and_roses"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stage}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> STAGE = create(key("stage"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sunflowers}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SUNFLOWERS = create(key("sunflowers"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:sunset}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> SUNSET = create(key("sunset"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:tides}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> TIDES = create(key("tides"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:unpacked}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> UNPACKED = create(key("unpacked"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:void}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> VOID = create(key("void"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wanderer}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WANDERER = create(key("wanderer"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wasteland}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WASTELAND = create(key("wasteland"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:water}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WATER = create(key("water"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wind}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WIND = create(key("wind"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:wither}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<Art> WITHER = create(key("wither"));
|
||||
|
||||
private PaintingVariantKeys() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a key for {@link Art} in the registry {@code minecraft:painting_variant}.
|
||||
*
|
||||
* @param key the value's key in the registry
|
||||
* @return a new typed key
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static @NonNull TypedKey<Art> create(final @NonNull Key key) {
|
||||
return TypedKey.create(RegistryKey.PAINTING_VARIANT, key);
|
||||
}
|
||||
}
|
11487
paper-api-generator/generated/io/papermc/paper/registry/keys/SoundEventKeys.java
Normale Datei
11487
paper-api-generator/generated/io/papermc/paper/registry/keys/SoundEventKeys.java
Normale Datei
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
@ -8,10 +8,12 @@ import io.papermc.paper.registry.RegistryKey;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import org.bukkit.Art;
|
||||
import org.bukkit.Fluid;
|
||||
import org.bukkit.GameEvent;
|
||||
import org.bukkit.JukeboxSong;
|
||||
import org.bukkit.MusicInstrument;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.BlockType;
|
||||
@ -49,6 +51,7 @@ public interface Generators {
|
||||
simpleKey("MenuTypeKeys", MenuType.class, Registries.MENU, RegistryKey.MENU, false),
|
||||
simpleKey("AttributeKeys", Attribute.class, Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, false),
|
||||
simpleKey("FluidKeys", Fluid.class, Registries.FLUID, RegistryKey.FLUID, false),
|
||||
simpleKey("SoundEventKeys", Sound.class, Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, false),
|
||||
|
||||
// data-driven
|
||||
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
|
||||
@ -60,6 +63,7 @@ public interface Generators {
|
||||
simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, false),
|
||||
simpleKey("JukeboxSongKeys", JukeboxSong.class, Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, true),
|
||||
simpleKey("BannerPatternKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, true),
|
||||
simpleKey("PaintingVariantKeys", Art.class, Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, true),
|
||||
|
||||
// tags
|
||||
simpleTagKey("EnchantmentTagKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT),
|
||||
|
@ -85,10 +85,10 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..fdef87eec3765523b00c987d4c1ccc289882e95d
|
||||
index 0000000000000000000000000000000000000000..d895b36e14f7fab6e3e78160dfa559d2c5331601
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
@@ -0,0 +1,188 @@
|
||||
@@ -0,0 +1,196 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import net.kyori.adventure.key.Keyed;
|
||||
@ -214,6 +214,11 @@ index 0000000000000000000000000000000000000000..fdef87eec3765523b00c987d4c1ccc28
|
||||
+ * @see io.papermc.paper.registry.keys.FluidKeys
|
||||
+ */
|
||||
+ RegistryKey<Fluid> FLUID = create("fluid");
|
||||
+ /**
|
||||
+ * Built-in registry for sound events.
|
||||
+ * @see io.papermc.paper.registry.keys.SoundEventKeys
|
||||
+ */
|
||||
+ RegistryKey<Sound> SOUND_EVENT = create("sound_event");
|
||||
+
|
||||
+
|
||||
+
|
||||
@ -265,16 +270,19 @@ index 0000000000000000000000000000000000000000..fdef87eec3765523b00c987d4c1ccc28
|
||||
+ * @see io.papermc.paper.registry.keys.BannerPatternKeys
|
||||
+ */
|
||||
+ RegistryKey<PatternType> BANNER_PATTERN = create("banner_pattern");
|
||||
+ /**
|
||||
+ * Data-driven registry for painting variants.
|
||||
+ * @see io.papermc.paper.registry.keys.PaintingVariantKeys
|
||||
+ */
|
||||
+ RegistryKey<Art> PAINTING_VARIANT = create("painting_variant");
|
||||
+
|
||||
+
|
||||
+ /* ******************* *
|
||||
+ * API-only Registries *
|
||||
+ * ******************* */
|
||||
+ RegistryKey<Art> PAINTING_VARIANT = create("painting_variant");
|
||||
+ RegistryKey<EntityType> ENTITY_TYPE = create("entity_type");
|
||||
+ RegistryKey<Particle> PARTICLE_TYPE = create("particle_type");
|
||||
+ RegistryKey<PotionType> POTION = create("potion");
|
||||
+ RegistryKey<Sound> SOUND_EVENT = create("sound_event");
|
||||
+ RegistryKey<MemoryKey<?>> MEMORY_MODULE_TYPE = create("memory_module_type");
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java b/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java
|
||||
|
@ -1494,27 +1494,27 @@ index 18a53194483410c4d5ad35f901c90d44efaeef60..aff43d77f31d81b82e5fc5fea6272dda
|
||||
String getDisplayName();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
|
||||
index 8824e83039195882fa9c2a854460b0aeedfb7d21..cf17af024b1953b6f21f18885411ea6a0baa1d4c 100644
|
||||
index 4204a7dac18c60f177a5f70693388cd4ddc3bc0c..04e890be72b18259f1af2833879b4d9af51b1f02 100644
|
||||
--- a/src/main/java/org/bukkit/Sound.java
|
||||
+++ b/src/main/java/org/bukkit/Sound.java
|
||||
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* guarantee values will not be removed from this Enum. As such, you should not
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* guarantee values will not be removed from this interface. As such, you should not
|
||||
* depend on the ordinal values of this class.
|
||||
*/
|
||||
-public enum Sound implements Keyed {
|
||||
+public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Paper - implement Sound.Type
|
||||
-public interface Sound extends OldEnum<Sound>, Keyed {
|
||||
+public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.Sound.Type { // Paper - implement Sound.Type
|
||||
|
||||
AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"),
|
||||
AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"),
|
||||
@@ -1660,4 +1660,11 @@ public enum Sound implements Keyed {
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
Sound AMBIENT_BASALT_DELTAS_ADDITIONS = getSound("ambient.basalt_deltas.additions");
|
||||
Sound AMBIENT_BASALT_DELTAS_LOOP = getSound("ambient.basalt_deltas.loop");
|
||||
@@ -1698,4 +1698,11 @@ public interface Sound extends OldEnum<Sound>, Keyed {
|
||||
static Sound[] values() {
|
||||
return Lists.newArrayList(Registry.SOUNDS).toArray(new Sound[0]);
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public net.kyori.adventure.key.@NotNull Key key() {
|
||||
+ return this.key;
|
||||
+ default net.kyori.adventure.key.@NotNull Key key() {
|
||||
+ return this.getKey();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
@ -11,34 +11,6 @@ that continues to have use (internally).
|
||||
|
||||
These do not help plugin developers if they bring moise noise than value.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Art.java b/src/main/java/org/bukkit/Art.java
|
||||
index dadff073abb2dec39111e677ec77ffdb2b7ff9a9..042d1d932a33022e4fc873652f70dc6ed342d46a 100644
|
||||
--- a/src/main/java/org/bukkit/Art.java
|
||||
+++ b/src/main/java/org/bukkit/Art.java
|
||||
@@ -96,9 +96,9 @@ public enum Art implements Keyed {
|
||||
* Get the ID of this painting.
|
||||
*
|
||||
* @return The ID of this painting
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -114,9 +114,9 @@ public enum Art implements Keyed {
|
||||
*
|
||||
* @param id The ID
|
||||
* @return The painting
|
||||
- * @deprecated Magic value
|
||||
+ * @apiNote Internal Use Only
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@Nullable
|
||||
public static Art getById(int id) {
|
||||
return BY_ID.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 577b4b89b50441572f0edd9325047c38e25e782e..949ffc320502e46493183cc3ef621d9c4edbe7d6 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
@ -453,7 +425,7 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
|
||||
return note;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 774f9bd0ef95d385dc3f715753c83e05fcc2bdff..26399345dd02031712994da1553417186b8c7370 100644
|
||||
index f0e806865910578110f4794f7ebe93640516e7c1..b4f297f90e3c1deaa1fc3f4418418588ab19b6c5 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -248,14 +248,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@ -932,10 +904,10 @@ index 9e0137ea412ec8c65b2903a76499ba8222446ea3..db7dafba43b50146a32d749ec043c5d5
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java
|
||||
index 4910075d0fb21b4dc4fab57894f9c7cca3093e3b..9125cc9f60258938946ee30932f0299edcd9573b 100644
|
||||
index e5c43a80375624b11653b0693a7883a490d73c6d..d9ad5fd48eec569eb4aef2aaf527ba24d2db3254 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Minecart.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Minecart.java
|
||||
@@ -106,7 +106,9 @@ public interface Minecart extends Vehicle {
|
||||
@@ -102,7 +102,9 @@ public interface Minecart extends Vehicle {
|
||||
* Passing a null value will set the minecart to have no display block.
|
||||
*
|
||||
* @param material the material to set as display block.
|
||||
@ -945,7 +917,7 @@ index 4910075d0fb21b4dc4fab57894f9c7cca3093e3b..9125cc9f60258938946ee30932f0299e
|
||||
public void setDisplayBlock(@Nullable MaterialData material);
|
||||
|
||||
/**
|
||||
@@ -114,8 +116,10 @@ public interface Minecart extends Vehicle {
|
||||
@@ -110,8 +112,10 @@ public interface Minecart extends Vehicle {
|
||||
* This function will return the type AIR if none is set.
|
||||
*
|
||||
* @return the block displayed by this minecart.
|
||||
|
@ -24,7 +24,7 @@ index dbdd2c1ad74a4d56e282736cd06d6937701f2e5c..a0fb3c44405f6362f8a1613661d507e4
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java
|
||||
index 9125cc9f60258938946ee30932f0299edcd9573b..148d8cddba48a886eddef72a3de63d5eaa15949f 100644
|
||||
index d9ad5fd48eec569eb4aef2aaf527ba24d2db3254..c3c94a5694f1e8d79e5acc45af1cd2e0fa6a621f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Minecart.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Minecart.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -35,7 +35,7 @@ index 9125cc9f60258938946ee30932f0299edcd9573b..148d8cddba48a886eddef72a3de63d5e
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.util.Vector;
|
||||
@@ -152,4 +153,14 @@ public interface Minecart extends Vehicle {
|
||||
@@ -148,4 +149,14 @@ public interface Minecart extends Vehicle {
|
||||
* @return the current block offset for this minecart.
|
||||
*/
|
||||
public int getDisplayBlockOffset();
|
||||
|
@ -207,10 +207,19 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e
|
||||
return server.getRegistry(tClass);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0ed66181e 100644
|
||||
index b4f297f90e3c1deaa1fc3f4418418588ab19b6c5..099c8acc0338dc0e6ac81f77d99cd2a02a630535 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -92,20 +92,26 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -86,26 +86,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server art.
|
||||
*
|
||||
* @see Art
|
||||
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#PAINTING_VARIANT}
|
||||
*/
|
||||
- Registry<Art> ART = Objects.requireNonNull(Bukkit.getRegistry(Art.class), "No registry present for Art. This is a bug.");
|
||||
+ @Deprecated(since = "1.21.3") // Paper
|
||||
+ Registry<Art> ART = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Art.class), "No registry present for Art. This is a bug.");
|
||||
/**
|
||||
* Attribute.
|
||||
*
|
||||
* @see Attribute
|
||||
@ -240,7 +249,7 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Server block types.
|
||||
*
|
||||
@@ -113,7 +119,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -113,7 +121,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote BlockType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@ -249,7 +258,7 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Custom boss bars.
|
||||
*
|
||||
@@ -155,13 +161,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -155,13 +163,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Cat.Type
|
||||
*/
|
||||
@ -267,7 +276,7 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Server entity types.
|
||||
*
|
||||
@@ -173,7 +181,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -173,7 +183,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see MusicInstrument
|
||||
*/
|
||||
@ -276,7 +285,7 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Server item types.
|
||||
*
|
||||
@@ -181,7 +189,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -181,7 +191,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote ItemType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@ -285,7 +294,7 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Default server loot tables.
|
||||
*
|
||||
@@ -200,13 +208,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -200,13 +210,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see MenuType
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@ -301,7 +310,7 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Server particles.
|
||||
*
|
||||
@@ -229,14 +237,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -229,58 +239,67 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server structures.
|
||||
*
|
||||
* @see Structure
|
||||
@ -320,7 +329,11 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Sound keys.
|
||||
*
|
||||
@@ -247,40 +257,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see Sound
|
||||
*/
|
||||
- Registry<Sound> SOUNDS = Objects.requireNonNull(Bukkit.getRegistry(Sound.class), "No registry present for Sound. This is a bug.");
|
||||
+ Registry<Sound> SOUNDS = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.SOUND_EVENT); // Paper
|
||||
/**
|
||||
* Trim materials.
|
||||
*
|
||||
* @see TrimMaterial
|
||||
@ -375,7 +388,7 @@ index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0
|
||||
/**
|
||||
* Memory Keys.
|
||||
*
|
||||
@@ -320,32 +337,36 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -320,32 +339,36 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server fluids.
|
||||
*
|
||||
* @see Fluid
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 759925decc0b66e8f5861f3f8bd9bee0ed66181e..833eea6ee8c7fd8ccb3f2eed4285a3eb8311448c 100644
|
||||
index 099c8acc0338dc0e6ac81f77d99cd2a02a630535..a5db0a013921423f87abb14dc08b24f47d4093f6 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -367,6 +367,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -369,6 +369,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
||||
|
@ -99,17 +99,27 @@ index 032d7b812ddc0a85e316882c8f7de0c5a0a4fd30..8df26e0d7bea77bb257cddbc2ab9e969
|
||||
public static Instrument getByType(final byte type) {
|
||||
return BY_DATA.get(type);
|
||||
diff --git a/src/test/java/org/bukkit/InstrumentTest.java b/src/test/java/org/bukkit/InstrumentTest.java
|
||||
index 8c1d88885de7d56c1b7c78d2e6e059b0648c982a..b177a47a5bda05bfe3598ec5e6771b92a73f0edf 100644
|
||||
deleted file mode 100644
|
||||
index 6f27b260d9dbe76da733459c8341282e23440b8a..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/InstrumentTest.java
|
||||
+++ b/src/test/java/org/bukkit/InstrumentTest.java
|
||||
@@ -8,9 +8,7 @@ public class InstrumentTest {
|
||||
@Test
|
||||
public void getByType() {
|
||||
for (Instrument instrument : Instrument.values()) {
|
||||
+++ /dev/null
|
||||
@@ -1,19 +0,0 @@
|
||||
-package org.bukkit;
|
||||
-
|
||||
-import static org.bukkit.support.MatcherAssert.*;
|
||||
-import static org.hamcrest.CoreMatchers.*;
|
||||
-import org.bukkit.support.AbstractTestingBase;
|
||||
-import org.junit.jupiter.api.Test;
|
||||
-
|
||||
-public class InstrumentTest extends AbstractTestingBase {
|
||||
- @Test
|
||||
- public void getByType() {
|
||||
- for (Instrument instrument : Instrument.values()) {
|
||||
- if (instrument.getType() < 0) {
|
||||
- continue;
|
||||
- }
|
||||
+ // Paper - byte magic values are still used
|
||||
|
||||
assertThat(Instrument.getByType(instrument.getType()), is(instrument));
|
||||
}
|
||||
-
|
||||
- assertThat(Instrument.getByType(instrument.getType()), is(instrument));
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
|
@ -10,12 +10,12 @@ getKey() methods on Keyed objects that have a registry
|
||||
are marked as Deprecated or Obsolete.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Art.java b/src/main/java/org/bukkit/Art.java
|
||||
index 042d1d932a33022e4fc873652f70dc6ed342d46a..e57e34064262b90221b0621f1d13e9705e68421a 100644
|
||||
index d24bf449f58fd7c1b8ffab8dbc42f9f1fef8c4ef..00a290f1bf58cdc2238c13fd5a6048a26b7871da 100644
|
||||
--- a/src/main/java/org/bukkit/Art.java
|
||||
+++ b/src/main/java/org/bukkit/Art.java
|
||||
@@ -103,6 +103,13 @@ public enum Art implements Keyed {
|
||||
return id;
|
||||
}
|
||||
@@ -97,6 +97,16 @@ public interface Art extends OldEnum<Art>, Keyed {
|
||||
@Deprecated(since = "1.6.2")
|
||||
int getId();
|
||||
|
||||
+ // Paper start - deprecate getKey
|
||||
+ /**
|
||||
@ -23,10 +23,13 @@ index 042d1d932a33022e4fc873652f70dc6ed342d46a..e57e34064262b90221b0621f1d13e970
|
||||
+ * and {@link io.papermc.paper.registry.RegistryKey#PAINTING_VARIANT}. Painting variants can exist without a key.
|
||||
+ */
|
||||
+ @Deprecated(since = "1.21")
|
||||
+ @Override
|
||||
+ @NotNull NamespacedKey getKey();
|
||||
+ // Paper end - deprecate getKey
|
||||
@NotNull
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
+
|
||||
/**
|
||||
* Get a painting by its numeric ID
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
index c9f02466a04d20579fe2258bb02acf98e163ca81..bffd4ab2d08e5c3f83a49a31e1e55cc1eab7b319 100644
|
||||
--- a/src/main/java/org/bukkit/MusicInstrument.java
|
||||
@ -49,10 +52,10 @@ index c9f02466a04d20579fe2258bb02acf98e163ca81..bffd4ab2d08e5c3f83a49a31e1e55cc1
|
||||
@Override
|
||||
public @NotNull String translationKey() {
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 833eea6ee8c7fd8ccb3f2eed4285a3eb8311448c..e4d4ac6436f341f5d9de95e1ab56461fd68a3dc2 100644
|
||||
index a5db0a013921423f87abb14dc08b24f47d4093f6..9ed61b649d7e7056bd9ebcbb77f17c6c5798bf2d 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -385,6 +385,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -387,6 +387,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
|
||||
@ -132,7 +135,7 @@ index 833eea6ee8c7fd8ccb3f2eed4285a3eb8311448c..e4d4ac6436f341f5d9de95e1ab56461f
|
||||
/**
|
||||
* Get the object by its key.
|
||||
*
|
||||
@@ -481,5 +554,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -483,5 +556,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
public Class<T> getType() {
|
||||
return this.type;
|
||||
}
|
||||
@ -146,11 +149,11 @@ index 833eea6ee8c7fd8ccb3f2eed4285a3eb8311448c..e4d4ac6436f341f5d9de95e1ab56461f
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
|
||||
index cf17af024b1953b6f21f18885411ea6a0baa1d4c..f32a035317f3f8e200bb8076e6a326cb1e87cfe1 100644
|
||||
index 04e890be72b18259f1af2833879b4d9af51b1f02..97c4fc9615e28c7268cd8340b50029c8f7de56b7 100644
|
||||
--- a/src/main/java/org/bukkit/Sound.java
|
||||
+++ b/src/main/java/org/bukkit/Sound.java
|
||||
@@ -1655,6 +1655,13 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
|
||||
this.key = NamespacedKey.minecraft(key);
|
||||
@@ -1689,6 +1689,16 @@ public interface Sound extends OldEnum<Sound>, Keyed, net.kyori.adventure.sound.
|
||||
return sound;
|
||||
}
|
||||
|
||||
+ // Paper start - deprecate getKey
|
||||
@ -159,10 +162,13 @@ index cf17af024b1953b6f21f18885411ea6a0baa1d4c..f32a035317f3f8e200bb8076e6a326cb
|
||||
+ * can exist without a key.
|
||||
+ */
|
||||
+ @Deprecated(since = "1.20.5")
|
||||
+ @Override
|
||||
+ @NotNull NamespacedKey getKey();
|
||||
+ // Paper end - deprecate getKey
|
||||
@NotNull
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
+
|
||||
/**
|
||||
* @return an array of all known sounds.
|
||||
* @deprecated use {@link Registry#iterator()}.
|
||||
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
index eaf6cd758344eeba29f00f822a50c93704af8bda..eb192030832e1741850871bec9bf999f014b6fc1 100644
|
||||
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
|
@ -809,10 +809,10 @@ index 0000000000000000000000000000000000000000..bf49125acc8a0508bf59674bba3ed350
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index e4d4ac6436f341f5d9de95e1ab56461fd68a3dc2..b56e8fc3fba40637396abef27c08806f5157b3b4 100644
|
||||
index 9ed61b649d7e7056bd9ebcbb77f17c6c5798bf2d..16bef936a9aef957a73c33e45be7573584943a6b 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -384,6 +384,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -386,6 +386,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*/
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
@ -840,7 +840,7 @@ index e4d4ac6436f341f5d9de95e1ab56461fd68a3dc2..b56e8fc3fba40637396abef27c08806f
|
||||
|
||||
// Paper start - improve Registry
|
||||
/**
|
||||
@@ -458,6 +479,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -460,6 +481,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
}
|
||||
// Paper end - improve Registry
|
||||
|
||||
@ -875,7 +875,7 @@ index e4d4ac6436f341f5d9de95e1ab56461fd68a3dc2..b56e8fc3fba40637396abef27c08806f
|
||||
/**
|
||||
* Get the object by its key.
|
||||
*
|
||||
@@ -561,5 +610,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -563,5 +612,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
return value.getKey();
|
||||
}
|
||||
// Paper end - improve Registry
|
||||
|
@ -452,3 +452,81 @@ index 5781c2fab2d407b4a22d5fc80e1c03e907617316..68ae998b30bbcacae3604fb6581ceca3
|
||||
RegistryHelper.registry = layers.compositeAccess().freeze();
|
||||
// Register vanilla pack
|
||||
RegistryHelper.dataPack = ReloadableServerResources.loadResources(ireloadableresourcemanager, layers, list, featureFlagSet, Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join();
|
||||
diff --git a/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java b/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java
|
||||
index d78661198815b78d041288eb62076514926428ad..2d268498b545db48efa106d2c7afca7f7b74c76d 100644
|
||||
--- a/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java
|
||||
+++ b/src/test/java/org/bukkit/support/suite/AllFeaturesTestSuite.java
|
||||
@@ -14,7 +14,7 @@ import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
@Suite(failIfNoTests = false)
|
||||
@SuiteDisplayName("Test suite for test which need registry values present, with all feature flags set")
|
||||
@IncludeTags("AllFeatures")
|
||||
-@SelectPackages("org.bukkit")
|
||||
+@SelectPackages({"org.bukkit", "io.papermc"})
|
||||
@SelectClasses({RegistryClassTest.class, PerRegistryTest.class, RegistryConversionTest.class}) // Make sure general registry tests are run first
|
||||
@ExcludeClassNamePatterns("org.bukkit.craftbukkit.inventory.ItemStack.*Test")
|
||||
@ConfigurationParameter(key = "TestSuite", value = "AllFeatures")
|
||||
diff --git a/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java b/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java
|
||||
index 8faaffd16fb05bd3d976b6a63835cfa547ec2445..c1ee709083276acb14b474993800dd4894febc47 100644
|
||||
--- a/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java
|
||||
+++ b/src/test/java/org/bukkit/support/suite/BundleFeatureTestSuite.java
|
||||
@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
@Suite(failIfNoTests = false)
|
||||
@SuiteDisplayName("Test suite for test which need registry values present, with the bundle feature flag set")
|
||||
@IncludeTags("BundleFeature")
|
||||
-@SelectPackages("org.bukkit")
|
||||
+@SelectPackages({"org.bukkit", "io.papermc"})
|
||||
@ConfigurationParameter(key = "TestSuite", value = "BundleFeature")
|
||||
public class BundleFeatureTestSuite {
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java b/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java
|
||||
index 576c35e086345c96325628cf1a048599f9ed6950..ac3c1c88ce5de4b623d17ab0af11a7d04caec869 100644
|
||||
--- a/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java
|
||||
+++ b/src/test/java/org/bukkit/support/suite/LegacyTestSuite.java
|
||||
@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
@Suite(failIfNoTests = false)
|
||||
@SuiteDisplayName("Test suite for legacy tests")
|
||||
@IncludeTags("Legacy")
|
||||
-@SelectPackages("org.bukkit")
|
||||
+@SelectPackages({"org.bukkit", "io.papermc"})
|
||||
@ConfigurationParameter(key = "TestSuite", value = "Legacy")
|
||||
public class LegacyTestSuite {
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/support/suite/NormalTestSuite.java b/src/test/java/org/bukkit/support/suite/NormalTestSuite.java
|
||||
index 661c49c83b9a81512cf181b50f6353dc76e9f0bc..76f61fb60612160477b7da0b095f1c7e4822d4fb 100644
|
||||
--- a/src/test/java/org/bukkit/support/suite/NormalTestSuite.java
|
||||
+++ b/src/test/java/org/bukkit/support/suite/NormalTestSuite.java
|
||||
@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
@Suite(failIfNoTests = false)
|
||||
@SuiteDisplayName("Test suite for standalone tests, which don't need any registry values present")
|
||||
@IncludeTags("Normal")
|
||||
-@SelectPackages("org.bukkit")
|
||||
+@SelectPackages({"org.bukkit", "io.papermc"})
|
||||
@ConfigurationParameter(key = "TestSuite", value = "Normal")
|
||||
public class NormalTestSuite {
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/support/suite/SlowTestSuite.java b/src/test/java/org/bukkit/support/suite/SlowTestSuite.java
|
||||
index f95ff2e9930f4fd0ff284f714fc39afb6b7789ca..60be4c20101bbae8cf027270ff0e1e138d2fe9d2 100644
|
||||
--- a/src/test/java/org/bukkit/support/suite/SlowTestSuite.java
|
||||
+++ b/src/test/java/org/bukkit/support/suite/SlowTestSuite.java
|
||||
@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
@Suite(failIfNoTests = false)
|
||||
@SuiteDisplayName("Test suite for slow tests, which don't need to run every time")
|
||||
@IncludeTags("Slow")
|
||||
-@SelectPackages("org.bukkit")
|
||||
+@SelectPackages({"org.bukkit", "io.papermc"})
|
||||
@ConfigurationParameter(key = "TestSuite", value = "Slow")
|
||||
public class SlowTestSuite {
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java b/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java
|
||||
index 5ee48e92d2b5134a4ba15802087f6afe58c1cb8d..d0e2eacfcd487e2852eff4b1828031dd3649e41a 100644
|
||||
--- a/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java
|
||||
+++ b/src/test/java/org/bukkit/support/suite/VanillaFeatureTestSuite.java
|
||||
@@ -9,7 +9,7 @@ import org.junit.platform.suite.api.SuiteDisplayName;
|
||||
@Suite(failIfNoTests = false)
|
||||
@SuiteDisplayName("Test suite for test which need vanilla registry values present")
|
||||
@IncludeTags("VanillaFeature")
|
||||
-@SelectPackages("org.bukkit")
|
||||
+@SelectPackages({"org.bukkit", "io.papermc"})
|
||||
@ConfigurationParameter(key = "TestSuite", value = "VanillaFeature")
|
||||
public class VanillaFeatureTestSuite {
|
||||
}
|
||||
|
@ -5594,7 +5594,7 @@ index a1f4ebcd0877a6d0c41493eff5d70a408bf98e59..f1725ef766c35aa623ace58fe8bf31fc
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 23a611c9a83d1cea5ab2f64cdbd696c39872477d..bf660a057d135563b47e7b74d927a82a20b8ef75 100644
|
||||
index d7095aab94a9f3b9f06a033ba4d414dfae42f620..7bb87d2bdf0ead0fdca38a9685e2e15b249ec2cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -181,6 +181,7 @@ public abstract class PlayerList {
|
||||
@ -5624,10 +5624,10 @@ index ae25aec117a7272735c824a00c1ed117fa52a921..d6e942aca1bcc769c390504a4119d661
|
||||
@Override
|
||||
public void schedule(R runnable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1631ea62aab53d6e5e0ae44f63367416ac424410..c010d18061f58a583c69e85fc29305497523f569 100644
|
||||
index 4c9ff26332e2f5224d0308e4cb64b7b6c474fb3f..0fa9bcd7e7f1c4d1c8c57a061f0a782de1bfbf8b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -342,6 +342,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -343,6 +343,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -5640,7 +5640,7 @@ index 1631ea62aab53d6e5e0ae44f63367416ac424410..c010d18061f58a583c69e85fc2930549
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 47712d062ece9914de058153272ab1fa535af372..9aa4e70f1d1c4de2138d31701dceaed25062e69c 100644
|
||||
index 17f706d401154035a7f1ed47b04a38e4eef24263..1d7af970b8f5eaa46fe4cd2b7d076f3cdd371216 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -296,6 +296,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -6162,7 +6162,7 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..4eb0b0969325f39a7ae65492cccd4825
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3882ae04173cd125fe490692a6bc2b4d8b20ff7b..eb61712ea067b277e7f32f887e3528faca275450 100644
|
||||
index 6c8a69b7c1b45549b2c388a8df2258184c587309..49102177454765b8e53d0d7f47fe4bf4a33549af 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2617,4 +2617,9 @@ public final class CraftServer implements Server {
|
||||
@ -6386,10 +6386,10 @@ index e837d76e833d73d888bc1dad3515c2b82bc0e437..4705aed1dd98378c146bf9e346df1a17
|
||||
public WorldBorder getWorldBorder() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 1bf87b4915edf341ad55f8274cef324e0bc28547..3591b79481ac17bd02e59ac3c623d1c6991abd84 100644
|
||||
index fb83cadf384712e2dff1cb001bdbeec8f5e89ada..5baf68732cb0e5ecab9d809df54a42e8252f1624 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -34,6 +34,9 @@ public class ActivationRange
|
||||
@@ -35,6 +35,9 @@ public class ActivationRange
|
||||
|
||||
public enum ActivationType
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
|
||||
debugging in an IDE pre-relocate.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b89f56a10 100644
|
||||
index 40fbbff1df7e65ca01bb82e213eeefbb38c85a7a..7d2d5c4ee244e7118a4c38628e2e69c79b11b98d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -12,6 +12,7 @@ import java.util.Arrays;
|
||||
@ -27,7 +27,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
@@ -126,6 +128,40 @@ public class Commodore {
|
||||
@@ -128,6 +130,40 @@ public class Commodore {
|
||||
return this.reroutes;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b
|
||||
public static void main(String[] args) {
|
||||
OptionParser parser = new OptionParser();
|
||||
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
|
||||
@@ -281,9 +317,49 @@ public class Commodore {
|
||||
@@ -283,9 +319,49 @@ public class Commodore {
|
||||
}
|
||||
|
||||
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
|
||||
@ -118,7 +118,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b
|
||||
name = FieldRename.rename(pluginVersion, owner, name);
|
||||
|
||||
if (modern) {
|
||||
@@ -396,6 +472,13 @@ public class Commodore {
|
||||
@@ -398,6 +474,13 @@ public class Commodore {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b
|
||||
if (modern) {
|
||||
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
|
||||
switch (name) {
|
||||
@@ -492,6 +575,13 @@ public class Commodore {
|
||||
@@ -494,6 +577,13 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitLdcInsn(Object value) {
|
||||
@ -146,7 +146,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b
|
||||
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
|
||||
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
|
||||
return;
|
||||
@@ -502,6 +592,14 @@ public class Commodore {
|
||||
@@ -504,6 +594,14 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
|
||||
@ -161,7 +161,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b
|
||||
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
|
||||
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
|
||||
Type samMethodType = (Type) bootstrapMethodArguments[0];
|
||||
@@ -518,7 +616,7 @@ public class Commodore {
|
||||
@@ -520,7 +618,7 @@ public class Commodore {
|
||||
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
|
||||
methodArgs.add(newInstantiated);
|
||||
|
||||
@ -170,7 +170,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b
|
||||
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
|
||||
return;
|
||||
}
|
||||
@@ -569,6 +667,12 @@ public class Commodore {
|
||||
@@ -571,6 +669,12 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
|
||||
|
@ -645,10 +645,10 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e
|
||||
return traceElements;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 58df23162aed12f3058b5e0921a9e30b89f56a10..ba104635c7713b04ce624bc4c7bd390462bc0edb 100644
|
||||
index 7d2d5c4ee244e7118a4c38628e2e69c79b11b98d..371d31266a532e59c49dbb106e354296b119fa5e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -129,36 +129,26 @@ public class Commodore {
|
||||
@@ -131,36 +131,26 @@ public class Commodore {
|
||||
}
|
||||
|
||||
// Paper start - Plugin rewrites
|
||||
@ -696,7 +696,7 @@ index 58df23162aed12f3058b5e0921a9e30b89f56a10..ba104635c7713b04ce624bc4c7bd3904
|
||||
}
|
||||
// Paper end - Plugin rewrites
|
||||
|
||||
@@ -243,6 +233,7 @@ public class Commodore {
|
||||
@@ -245,6 +235,7 @@ public class Commodore {
|
||||
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
|
||||
}
|
||||
|
||||
|
@ -330,10 +330,10 @@ index 18d56058073b6cc4f9020f0a6137e4ac26eed0b2..fddc6b5abbad66ebe556ff8565c38c60
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c594f9a88 100644
|
||||
index 0fa9bcd7e7f1c4d1c8c57a061f0a782de1bfbf8b..aba3e1b5d86940f91034ee6415c909529503a184 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -148,7 +148,6 @@ import org.bukkit.command.CommandSender;
|
||||
@@ -149,7 +149,6 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Hanging;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
@ -341,7 +341,7 @@ index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c
|
||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
@@ -326,7 +325,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -327,7 +326,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Marks an entity, that it was removed by a plugin via Entity#remove
|
||||
// Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
|
||||
public boolean pluginRemoved = false;
|
||||
@ -349,7 +349,7 @@ index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c
|
||||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -866,7 +864,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -867,7 +865,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@ -357,7 +357,7 @@ index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -978,7 +975,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -979,7 +976,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
}
|
||||
@ -366,7 +366,7 @@ index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c
|
||||
|
||||
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission moveEffect, Vec3 movement, BlockPos landingPos, BlockState landingState) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b5323d1b601 100644
|
||||
index 1d7af970b8f5eaa46fe4cd2b7d076f3cdd371216..900ab23f587e9d990afe29492058390dc1c13f2d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -162,8 +162,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@ -378,7 +378,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -3090,7 +3088,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3091,7 +3089,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -386,7 +386,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
super.tick();
|
||||
this.updatingUsingItem();
|
||||
this.updateSwimAmount();
|
||||
@@ -3132,9 +3129,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3133,9 +3130,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
if (!this.isRemoved()) {
|
||||
@ -396,7 +396,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
}
|
||||
|
||||
double d0 = this.getX() - this.xo;
|
||||
@@ -3228,7 +3223,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3229,7 +3224,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.elytraAnimationState.tick();
|
||||
@ -404,7 +404,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
}
|
||||
|
||||
public void detectEquipmentUpdatesPublic() { // CraftBukkit
|
||||
@@ -3435,7 +3429,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3436,7 +3430,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
gameprofilerfiller.push("ai");
|
||||
@ -412,7 +412,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
if (this.isImmobile()) {
|
||||
this.jumping = false;
|
||||
this.xxa = 0.0F;
|
||||
@@ -3445,7 +3438,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3446,7 +3439,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.serverAiStep();
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
@ -420,7 +420,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.push("jump");
|
||||
@@ -3488,7 +3480,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3489,7 +3481,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.resetFallDistance();
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
label112:
|
||||
{
|
||||
LivingEntity entityliving = this.getControllingPassenger();
|
||||
@@ -3502,7 +3493,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3503,7 +3494,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
this.travel(vec3d1);
|
||||
}
|
||||
@ -436,7 +436,7 @@ index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b53
|
||||
|
||||
if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
|
||||
this.applyEffectsFromBlocks();
|
||||
@@ -3538,9 +3528,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3539,9 +3529,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||
}
|
||||
|
||||
@ -595,7 +595,7 @@ index d1b82dec25069a7027aaf53086b1829e511fc301..4367ccc628bb4f404d6a081083002518
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7c5b0db8115dc4032a3a364299ca06c88efd9a26..5650b4cfcd4008ac7f351d5bfb1fb8cc81da4caa 100644
|
||||
index f3bc8196b43bfdfdd85e03769c4d109c2fe1930c..f401fb3261a883019083f3c6c145d0ff74f149f4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -379,7 +379,6 @@ public final class CraftServer implements Server {
|
||||
@ -919,10 +919,10 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..dba31a2cbcfebe1f28883545ce4a70fc
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 3591b79481ac17bd02e59ac3c623d1c6991abd84..263df52c7f5e172a6b9118b4bc4672e443adedba 100644
|
||||
index 5baf68732cb0e5ecab9d809df54a42e8252f1624..0338ceaddc1a0921f5f8796d5eac75c301bafac2 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -27,7 +27,6 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
|
||||
@@ -28,7 +28,6 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
|
||||
import net.minecraft.world.entity.raid.Raider;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
@ -930,7 +930,7 @@ index 3591b79481ac17bd02e59ac3c623d1c6991abd84..263df52c7f5e172a6b9118b4bc4672e4
|
||||
|
||||
public class ActivationRange
|
||||
{
|
||||
@@ -110,7 +109,6 @@ public class ActivationRange
|
||||
@@ -111,7 +110,6 @@ public class ActivationRange
|
||||
*/
|
||||
public static void activateEntities(Level world)
|
||||
{
|
||||
@ -938,7 +938,7 @@ index 3591b79481ac17bd02e59ac3c623d1c6991abd84..263df52c7f5e172a6b9118b4bc4672e4
|
||||
final int miscActivationRange = world.spigotConfig.miscActivationRange;
|
||||
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
|
||||
final int animalActivationRange = world.spigotConfig.animalActivationRange;
|
||||
@@ -137,7 +135,6 @@ public class ActivationRange
|
||||
@@ -138,7 +136,6 @@ public class ActivationRange
|
||||
|
||||
world.getEntities().get(ActivationRange.maxBB, ActivationRange::activateEntity);
|
||||
}
|
||||
@ -946,18 +946,18 @@ index 3591b79481ac17bd02e59ac3c623d1c6991abd84..263df52c7f5e172a6b9118b4bc4672e4
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,10 +229,8 @@ public class ActivationRange
|
||||
@@ -233,10 +230,8 @@ public class ActivationRange
|
||||
*/
|
||||
public static boolean checkIfActive(Entity entity)
|
||||
{
|
||||
- SpigotTimings.checkIfActiveTimer.startTiming();
|
||||
// Never safe to skip fireworks or entities not yet added to chunk
|
||||
if ( entity instanceof FireworkRocketEntity ) {
|
||||
// Never safe to skip fireworks or item gravity
|
||||
if (entity instanceof FireworkRocketEntity || (entity instanceof ItemEntity && (entity.tickCount + entity.getId() + 1) % 4 == 0)) {
|
||||
- SpigotTimings.checkIfActiveTimer.stopTiming();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -259,7 +254,6 @@ public class ActivationRange
|
||||
@@ -260,7 +255,6 @@ public class ActivationRange
|
||||
{
|
||||
isActive = false;
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ index f3633da64f990972cddc03f2fcfd34ced2955a7a..025363e6b51ff8aa089715b1ec2a0fa1
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c8b8102d84119dfb6093f4b79aa3124c594f9a88..e97853cbfa6da8ecdb4c92cf634831492e1fc7e3 100644
|
||||
index aba3e1b5d86940f91034ee6415c909529503a184..57960530e15f0e4b8fb40b725ff03aaf8ce6ffac 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -331,7 +331,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -332,7 +332,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@ -56,7 +56,7 @@ index c8b8102d84119dfb6093f4b79aa3124c594f9a88..e97853cbfa6da8ecdb4c92cf63483149
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -2269,6 +2289,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2270,6 +2290,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.bukkitEntity.storeBukkitValues(nbttagcompound);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -72,7 +72,7 @@ index c8b8102d84119dfb6093f4b79aa3124c594f9a88..e97853cbfa6da8ecdb4c92cf63483149
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -2397,6 +2426,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2398,6 +2427,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable top of nether void damage
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e97853cbfa6da8ecdb4c92cf634831492e1fc7e3..49df5f4b09926556986e3a45d52ff299b878af76 100644
|
||||
index 57960530e15f0e4b8fb40b725ff03aaf8ce6ffac..2828ef013fe2c35292990cccd824a76a5551c952 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -720,7 +720,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -721,7 +721,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void checkBelowWorld() {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add more entities to activation range ignore list
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 263df52c7f5e172a6b9118b4bc4672e443adedba..dd1c5bc7522a4710cbfdd4764f6431e1e28d63cc 100644
|
||||
index 0338ceaddc1a0921f5f8796d5eac75c301bafac2..bd522080d17b5b470ec3ab42aa4ecc3082248c8a 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -91,6 +91,9 @@ public class ActivationRange
|
||||
@@ -92,6 +92,9 @@ public class ActivationRange
|
||||
|| entity instanceof AbstractHurtingProjectile
|
||||
|| entity instanceof LightningBolt
|
||||
|| entity instanceof PrimedTnt
|
||||
|
@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
|
||||
logic which is most likely to be true.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 49df5f4b09926556986e3a45d52ff299b878af76..8a61ca3cba2888e03e440519714705fe50b81267 100644
|
||||
index 2828ef013fe2c35292990cccd824a76a5551c952..0c2389e73e98ec48ed636f616a36e6e1cefa7b93 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3057,6 +3057,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3058,6 +3058,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
@Nullable
|
||||
public PlayerTeam getTeam() {
|
||||
@ -23,7 +23,7 @@ index 49df5f4b09926556986e3a45d52ff299b878af76..8a61ca3cba2888e03e440519714705fe
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 6dba567e9f7a197af16598647f216b5323d1b601..47403887721914b632565947efae0dfa7c841588 100644
|
||||
index 900ab23f587e9d990afe29492058390dc1c13f2d..c177e3ba30b8807eb41ad7741706d9a017ab9717 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -871,6 +871,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 47403887721914b632565947efae0dfa7c841588..031b7f51959d1b8ca30e4a9fda0a2832516c9c0c 100644
|
||||
index c177e3ba30b8807eb41ad7741706d9a017ab9717..21a356b3c7d3dec73e5c8feaa4afda479a7ec1a2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3982,10 +3982,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3983,10 +3983,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@ -21,7 +21,7 @@ index 47403887721914b632565947efae0dfa7c841588..031b7f51959d1b8ca30e4a9fda0a2832
|
||||
this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -4003,6 +4004,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4004,6 +4005,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
} else {
|
||||
itemstack = this.useItem.finishUsingItem(this.level(), this);
|
||||
}
|
||||
@ -34,7 +34,7 @@ index 47403887721914b632565947efae0dfa7c841588..031b7f51959d1b8ca30e4a9fda0a2832
|
||||
// CraftBukkit end
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
@@ -4010,6 +4017,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4011,6 +4018,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 031b7f51959d1b8ca30e4a9fda0a2832516c9c0c..e5d1877f570b302f0b193e77ff5fdd7e89532513 100644
|
||||
index 21a356b3c7d3dec73e5c8feaa4afda479a7ec1a2..cd7837935003775688281882b19f0808512a2e0d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -831,7 +831,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -34,7 +34,7 @@ index 031b7f51959d1b8ca30e4a9fda0a2832516c9c0c..e5d1877f570b302f0b193e77ff5fdd7e
|
||||
// CraftBukkit start - Handle scaled health
|
||||
if (this instanceof ServerPlayer) {
|
||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
|
||||
@@ -3839,7 +3849,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3840,7 +3850,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public final void setAbsorptionAmount(float absorptionAmount) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities
|
||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8a61ca3cba2888e03e440519714705fe50b81267..847fd720f11e89d906430c820bc92afe0454761d 100644
|
||||
index 0c2389e73e98ec48ed636f616a36e6e1cefa7b93..27a0f0651ac961c06626df1e4beb5525b4dacd48 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -183,6 +183,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -184,6 +184,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ index 8a61ca3cba2888e03e440519714705fe50b81267..847fd720f11e89d906430c820bc92afe
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
public CraftEntity getBukkitEntity() {
|
||||
@@ -373,7 +446,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -374,7 +447,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.bb = Entity.INITIAL_AABB;
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.nextStep = 1.0F;
|
||||
|
@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
||||
You can set this to 0 to disable collisions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 847fd720f11e89d906430c820bc92afe0454761d..b1b26e7c0f66f0697bcfe9eb045d45f31cd9ab06 100644
|
||||
index 27a0f0651ac961c06626df1e4beb5525b4dacd48..2b5d1bc6d3b3fd04bcbf4984035a00b9151cf2ee 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -404,6 +404,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -405,6 +405,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@ -24,10 +24,10 @@ index 847fd720f11e89d906430c820bc92afe0454761d..b1b26e7c0f66f0697bcfe9eb045d45f3
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7a648a8c3f25397e1c883a42648b21a05901513f..bcc0137fec45406e70231b4e2a5bd69dc08ffb5a 100644
|
||||
index 6c29a05e91a6bac634ca3e5394b90112b65cdbd6..009539fa39c81c610ac34747cc09082a0756c79d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3640,10 +3640,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3641,10 +3641,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
Iterator iterator1 = list.iterator();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b1b26e7c0f66f0697bcfe9eb045d45f31cd9ab06..99794276626d26849150d4956abbbc2296543907 100644
|
||||
index 2b5d1bc6d3b3fd04bcbf4984035a00b9151cf2ee..aa70b6437cabdd875cec446db4bcf2422ab2cbc6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -405,6 +405,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -406,6 +406,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||
@ -16,7 +16,7 @@ index b1b26e7c0f66f0697bcfe9eb045d45f31cd9ab06..99794276626d26849150d4956abbbc22
|
||||
// Paper start - Entity origin API
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@@ -2375,6 +2376,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2376,6 +2377,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -27,7 +27,7 @@ index b1b26e7c0f66f0697bcfe9eb045d45f31cd9ab06..99794276626d26849150d4956abbbc22
|
||||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2516,6 +2521,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2517,6 +2522,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.originWorld = originWorld;
|
||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index bcc0137fec45406e70231b4e2a5bd69dc08ffb5a..84e11e2c62e643f959f1a570a27f6ad07df165d4 100644
|
||||
index 009539fa39c81c610ac34747cc09082a0756c79d..08322f6147b78d140a2e0d6c3189ee95270c3c71 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3283,6 +3283,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3284,6 +3284,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
itemstack = this.getItemBySlot(enumitemslot);
|
||||
if (this.equipmentHasChanged(itemstack2, itemstack)) {
|
||||
|
@ -207,10 +207,10 @@ index 128fcd537783986d816dae6d1ce2afb7af07d45a..32eeca2467189c6c97f7da5529d4fe93
|
||||
public void onEntityRemove(Entity entity) {
|
||||
this.invertedVisibilityEntities.remove(entity.getUUID());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index ba104635c7713b04ce624bc4c7bd390462bc0edb..9a6857f325d72c1b5ce403c3240e0b1a3f43bc38 100644
|
||||
index 371d31266a532e59c49dbb106e354296b119fa5e..61d617d4abb9c9cf5c711459aa98c8b173597a9a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -470,6 +470,13 @@ public class Commodore {
|
||||
@@ -472,6 +472,13 @@ public class Commodore {
|
||||
}
|
||||
// Paper end - Rewrite plugins
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityTeleportEndGatewayEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 99794276626d26849150d4956abbbc2296543907..087f030985180b91a809fb45244e23106da62e34 100644
|
||||
index aa70b6437cabdd875cec446db4bcf2422ab2cbc6..46cb5722be10182af7af41f733405ab5fe137576 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3429,8 +3429,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3430,8 +3430,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// CraftBukkit start
|
||||
PositionMoveRotation absolutePosition = PositionMoveRotation.calculateAbsolute(PositionMoveRotation.of(this), PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
|
||||
Location to = CraftLocation.toBukkit(absolutePosition.position(), teleportTarget.newLevel().getWorld(), absolutePosition.yRot(), absolutePosition.xRot());
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 84e11e2c62e643f959f1a570a27f6ad07df165d4..08a2fbca50e26938e46e49dae7b101cfc375b02e 100644
|
||||
index 08322f6147b78d140a2e0d6c3189ee95270c3c71..9e21f77689eb246ad72cdbd7ee19211dcb2ed738 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4101,12 +4101,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4102,12 +4102,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.isUsingItem() && !this.useItem.isEmpty()) {
|
||||
Item item = this.useItem.getItem();
|
||||
|
||||
|
@ -11,10 +11,10 @@ Co-authored-by: aerulion <aerulion@gmail.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 087f030985180b91a809fb45244e23106da62e34..011006bc2e88a9fec98796f939c07d884b92126b 100644
|
||||
index 46cb5722be10182af7af41f733405ab5fe137576..ab7740d1753cd8540189c77053e5ca1f71c1b024 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2050,7 +2050,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2051,7 +2051,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void push(double deltaX, double deltaY, double deltaZ) {
|
||||
@ -38,7 +38,7 @@ index 087f030985180b91a809fb45244e23106da62e34..011006bc2e88a9fec98796f939c07d88
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 08a2fbca50e26938e46e49dae7b101cfc375b02e..cfff596d720efe5f5ee4ad1990c3ee0fd6e4e836 100644
|
||||
index 9e21f77689eb246ad72cdbd7ee19211dcb2ed738..61124dfec84792fa23ce1b0f03cbd97b1a6bde5b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1563,7 +1563,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
||||
UUID, ticks lived, valid, dead
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 011006bc2e88a9fec98796f939c07d884b92126b..79a3d586ddf404c449b7c0aa1996e9b9897b2383 100644
|
||||
index ab7740d1753cd8540189c77053e5ca1f71c1b024..659ed49cebb8ed2a6e1c88fb1e4d95f0520820d4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3406,7 +3406,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3407,7 +3407,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public String toString() {
|
||||
String s = this.level() == null ? "~NULL~" : this.level().toString();
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index cfff596d720efe5f5ee4ad1990c3ee0fd6e4e836..5b8e0931be2acb1eb4ac6f399ecc0a5ebc5db586 100644
|
||||
index 61124dfec84792fa23ce1b0f03cbd97b1a6bde5b..30343efb680edf3dc355498b04c5db9ebecbf270 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4112,6 +4112,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4113,6 +4113,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
// Paper start - Make shield blocking delay configurable
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7a89c25fcd1c76e4b176c257600db89788aa0f21..3bcf2ba5f065d946ded4020b9882bc4e19af0e08 100644
|
||||
index 781568c0aef7556fd4422574d31c0ad790f0afa7..8f6f73fd6f1fce3b78e472f454e0a34043a00125 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4176,6 +4176,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4177,6 +4177,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return this.level().clip(raytrace);
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ index cef054ba95ed7d2b0e2ee575edae3e94b77f58b6..8d958ac09bd9484d879eee6acb6aaea2
|
||||
Iterator iterator = entityliving.getActiveEffects().iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 79a3d586ddf404c449b7c0aa1996e9b9897b2383..5d551a50e1043e369ebf3ddfe181be1e24cfd068 100644
|
||||
index 659ed49cebb8ed2a6e1c88fb1e4d95f0520820d4..2e1628a9b5507ff6b1f00ac83247fc033b2db1c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2821,17 +2821,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2822,17 +2822,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void removeVehicle() {
|
||||
@ -75,7 +75,7 @@ index 79a3d586ddf404c449b7c0aa1996e9b9897b2383..5d551a50e1043e369ebf3ddfe181be1e
|
||||
}
|
||||
|
||||
protected void addPassenger(Entity passenger) {
|
||||
@@ -2856,7 +2867,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2857,7 +2868,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ index 79a3d586ddf404c449b7c0aa1996e9b9897b2383..5d551a50e1043e369ebf3ddfe181be1e
|
||||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2866,7 +2880,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2867,7 +2881,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) this.getBukkitEntity(),
|
||||
@ -96,7 +96,7 @@ index 79a3d586ddf404c449b7c0aa1996e9b9897b2383..5d551a50e1043e369ebf3ddfe181be1e
|
||||
);
|
||||
// Suppress during worldgen
|
||||
if (this.valid) {
|
||||
@@ -2879,7 +2893,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2880,7 +2894,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,10 +106,10 @@ index 79a3d586ddf404c449b7c0aa1996e9b9897b2383..5d551a50e1043e369ebf3ddfe181be1e
|
||||
if (this.valid) {
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3bcf2ba5f065d946ded4020b9882bc4e19af0e08..63d1c5e8441eb5a32fc298ff2d2f3157cbd19557 100644
|
||||
index 8f6f73fd6f1fce3b78e472f454e0a34043a00125..7e684a7df64b64e25ba602c39488712eefdfbcfa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3756,9 +3756,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3757,9 +3757,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@Override
|
||||
public void stopRiding() {
|
||||
|
@ -51,7 +51,7 @@ index 9cfd0b457f6c462921667b9439a7b3e32d019758..62412b37d4f7d37b3fec0966ab700c2a
|
||||
|
||||
if (entity == null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index c75bc7427bd818e9d23ca0af2b08cb160f3c432e..fd1fe9a72a1d4e87b97a34fc79ab1429d31207e5 100644
|
||||
index 97b48186a48ca037645d4a5ae84e3a95fd413a33..a04cfa09d9f8594a7ad3120855efe1641abb7a47 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -223,6 +223,11 @@ public abstract class PlayerList {
|
||||
@ -67,10 +67,10 @@ index c75bc7427bd818e9d23ca0af2b08cb160f3c432e..fd1fe9a72a1d4e87b97a34fc79ab1429
|
||||
String s1 = connection.getLoggableAddress(this.server.logIPs());
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5d551a50e1043e369ebf3ddfe181be1e24cfd068..463d34e7b54efd503c4879d1386b2439474863dd 100644
|
||||
index 2e1628a9b5507ff6b1f00ac83247fc033b2db1c4..e7b4809aa7220597ae92cf8f941f61e874d45d46 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -255,6 +255,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -256,6 +256,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
// Paper end - Share random for entities to make them more random
|
||||
@ -78,7 +78,7 @@ index 5d551a50e1043e369ebf3ddfe181be1e24cfd068..463d34e7b54efd503c4879d1386b2439
|
||||
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
@@ -2390,6 +2391,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2391,6 +2392,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -88,7 +88,7 @@ index 5d551a50e1043e369ebf3ddfe181be1e24cfd068..463d34e7b54efd503c4879d1386b2439
|
||||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -2537,6 +2541,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2538,6 +2542,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 63d1c5e8441eb5a32fc298ff2d2f3157cbd19557..ebfea3adbedd2695f645421019a276efbc73ee63 100644
|
||||
index 7e684a7df64b64e25ba602c39488712eefdfbcfa..ba78e8b73793292830f3260f9a12c50c698bb881 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3993,9 +3993,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3994,9 +3994,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void startUsingItem(InteractionHand hand) {
|
||||
@ -24,7 +24,7 @@ index 63d1c5e8441eb5a32fc298ff2d2f3157cbd19557..ebfea3adbedd2695f645421019a276ef
|
||||
this.useItem = itemstack;
|
||||
this.useItemRemaining = itemstack.getUseDuration(this);
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -4066,6 +4071,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4067,6 +4072,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.releaseUsingItem();
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
@ -32,7 +32,7 @@ index 63d1c5e8441eb5a32fc298ff2d2f3157cbd19557..ebfea3adbedd2695f645421019a276ef
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
PlayerItemConsumeEvent event = null; // Paper
|
||||
@@ -4103,8 +4109,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4104,8 +4110,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
|
@ -21,15 +21,12 @@ index 75ebf09777e19645eee296a9edabac39c858ffb9..c21fa55c62d97d9511e41a1e313e9043
|
||||
this.applyEffectsFromBlocks();
|
||||
float f = 0.98F;
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index dd1c5bc7522a4710cbfdd4764f6431e1e28d63cc..05ad15fc40ccb7feed5c51ad0ad0a98bd0d02af6 100644
|
||||
index bd522080d17b5b470ec3ab42aa4ecc3082248c8a..964e3e81ab522ceebfceb651dfe3309d7b87c688 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -251,12 +251,11 @@ public class ActivationRange
|
||||
entity.activatedTick = MinecraftServer.currentTick + 20;
|
||||
@@ -253,11 +253,8 @@ public class ActivationRange
|
||||
}
|
||||
isActive = true;
|
||||
+ } else if (entity instanceof net.minecraft.world.entity.item.ItemEntity && (entity.tickCount + entity.getId()) % 4 == 0) { // Paper - Needed for item gravity, see ItemEntity tick
|
||||
+ isActive = true;
|
||||
}
|
||||
- // Add a little performance juice to active entities. Skip 1/4 if not immune.
|
||||
- } else if ( !entity.defaultActivationState && entity.tickCount % 4 == 0 && !ActivationRange.checkEntityImmunities( entity ) )
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
|
||||
public net.minecraft.world.entity.LivingEntity jumping
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index ebfea3adbedd2695f645421019a276efbc73ee63..724fe482f1711008dc43fef96c4512a18ed54a48 100644
|
||||
index ba78e8b73793292830f3260f9a12c50c698bb881..a874913997c80c8f47f395e2ef4bb959aaa3e76d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3537,8 +3537,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3538,8 +3538,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
|
||||
this.jumpInLiquid(FluidTags.LAVA);
|
||||
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 463d34e7b54efd503c4879d1386b2439474863dd..fa80b6220aba144521dc0a2a35914c10046c1963 100644
|
||||
index e7b4809aa7220597ae92cf8f941f61e874d45d46..01ea0f81aecbf642d238e6cf6409df2cc83000f3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -406,6 +406,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -407,6 +407,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||
@ -16,7 +16,7 @@ index 463d34e7b54efd503c4879d1386b2439474863dd..fa80b6220aba144521dc0a2a35914c10
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
// Paper start - Entity origin API
|
||||
@javax.annotation.Nullable
|
||||
@@ -2398,6 +2399,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2399,6 +2400,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
|
||||
}
|
||||
@ -26,7 +26,7 @@ index 463d34e7b54efd503c4879d1386b2439474863dd..fa80b6220aba144521dc0a2a35914c10
|
||||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2541,6 +2545,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2542,6 +2546,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
|
||||
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 724fe482f1711008dc43fef96c4512a18ed54a48..4fb99e3ee14d2e7fe2720e25af1c890004b0c250 100644
|
||||
index a874913997c80c8f47f395e2ef4bb959aaa3e76d..b01e472a8a5f05e586bfa35e33abfd3875518ab3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3681,10 +3681,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3682,10 +3682,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!(world instanceof ServerLevel worldserver)) {
|
||||
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
|
||||
} else {
|
||||
|
@ -10,7 +10,7 @@ Co-authored-by: Wyatt Childers <wchilders@nearce.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4ff14dc6996634b0fcd365f76055023601ad2be0..530369764cad77466995f8f65070eec6a5de74f2 100644
|
||||
index ac5725230b04bc1a333863e251fe86580f909ea9..54de4e701adea123c0fdfb5787e951699305bb81 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -197,6 +197,7 @@ public abstract class PlayerList {
|
||||
@ -84,10 +84,10 @@ index 4ff14dc6996634b0fcd365f76055023601ad2be0..530369764cad77466995f8f65070eec6
|
||||
}
|
||||
// Paper end - Entity#getEntitySpawnReason
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index fa80b6220aba144521dc0a2a35914c10046c1963..5b8e264098f1b713de15f714bae59d3efda365cf 100644
|
||||
index 01ea0f81aecbf642d238e6cf6409df2cc83000f3..416e76f2124aba0c9ad6e6ecb052e73a8b743f37 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2502,27 +2502,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2503,27 +2503,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4fb99e3ee14d2e7fe2720e25af1c890004b0c250..25a2085ed68d393afbb658b63a1cd39af98f39fa 100644
|
||||
index b01e472a8a5f05e586bfa35e33abfd3875518ab3..33d969e09372930e740a8a4a84e5503284df9c28 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2352,7 +2352,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2353,7 +2353,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
|
||||
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
||||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5b8e264098f1b713de15f714bae59d3efda365cf..e3228ad3825adedbd1a8326ac3bea329b539b18f 100644
|
||||
index 416e76f2124aba0c9ad6e6ecb052e73a8b743f37..8b4ded85500379bd7dafba51a91732dc56b815e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2630,11 +2630,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2631,11 +2631,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||
@ -34,7 +34,7 @@ index 5b8e264098f1b713de15f714bae59d3efda365cf..e3228ad3825adedbd1a8326ac3bea329
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@@ -3462,6 +3463,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3463,6 +3464,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public Entity teleport(TeleportTransition teleportTarget) {
|
||||
Level world = this.level();
|
||||
|
||||
@ -47,7 +47,7 @@ index 5b8e264098f1b713de15f714bae59d3efda365cf..e3228ad3825adedbd1a8326ac3bea329
|
||||
if (world instanceof ServerLevel worldserver) {
|
||||
if (!this.isRemoved()) {
|
||||
// CraftBukkit start
|
||||
@@ -3550,6 +3557,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3551,6 +3558,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
gameprofilerfiller.pop();
|
||||
return null;
|
||||
} else {
|
||||
@ -59,7 +59,7 @@ index 5b8e264098f1b713de15f714bae59d3efda365cf..e3228ad3825adedbd1a8326ac3bea329
|
||||
entity.restoreFrom(this);
|
||||
this.removeAfterChangingDimensions();
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
@@ -3662,6 +3674,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3663,6 +3675,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level from, Level to) {
|
||||
@ -68,7 +68,7 @@ index 5b8e264098f1b713de15f714bae59d3efda365cf..e3228ad3825adedbd1a8326ac3bea329
|
||||
Iterator iterator = this.getPassengers().iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 25a2085ed68d393afbb658b63a1cd39af98f39fa..718ccabb46d4520ba363d21a33e06eb2c9ff62ee 100644
|
||||
index 33d969e09372930e740a8a4a84e5503284df9c28..4d39aa2fdc311acb34d7b674365141b995c324b7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1765,9 +1765,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Ensure Entity position and AABB are never invalid
|
||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d5f96ed753e8298085e40c6181285cd6ea838ca2..8993c16254ac05d509bd8ac1cd21e7cc7c4097b8 100644
|
||||
index 8b4ded85500379bd7dafba51a91732dc56b815e6..65144603a545903b8f11ee1b2b1ac2795af81381 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -677,8 +677,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -678,8 +678,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void setPos(double x, double y, double z) {
|
||||
@ -20,7 +20,7 @@ index d5f96ed753e8298085e40c6181285cd6ea838ca2..8993c16254ac05d509bd8ac1cd21e7cc
|
||||
}
|
||||
|
||||
protected AABB makeBoundingBox() {
|
||||
@@ -4412,7 +4412,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4442,7 +4442,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ index d5f96ed753e8298085e40c6181285cd6ea838ca2..8993c16254ac05d509bd8ac1cd21e7cc
|
||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
this.position = new Vec3(x, y, z);
|
||||
int i = Mth.floor(x);
|
||||
@@ -4430,6 +4452,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4460,6 +4482,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.levelCallback.onMove();
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 718ccabb46d4520ba363d21a33e06eb2c9ff62ee..7e3670bee52407d768d1f7c0be66d7c0d0f72c46 100644
|
||||
index 4d39aa2fdc311acb34d7b674365141b995c324b7..6a2f54a70b484effb903f084a5a109981ef38114 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3796,7 +3796,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3797,7 +3797,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
Entity entity = this.getVehicle();
|
||||
|
||||
super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation
|
||||
|
@ -22,10 +22,10 @@ index 00ce20359f6d73acf3f1016806e5f4f3b6d01bcd..1754e413dc1b7a18b3fc0b981eae1128
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8993c16254ac05d509bd8ac1cd21e7cc7c4097b8..2c9e57436469f94beb45f656a1df71aba7b1e408 100644
|
||||
index 65144603a545903b8f11ee1b2b1ac2795af81381..906a5cc5671b707ef90d1f25d8ba5642c7a483bc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -179,6 +179,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -180,6 +180,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@ -33,7 +33,7 @@ index 8993c16254ac05d509bd8ac1cd21e7cc7c4097b8..2c9e57436469f94beb45f656a1df71ab
|
||||
static boolean isLevelAtLeast(CompoundTag tag, int level) {
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
@@ -1943,6 +1944,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1944,6 +1945,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void moveTo(double x, double y, double z, float yaw, float pitch) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2c9e57436469f94beb45f656a1df71aba7b1e408..c3e28cc070993be5afe9323c2c2d54ffc81d82f3 100644
|
||||
index 906a5cc5671b707ef90d1f25d8ba5642c7a483bc..3f0a44db707176c25e306f55fa63da9314d682a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4704,4 +4704,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4734,4 +4734,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
void accept(Entity entity, double x, double y, double z);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c3e28cc070993be5afe9323c2c2d54ffc81d82f3..6cefe8e0de375d3b192cc8be2b553a2dcbe098f5 100644
|
||||
index 3f0a44db707176c25e306f55fa63da9314d682a1..4a26795d22c0276980f4d0ad266861389d8471a8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4709,5 +4709,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4739,5 +4739,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public static int nextEntityId() {
|
||||
return ENTITY_COUNTER.incrementAndGet();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6cefe8e0de375d3b192cc8be2b553a2dcbe098f5..7feed6383fdc367796ccb943bd086814ec989e6d 100644
|
||||
index 4a26795d22c0276980f4d0ad266861389d8471a8..9ebce90de425989014466d2c5ce68fce505d1dcd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2195,6 +2195,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2196,6 +2196,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean isPushable() {
|
||||
@ -44,10 +44,10 @@ index b8d57e25851dd7da905100dfd4022e4b99fd7f02..721321a19ce056f82de2bef44a8791dc
|
||||
} else if (entity1 instanceof Player && entity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions) { // Paper - Configurable player collision
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7e3670bee52407d768d1f7c0be66d7c0d0f72c46..d361e39ba50958e7bdaea0b95c37d13f48a89771 100644
|
||||
index 6a2f54a70b484effb903f084a5a109981ef38114..499e4fbb919ae3875aaa371d6ee206b8b144387b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3710,7 +3710,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3711,7 +3711,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return;
|
||||
}
|
||||
// Paper end - don't run getEntities if we're not going to use its result
|
||||
@ -56,7 +56,7 @@ index 7e3670bee52407d768d1f7c0be66d7c0d0f72c46..d361e39ba50958e7bdaea0b95c37d13f
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
// Paper - don't run getEntities if we're not going to use its result; moved up
|
||||
@@ -3915,9 +3915,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3916,9 +3916,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return !this.isRemoved() && this.collides; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ index b0373df16a3e6910fb5f4a2ab7ca2523ced84a22..a9661ab34bc98c19d525eb4b60b1f0d0
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index a8fc89f78181abf9963bd1523f3bbefa911847d8..50c0055d80735313c280821991bd2a76e427f082 100644
|
||||
index a4ab0e50a245790b1767047c384859f06c3f9526..fb9f0a62201dfeccd0eec9bb399f9edc6a01f1f0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -161,7 +161,7 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add missing default perms for commands
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
index a9ea2e38e4673686c9994a58c94ad19e59fd423c..52649f82351ab4f675c3cc3cd6640956b0f76b91 100644
|
||||
index a9ea2e38e4673686c9994a58c94ad19e59fd423c..b3169c551b8410f5861f9db0543c785439ecba7c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
@@ -24,13 +24,75 @@ public final class CommandPermissions {
|
||||
@@ -24,13 +24,76 @@ public final class CommandPermissions {
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "stop", "Allows the user to stop the server", PermissionDefault.OP, commands);
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "list", "Allows the user to list all online players", PermissionDefault.OP, commands);
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands);
|
||||
@ -82,6 +82,7 @@ index a9ea2e38e4673686c9994a58c94ad19e59fd423c..52649f82351ab4f675c3cc3cd6640956
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "place", "Allows the user to place features and structures", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "return", "Allows the user to use the /return command", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "random", "Allows the user to generate a random number", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "rotate", "Allows the user to change the rotation of entities", PermissionDefault.OP, commands);
|
||||
+ // Paper end
|
||||
|
||||
DefaultPermissions.registerPermission("minecraft.admin.command_feedback", "Receive command broadcasts when sendCommandFeedback is true", PermissionDefault.OP, commands);
|
||||
|
@ -5,12 +5,12 @@ Subject: [PATCH] Fix CraftSound backwards compatibility
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 260a738d5d61cf931b939502ea9c66451855b91e..dce716b6ac407d1e1ae07272ee5c8b14f891f5fa 100644
|
||||
index e53d6d33bfe9ed14fce0f5df0ab7648f18489c39..5b6e6902db19b078bb8598014a87c06f1267acc4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -40,4 +40,10 @@ public class CraftSound {
|
||||
throw new IllegalArgumentException("No Reference holder found for " + bukkit
|
||||
+ ", this can happen if a plugin creates its own sound effect with out properly registering it.");
|
||||
@@ -106,4 +106,10 @@ public class CraftSound implements Sound, Handleable<SoundEvent> {
|
||||
public int hashCode() {
|
||||
return this.getKey().hashCode();
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
|
@ -28,10 +28,10 @@ index 488ebd443903af812913437f1ade3002093f2470..a043ac10834562d357ef0b5aded2e916
|
||||
|
||||
public Vec3 decode(long x, long y, long z) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7feed6383fdc367796ccb943bd086814ec989e6d..7c07ffaabce7a3964114b0859ad0028d52c662cc 100644
|
||||
index 9ebce90de425989014466d2c5ce68fce505d1dcd..282863951033f7e036b0e58393651e1a22fada23 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4449,6 +4449,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4479,6 +4479,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return;
|
||||
}
|
||||
// Paper end - Block invalid positions and bounding box
|
||||
|
@ -25,10 +25,10 @@ index c101d01b55472efc9fc2829b8c17db5377ed57ff..5d51a49228eaee94f91cd04843e27c79
|
||||
public Status getStatus() {
|
||||
return CraftBoat.boatStatusFromNms(this.getHandle().status);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
index ee010d53f8c671d17d68f3f43dca9978e23ac8ab..d35c1a10e58932b19c8053c5dacdc25fd7f22e8c 100644
|
||||
index c4db7c00c66e064993b8b2158f226d063eea798c..8192ccb01ed4efe9e987cab94952c172ed876581 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.craftbukkit.entity;
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
@ -36,7 +36,7 @@ index ee010d53f8c671d17d68f3f43dca9978e23ac8ab..d35c1a10e58932b19c8053c5dacdc25f
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
@@ -68,6 +69,24 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
@@ -69,6 +70,24 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
this.getHandle().setDerailedVelocityMod(derailed);
|
||||
}
|
||||
|
||||
|
@ -12,10 +12,10 @@ public net.minecraft.server.RegistryLayer STATIC_ACCESS
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9657c35ffbcc12061b394b97c97224e699c99b4f
|
||||
index 0000000000000000000000000000000000000000..39120c63ed25d45a4083523fbfe79d871f4d892e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
|
||||
@@ -0,0 +1,152 @@
|
||||
@@ -0,0 +1,156 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import io.papermc.paper.adventure.PaperAdventure;
|
||||
@ -28,19 +28,23 @@ index 0000000000000000000000000000000000000000..9657c35ffbcc12061b394b97c97224e6
|
||||
+import net.minecraft.core.Registry;
|
||||
+import net.minecraft.core.registries.Registries;
|
||||
+import net.minecraft.resources.ResourceKey;
|
||||
+import org.bukkit.Art;
|
||||
+import org.bukkit.Fluid;
|
||||
+import org.bukkit.GameEvent;
|
||||
+import org.bukkit.JukeboxSong;
|
||||
+import org.bukkit.Keyed;
|
||||
+import org.bukkit.MusicInstrument;
|
||||
+import org.bukkit.Sound;
|
||||
+import org.bukkit.attribute.Attribute;
|
||||
+import org.bukkit.block.Biome;
|
||||
+import org.bukkit.block.BlockType;
|
||||
+import org.bukkit.block.banner.PatternType;
|
||||
+import org.bukkit.craftbukkit.CraftArt;
|
||||
+import org.bukkit.craftbukkit.CraftFluid;
|
||||
+import org.bukkit.craftbukkit.CraftGameEvent;
|
||||
+import org.bukkit.craftbukkit.CraftJukeboxSong;
|
||||
+import org.bukkit.craftbukkit.CraftMusicInstrument;
|
||||
+import org.bukkit.craftbukkit.CraftSound;
|
||||
+import org.bukkit.craftbukkit.attribute.CraftAttribute;
|
||||
+import org.bukkit.craftbukkit.block.CraftBiome;
|
||||
+import org.bukkit.craftbukkit.block.CraftBlockType;
|
||||
@ -106,6 +110,7 @@ index 0000000000000000000000000000000000000000..9657c35ffbcc12061b394b97c97224e6
|
||||
+ entry(Registries.MENU, RegistryKey.MENU, MenuType.class, CraftMenuType::new),
|
||||
+ entry(Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, Attribute.class, CraftAttribute::new),
|
||||
+ entry(Registries.FLUID, RegistryKey.FLUID, Fluid.class, CraftFluid::new),
|
||||
+ entry(Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, Sound.class, CraftSound::new),
|
||||
+
|
||||
+ // data-drivens
|
||||
+ entry(Registries.BIOME, RegistryKey.BIOME, Biome.class, CraftBiome::new).delayed(),
|
||||
@ -117,13 +122,12 @@ index 0000000000000000000000000000000000000000..9657c35ffbcc12061b394b97c97224e6
|
||||
+ entry(Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, Enchantment.class, CraftEnchantment::new).withSerializationUpdater(FieldRename.ENCHANTMENT_RENAME).delayed(),
|
||||
+ entry(Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, JukeboxSong.class, CraftJukeboxSong::new).delayed(),
|
||||
+ entry(Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, PatternType.class, CraftPatternType::new).delayed(),
|
||||
+ entry(Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, Art.class, CraftArt::new).delayed(),
|
||||
+
|
||||
+ // api-only
|
||||
+ apiOnly(Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, () -> org.bukkit.Registry.ART),
|
||||
+ apiOnly(Registries.ENTITY_TYPE, RegistryKey.ENTITY_TYPE, () -> org.bukkit.Registry.ENTITY_TYPE),
|
||||
+ apiOnly(Registries.PARTICLE_TYPE, RegistryKey.PARTICLE_TYPE, () -> org.bukkit.Registry.PARTICLE_TYPE),
|
||||
+ apiOnly(Registries.POTION, RegistryKey.POTION, () -> org.bukkit.Registry.POTION),
|
||||
+ apiOnly(Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, () -> org.bukkit.Registry.SOUNDS),
|
||||
+ apiOnly(Registries.MEMORY_MODULE_TYPE, RegistryKey.MEMORY_MODULE_TYPE, () -> (org.bukkit.Registry<MemoryKey<?>>) (org.bukkit.Registry) org.bukkit.Registry.MEMORY_MODULE_TYPE)
|
||||
+ );
|
||||
+ final Map<RegistryKey<?>, RegistryEntry<?, ?>> byRegistryKey = new IdentityHashMap<>(REGISTRY_ENTRIES.size());
|
||||
@ -749,10 +753,10 @@ index 8e8d6214adbd21a221147f0fc0d91cd9c06a080c..6fddef967b6314ca0158f5bd4b889867
|
||||
String string = Registries.elementsDirPath(type.registryKey());
|
||||
SimpleJsonResourceReloadListener.scanDirectory(resourceManager, string, ops, type.codec(), map);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
index d7e3371ebc08b5534c259ea45d89a969dfbe491a..16985dc1f54d64c44f96b045012612f16ba9ae8a 100644
|
||||
index 0d091c7b328fb70a82f5b5ded7dec61b7cd3d59a..249f0dcad04a35244da6dab837a461bb42aad00a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
@@ -125,90 +125,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -127,96 +127,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
+ ", this can happen if a plugin creates its own registry entry with out properly registering it.");
|
||||
}
|
||||
|
||||
@ -764,6 +768,9 @@ index d7e3371ebc08b5534c259ea45d89a969dfbe491a..16985dc1f54d64c44f96b045012612f1
|
||||
- * @return the bukkit registry of the provided class
|
||||
- */
|
||||
- public static <B extends Keyed> Registry<?> createRegistry(Class<? super B> bukkitClass, RegistryAccess registryHolder) {
|
||||
- if (bukkitClass == Art.class) {
|
||||
- return new CraftRegistry<>(Art.class, registryHolder.lookupOrThrow(Registries.PAINTING_VARIANT), CraftArt::new, FieldRename.NONE);
|
||||
- }
|
||||
- if (bukkitClass == Attribute.class) {
|
||||
- return new CraftRegistry<>(Attribute.class, registryHolder.lookupOrThrow(Registries.ATTRIBUTE), CraftAttribute::new, FieldRename.ATTRIBUTE_RENAME);
|
||||
- }
|
||||
@ -788,6 +795,9 @@ index d7e3371ebc08b5534c259ea45d89a969dfbe491a..16985dc1f54d64c44f96b045012612f1
|
||||
- if (bukkitClass == PotionEffectType.class) {
|
||||
- return new CraftRegistry<>(PotionEffectType.class, registryHolder.lookupOrThrow(Registries.MOB_EFFECT), CraftPotionEffectType::new, FieldRename.NONE);
|
||||
- }
|
||||
- if (bukkitClass == Sound.class) {
|
||||
- return new CraftRegistry<>(Sound.class, registryHolder.lookupOrThrow(Registries.SOUND_EVENT), CraftSound::new, FieldRename.NONE);
|
||||
- }
|
||||
- if (bukkitClass == Structure.class) {
|
||||
- return new CraftRegistry<>(Structure.class, registryHolder.lookupOrThrow(Registries.STRUCTURE), CraftStructure::new, FieldRename.NONE);
|
||||
- }
|
||||
@ -846,7 +856,7 @@ index d7e3371ebc08b5534c259ea45d89a969dfbe491a..16985dc1f54d64c44f96b045012612f1
|
||||
}
|
||||
|
||||
if (bukkit instanceof Registry.SimpleRegistry<?> simple) {
|
||||
@@ -226,23 +148,21 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -234,23 +150,21 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
return bukkit.get(namespacedKey);
|
||||
}
|
||||
|
||||
@ -930,10 +940,10 @@ index 091e11934bddb180f0b2e51efb3921c62275d41d..12fe2f8d0dcb715545e071023490a321
|
||||
// PatternType
|
||||
private static final FieldRenameData PATTERN_TYPE_DATA = FieldRenameData.Builder.newBuilder()
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 9a6857f325d72c1b5ce403c3240e0b1a3f43bc38..e4b79d92a8c41eb37d989248425b1e5a963b476c 100644
|
||||
index 61d617d4abb9c9cf5c711459aa98c8b173597a9a..c9b789c2a904c2caff516ee9aeff4a6b368766f4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -218,20 +218,10 @@ public class Commodore {
|
||||
@@ -220,20 +220,10 @@ public class Commodore {
|
||||
|
||||
public byte[] convert(byte[] b, final String pluginName, final ApiVersion pluginVersion, final Set<String> activeCompatibilities) {
|
||||
final boolean modern = pluginVersion.isNewerThanOrSameAs(ApiVersion.FLATTENING);
|
||||
@ -954,7 +964,7 @@ index 9a6857f325d72c1b5ce403c3240e0b1a3f43bc38..e4b79d92a8c41eb37d989248425b1e5a
|
||||
|
||||
visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper
|
||||
cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
|
||||
@@ -298,15 +288,6 @@ public class Commodore {
|
||||
@@ -300,15 +290,6 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
@ -1259,7 +1269,7 @@ index bbd5dd5b27937ddc3d8c57f2b604331495b0f311..626c3033e36897846fe84a77d05e2e91
|
||||
CraftRegistry.setMinecraftRegistry(RegistryHelper.getRegistry());
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
|
||||
index c0e02198200c93e3d0ff2461d267e856db087532..bbabfad54c58f74cb5d70cbce4d140ad69a56abb 100644
|
||||
index bfec6280e8b753a29ad2d9eb88808beb79ec65ea..b717a5ffa567781b0687bbe238b62844214db284 100644
|
||||
--- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
|
||||
+++ b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -1270,11 +1280,12 @@ index c0e02198200c93e3d0ff2461d267e856db087532..bbabfad54c58f74cb5d70cbce4d140ad
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
@@ -67,39 +68,38 @@ public class RegistriesArgumentProvider implements ArgumentsProvider {
|
||||
@@ -73,41 +74,40 @@ public class RegistriesArgumentProvider implements ArgumentsProvider {
|
||||
private static final List<Arguments> DATA = Lists.newArrayList();
|
||||
|
||||
static {
|
||||
- // Order: Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class
|
||||
- register(Art.class, Registries.PAINTING_VARIANT, CraftArt.class, PaintingVariant.class);
|
||||
- register(Attribute.class, Registries.ATTRIBUTE, CraftAttribute.class, net.minecraft.world.entity.ai.attributes.Attribute.class);
|
||||
- register(Biome.class, Registries.BIOME, CraftBiome.class, net.minecraft.world.level.biome.Biome.class);
|
||||
- register(Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class);
|
||||
@ -1283,6 +1294,7 @@ index c0e02198200c93e3d0ff2461d267e856db087532..bbabfad54c58f74cb5d70cbce4d140ad
|
||||
- register(MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class);
|
||||
- register(MenuType.class, Registries.MENU, CraftMenuType.class, net.minecraft.world.inventory.MenuType.class);
|
||||
- register(PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class);
|
||||
- register(Sound.class, Registries.SOUND_EVENT, CraftSound.class, SoundEvent.class);
|
||||
- register(Structure.class, Registries.STRUCTURE, CraftStructure.class, net.minecraft.world.level.levelgen.structure.Structure.class);
|
||||
- register(StructureType.class, Registries.STRUCTURE_TYPE, CraftStructureType.class, net.minecraft.world.level.levelgen.structure.StructureType.class);
|
||||
- register(Villager.Type.class, Registries.VILLAGER_TYPE, CraftVillager.CraftType.class, VillagerType.class);
|
||||
@ -1300,6 +1312,7 @@ index c0e02198200c93e3d0ff2461d267e856db087532..bbabfad54c58f74cb5d70cbce4d140ad
|
||||
- register(PatternType.class, Registries.BANNER_PATTERN, CraftPatternType.class, BannerPattern.class);
|
||||
-
|
||||
+ // Order: RegistryKey, Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class
|
||||
+ register(RegistryKey.PAINTING_VARIANT, Art.class, Registries.PAINTING_VARIANT, CraftArt.class, PaintingVariant.class);
|
||||
+ register(RegistryKey.ATTRIBUTE, Attribute.class, Registries.ATTRIBUTE, CraftAttribute.class, net.minecraft.world.entity.ai.attributes.Attribute.class);
|
||||
+ register(RegistryKey.BIOME, Biome.class, Registries.BIOME, CraftBiome.class, net.minecraft.world.level.biome.Biome.class);
|
||||
+ register(RegistryKey.ENCHANTMENT, Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class);
|
||||
@ -1307,6 +1320,7 @@ index c0e02198200c93e3d0ff2461d267e856db087532..bbabfad54c58f74cb5d70cbce4d140ad
|
||||
+ register(RegistryKey.GAME_EVENT, GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class);
|
||||
+ register(RegistryKey.INSTRUMENT, MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class);
|
||||
+ register(RegistryKey.MOB_EFFECT, PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class);
|
||||
+ register(RegistryKey.SOUND_EVENT, Sound.class, Registries.SOUND_EVENT, CraftSound.class, SoundEvent.class);
|
||||
+ register(RegistryKey.STRUCTURE, Structure.class, Registries.STRUCTURE, CraftStructure.class, net.minecraft.world.level.levelgen.structure.Structure.class);
|
||||
+ register(RegistryKey.STRUCTURE_TYPE, StructureType.class, Registries.STRUCTURE_TYPE, CraftStructureType.class, net.minecraft.world.level.levelgen.structure.StructureType.class);
|
||||
+ register(RegistryKey.VILLAGER_TYPE, Villager.Type.class, Registries.VILLAGER_TYPE, CraftVillager.CraftType.class, VillagerType.class);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Collision option for requiring a player participant
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7c07ffaabce7a3964114b0859ad0028d52c662cc..0d10abc918e31bf8a529706b3350c80dec11b313 100644
|
||||
index 282863951033f7e036b0e58393651e1a22fada23..fa070c7243a4d800edc7bde2905773022788fa14 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2024,6 +2024,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2025,6 +2025,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void push(Entity entity) {
|
||||
if (!this.isPassengerOfSameVehicle(entity)) {
|
||||
if (!entity.noPhysics && !this.noPhysics) {
|
||||
@ -29,7 +29,7 @@ index a9661ab34bc98c19d525eb4b60b1f0d05d73241e..3590f4bc1af829cdb6e0cfdc8fa68571
|
||||
if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index 50c0055d80735313c280821991bd2a76e427f082..ee7350e19a86ffa115e4bce6b186a2422951e89b 100644
|
||||
index fb9f0a62201dfeccd0eec9bb399f9edc6a01f1f0..9a864b4bacc5e180f36a6af2a0d63dc6d10ab0e5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -562,6 +562,7 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expand EntityUnleashEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0d10abc918e31bf8a529706b3350c80dec11b313..3479b7c89741ba93e49e7e51fe4b45bb14fbc419 100644
|
||||
index fa070c7243a4d800edc7bde2905773022788fa14..963c190e4c445131659cc9e2e72b0272324666e2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2689,12 +2689,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2690,12 +2690,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (leashable.getLeashHolder() == player) {
|
||||
if (!this.level().isClientSide()) {
|
||||
// CraftBukkit start - fire PlayerUnleashEntityEvent
|
||||
@ -26,7 +26,7 @@ index 0d10abc918e31bf8a529706b3350c80dec11b313..3479b7c89741ba93e49e7e51fe4b45bb
|
||||
this.gameEvent(GameEvent.ENTITY_INTERACT, player);
|
||||
}
|
||||
|
||||
@@ -3659,9 +3662,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3660,9 +3663,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
protected void removeAfterChangingDimensions() {
|
||||
this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION, null); // CraftBukkit - add Bukkit remove cause
|
||||
@ -140,7 +140,7 @@ index 4b44830ef5d08887274ebb39e2780606fe3a76b4..d3a7953a3f42a0020342845e9107c699
|
||||
flag1 = true;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index a25e814978a2f19fa6fe74aaa5c529a524240d71..5064dd8c97f45f0c4e2d1402500e7cf67a263dfa 100644
|
||||
index 6d1d3451054af05e2381d70d71b99869f37c0901..697c69b60aa45b6a229f3bec77dc728e50a895ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1596,8 +1596,10 @@ public class CraftEventFactory {
|
||||
|
@ -29,10 +29,10 @@ index 0e984f3521b578779dd9d0142bce7db433b78f07..1c3f41d7ed7320342fe68c5ab6eb57db
|
||||
public LevelChunk getChunkIfLoaded(int x, int z) {
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index d361e39ba50958e7bdaea0b95c37d13f48a89771..ce9369e730ba8862cd1e6e26f8825c35b16fcfb9 100644
|
||||
index 499e4fbb919ae3875aaa371d6ee206b8b144387b..a0b90b18e8f8970e722ebd0e78113f55ff54a55b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3626,6 +3626,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3627,6 +3627,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
this.pushEntities();
|
||||
gameprofilerfiller.pop();
|
||||
|
@ -9,10 +9,10 @@ till their item is switched.
|
||||
This patch clears the active item when the event is cancelled
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index ce9369e730ba8862cd1e6e26f8825c35b16fcfb9..502a5455533113ef580cd23399dc1dcad530b0ae 100644
|
||||
index a0b90b18e8f8970e722ebd0e78113f55ff54a55b..6eda6f62e54eefddad51033e7d69c76ffc110a6d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4141,6 +4141,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4142,6 +4142,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
entityPlayer.getBukkitEntity().updateInventory();
|
||||
entityPlayer.getBukkitEntity().updateScaledHealth();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Line Of Sight Changes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 502a5455533113ef580cd23399dc1dcad530b0ae..83557da78340e3327f8c9a3050662413ecc3fc17 100644
|
||||
index 6eda6f62e54eefddad51033e7d69c76ffc110a6d..5415cade10ab36709f722cabc20ea3f1b9c285d9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3905,7 +3905,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3906,7 +3906,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ());
|
||||
Vec3 vec3d1 = new Vec3(entity.getX(), entityY.getAsDouble(), entity.getZ());
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3479b7c89741ba93e49e7e51fe4b45bb14fbc419..fe9cdd104d6203233a90068b55e0876be4964afe 100644
|
||||
index 963c190e4c445131659cc9e2e72b0272324666e2..5ddab7fde91ab1089c9ea35f441a21dfd5df2ef8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4087,20 +4087,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4088,20 +4088,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
private Stream<Entity> getIndirectPassengersStream() {
|
||||
@ -43,7 +43,7 @@ index 3479b7c89741ba93e49e7e51fe4b45bb14fbc419..fe9cdd104d6203233a90068b55e0876b
|
||||
return () -> {
|
||||
return this.getIndirectPassengersStream().iterator();
|
||||
};
|
||||
@@ -4113,6 +4127,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4114,6 +4128,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean hasExactlyOnePlayerPassenger() {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index fe9cdd104d6203233a90068b55e0876be4964afe..88d3b1997bba632c5746d295bb39095f5d328369 100644
|
||||
index 5ddab7fde91ab1089c9ea35f441a21dfd5df2ef8..3d9bf236eb1535cc2547f1421ee2a09b2c44fc52 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3491,6 +3491,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3492,6 +3492,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.isRemoved()) {
|
||||
// CraftBukkit start
|
||||
PositionMoveRotation absolutePosition = PositionMoveRotation.calculateAbsolute(PositionMoveRotation.of(this), PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
|
||||
@ -16,7 +16,7 @@ index fe9cdd104d6203233a90068b55e0876be4964afe..88d3b1997bba632c5746d295bb39095f
|
||||
Location to = CraftLocation.toBukkit(absolutePosition.position(), teleportTarget.newLevel().getWorld(), absolutePosition.yRot(), absolutePosition.xRot());
|
||||
// Paper start - gateway-specific teleport event
|
||||
final EntityTeleportEvent teleEvent;
|
||||
@@ -3507,7 +3508,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3508,7 +3509,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!to.equals(teleEvent.getTo())) {
|
||||
to = teleEvent.getTo();
|
||||
teleportTarget = new TeleportTransition(((CraftWorld) to.getWorld()).getHandle(), CraftLocation.toVec3D(to), Vec3.ZERO, to.getYaw(), to.getPitch(), teleportTarget.missingRespawnBlock(), teleportTarget.asPassenger(), Set.of(), teleportTarget.postTeleportTransition(), teleportTarget.cause());
|
||||
|
@ -164,10 +164,10 @@ index 8ca86852319d7463f60832bc98b825b0b4325995..62ada73302c6b3ce3fb2dcc8c31a1d9c
|
||||
|
||||
private final DisplayInfo handle;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index e4b79d92a8c41eb37d989248425b1e5a963b476c..1f25fa2b2ce8fae5bce29232cbb51966b86dae85 100644
|
||||
index c9b789c2a904c2caff516ee9aeff4a6b368766f4..52a507ff2770bd46494e805956b4569f0d4d21ee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -456,6 +456,11 @@ public class Commodore {
|
||||
@@ -458,6 +458,11 @@ public class Commodore {
|
||||
super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf);
|
||||
return;
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ index cab7a3d21699605cb7fc480830d7529f70e69e88..ad86ee4372e55c82968fd4fc6a65deba
|
||||
+ // Paper end - old getSpawnEgg API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 1f25fa2b2ce8fae5bce29232cbb51966b86dae85..f10e7a847e9f57d2a987b118215c0ceab251a5b0 100644
|
||||
index 52a507ff2770bd46494e805956b4569f0d4d21ee..5a7aa491e0846ca8133bc4bb6e74b93cff85fb17 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -463,6 +463,15 @@ public class Commodore {
|
||||
@@ -465,6 +465,15 @@ public class Commodore {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
||||
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 88d3b1997bba632c5746d295bb39095f5d328369..900765b0129e8bf485aca93af6f523c9948e288b 100644
|
||||
index 3d9bf236eb1535cc2547f1421ee2a09b2c44fc52..9755d8a40a5a5b4863ce057f576f393773cee3e4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2260,6 +2260,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2261,6 +2261,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,10 +51,10 @@ index 7acd7f60327106d55e8f48247650bc0064dd1b58..bee79fab7f8195e14f6bd22d9cd59bfc
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
index 87c93ee9bbbfff785b7b6a1f0c4b932e36362943..4e81c26fdbd089961b2577168c716bf29d504d40 100644
|
||||
index 71bc74071e7bbce1d6aa5b0f0fb244c93dae168e..732655bf8dd279167f799e01b1516b4dd5fa7464 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
@@ -86,7 +86,21 @@ public final class VanillaCommandWrapper extends BukkitCommand {
|
||||
@@ -91,7 +91,21 @@ public final class VanillaCommandWrapper extends BukkitCommand {
|
||||
}
|
||||
|
||||
public static String getPermission(CommandNode<CommandSourceStack> vanillaCommand) {
|
||||
|
@ -8,10 +8,10 @@ This is because bukkit uses a separate head rotation field for yaw.
|
||||
This issue only applies to players.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 900765b0129e8bf485aca93af6f523c9948e288b..3903bbc53d541e66d9362eea27029ed320a74772 100644
|
||||
index 9755d8a40a5a5b4863ce057f576f393773cee3e4..2ab2cfddae9f1bb3a1ca3c3bfd0916a14409b205 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1914,6 +1914,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1915,6 +1915,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F);
|
||||
this.yRotO = this.getYRot();
|
||||
this.xRotO = this.getXRot();
|
||||
@ -19,7 +19,7 @@ index 900765b0129e8bf485aca93af6f523c9948e288b..3903bbc53d541e66d9362eea27029ed3
|
||||
}
|
||||
|
||||
public void absMoveTo(double x, double y, double z) {
|
||||
@@ -1956,6 +1957,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1957,6 +1958,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.setXRot(pitch);
|
||||
this.setOldPosAndRot();
|
||||
this.reapplyPosition();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] don't attempt to teleport dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3903bbc53d541e66d9362eea27029ed320a74772..d6bbefe3d3b21c6fc9be3cfe3ba304226bab6883 100644
|
||||
index 2ab2cfddae9f1bb3a1ca3c3bfd0916a14409b205..d05fd90a000c723e9c3bef0fde1b59aea2367f7f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -713,7 +713,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -714,7 +714,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// CraftBukkit start
|
||||
public void postTick() {
|
||||
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent excessive velocity through repeated crits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4f13d792a2cc504f174766d4c0d924d9ca51df9c..2ae65d0303a01536bae6ef8f900b23b94d72dc22 100644
|
||||
index 924db96764ef1d0b9596be01f344065f8e1a721e..f06fe310e8dd950fa68ed3b7a7ba5e43a23b9316 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2863,17 +2863,29 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2864,17 +2864,29 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return this.hasEffect(MobEffects.JUMP) ? 0.1F * ((float) this.getEffect(MobEffects.JUMP).getAmplifier() + 1.0F) : 0.0F;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d6bbefe3d3b21c6fc9be3cfe3ba304226bab6883..06d7aed2539a0f38fabe5b10c91d8da10c43605f 100644
|
||||
index d05fd90a000c723e9c3bef0fde1b59aea2367f7f..0eda06b3919e0cc4ddaec4b644c17011a01ccdeb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3480,6 +3480,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3481,6 +3481,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void restoreFrom(Entity original) {
|
||||
@ -22,7 +22,7 @@ index d6bbefe3d3b21c6fc9be3cfe3ba304226bab6883..06d7aed2539a0f38fabe5b10c91d8da1
|
||||
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
|
||||
|
||||
nbttagcompound.remove("Dimension");
|
||||
@@ -3617,8 +3624,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3618,8 +3625,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
entity.restoreFrom(this);
|
||||
this.removeAfterChangingDimensions();
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Freeze Tick Lock API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 06d7aed2539a0f38fabe5b10c91d8da10c43605f..4b0b768a4563281ec4ef1a16a3a21c24a1272849 100644
|
||||
index 0eda06b3919e0cc4ddaec4b644c17011a01ccdeb..a390e1791b4fb3eae5555fc9b760588e410be900 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -414,6 +414,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -415,6 +415,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
private UUID originWorld;
|
||||
@ -16,7 +16,7 @@ index 06d7aed2539a0f38fabe5b10c91d8da10c43605f..4b0b768a4563281ec4ef1a16a3a21c24
|
||||
|
||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
this.origin = location.toVector();
|
||||
@@ -759,7 +760,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -760,7 +761,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.setRemainingFireTicks(this.remainingFireTicks - 1);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ index 06d7aed2539a0f38fabe5b10c91d8da10c43605f..4b0b768a4563281ec4ef1a16a3a21c24
|
||||
this.setTicksFrozen(0);
|
||||
this.level().levelEvent((Player) null, 1009, this.blockPosition, 1);
|
||||
}
|
||||
@@ -2428,6 +2429,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2429,6 +2430,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (fromNetherPortal) {
|
||||
nbttagcompound.putBoolean("Paper.FromNetherPortal", true);
|
||||
}
|
||||
@ -35,7 +35,7 @@ index 06d7aed2539a0f38fabe5b10c91d8da10c43605f..4b0b768a4563281ec4ef1a16a3a21c24
|
||||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2573,6 +2577,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2574,6 +2578,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (spawnReason == null) {
|
||||
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT;
|
||||
}
|
||||
@ -46,10 +46,10 @@ index 06d7aed2539a0f38fabe5b10c91d8da10c43605f..4b0b768a4563281ec4ef1a16a3a21c24
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 2ae65d0303a01536bae6ef8f900b23b94d72dc22..f0a3a1342610966f954d8f25fd38281b2af80f06 100644
|
||||
index f06fe310e8dd950fa68ed3b7a7ba5e43a23b9316..36277d10822a4fd19b6159a90a455c237b5b177f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3609,7 +3609,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3610,7 +3610,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.calculateEntityAnimation(this instanceof FlyingAnimal);
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.push("freezing");
|
||||
|
@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6d32505266fef119289bcf6761c1948368238eb9..9de7978c7383f8364feba82e9cd3efbfcce00e3c 100644
|
||||
index 23b2233f7435f03902e640152cc6fe1501fb3820..c89aee30e4a4f4eec48e23b04e0558e17d95587c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2165,6 +2165,13 @@ public final class CraftServer implements Server {
|
||||
@ -153,10 +153,10 @@ index 7f22950ae61436e91a59cd29a345809c42bbe739..1e3091687735b461d3b6a313ab876112
|
||||
|
||||
protected ServerCommandSender() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
index 4e81c26fdbd089961b2577168c716bf29d504d40..a35e2d2f53e8308d51e5a07b34c56d05a707bc14 100644
|
||||
index 732655bf8dd279167f799e01b1516b4dd5fa7464..4d4a1ac9d75908bbd105a1e5756d2c0932b2d238 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
|
||||
@@ -81,6 +81,11 @@ public final class VanillaCommandWrapper extends BukkitCommand {
|
||||
@@ -86,6 +86,11 @@ public final class VanillaCommandWrapper extends BukkitCommand {
|
||||
if (sender instanceof ProxiedCommandSender) {
|
||||
return ((ProxiedNativeCommandSender) sender).getHandle();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity
|
||||
Bad plugins doing this would cause some obvious problems...
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 4b0b768a4563281ec4ef1a16a3a21c24a1272849..dcd6cb204d5d19da17664e446da7f3edef104b80 100644
|
||||
index a390e1791b4fb3eae5555fc9b760588e410be900..612abe47627f0e7c69aa8bfaeee1de4fda528a57 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2802,7 +2802,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2803,7 +2803,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean startRiding(Entity entity, boolean force) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index f0a3a1342610966f954d8f25fd38281b2af80f06..94cc2bc2f5e6ed32173f675c3b27ab602dbcd7f8 100644
|
||||
index 36277d10822a4fd19b6159a90a455c237b5b177f..aef73b8ebc6b7784dea32a70e972fa9adb7d303e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4202,6 +4202,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4203,6 +4203,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
public void releaseUsingItem() {
|
||||
if (!this.useItem.isEmpty()) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent entity loading causing async lookups
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dcd6cb204d5d19da17664e446da7f3edef104b80..736b8bb59631a4e6f8639d84715a7d8cf9dbb775 100644
|
||||
index 612abe47627f0e7c69aa8bfaeee1de4fda528a57..828535741f9e39693fe9055ae1f5af2258668ae3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -724,6 +724,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -725,6 +725,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
ProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
gameprofilerfiller.push("entityBaseTick");
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 736b8bb59631a4e6f8639d84715a7d8cf9dbb775..0de6c90c195439564810036c90f31e8296538666 100644
|
||||
index 828535741f9e39693fe9055ae1f5af2258668ae3..7d4817cf9d2783f7be5882748323391a8cae5673 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2672,6 +2672,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2673,6 +2673,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Stop large look changes from crashing the server
|
||||
Co-authored-by: Jaren Knodel <Jaren@Knodel.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 94cc2bc2f5e6ed32173f675c3b27ab602dbcd7f8..079e6224c56128c0a0fc0643eeec49f2475937ea 100644
|
||||
index aef73b8ebc6b7784dea32a70e972fa9adb7d303e..5986af338ffadbfae32783178dfe0b145c875b73 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3270,37 +3270,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3271,37 +3271,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.push("rangeChecks");
|
||||
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type
|
||||
TODO: Remove in 1.21?
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index f10e7a847e9f57d2a987b118215c0ceab251a5b0..015a2cf3e969e938158f27a04e172c837068437d 100644
|
||||
index 5a7aa491e0846ca8133bc4bb6e74b93cff85fb17..2a2e37a7c67cac657712fc20746a892097a3c4be 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -461,6 +461,12 @@ public class Commodore {
|
||||
@@ -463,6 +463,12 @@ public class Commodore {
|
||||
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false);
|
||||
return;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0de6c90c195439564810036c90f31e8296538666..8b2b0cf8318f06f0fef59908ece650fb54b6a6b3 100644
|
||||
index 7d4817cf9d2783f7be5882748323391a8cae5673..9b5af1041410be058afde31d2630d8dcb3b25179 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3320,6 +3320,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3321,6 +3321,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
pluginManager.callEvent(entityCombustEvent);
|
||||
if (!entityCombustEvent.isCancelled()) {
|
||||
this.igniteForSeconds(entityCombustEvent.getDuration(), false);
|
||||
|
@ -24,10 +24,10 @@ index 45e61a08152517a61260e662764d8bb0335537e3..b81d814619e4175f42aee397811b07ca
|
||||
+ // Paper end - check global player list where appropriate
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 079e6224c56128c0a0fc0643eeec49f2475937ea..0e2b5e1dbdf671da0a4edfa77f7fb759732674cb 100644
|
||||
index 5986af338ffadbfae32783178dfe0b145c875b73..d121b28c8a79b6f5b690c53ae4fef7cd304afdaa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3865,7 +3865,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3866,7 +3866,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void onItemPickup(ItemEntity item) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Friction API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0e2b5e1dbdf671da0a4edfa77f7fb759732674cb..076c7828fdfa53c7453406beb937700e12b137d2 100644
|
||||
index d121b28c8a79b6f5b690c53ae4fef7cd304afdaa..29c3db84b55e82e25d60c99c87f3472b30fc9239 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -296,6 +296,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -110,12 +110,12 @@ index d555fd0b200c012f30ed0c0ec09a37b25a737b76..7a6d51020d9c6be33b4c34c0d6085595
|
||||
this.discard(null); // CraftBukkit - add Bukkit remove cause
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index d8fcd6d1edec1f31a861fab4b86cbeb15ddc799d..d277f56fef882313d6d21f636fafae2f26630ad7 100644
|
||||
index 1fdf2179eb768575fa49c019fb6d81f466892f98..ce91809d66007def728a127a0a9d33f6235cc94d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -93,6 +93,7 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||
private double flyingZ = 0.95;
|
||||
public double maxSpeed = 0.4D;
|
||||
public Double maxSpeed;
|
||||
// CraftBukkit end
|
||||
+ public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API
|
||||
|
||||
@ -152,10 +152,10 @@ index d8fcd6d1edec1f31a861fab4b86cbeb15ddc799d..d277f56fef882313d6d21f636fafae2f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java b/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
|
||||
index 00b0004940339dc105fb95f813bd35b16f7a9fb4..a8718ee94cd6b9a20bd1e9a49d58d39e6f3f2a7a 100644
|
||||
index 60b8d8c1ccfe7f9d1a327d1a361493e97ca9ad4c..f43439b31a14b9db4744512465d81134ebe5b3e1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
|
||||
@@ -548,6 +548,7 @@ public class NewMinecartBehavior extends MinecartBehavior {
|
||||
@@ -554,6 +554,7 @@ public class NewMinecartBehavior extends MinecartBehavior {
|
||||
|
||||
@Override
|
||||
public double getSlowdownFactor() {
|
||||
@ -164,10 +164,10 @@ index 00b0004940339dc105fb95f813bd35b16f7a9fb4..a8718ee94cd6b9a20bd1e9a49d58d39e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java b/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
|
||||
index cf871c174091139c8ad1affb84f98fcd74b60dee..23cbafcc12f6e5f5755215a72879a6cab306ad18 100644
|
||||
index 62ae79808aba4112ea845311080bb496174a68d2..04a622f52353ebcc21f41c233f5a0fd67690cf4a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
|
||||
@@ -522,6 +522,7 @@ public class OldMinecartBehavior extends MinecartBehavior {
|
||||
@@ -528,6 +528,7 @@ public class OldMinecartBehavior extends MinecartBehavior {
|
||||
|
||||
@Override
|
||||
public double getSlowdownFactor() {
|
||||
@ -221,10 +221,10 @@ index 1ceaa081231a617bd87331b308c24d9c7a8dcf2b..2fd4a3068d86a37cc18c9203448823c5
|
||||
+ // Paper end - friction API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
index d35c1a10e58932b19c8053c5dacdc25fd7f22e8c..ab9d06a9a4951a5b8aa14d47818a3850433e92b8 100644
|
||||
index 8192ccb01ed4efe9e987cab94952c172ed876581..5791f9936532899b337b149a109781fba0819657 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
@@ -137,4 +137,18 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
@@ -138,4 +138,18 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
public int getDisplayBlockOffset() {
|
||||
return this.getHandle().getDisplayOffset();
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ index 51a6735b35e73175680e61c2d67d4adbedf305c9..8b5d11aceb77135c917c3581f4db792e
|
||||
} else if (this.seenBy.remove(player.connection)) {
|
||||
this.serverEntity.removePairing(player);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8b2b0cf8318f06f0fef59908ece650fb54b6a6b3..429cdb83252b417c810d529125fc7343dca7990d 100644
|
||||
index 9b5af1041410be058afde31d2630d8dcb3b25179..a361480801d113b9619f7cd93b0da2332ca089dd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4071,7 +4071,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4072,7 +4072,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
public void startSeenByPlayer(ServerPlayer player) {}
|
||||
|
||||
|
@ -55,3 +55,29 @@ index 0000000000000000000000000000000000000000..cd718ed01ba5d448cdf0a2b6a39dc7ef
|
||||
+ assertEquals(nms.getSoundEvent(), CraftSound.bukkitToMinecraftHolder(bukkit.getSound()));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/InstrumentTest.java b/src/test/java/org/bukkit/InstrumentTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5da6b5c996c9a4077f309e923731e3f148e91c19
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/org/bukkit/InstrumentTest.java
|
||||
@@ -0,0 +1,20 @@
|
||||
+package org.bukkit;
|
||||
+
|
||||
+import org.bukkit.support.environment.AllFeatures;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+
|
||||
+import static org.bukkit.support.MatcherAssert.assertThat;
|
||||
+import static org.hamcrest.CoreMatchers.is;
|
||||
+
|
||||
+@AllFeatures
|
||||
+public class InstrumentTest { // Paper - moved to internals as this test now access the sound registry.
|
||||
+
|
||||
+ @Test
|
||||
+ public void getByType() {
|
||||
+ for (Instrument instrument : Instrument.values()) {
|
||||
+ // Paper - byte magic values are still used
|
||||
+
|
||||
+ assertThat(Instrument.getByType(instrument.getType()), is(instrument));
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
@ -18,10 +18,10 @@ index 25b1e8bec23465f0e9a17f156bdff7fe716db84c..f05a9fd321a4af28e9771bbf39d73f80
|
||||
// Paper start - gateway-specific teleport event
|
||||
if (this.portalProcess != null && this.portalProcess.isSamePortal(((net.minecraft.world.level.block.EndGatewayBlock) net.minecraft.world.level.block.Blocks.END_GATEWAY)) && this.serverLevel().getBlockEntity(this.portalProcess.getEntryPosition()) instanceof net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity theEndGatewayBlockEntity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 429cdb83252b417c810d529125fc7343dca7990d..411ffaf842841709eaef48776e2c6ce4f524af05 100644
|
||||
index a361480801d113b9619f7cd93b0da2332ca089dd..4d9680748a00df783e9611a90c31e2665ce3d736 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3742,7 +3742,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3743,7 +3743,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
|
||||
Location enter = bukkitEntity.getLocation();
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose pre-collision moving velocity to
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 411ffaf842841709eaef48776e2c6ce4f524af05..5340d6d911a7e586468f2b7e2e74b3386d1dc72d 100644
|
||||
index 4d9680748a00df783e9611a90c31e2665ce3d736..798fd11e76326ace74035cf782be9f4218fe5edc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -968,6 +968,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -969,6 +969,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@ -17,7 +17,7 @@ index 411ffaf842841709eaef48776e2c6ce4f524af05..5340d6d911a7e586468f2b7e2e74b338
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -1059,7 +1060,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1060,7 +1061,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
if (!bl.getType().isAir()) {
|
||||
|
@ -23,10 +23,10 @@ index 821bb93e1b055ba38fafe3b7079d79aa062ebe8a..221d73676fe2fd240a47cf312c1179e0
|
||||
|
||||
return !this.getResponse();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 879ac6ec0b429ddb89ede2d51c8ccee9090fdc49..2a587683463fb0a0770ab54125868e82c0694ca6 100644
|
||||
index 0f20301c8194dcf9f3b42429437552ca0a613b13..c6fa51118232e5875779482ed1d694b7b9c7b861 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2463,7 +2463,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2464,7 +2464,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
// Duplicate triggers if blocking
|
||||
if (event.getDamage(DamageModifier.BLOCKING) < 0) {
|
||||
if (this instanceof ServerPlayer) {
|
||||
@ -35,7 +35,7 @@ index 879ac6ec0b429ddb89ede2d51c8ccee9090fdc49..2a587683463fb0a0770ab54125868e82
|
||||
f2 = (float) -event.getDamage(DamageModifier.BLOCKING);
|
||||
if (f2 > 0.0F && f2 < 3.4028235E37F) {
|
||||
((ServerPlayer) this).awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(originalDamage * 10.0F));
|
||||
@@ -2471,7 +2471,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2472,7 +2472,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
if (damagesource.getEntity() instanceof ServerPlayer) {
|
||||
|
@ -14,10 +14,10 @@ clearing the owner.
|
||||
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5340d6d911a7e586468f2b7e2e74b3386d1dc72d..90b47da5c6df05565b522636e08c4ebb7165c351 100644
|
||||
index 798fd11e76326ace74035cf782be9f4218fe5edc..3d4d5d23623dccb8a5be85c2205dae11509a7119 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -393,6 +393,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -394,6 +394,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public boolean inWorld = false;
|
||||
public boolean generation;
|
||||
public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't load chunks for supporting block checks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 90b47da5c6df05565b522636e08c4ebb7165c351..a8bb9caaf0db01d8b7cfb18e5f162c6eeada5d6a 100644
|
||||
index 3d4d5d23623dccb8a5be85c2205dae11509a7119..c26c814e9a3a54fb7b46b0e5f51843621f179d3d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1228,7 +1228,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1229,7 +1229,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
protected BlockPos getOnPos(float offset) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix possible NPE on painting creation
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
index 39ea25d2145acaa7c7b458800adc674a3e73e7c1..8715d8e790b6735610e2f880f8c1f88a89967f21 100644
|
||||
index 0b9c4f9b61651660e821735f18b4f3cc7cfd164c..e31aa2a499e894847f19800b6bceb17aba38a1c0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
|
||||
@@ -361,8 +361,13 @@ public final class CraftEntityTypes {
|
||||
@ -24,7 +24,7 @@ index 39ea25d2145acaa7c7b458800adc674a3e73e7c1..8715d8e790b6735610e2f880f8c1f88a
|
||||
net.minecraft.world.entity.decoration.Painting entity = new net.minecraft.world.entity.decoration.Painting(net.minecraft.world.entity.EntityType.PAINTING, spawnData.minecraftWorld());
|
||||
entity.absMoveTo(spawnData.x(), spawnData.y(), spawnData.z(), spawnData.yaw(), spawnData.pitch());
|
||||
entity.setDirection(hangingData.direction());
|
||||
@@ -523,6 +528,7 @@ public final class CraftEntityTypes {
|
||||
@@ -529,6 +534,7 @@ public final class CraftEntityTypes {
|
||||
AABB bb = (ItemFrame.class.isAssignableFrom(clazz))
|
||||
? net.minecraft.world.entity.decoration.ItemFrame.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite())
|
||||
: net.minecraft.world.entity.decoration.Painting.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height);
|
||||
|
@ -1173,7 +1173,7 @@ index 741b5ba321d9bd854afb9b54f0e23c739c7f929c..9312279f8f958cd1fd13e8333ca47680
|
||||
gameprofilerfiller.push("commandFunctions");
|
||||
this.getFunctions().tick();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index cbba549176b3acfc25ec42c2935b31ab2176e0fa..4ac0bb0ec3222ebdd3fa386696dcb0723dc162a4 100644
|
||||
index 7da3e315de67f3273997ce9160995183a3a1ce71..3a6e918e9db6397b6f1cff531041655298ce087d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -597,6 +597,7 @@ public abstract class PlayerList {
|
||||
@ -1185,10 +1185,10 @@ index cbba549176b3acfc25ec42c2935b31ab2176e0fa..4ac0bb0ec3222ebdd3fa386696dcb072
|
||||
this.players.remove(entityplayer);
|
||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a8bb9caaf0db01d8b7cfb18e5f162c6eeada5d6a..cc4906ed08e84beaca0ba93200693a0a3730fb4c 100644
|
||||
index c26c814e9a3a54fb7b46b0e5f51843621f179d3d..638b202519b0cca5ca7ba406e6f92c51a0ef990e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -262,10 +262,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -263,10 +263,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (this.bukkitEntity == null) {
|
||||
@ -1211,7 +1211,7 @@ index a8bb9caaf0db01d8b7cfb18e5f162c6eeada5d6a..cc4906ed08e84beaca0ba93200693a0a
|
||||
|
||||
// CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
|
||||
public int getDefaultMaxAirSupply() {
|
||||
@@ -4676,6 +4687,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4706,6 +4717,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
|
||||
CraftEventFactory.callEntityRemoveEvent(this, cause);
|
||||
// CraftBukkit end
|
||||
@ -1219,7 +1219,7 @@ index a8bb9caaf0db01d8b7cfb18e5f162c6eeada5d6a..cc4906ed08e84beaca0ba93200693a0a
|
||||
if (this.removalReason == null) {
|
||||
this.removalReason = entity_removalreason;
|
||||
}
|
||||
@@ -4687,12 +4699,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4717,12 +4729,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.getPassengers().forEach(Entity::stopRiding);
|
||||
this.levelCallback.onRemove(entity_removalreason);
|
||||
this.onRemoval(entity_removalreason);
|
||||
@ -1249,7 +1249,7 @@ index a8bb9caaf0db01d8b7cfb18e5f162c6eeada5d6a..cc4906ed08e84beaca0ba93200693a0a
|
||||
public void setLevelCallback(EntityInLevelCallback changeListener) {
|
||||
this.levelCallback = changeListener;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a7b79c9ec51f037287fad609c29b240e2071f2f8..46807d5d94a0f90b230dfaf4d37378a3bfa21414 100644
|
||||
index b59dc253a086374e07338b989ba5835d138e5d72..190529d8f96b2cb4096a454aec37775388650af2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -313,6 +313,76 @@ public final class CraftServer implements Server {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] API for updating recipes on clients
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4ac0bb0ec3222ebdd3fa386696dcb0723dc162a4..d92fb522d88a790d9cea2e6c4edad30bb73298fc 100644
|
||||
index 3a6e918e9db6397b6f1cff531041655298ce087d..efc12d629b71ba1da664d9ecfd4575bee9b45dc3 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1448,6 +1448,13 @@ public abstract class PlayerList {
|
||||
@ -15,14 +15,14 @@ index 4ac0bb0ec3222ebdd3fa386696dcb0723dc162a4..d92fb522d88a790d9cea2e6c4edad30b
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ this.reloadAdvancementData();
|
||||
+ this.reloadTagData();
|
||||
+ this.reloadRecipeData();
|
||||
+ this.reloadRecipes();
|
||||
+ }
|
||||
+ public void reloadAdvancementData() {
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
// CraftBukkit start
|
||||
/*Iterator iterator = this.advancements.values().iterator();
|
||||
|
||||
@@ -1463,7 +1470,13 @@ public abstract class PlayerList {
|
||||
@@ -1463,9 +1470,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -30,14 +30,15 @@ index 4ac0bb0ec3222ebdd3fa386696dcb0723dc162a4..d92fb522d88a790d9cea2e6c4edad30b
|
||||
+ }
|
||||
+ public void reloadTagData() {
|
||||
this.broadcastAll(new ClientboundUpdateTagsPacket(TagNetworkSerialization.serializeTagsToNetwork(this.registries)));
|
||||
+ }
|
||||
+ public void reloadRecipeData() {
|
||||
// CraftBukkit start
|
||||
- this.reloadRecipes();
|
||||
+ // this.reloadRecipes(); // Paper - do not reload recipes just because tag data was reloaded
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
RecipeManager craftingmanager = this.server.getRecipeManager();
|
||||
ClientboundUpdateRecipesPacket packetplayoutrecipeupdate = new ClientboundUpdateRecipesPacket(craftingmanager.getSynchronizedItemProperties(), craftingmanager.getSynchronizedStonecutterRecipes());
|
||||
Iterator iterator1 = this.players.iterator();
|
||||
}
|
||||
|
||||
public void reloadRecipes() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index da3819f49b105bd98ce94b5abdf1c7652ff625a4..fa505c0714bb95b2ab08b4bbb9ea79ce98898f4b 100644
|
||||
index 87bc228c121077815bdad7942df1c9576edac21b..a618258fde1226588ea447522ba4177aa9cf9016 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1178,6 +1178,18 @@ public final class CraftServer implements Server {
|
||||
@ -52,7 +53,7 @@ index da3819f49b105bd98ce94b5abdf1c7652ff625a4..fa505c0714bb95b2ab08b4bbb9ea79ce
|
||||
+
|
||||
+ @Override
|
||||
+ public void updateRecipes() {
|
||||
+ this.playerList.reloadRecipeData();
|
||||
+ this.playerList.reloadRecipes();
|
||||
+ }
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
+
|
||||
@ -79,7 +80,7 @@ index da3819f49b105bd98ce94b5abdf1c7652ff625a4..fa505c0714bb95b2ab08b4bbb9ea79ce
|
||||
toAdd.addToCraftingManager();
|
||||
+ // Paper start - API for updating recipes on clients
|
||||
+ if (true || resendRecipes) { // Always needs to be resent now... TODO
|
||||
+ this.playerList.reloadRecipeData();
|
||||
+ this.playerList.reloadRecipes();
|
||||
+ }
|
||||
+ // Paper end - API for updating recipes on clients
|
||||
return true;
|
||||
@ -103,7 +104,7 @@ index da3819f49b105bd98ce94b5abdf1c7652ff625a4..fa505c0714bb95b2ab08b4bbb9ea79ce
|
||||
+ final ResourceKey<net.minecraft.world.item.crafting.Recipe<?>> minecraftKey = CraftRecipe.toMinecraft(recipeKey);
|
||||
+ final boolean removed = this.getServer().getRecipeManager().removeRecipe(minecraftKey);
|
||||
+ if (removed/* && resendRecipes*/) { // TODO Always need to resend them rn - deprecate this method?
|
||||
+ this.playerList.reloadRecipeData();
|
||||
+ this.playerList.reloadRecipes();
|
||||
+ }
|
||||
+ return removed;
|
||||
+ // Paper end - resend recipes on successful removal
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expand Pose API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cc4906ed08e84beaca0ba93200693a0a3730fb4c..67dda7d37cc4af2f09734da5653e8fa33098c7db 100644
|
||||
index 638b202519b0cca5ca7ba406e6f92c51a0ef990e..8a0b26533e6bbabe829efbf5afcef1a79cdf0adb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -427,6 +427,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -428,6 +428,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@javax.annotation.Nullable
|
||||
private UUID originWorld;
|
||||
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||
@ -16,7 +16,7 @@ index cc4906ed08e84beaca0ba93200693a0a3730fb4c..67dda7d37cc4af2f09734da5653e8fa3
|
||||
|
||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
this.origin = location.toVector();
|
||||
@@ -625,6 +626,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -626,6 +627,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void onRemoval(Entity.RemovalReason reason) {}
|
||||
|
||||
public void setPose(net.minecraft.world.entity.Pose pose) {
|
||||
|
@ -40,10 +40,10 @@ index 38730e11118bf71d167a18b807e06c20ea0d63d0..5be7304c8417e2987837d1c6ce8b8023
|
||||
|
||||
if (event.isCancelled()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 67dda7d37cc4af2f09734da5653e8fa33098c7db..56f2ac87f42572556646eb62f16274726e7ae455 100644
|
||||
index 8a0b26533e6bbabe829efbf5afcef1a79cdf0adb..4cd07d9a90885b59ef1b2be7562386d5e8c7b2ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2752,8 +2752,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2753,8 +2753,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.level().isClientSide()) {
|
||||
// CraftBukkit start - fire PlayerLeashEntityEvent
|
||||
if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Broadcast take item packets with collector as source
|
||||
This fixes players (which can't view the collector) seeing item pickups with themselves as the target.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 2a587683463fb0a0770ab54125868e82c0694ca6..375280dd829eb2f6b98a95228250a3d87a7872cf 100644
|
||||
index c6fa51118232e5875779482ed1d694b7b9c7b861..2bff94cef4fef66b81508a2ef4b5613e76044832 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3891,7 +3891,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3892,7 +3892,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
public void take(Entity item, int count) {
|
||||
if (!item.isRemoved() && !this.level().isClientSide && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) {
|
||||
|
@ -31,10 +31,10 @@ index 7cecbac43f1cd2d9516034ea9d2633c0c76e61f4..7a985c30a973efacf3e8b70e7163c550
|
||||
if (entity.valid) {
|
||||
MinecraftServer.LOGGER.error("Attempted Double World add on {}", entity, new Throwable());
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 56f2ac87f42572556646eb62f16274726e7ae455..5c7df0efee4a0aa078e36d3e262cd0b48a27cf47 100644
|
||||
index 4cd07d9a90885b59ef1b2be7562386d5e8c7b2ae..7657888bab53428fda9d3d10ac35bfddc5c16266 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -631,7 +631,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -632,7 +632,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (pose == this.getPose()) {
|
||||
return;
|
||||
}
|
||||
@ -68,7 +68,7 @@ index 64dc0bd1900575e40ac72a98c6df371223bd244c..c2693d530be00af16b2aa4ca4afd1d13
|
||||
}, () -> {
|
||||
EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id"));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 375280dd829eb2f6b98a95228250a3d87a7872cf..e8749957c39abcd922b734a87df95b815012737a 100644
|
||||
index 2bff94cef4fef66b81508a2ef4b5613e76044832..22c565fd6b14ae018f4526b174388ed5247600f6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1159,6 +1159,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -37,10 +37,10 @@ index 419fcb4cd97cf10a2601e02024b999a51a0ff952..df21cd1bd2a3dda7169edbea18bbfdf0
|
||||
loot.addAll(this.drops);
|
||||
this.drops.clear(); // SPIGOT-5188: make sure to clear
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5c7df0efee4a0aa078e36d3e262cd0b48a27cf47..b78395ab8f393a0f6551951731ddce7a5228b44c 100644
|
||||
index 7657888bab53428fda9d3d10ac35bfddc5c16266..b7594a0fd6fe7e25d13202c95b2c39a04e84abde 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2678,19 +2678,45 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2679,19 +2679,45 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
@Nullable
|
||||
public ItemEntity spawnAtLocation(ServerLevel world, ItemStack stack, float yOffset) {
|
||||
@ -89,7 +89,7 @@ index 5c7df0efee4a0aa078e36d3e262cd0b48a27cf47..b78395ab8f393a0f6551951731ddce7a
|
||||
return this.spawnAtLocation(world, entityitem);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e8749957c39abcd922b734a87df95b815012737a..9e105732fb765258af9154b84534234fd84eb24f 100644
|
||||
index 22c565fd6b14ae018f4526b174388ed5247600f6..8c3ec957210a259e26253dbb3a4191702ce6699c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -289,7 +289,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -150,7 +150,7 @@ index 2bb2b36f793d25b6e49d1a72bb665cfa9f212730..63f02cdc67d9e88cc6998d0ae9d139c8
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index dbef230ae88ee1bfbc20ba53b534434c3ccac985..a0455f590d549343d6d8fd7991ba1b87a87acdb8 100644
|
||||
index b6c30bb70fb4746da024bc4d80b71aeb3558f101..1c87019f5eb8e51accef3dc7ee949cdf2bec8f72 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -973,19 +973,25 @@ public class CraftEventFactory {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Improve Registry
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
index 16985dc1f54d64c44f96b045012612f16ba9ae8a..002a3475c6e062071845399ed723754ce4ce9e95 100644
|
||||
index 249f0dcad04a35244da6dab837a461bb42aad00a..273844c9071b8d5cf6009c6c94a6c47a9d0cc700 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
@@ -150,6 +150,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -152,6 +152,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
|
||||
private final Class<?> bukkitClass; // Paper - relax preload class
|
||||
private final Map<NamespacedKey, B> cache = new HashMap<>();
|
||||
@ -16,7 +16,7 @@ index 16985dc1f54d64c44f96b045012612f16ba9ae8a..002a3475c6e062071845399ed723754c
|
||||
private final net.minecraft.core.Registry<M> minecraftRegistry;
|
||||
private final BiFunction<NamespacedKey, M, B> minecraftToBukkit;
|
||||
private final BiFunction<NamespacedKey, ApiVersion, NamespacedKey> serializationUpdater; // Paper - rename to make it *clear* what it is *only* for
|
||||
@@ -198,6 +199,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -200,6 +201,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
}
|
||||
|
||||
this.cache.put(namespacedKey, bukkit);
|
||||
@ -24,7 +24,7 @@ index 16985dc1f54d64c44f96b045012612f16ba9ae8a..002a3475c6e062071845399ed723754c
|
||||
|
||||
return bukkit;
|
||||
}
|
||||
@@ -230,4 +232,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -232,4 +234,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
|
||||
return this.minecraftToBukkit.apply(namespacedKey, minecraft);
|
||||
}
|
||||
|
@ -26,10 +26,10 @@ index c6dcc37ac5fcf50bcb246f533b99983dfc5c19c2..c13b6f14c3061710c2b27034db240cc9
|
||||
d3 = to.getX();
|
||||
d4 = to.getY();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 9e105732fb765258af9154b84534234fd84eb24f..97a524db692b7367f22a373439c1233b143f4a17 100644
|
||||
index 8c3ec957210a259e26253dbb3a4191702ce6699c..0557a182a17a2891f2a9e0e4367d5102674e3b42 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4363,7 +4363,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -4364,7 +4364,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (!(this instanceof ServerPlayer)) {
|
||||
EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), new Location(this.level().getWorld(), d3, d4, d5), new Location(this.level().getWorld(), d0, d6, d2));
|
||||
this.level().getCraftServer().getPluginManager().callEvent(teleport);
|
||||
|
@ -18,10 +18,10 @@ index 90b82ad996b2b85628c9a5ddeef9410150b7f70c..5fd22a80e9d05afbea273471cee99173
|
||||
|
||||
public static NamespacedKey minecraftToBukkitKey(ResourceKey<LootTable> minecraft) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
index 002a3475c6e062071845399ed723754ce4ce9e95..9245f6de141384bfc12e8dd81ce1df366c6a62aa 100644
|
||||
index 273844c9071b8d5cf6009c6c94a6c47a9d0cc700..45c78c113e881b277e1216293ad918ee40b44325 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
@@ -125,6 +125,16 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -127,6 +127,16 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
+ ", this can happen if a plugin creates its own registry entry with out properly registering it.");
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ index afed8bdb9bd6a135e9b5f7bd9bfc61964cb240f7..bb2d1dddca6bfe719b28df136e80a7c5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java
|
||||
index bcac1359c667ef1ee46384f9c7a5adf4010d2b08..98a4463c9f194f33f4f85d95a0b9fa061cf6faaf 100644
|
||||
index bcac1359c667ef1ee46384f9c7a5adf4010d2b08..b1b139b773b37e6ec2afea85c500387d6ba9800e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java
|
||||
@@ -16,7 +16,7 @@ public class CraftPainting extends CraftHanging implements Painting {
|
||||
@ -76,7 +76,7 @@ index bcac1359c667ef1ee46384f9c7a5adf4010d2b08..98a4463c9f194f33f4f85d95a0b9fa06
|
||||
@Override
|
||||
public Art getArt() {
|
||||
- return CraftArt.minecraftHolderToBukkit(this.getHandle().getVariant());
|
||||
+ return org.bukkit.craftbukkit.CraftRegistry.unwrapAndConvertHolder(org.bukkit.Registry.ART, this.getHandle().getVariant()).orElseThrow(() -> new IllegalStateException("Inlined/custom painting variants are not supported yet in the API!")); // Paper
|
||||
+ return org.bukkit.craftbukkit.CraftRegistry.unwrapAndConvertHolder(org.bukkit.Registry.ART, this.getHandle().getVariant()).orElseThrow(() -> new IllegalStateException("Inlined painting variants are not supported yet in the API!")); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,10 +84,10 @@ index fddbdb7322a2063996a28c5c3d93c265188b1256..be87cb3cfa15a7d889118cdc4b87232e
|
||||
|
||||
public DamageSource sonicBoom(Entity attacker) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b78395ab8f393a0f6551951731ddce7a5228b44c..e2322f361271712aca31c95b8b79cdf1c04945f2 100644
|
||||
index b7594a0fd6fe7e25d13202c95b2c39a04e84abde..6ebd653ea3c302f26d02f81b6718924708148e4c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3388,7 +3388,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3389,7 +3389,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return;
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ index 4c6e15535fa40aad8cf1920f392589404f9ba79c..35eb95ef6fb6a0f7ea63351e90741c48
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index e7749a3ef6289d73379649f2f76f4e4fdfac7a8b..96b901d07718d8926a2175925e867b4417c3947c 100644
|
||||
index ea4e1bf4bfe003c102ecce5958131aa86ec83864..937ed4e77739ff02ff1e4405047f15eac40906fe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1092,7 +1092,7 @@ public class CraftEventFactory {
|
||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren