mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-11 02:37:36 +01:00
Enable support of PotionMeta on SPLASH_POTION, LINGERING_POTION and TIPPED_ARROW.
By: Melair <melair@caldonia.net>
This commit is contained in:
parent
a64de09934
commit
4cd50efad7
@ -76,6 +76,9 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
case LEATHER_BOOTS:
|
||||
return meta instanceof CraftMetaLeatherArmor ? meta : new CraftMetaLeatherArmor(meta);
|
||||
case POTION:
|
||||
case SPLASH_POTION:
|
||||
case LINGERING_POTION:
|
||||
case TIPPED_ARROW:
|
||||
return meta instanceof CraftMetaPotion ? meta : new CraftMetaPotion(meta);
|
||||
case MAP:
|
||||
return meta instanceof CraftMetaMap ? meta : new CraftMetaMap(meta);
|
||||
|
@ -338,6 +338,9 @@ public final class CraftItemStack extends ItemStack {
|
||||
case LEATHER_BOOTS:
|
||||
return new CraftMetaLeatherArmor(item.getTag());
|
||||
case POTION:
|
||||
case SPLASH_POTION:
|
||||
case LINGERING_POTION:
|
||||
case TIPPED_ARROW:
|
||||
return new CraftMetaPotion(item.getTag());
|
||||
case MAP:
|
||||
return new CraftMetaMap(item.getTag());
|
||||
|
@ -109,6 +109,9 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
|
||||
boolean applicableTo(Material type) {
|
||||
switch(type) {
|
||||
case POTION:
|
||||
case SPLASH_POTION:
|
||||
case LINGERING_POTION:
|
||||
case TIPPED_ARROW:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user