aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/impl/FluidEntry.java
blob: 795ed0deb604528fe5ccb847e8561ecdc02f23c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * Roughly Enough Items by Danielshe.
 * Licensed under the MIT License.
 */

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 FluidEntry implements Entry {
    private Fluid fluid;
    
    @Deprecated
    public FluidEntry(Fluid fluid) {
        this.fluid = fluid;
    }
    
    @Override
    public Type getEntryType() {
        return Type.FLUID;
    }
    
    @Nullable
    @Override
    public ItemStack getItemStack() {
        return null;
    }
    
    @Nullable
    @Override
    public Fluid getFluid() {
        return fluid;
    }
    
    @Override
    public Entry clone() {
        return this;
    }
    
    @Override
    public boolean equalsEntry(Entry other, boolean checkTags) {
        if (other.getEntryType() == Type.FLUID) {
            return other.getFluid().matchesType(getFluid());
        } else return false;
    }
}