blob: 688a85b5210429837bff7f0a190a0aabeaeb9a66 (
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
|
package gregtech.api.interfaces.metatileentity;
import net.minecraftforge.fluids.Fluid;
/**
* Implement this interface if your MetaTileEntity supports fluid lock mechanism.
*/
@SuppressWarnings({"BooleanMethodIsAlwaysInverted", "unused"})
public interface IFluidLockable {
/**
* Use {@link Fluid#getName()} instead of {@link Fluid#getUnlocalizedName()} for fluid name
*/
void setLockedFluidName(String name);
String getLockedFluidName();
/**
* Set fluid lock state.
* Would be useful when you don't necessarily want to change mode when locked fluid is changed.
*/
void lockFluid(boolean lock);
boolean isFluidLocked();
boolean allowChangingLockedFluid(String name);
default void onFluidLockPacketReceived(String name) {}
}
|