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/EmptyEntryStack.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/EmptyEntryStack.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/impl/EmptyEntryStack.java | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/EmptyEntryStack.java b/src/main/java/me/shedaniel/rei/impl/EmptyEntryStack.java new file mode 100644 index 000000000..a4cae7fa2 --- /dev/null +++ b/src/main/java/me/shedaniel/rei/impl/EmptyEntryStack.java @@ -0,0 +1,96 @@ +/* + * Roughly Enough Items by Danielshe. + * Licensed under the MIT License. + */ + +package me.shedaniel.rei.impl; + +import me.shedaniel.math.api.Rectangle; +import me.shedaniel.rei.api.Entry; +import me.shedaniel.rei.api.EntryStack; +import me.shedaniel.rei.gui.widget.QueuedTooltip; +import net.minecraft.util.Identifier; + +import javax.annotation.Nullable; +import java.util.Optional; + +@Deprecated +public class EmptyEntryStack extends AbstractEntryStack { + + @Deprecated + public static final EntryStack EMPTY = new EmptyEntryStack(); + + private EmptyEntryStack() { + } + + @Override + public Optional<Identifier> getIdentifier() { + return Optional.empty(); + } + + @Override + public Type getType() { + return Type.EMPTY; + } + + @Override + public int getAmount() { + return 0; + } + + @Override + public void setAmount(int amount) { + + } + + @Override + public boolean isEmpty() { + return true; + } + + @Override + public Entry toEntry() { + return null; + } + + @Override + public EntryStack copy() { + return this; + } + + @Override + public Object getObject() { + return null; + } + + @Override + public boolean equalsIgnoreTagsAndAmount(EntryStack stack) { + return stack.getType() == getType(); + } + + @Override + public boolean equalsIgnoreTags(EntryStack stack) { + return stack.getType() == getType(); + } + + @Override + public boolean equalsIgnoreAmount(EntryStack stack) { + return stack.getType() == getType(); + } + + @Override + public boolean equalsAll(EntryStack stack) { + return stack.getType() == getType(); + } + + @Override + @Nullable + public QueuedTooltip getTooltip(int mouseX, int mouseY) { + return null; + } + + @Override + public void render(Rectangle bounds, int mouseX, int mouseY, float delta) { + + } +} |
