1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Little performance improvement

This commit is contained in:
TheBusyBiscuit 2020-05-03 18:36:29 +02:00
parent afad0e266e
commit 3e2d1847ed
2 changed files with 3 additions and 5 deletions

View File

@ -20,6 +20,7 @@
## Release Candidate 12 (TBD)
#### Changes
* Little performance improvements
* Bandages, Rags and Splints will no longer be consumed if your health is full and you are not on fire
#### Fixes

View File

@ -21,7 +21,8 @@ public final class ItemStackWrapper extends ItemStack {
private ItemMeta meta;
public ItemStackWrapper(ItemStack item) {
super(item);
super(item.getType(), item.getAmount());
meta = item.getItemMeta();
}
@Override
@ -30,10 +31,6 @@ public final class ItemStackWrapper extends ItemStack {
// Since this class is immutable, we can simply let the super class create one copy
// and then store that instead of creating a clone everytime.
// This will significantly speed up any loop comparisons if used correctly.
if (meta == null) {
meta = super.getItemMeta();
}
return meta;
}