mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 09:47:40 +01:00
Fixed getData() not returning the correct values.
By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
parent
865f44281e
commit
485a47aac4
@ -116,6 +116,10 @@ public class ItemStack {
|
|||||||
* @return MaterialData for this item
|
* @return MaterialData for this item
|
||||||
*/
|
*/
|
||||||
public MaterialData getData() {
|
public MaterialData getData() {
|
||||||
|
if (Material.getMaterial(getTypeId()).getData() != null) {
|
||||||
|
data = Material.getMaterial(getTypeId()).getNewData((byte)this.durability);
|
||||||
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user