mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-04-13 09:41:09 +00:00
SPIGOT-7731: Spawn eggs cannot have damage
This commit is contained in:
parent
e585297ede
commit
19b7caaabe
2 changed files with 0 additions and 20 deletions
|
@ -10,7 +10,6 @@ import org.bukkit.entity.EntityType;
|
|||
import org.bukkit.inventory.meta.BookMeta;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -150,20 +149,6 @@ public interface ItemFactory {
|
|||
@NotNull
|
||||
ItemStack createItemStack(@NotNull String input) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Apply a material change for an item meta. Do not use under any
|
||||
* circumstances.
|
||||
*
|
||||
* @param meta meta
|
||||
* @param material material
|
||||
* @return updated material
|
||||
* @throws IllegalArgumentException if bad material or data
|
||||
* @apiNote for internal use only
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@NotNull
|
||||
Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Gets a {@link Material} representing the spawn egg for the provided
|
||||
* {@link EntityType}. <br>
|
||||
|
|
|
@ -614,11 +614,6 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
|||
}
|
||||
this.meta = Bukkit.getItemFactory().asMetaFor(itemMeta, material);
|
||||
|
||||
Material newType = Bukkit.getItemFactory().updateMaterial(meta, material);
|
||||
if (this.type != newType) {
|
||||
this.type = newType;
|
||||
}
|
||||
|
||||
if (this.meta == itemMeta) {
|
||||
this.meta = itemMeta.clone();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue