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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
package gregtech.common.tileentities.machines.multi;
import static gregtech.api.enums.HatchElement.Energy;
import static gregtech.api.enums.HatchElement.InputBus;
import static gregtech.api.enums.HatchElement.InputHatch;
import static gregtech.api.enums.HatchElement.Maintenance;
import static gregtech.api.enums.HatchElement.OutputBus;
import static gregtech.api.enums.HatchElement.OutputHatch;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW;
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_GLOW;
import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import com.google.common.collect.ImmutableList;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
import com.gtnewhorizon.structurelib.structure.StructureUtility;
import gregtech.api.GregTechAPI;
import gregtech.api.interfaces.IHatchElement;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.logic.ProcessingLogic;
import gregtech.api.metatileentity.implementations.MTECubicMultiBlockBase;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.MultiblockTooltipBuilder;
public class MTEVacuumFreezer extends MTECubicMultiBlockBase<MTEVacuumFreezer> {
public MTEVacuumFreezer(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
public MTEVacuumFreezer(String aName) {
super(aName);
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new MTEVacuumFreezer(this.mName);
}
@Override
protected MultiblockTooltipBuilder createTooltip() {
final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType("Vacuum Freezer")
.addInfo("Controller Block for the Vacuum Freezer")
.addInfo("Cools hot ingots and cells")
.addSeparator()
.beginStructureBlock(3, 3, 3, true)
.addController("Front center")
.addCasingInfoRange("Frost Proof Machine Casing", 16, 24, false)
.addEnergyHatch("Any casing", 1)
.addMaintenanceHatch("Any casing", 1)
.addInputHatch("Any casing", 1)
.addOutputHatch("Any casing", 1)
.addInputBus("Any casing", 1)
.addOutputBus("Any casing", 1)
.toolTipFinisher("Gregtech");
return tt;
}
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection aFacing,
int colorIndex, boolean aActive, boolean redstoneLevel) {
ITexture[] rTexture;
if (side == aFacing) {
if (aActive) {
rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
.addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE)
.extFacing()
.build(),
TextureFactory.builder()
.addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW)
.extFacing()
.glow()
.build() };
} else {
rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
.addIcon(OVERLAY_FRONT_VACUUM_FREEZER)
.extFacing()
.build(),
TextureFactory.builder()
.addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW)
.extFacing()
.glow()
.build() };
}
} else {
rTexture = new ITexture[] { casingTexturePages[0][17] };
}
return rTexture;
}
@Override
public RecipeMap<?> getRecipeMap() {
return RecipeMaps.vacuumFreezerRecipes;
}
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return true;
}
@Override
protected ProcessingLogic createProcessingLogic() {
return new ProcessingLogic();
}
@Override
protected IStructureElement<MTECubicMultiBlockBase<?>> getCasingElement() {
return StructureUtility.ofBlock(GregTechAPI.sBlockCasings2, 1);
}
@Override
protected List<IHatchElement<? super MTECubicMultiBlockBase<?>>> getAllowedHatches() {
return ImmutableList.of(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy);
}
@Override
protected int getHatchTextureIndex() {
return 17;
}
@Override
protected int getRequiredCasingCount() {
return 16;
}
@Override
public int getMaxEfficiency(ItemStack aStack) {
return 10000;
}
@Override
public int getDamageToComponent(ItemStack aStack) {
return 0;
}
@Override
public boolean explodesOnComponentBreak(ItemStack aStack) {
return false;
}
@Override
public boolean supportsVoidProtection() {
return true;
}
@Override
public boolean supportsBatchMode() {
return true;
}
}
|