mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
SPIGOT-7731: Spawn eggs cannot have damage
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
a19c7f8470
commit
69683a66cc
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…
Reference in a new issue