mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
SPIGOT-279: Fix all metadata being cleared for items that support blockEntityTag on material mis-match
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
3abc015fc8
commit
34d157aca8
2 changed files with 1 additions and 8 deletions
|
@ -103,13 +103,6 @@ public final class CraftItemFactory implements ItemFactory {
|
||||||
case HOPPER:
|
case HOPPER:
|
||||||
case REDSTONE_COMPARATOR:
|
case REDSTONE_COMPARATOR:
|
||||||
case FLOWER_POT_ITEM:
|
case FLOWER_POT_ITEM:
|
||||||
if (meta instanceof CraftMetaTileEntity) {
|
|
||||||
CraftMetaTileEntity te = (CraftMetaTileEntity) meta;
|
|
||||||
if (te.material != material) {
|
|
||||||
return new CraftMetaTileEntity((CraftMetaTileEntity) null, material);
|
|
||||||
}
|
|
||||||
return meta;
|
|
||||||
}
|
|
||||||
return new CraftMetaTileEntity(meta, material);
|
return new CraftMetaTileEntity(meta, material);
|
||||||
default:
|
default:
|
||||||
return new CraftMetaItem(meta);
|
return new CraftMetaItem(meta);
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class CraftMetaTileEntity extends CraftMetaItem {
|
||||||
super(meta);
|
super(meta);
|
||||||
this.material = material;
|
this.material = material;
|
||||||
|
|
||||||
if (!(meta instanceof CraftMetaTileEntity)) {
|
if (!(meta instanceof CraftMetaTileEntity) || ((CraftMetaTileEntity) meta).material != material) {
|
||||||
blockEntityTag = null;
|
blockEntityTag = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue