diff options
| author | Danielshe <shekwancheung0528@gmail.com> | 2019-11-03 14:44:52 +0800 |
|---|---|---|
| committer | Danielshe <shekwancheung0528@gmail.com> | 2019-11-03 14:44:59 +0800 |
| commit | 9f5a9eae9a7863412cc5eb433bf15e5ee71da616 (patch) | |
| tree | 0e6b0b94af061c5e9023b1ff19f339a6c30149be /src/main/java/me/shedaniel/rei/impl/ItemStackEntry.java | |
| parent | 3e3e25855b9f6df507a7d4c8a07c64b9a502fae2 (diff) | |
| download | RoughlyEnoughItems-9f5a9eae9a7863412cc5eb433bf15e5ee71da616.tar.gz RoughlyEnoughItems-9f5a9eae9a7863412cc5eb433bf15e5ee71da616.tar.bz2 RoughlyEnoughItems-9f5a9eae9a7863412cc5eb433bf15e5ee71da616.zip | |
3.2.1
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/ItemStackEntry.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/impl/ItemStackEntry.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/ItemStackEntry.java b/src/main/java/me/shedaniel/rei/impl/ItemStackEntry.java index 1802e69dc..594a182e6 100644 --- a/src/main/java/me/shedaniel/rei/impl/ItemStackEntry.java +++ b/src/main/java/me/shedaniel/rei/impl/ItemStackEntry.java @@ -6,11 +6,14 @@ package me.shedaniel.rei.impl; import me.shedaniel.rei.api.Entry; +import me.shedaniel.rei.api.annotations.ToBeRemoved; import net.minecraft.fluid.Fluid; import net.minecraft.item.ItemStack; import javax.annotation.Nullable; +@ToBeRemoved +@Deprecated public class ItemStackEntry implements Entry { private ItemStack itemStack; @@ -35,4 +38,16 @@ public class ItemStackEntry implements Entry { public Fluid getFluid() { return null; } + + @Override + public Entry clone() { + return Entry.create(getItemStack().copy()); + } + + @Override + public boolean equalsEntry(Entry other, boolean checkTags) { + if (other.getEntryType() == Type.ITEM) { + return checkTags ? ItemStack.areEqualIgnoreDamage(other.getItemStack(), getItemStack()) : other.getItemStack().isItemEqualIgnoreDamage(getItemStack()); + } else return false; + } } |
