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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
package common.tileentities;
import kekztech.MultiFluidHandler;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
@Deprecated
public class TE_TFFTMultiHatch extends TileEntity implements IFluidHandler {
public static final int BASE_OUTPUT_PER_SECOND = 2000; // L/s
private byte facings = 0x0;
private MultiFluidHandler mfh;
private int tickCounter = 0;
private boolean autoOutput = false;
public boolean hasFacingOnSide(byte side) {
final byte key = (byte) Math.pow(0x2, side);
return (facings & key) == key;
}
public void setFacingToSide(byte side) {
facings = (byte) Math.pow(0x2, side);
}
public void setMultiFluidHandler(MultiFluidHandler mfh) {
this.mfh = mfh;
}
public void toggleAutoOutput() {
autoOutput = !autoOutput;
}
public boolean isOutputting() {
return autoOutput;
}
@Override
public void updateEntity() {
// Removed deprecated code
}
@Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
// Removed deprecated code
return 0;
}
@Override
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
// Removed deprecated code
return null;
}
/**
* Drains fluid out of 0th internal tank.
* If the TFFT Controller contains an Integrated Circuit, drain fluid
* from the slot equal to the circuit configuration.
*
* @param from
* Orientation the fluid is drained to.
* @param maxDrain
* Maximum amount of fluid to drain.
* @param doDrain
* If false, drain will only be simulated.
* @return FluidStack representing the Fluid and amount that was (or would have been, if
* simulated) drained.
*/
@Override
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
// Removed deprecated code
return null;
}
@Override
public boolean canFill(ForgeDirection from, Fluid fluid) {
// Removed deprecated code
return false;
}
@Override
public boolean canDrain(ForgeDirection from, Fluid fluid) {
// Removed deprecated code
return false;
}
@Override
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
// Removed deprecated code
return null;
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setBoolean("autoOutput", autoOutput);
nbt.setByte("facings", facings);
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
autoOutput = nbt.getBoolean("autoOutput");
facings = nbt.getByte("facings");
}
}
|