mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-30 19:52:06 -07:00
all api patches done*
*still waiting for leaf to port datafixer to 1.18 so i can do entity serialization
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: booky10 <boooky10@gmail.com>
|
||||
Date: Fri, 5 Nov 2021 21:01:36 +0100
|
||||
Subject: [PATCH] Add API for resetting a single score
|
||||
|
||||
It was only possible to reset all scores for a specific entry, instead of resetting only specific scores.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Score.java b/src/main/java/org/bukkit/scoreboard/Score.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Score.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Score.java
|
||||
@@ -0,0 +0,0 @@ public interface Score {
|
||||
*/
|
||||
@Nullable
|
||||
Scoreboard getScoreboard();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Resets this score, if a value has been set.
|
||||
+ *
|
||||
+ * @throws IllegalStateException if the associated objective has been
|
||||
+ * unregistered
|
||||
+ */
|
||||
+ void resetScore() throws IllegalStateException;
|
||||
+ // Paper end
|
||||
}
|
@@ -1,71 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Sun, 3 Jan 2021 17:58:25 -0800
|
||||
Subject: [PATCH] Add BlockBreakBlockEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/event/block/BlockBreakBlockEvent.java b/src/main/java/io/papermc/paper/event/block/BlockBreakBlockEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/event/block/BlockBreakBlockEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package io.papermc.paper.event.block;
|
||||
+
|
||||
+import org.bukkit.block.Block;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.block.BlockEvent;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+import java.util.List;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a block forces another block to break and drop items.
|
||||
+ * <p>
|
||||
+ * Currently called for piston's and liquid flows.
|
||||
+ */
|
||||
+public class BlockBreakBlockEvent extends BlockEvent {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private final List<ItemStack> drops;
|
||||
+ private final Block source;
|
||||
+
|
||||
+ public BlockBreakBlockEvent(@NotNull Block block, @NotNull Block source, @NotNull List<ItemStack> drops) {
|
||||
+ super(block);
|
||||
+ this.source = source;
|
||||
+ this.drops = drops;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the drops of this event
|
||||
+ *
|
||||
+ * @return the drops
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public List<ItemStack> getDrops() {
|
||||
+ return drops;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the block that cause this (e.g. a piston, or adjacent liquid)
|
||||
+ *
|
||||
+ * @return the source
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Block getSource() {
|
||||
+ return source;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
@@ -1,25 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 12:09:28 -0500
|
||||
Subject: [PATCH] Add ItemFactory#getMonsterEgg API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
@Deprecated
|
||||
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
|
||||
+
|
||||
+ /**
|
||||
+ * Get a spawn egg ItemStack from an EntityType
|
||||
+ *
|
||||
+ * @param type EntityType
|
||||
+ * @return ItemStack spawner egg
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ ItemStack getSpawnEgg(@Nullable org.bukkit.entity.EntityType type);
|
||||
// Paper end
|
||||
}
|
@@ -1,214 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: syldium <syldium@mailo.com>
|
||||
Date: Fri, 9 Jul 2021 18:49:40 +0200
|
||||
Subject: [PATCH] Add advancement display API
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/advancement/AdvancementDisplay.java b/src/main/java/io/papermc/paper/advancement/AdvancementDisplay.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/advancement/AdvancementDisplay.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package io.papermc.paper.advancement;
|
||||
+
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
+import net.kyori.adventure.text.format.TextColor;
|
||||
+import net.kyori.adventure.translation.Translatable;
|
||||
+import net.kyori.adventure.util.Index;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Describes the display of an advancement.
|
||||
+ * <p>
|
||||
+ * The display is used in the chat, in the toast messages and the advancements
|
||||
+ * screen.
|
||||
+ */
|
||||
+public interface AdvancementDisplay {
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the {@link Frame}.
|
||||
+ * <p>
|
||||
+ * This defines the appearance of the tile in the advancements screen and
|
||||
+ * the text when it's completed.
|
||||
+ *
|
||||
+ * @return the frame type
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Frame frame();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the advancement title.
|
||||
+ *
|
||||
+ * @return the title
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Component title();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the description.
|
||||
+ *
|
||||
+ * @return the description
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Component description();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the icon shown in the frame in the advancements screen.
|
||||
+ *
|
||||
+ * @return a copy of the icon
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ ItemStack icon();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether a toast should be displayed.
|
||||
+ * <p>
|
||||
+ * A toast is a notification that will be displayed in the top right corner
|
||||
+ * of the screen.
|
||||
+ *
|
||||
+ * @return {@code true} if a toast should be shown
|
||||
+ */
|
||||
+ boolean doesShowToast();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether a message should be sent in the chat.
|
||||
+ *
|
||||
+ * @return {@code true} if a message should be sent
|
||||
+ * @see org.bukkit.event.player.PlayerAdvancementDoneEvent#message() to edit
|
||||
+ * the message
|
||||
+ */
|
||||
+ boolean doesAnnounceToChat();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether this advancement is hidden.
|
||||
+ * <p>
|
||||
+ * Hidden advancements cannot be viewed by the player until they have been
|
||||
+ * unlocked.
|
||||
+ *
|
||||
+ * @return {@code true} if hidden
|
||||
+ */
|
||||
+ boolean isHidden();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the texture displayed behind the advancement tree when selected.
|
||||
+ * <p>
|
||||
+ * This only affects root advancements without any parent. If the background
|
||||
+ * is not specified or doesn't exist, the tab background will be the missing
|
||||
+ * texture.
|
||||
+ *
|
||||
+ * @return the background texture path
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ NamespacedKey backgroundPath();
|
||||
+
|
||||
+ /**
|
||||
+ * Defines how the {@link #icon()} appears in the advancements screen and
|
||||
+ * the color used with the {@link #title() advancement name}.
|
||||
+ */
|
||||
+ enum Frame implements Translatable {
|
||||
+
|
||||
+ /**
|
||||
+ * "Challenge complete" advancement.
|
||||
+ * <p>
|
||||
+ * The client will play the {@code ui.toast.challenge_complete} sound
|
||||
+ * when the challenge is completed and the toast is shown.
|
||||
+ */
|
||||
+ CHALLENGE("challenge", NamedTextColor.DARK_PURPLE),
|
||||
+
|
||||
+ /**
|
||||
+ * "Goal reached" advancement.
|
||||
+ */
|
||||
+ GOAL("goal", NamedTextColor.GREEN),
|
||||
+
|
||||
+ /**
|
||||
+ * "Advancement made" advancement.
|
||||
+ */
|
||||
+ TASK("task", NamedTextColor.GREEN);
|
||||
+
|
||||
+ /**
|
||||
+ * The name map.
|
||||
+ */
|
||||
+ public static final Index<String, Frame> NAMES = Index.create(Frame.class, frame -> frame.name);
|
||||
+ private final String name;
|
||||
+ private final TextColor color;
|
||||
+
|
||||
+ Frame(String name, TextColor color) {
|
||||
+ this.name = name;
|
||||
+ this.color = color;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the {@link TextColor} used for the advancement name.
|
||||
+ *
|
||||
+ * @return the text color
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public TextColor color() {
|
||||
+ return this.color;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the translation key used when an advancement is completed.
|
||||
+ * <p>
|
||||
+ * This is the first line of the toast displayed by the client.
|
||||
+ *
|
||||
+ * @return the toast message key
|
||||
+ */
|
||||
+ @Override
|
||||
+ @NotNull
|
||||
+ public String translationKey() {
|
||||
+ return "advancements.toast." + this.name;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/advancement/Advancement.java b/src/main/java/org/bukkit/advancement/Advancement.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/advancement/Advancement.java
|
||||
+++ b/src/main/java/org/bukkit/advancement/Advancement.java
|
||||
@@ -0,0 +0,0 @@ public interface Advancement extends Keyed {
|
||||
*/
|
||||
@NotNull
|
||||
Collection<String> getCriteria();
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Get the display info of this advancement.
|
||||
+ * <p>
|
||||
+ * Will be {@code null} when totally hidden, for example with crafting
|
||||
+ * recipes.
|
||||
+ *
|
||||
+ * @return the display info
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ io.papermc.paper.advancement.AdvancementDisplay getDisplay();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the parent advancement, if any.
|
||||
+ *
|
||||
+ * @return the parent advancement
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ Advancement getParent();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets all the direct children advancements.
|
||||
+ *
|
||||
+ * @return the children advancements
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @org.jetbrains.annotations.Unmodifiable
|
||||
+ Collection<Advancement> getChildren();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the root advancement of the tree this is located in.
|
||||
+ *
|
||||
+ * @return the root advancement
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Advancement getRoot();
|
||||
+ // Paper end
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: dodison <kacpik@mapik.eu>
|
||||
Date: Mon, 26 Jul 2021 17:35:20 +0200
|
||||
Subject: [PATCH] Add critical damage API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class EntityDamageByEntityEvent extends EntityDamageEvent {
|
||||
private final Entity damager;
|
||||
|
||||
+ @Deprecated // Paper - add critical damage API
|
||||
public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) {
|
||||
super(damagee, cause, damage);
|
||||
this.damager = damager;
|
||||
+ this.critical = false; // Paper - add critical damage API
|
||||
}
|
||||
|
||||
+ @Deprecated // Paper - add critical damage API
|
||||
public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
|
||||
+ // Paper start - add critical damage API
|
||||
+ this(damager, damagee, cause, modifiers, modifierFunctions, false);
|
||||
+ }
|
||||
+
|
||||
+ private final boolean critical;
|
||||
+ public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions, boolean critical) {
|
||||
+ // Paper end
|
||||
super(damagee, cause, modifiers, modifierFunctions);
|
||||
this.damager = damager;
|
||||
+ // Paper start - add critical damage API
|
||||
+ this.critical = critical;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Shows this damage instance was critical.
|
||||
+ * The damage instance can be critical if the attacking player met the respective conditions.
|
||||
+ * Furthermore arrows may also cause a critical damage event if the arrow {@link org.bukkit.entity.AbstractArrow#isCritical()}.
|
||||
+ *
|
||||
+ * @return if the hit was critical.
|
||||
+ * @see <a href="https://minecraft.fandom.com/wiki/Damage#Critical_hit">https://minecraft.fandom.com/wiki/Damage#Critical_hit</a>
|
||||
+ */
|
||||
+ public boolean isCritical() {
|
||||
+ return this.critical;
|
||||
}
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Returns the entity that damaged the defender.
|
@@ -1,37 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Madeline Miller <mnmiller1@me.com>
|
||||
Date: Sun, 29 Aug 2021 17:00:56 +1000
|
||||
Subject: [PATCH] Add helpers for left/right hand to Action
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/block/Action.java b/src/main/java/org/bukkit/event/block/Action.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/Action.java
|
||||
+++ b/src/main/java/org/bukkit/event/block/Action.java
|
||||
@@ -0,0 +0,0 @@ public enum Action {
|
||||
* <li>Triggering tripwire
|
||||
* </ul>
|
||||
*/
|
||||
- PHYSICAL,
|
||||
+ // Paper start
|
||||
+ PHYSICAL;
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether this action is a result of a left click.
|
||||
+ *
|
||||
+ * @return Whether it's a left click
|
||||
+ */
|
||||
+ public boolean isLeftClick() {
|
||||
+ return this == LEFT_CLICK_AIR || this == LEFT_CLICK_BLOCK;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether this action is a result of a right click.
|
||||
+ *
|
||||
+ * @return Whether it's a right click
|
||||
+ */
|
||||
+ public boolean isRightClick() {
|
||||
+ return this == RIGHT_CLICK_AIR || this == RIGHT_CLICK_BLOCK;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
@@ -1,82 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Thu, 4 Nov 2021 11:50:35 -0700
|
||||
Subject: [PATCH] Add isCollidable methods to various places
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -0,0 +0,0 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
||||
public com.google.common.collect.Multimap<org.bukkit.attribute.Attribute, org.bukkit.attribute.AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
|
||||
return Bukkit.getUnsafe().getItemAttributes(this, equipmentSlot);
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this material is collidable.
|
||||
+ *
|
||||
+ * @return true if collidable
|
||||
+ * @throws IllegalArgumentException if {@link #isBlock()} is false
|
||||
+ */
|
||||
+ public boolean isCollidable() {
|
||||
+ return Bukkit.getUnsafe().isCollidable(this);
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -0,0 +0,0 @@ public interface UnsafeValues {
|
||||
* @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
|
||||
*/
|
||||
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this material is collidable.
|
||||
+ *
|
||||
+ * @param material the material to check
|
||||
+ * @return true if collidable
|
||||
+ * @throws IllegalArgumentException if {@link Material#isBlock()} is false
|
||||
+ */
|
||||
+ boolean isCollidable(@org.jetbrains.annotations.NotNull Material material);
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -0,0 +0,0 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
||||
* @return true if block is solid
|
||||
*/
|
||||
boolean isSolid();
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this block is collidable.
|
||||
+ *
|
||||
+ * @return true if collidable
|
||||
+ */
|
||||
+ boolean isCollidable();
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockState.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockState.java
|
||||
@@ -0,0 +0,0 @@ public interface BlockState extends Metadatable {
|
||||
* or 'virtual' (e.g. on an itemstack)
|
||||
*/
|
||||
boolean isPlaced();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Checks if this block state is collidable.
|
||||
+ *
|
||||
+ * @return true if collidable
|
||||
+ */
|
||||
+ boolean isCollidable();
|
||||
+ // Paper end
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Zacek <dawon@dawon.eu>
|
||||
Date: Mon, 4 Oct 2021 08:29:36 +0200
|
||||
Subject: [PATCH] Add methods to find targets for lightning strikes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -0,0 +0,0 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public LightningStrike strikeLightningEffect(@NotNull Location loc);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Finds the location of the nearest unobstructed Lightning Rod in a 128-block
|
||||
+ * radius around the given location. Returns {@code null} if no Lightning Rod is found.
|
||||
+ *
|
||||
+ * <p>Note: To activate a Lightning Rod, the position one block above it must be struck by lightning.</p>
|
||||
+ *
|
||||
+ * @param location {@link Location} to search for Lightning Rod around
|
||||
+ * @return {@link Location} of Lightning Rod or {@code null}
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public Location findLightningRod(@NotNull Location location);
|
||||
+
|
||||
+ /**
|
||||
+ * Finds a target {@link Location} for lightning to strike.
|
||||
+ * <p>It selects from (in the following order):</p>
|
||||
+ * <ol>
|
||||
+ * <li>the block above the nearest Lightning Rod, found using {@link World#findLightningRod(Location)}</li>
|
||||
+ * <li>a random {@link LivingEntity} that can see the sky in a 6x6 cuboid
|
||||
+ * around input X/Z coordinates. Y ranges from <i>the highest motion-blocking
|
||||
+ * block at the input X/Z - 3</i> to <i>the height limit + 3</i></li>
|
||||
+ * </ol>
|
||||
+ * <p>Returns {@code null} if no target is found.</p>
|
||||
+ *
|
||||
+ * @param location {@link Location} to search for target around
|
||||
+ * @return lightning target or {@code null}
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public Location findLightningTarget(@NotNull Location location);
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Get a list of all entities in this World
|
||||
*
|
@@ -1,69 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 1 Oct 2021 08:04:43 -0700
|
||||
Subject: [PATCH] Add missing team sidebar display slots
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/DisplaySlot.java b/src/main/java/org/bukkit/scoreboard/DisplaySlot.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/DisplaySlot.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/DisplaySlot.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package org.bukkit.scoreboard;
|
||||
|
||||
+import net.kyori.adventure.text.format.NamedTextColor; // Paper
|
||||
/**
|
||||
* Locations for displaying objectives to the player
|
||||
*/
|
||||
public enum DisplaySlot {
|
||||
- BELOW_NAME,
|
||||
- PLAYER_LIST,
|
||||
- SIDEBAR;
|
||||
+ // Paper start
|
||||
+ BELOW_NAME("belowName"),
|
||||
+ PLAYER_LIST("list"),
|
||||
+ SIDEBAR("sidebar"),
|
||||
+ SIDEBAR_TEAM_BLACK(NamedTextColor.BLACK),
|
||||
+ SIDEBAR_TEAM_DARK_BLUE(NamedTextColor.DARK_BLUE),
|
||||
+ SIDEBAR_TEAM_DARK_GREEN(NamedTextColor.DARK_GREEN),
|
||||
+ SIDEBAR_TEAM_DARK_AQUA(NamedTextColor.DARK_AQUA),
|
||||
+ SIDEBAR_TEAM_DARK_RED(NamedTextColor.DARK_RED),
|
||||
+ SIDEBAR_TEAM_DARK_PURPLE(NamedTextColor.DARK_PURPLE),
|
||||
+ SIDEBAR_TEAM_GOLD(NamedTextColor.GOLD),
|
||||
+ SIDEBAR_TEAM_GRAY(NamedTextColor.GRAY),
|
||||
+ SIDEBAR_TEAM_DARK_GRAY(NamedTextColor.DARK_GRAY),
|
||||
+ SIDEBAR_TEAM_BLUE(NamedTextColor.BLUE),
|
||||
+ SIDEBAR_TEAM_GREEN(NamedTextColor.GREEN),
|
||||
+ SIDEBAR_TEAM_AQUA(NamedTextColor.AQUA),
|
||||
+ SIDEBAR_TEAM_RED(NamedTextColor.RED),
|
||||
+ SIDEBAR_TEAM_LIGHT_PURPLE(NamedTextColor.LIGHT_PURPLE),
|
||||
+ SIDEBAR_TEAM_YELLOW(NamedTextColor.YELLOW),
|
||||
+ SIDEBAR_TEAM_WHITE(NamedTextColor.WHITE);
|
||||
+
|
||||
+ public static final net.kyori.adventure.util.Index<String, DisplaySlot> NAMES = net.kyori.adventure.util.Index.create(DisplaySlot.class, DisplaySlot::getId);
|
||||
+
|
||||
+ private final String id;
|
||||
+
|
||||
+ DisplaySlot(@org.jetbrains.annotations.NotNull String id) {
|
||||
+ this.id = id;
|
||||
+ }
|
||||
+
|
||||
+ DisplaySlot(@org.jetbrains.annotations.NotNull NamedTextColor color) {
|
||||
+ this.id = "sidebar.team." + color;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Get the string id of this display slot.
|
||||
+ *
|
||||
+ * @return the string id
|
||||
+ */
|
||||
+ public @org.jetbrains.annotations.NotNull String getId() {
|
||||
+ return id;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String toString() {
|
||||
+ return this.id;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Sun, 24 Oct 2021 20:29:27 -0700
|
||||
Subject: [PATCH] Fix issues with mob conversion
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/PiglinAbstract.java b/src/main/java/org/bukkit/entity/PiglinAbstract.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/PiglinAbstract.java
|
||||
+++ b/src/main/java/org/bukkit/entity/PiglinAbstract.java
|
||||
@@ -0,0 +0,0 @@ public interface PiglinAbstract extends Monster, Ageable {
|
||||
public int getConversionTime();
|
||||
|
||||
/**
|
||||
- * Sets the amount of ticks until this entity will be converted to a
|
||||
- * Zombified Piglin.
|
||||
+ * Sets the conversion counter value. The counter is incremented
|
||||
+ * every tick the {@link #isConverting()} returns true. Setting this
|
||||
+ * value will not start the conversion if the {@link PiglinAbstract} is
|
||||
+ * not in a valid environment ({@link org.bukkit.World#isPiglinSafe})
|
||||
+ * to convert or {@link #isImmuneToZombification()} is true or
|
||||
+ * has no AI.
|
||||
*
|
||||
- * When this reaches 0, the entity will be converted. A value of less than 0
|
||||
- * will stop the current conversion process without converting the current
|
||||
- * entity.
|
||||
+ * When this reaches 300, the entity will be converted. To stop the
|
||||
+ * conversion use {@link #setImmuneToZombification(boolean)}.
|
||||
*
|
||||
- * @param time new conversion time
|
||||
+ * @param time new conversion counter
|
||||
*/
|
||||
public void setConversionTime(int time);
|
||||
|
@@ -1,27 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nassim Jahnke <nassim@njahnke.dev>
|
||||
Date: Fri, 1 Oct 2021 09:47:00 +0200
|
||||
Subject: [PATCH] Fix plugin provides load order
|
||||
|
||||
Fixes https://hub.spigotmc.org/jira/browse/SPIGOT-6740
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager {
|
||||
// Paper end
|
||||
missingDependency = false;
|
||||
pluginIterator.remove();
|
||||
+ pluginsProvided.values().removeIf(s -> s.equals(plugin)); // Paper - remove provided plugins
|
||||
softDependencies.remove(plugin);
|
||||
dependencies.remove(plugin);
|
||||
|
||||
@@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager {
|
||||
// We're clear to load, no more soft or hard dependencies left
|
||||
File file = plugins.get(plugin);
|
||||
pluginIterator.remove();
|
||||
+ pluginsProvided.values().removeIf(s -> s.equals(plugin)); // Paper - remove provided plugins
|
||||
missingDependency = false;
|
||||
|
||||
try {
|
@@ -1,62 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 20 Aug 2021 13:03:55 -0700
|
||||
Subject: [PATCH] Get entity default attributes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -0,0 +0,0 @@ public interface UnsafeValues {
|
||||
* @return the server's protocol version
|
||||
*/
|
||||
int getProtocolVersion();
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if the entity represented by the namespaced key has default attributes.
|
||||
+ *
|
||||
+ * @param entityKey the entity's key
|
||||
+ * @return true if it has default attributes
|
||||
+ */
|
||||
+ boolean hasDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the default attributes for the entity represented by the namespaced key.
|
||||
+ *
|
||||
+ * @param entityKey the entity's key
|
||||
+ * @return an unmodifiable instance of Attributable for reading default attributes.
|
||||
+ * @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
@@ -0,0 +0,0 @@ public enum EntityType implements Keyed, net.kyori.adventure.translation.Transla
|
||||
Preconditions.checkArgument(this != UNKNOWN, "UNKNOWN entities do not have translation keys");
|
||||
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if the entity has default attributes.
|
||||
+ *
|
||||
+ * @return true if it has default attributes
|
||||
+ */
|
||||
+ public boolean hasDefaultAttributes() {
|
||||
+ return org.bukkit.Bukkit.getUnsafe().hasDefaultEntityAttributes(this.key);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the default attributes for the entity.
|
||||
+ *
|
||||
+ * @return an unmodifiable instance of Attributable for reading default attributes.
|
||||
+ * @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultAttributes()} first)
|
||||
+ */
|
||||
+ public @NotNull org.bukkit.attribute.Attributable getDefaultAttributes() {
|
||||
+ return org.bukkit.Bukkit.getUnsafe().getDefaultEntityAttributes(this.key);
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Seggan <segganew@gmail.com>
|
||||
Date: Thu, 5 Aug 2021 13:10:31 -0400
|
||||
Subject: [PATCH] Goat ram API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Goat.java b/src/main/java/org/bukkit/entity/Goat.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Goat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Goat.java
|
||||
@@ -0,0 +0,0 @@ public interface Goat extends Animals {
|
||||
* @param screaming screaming status
|
||||
*/
|
||||
void setScreaming(boolean screaming);
|
||||
+
|
||||
+ // Paper start - Goat ram API
|
||||
+ /**
|
||||
+ * Makes the goat ram at the specified entity
|
||||
+ * @param entity the entity to ram at
|
||||
+ */
|
||||
+ void ram(@org.jetbrains.annotations.NotNull LivingEntity entity);
|
||||
+ // Paper end
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 12:36:46 -0500
|
||||
Subject: [PATCH] Left handed API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -0,0 +0,0 @@ public interface Mob extends LivingEntity, Lootable {
|
||||
* @return whether the mob is aware
|
||||
*/
|
||||
public boolean isAware();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Check if Mob is left-handed
|
||||
+ *
|
||||
+ * @return True if left-handed
|
||||
+ */
|
||||
+ public boolean isLeftHanded();
|
||||
+
|
||||
+ /**
|
||||
+ * Set if Mob is left-handed
|
||||
+ *
|
||||
+ * @param leftHanded True if left-handed
|
||||
+ */
|
||||
+ public void setLeftHanded(boolean leftHanded);
|
||||
+ // Paper end
|
||||
}
|
@@ -1,96 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Fri, 28 May 2021 21:47:39 -0700
|
||||
Subject: [PATCH] More CommandBlock API
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/CommandBlockHolder.java b/src/main/java/io/papermc/paper/command/CommandBlockHolder.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/command/CommandBlockHolder.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package io.papermc.paper.command;
|
||||
+
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public interface CommandBlockHolder {
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the command that this CommandBlock will run when powered.
|
||||
+ * This will never return null. If the CommandBlock does not have a
|
||||
+ * command, an empty String will be returned instead.
|
||||
+ *
|
||||
+ * @return Command that this CommandBlock will run when activated.
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ String getCommand();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the command that this CommandBlock will run when powered.
|
||||
+ * Setting the command to null is the same as setting it to an empty
|
||||
+ * String.
|
||||
+ *
|
||||
+ * @param command Command that this CommandBlock will run when activated.
|
||||
+ */
|
||||
+ void setCommand(@Nullable String command);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the last output from this command block.
|
||||
+ *
|
||||
+ * @return the last output
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Component lastOutput();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the last output from this command block.
|
||||
+ *
|
||||
+ * @param lastOutput the last output
|
||||
+ */
|
||||
+ void lastOutput(@Nullable Component lastOutput);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the success count from this command block.
|
||||
+ * @see <a href="https://minecraft.fandom.com/wiki/Command_Block#Success_count">Command_Block#Success_count</a>
|
||||
+ *
|
||||
+ * @return the success count
|
||||
+ */
|
||||
+ int getSuccessCount();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the success count from this command block.
|
||||
+ * @see <a href="https://minecraft.fandom.com/wiki/Command_Block#Success_count">Command_Block#Success_count</a>
|
||||
+ *
|
||||
+ * @param successCount the success count
|
||||
+ */
|
||||
+ void setSuccessCount(int successCount);
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/block/CommandBlock.java b/src/main/java/org/bukkit/block/CommandBlock.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/CommandBlock.java
|
||||
+++ b/src/main/java/org/bukkit/block/CommandBlock.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a captured state of a command block.
|
||||
*/
|
||||
-public interface CommandBlock extends TileState {
|
||||
+public interface CommandBlock extends TileState, io.papermc.paper.command.CommandBlockHolder { // Paper
|
||||
|
||||
/**
|
||||
* Gets the command that this CommandBlock will run when powered.
|
||||
diff --git a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
+++ b/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.entity.Minecart;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
-public interface CommandMinecart extends Minecart {
|
||||
+public interface CommandMinecart extends Minecart, io.papermc.paper.command.CommandBlockHolder { // Paper
|
||||
|
||||
/**
|
||||
* Gets the command that this CommandMinecart will run when activated.
|
@@ -1,56 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Sun, 26 Sep 2021 12:57:35 -0700
|
||||
Subject: [PATCH] Option to prevent NBT copy in smithing recipes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingRecipe.java b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
private final ItemStack result;
|
||||
private final RecipeChoice base;
|
||||
private final RecipeChoice addition;
|
||||
+ private final boolean copyNbt; // Paper
|
||||
|
||||
/**
|
||||
* Create a smithing recipe to produce the specified result ItemStack.
|
||||
@@ -0,0 +0,0 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
* @param addition The addition ingredient
|
||||
*/
|
||||
public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
+ // Paper start
|
||||
+ this(key, result, base, addition, true);
|
||||
+ }
|
||||
+ /**
|
||||
+ * Create a smithing recipe to produce the specified result ItemStack.
|
||||
+ *
|
||||
+ * @param key The unique recipe key
|
||||
+ * @param result The item you want the recipe to create.
|
||||
+ * @param base The base ingredient
|
||||
+ * @param addition The addition ingredient
|
||||
+ * @param copyNbt whether to copy the nbt from the input base item to the output
|
||||
+ */
|
||||
+ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyNbt) {
|
||||
+ this.copyNbt = copyNbt;
|
||||
+ // Paper end
|
||||
this.key = key;
|
||||
this.result = result;
|
||||
this.base = base;
|
||||
@@ -0,0 +0,0 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
public NamespacedKey getKey() {
|
||||
return this.key;
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Whether or not to copy the NBT of the input base item to the output.
|
||||
+ *
|
||||
+ * @return true to copy the NBT (default for vanilla smithing recipes)
|
||||
+ */
|
||||
+ public boolean willCopyNbt() {
|
||||
+ return copyNbt;
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Wed, 12 May 2021 02:49:28 -0700
|
||||
Subject: [PATCH] add back EntityPortalExitEvent
|
||||
|
||||
Was removed here: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/a2d787f6ebeb72fa7d5750788221fb9a0d838ac4
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java b/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
* <p>
|
||||
* This event allows you to modify the velocity of the entity after they have
|
||||
* successfully exited the portal.
|
||||
+ * <p>
|
||||
+ * Cancelling this event does not prevent the teleport, but it does prevent
|
||||
+ * any changes to velocity and location from taking place.
|
||||
*/
|
||||
public class EntityPortalExitEvent extends EntityTeleportEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
Reference in New Issue
Block a user