aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorBass <tudurap.com@gmail.com>2019-08-27 18:45:11 +0100
committerBass <tudurap.com@gmail.com>2019-08-27 18:45:11 +0100
commita560a97a4376e8ac198cd686b633f6f7b06c31e7 (patch)
tree6ec5f8d78cffe64aa1f5baddc2f322b47349adc5 /src/main/java
parent79a21009350940d758fcf0eda9fb284662c80fb2 (diff)
downloadGT5-Unofficial-a560a97a4376e8ac198cd686b633f6f7b06c31e7.tar.gz
GT5-Unofficial-a560a97a4376e8ac198cd686b633f6f7b06c31e7.tar.bz2
GT5-Unofficial-a560a97a4376e8ac198cd686b633f6f7b06c31e7.zip
Lang Extra Extra?
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java4
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java2
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java122
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java69
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java2
8 files changed, 104 insertions, 101 deletions
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
index d6c4553ed5..3d01ec7fb9 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/elementalMatter/definitions/dComplexAspectDefinition.java
@@ -306,13 +306,13 @@ public final class dComplexAspectDefinition extends cElementalDefinition impleme
lines.add(StatCollector.translateToLocal("tt.keyword.CHARGE") + " = " + getCharge() / 3f + " e");
}
if (Util.areBitsSet(SCAN_GET_COLOR, capabilities)) {
- lines.add(getColor() < 0 ? StatCollector.translateToLocal("tt.keyword.COLORLESS") : StatCollector.translateToLocal("tt.keyword.CARRIES_COLOR"));
+ lines.add(getColor() < 0 ? StatCollector.translateToLocal("tt.keyword.COLORLESS") : StatCollector.translateToLocal("tt.keyphrase.CARRIES_COLOR"));
}
if (Util.areBitsSet(SCAN_GET_MASS, capabilities)) {
lines.add(StatCollector.translateToLocal("tt.keyword.MASS") + " = " + getMass() + " eV/c\u00b2");
}
if (Util.areBitsSet(SCAN_GET_TIMESPAN_INFO, capabilities)) {
- lines.add(StatCollector.translateToLocal("tt.keyword.LIFE_TIME") + " = " + getRawTimeSpan(energyLevel) + " s");
+ lines.add(StatCollector.translateToLocal("tt.keyphrase.LIFE_TIME") + " = " + getRawTimeSpan(energyLevel) + " s");
lines.add(" " + StatCollector.translateToLocal("tt.keyphrase.At_current_energy_level"));
}
}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
index afaa9052cd..31a81726c4 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
@@ -55,7 +55,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
private static final String[] description = new String[]{
- EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":",
+ EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":",
StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing
StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch
StatCollector.translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
index d7570f7889..4425a97f64 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
@@ -55,7 +55,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
private static final String[] description = new String[]{
- EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":",
+ EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":",
StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing
StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch
StatCollector.translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
index c39e9e0661..2f3bca7c16 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
@@ -30,6 +30,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
import java.util.ArrayList;
@@ -44,35 +45,11 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat
* Created by danie_000 on 17.12.2016.
*/
public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
+ private final ArrayList<GT_MetaTileEntity_Hatch_Rack> eRacks = new ArrayList<>();
+
private static Textures.BlockIcons.CustomIcon ScreenOFF;
private static Textures.BlockIcons.CustomIcon ScreenON;
- //region parameters
- protected Parameters.Group.ParameterIn overclock,overvolt;
- protected Parameters.Group.ParameterOut maxCurrentTemp,availableData;
- private static final INameFunction<GT_MetaTileEntity_EM_computer> OC_NAME = (base, p)-> "Overclock ratio";
- private static final INameFunction<GT_MetaTileEntity_EM_computer> OV_NAME = (base, p)-> "Overvoltage ratio";
- private static final INameFunction<GT_MetaTileEntity_EM_computer> MAX_TEMP_NAME = (base, p)-> "Current max. heat";
- private static final INameFunction<GT_MetaTileEntity_EM_computer> COMPUTE_NAME = (base, p)-> "Produced computation";
- private static final IStatusFunction<GT_MetaTileEntity_EM_computer> OC_STATUS=
- (base,p)->LedStatus.fromLimitsInclusiveOuterBoundary(p.get(),0,1,1,3);
- private static final IStatusFunction<GT_MetaTileEntity_EM_computer> OV_STATUS=
- (base,p)->LedStatus.fromLimitsInclusiveOuterBoundary(p.get(),.7,.8,1.2,2);
- private static final IStatusFunction<GT_MetaTileEntity_EM_computer> MAX_TEMP_STATUS=
- (base,p)->LedStatus.fromLimitsInclusiveOuterBoundary(p.get(),-10000,0,0,5000);
- private static final IStatusFunction<GT_MetaTileEntity_EM_computer> COMPUTE_STATUS=(base, p)->{
- if(base.eAvailableData<0){
- return STATUS_TOO_LOW;
- }
- if(base.eAvailableData==0){
- return STATUS_NEUTRAL;
- }
- return STATUS_OK;
- };
- //endregion
-
- private final ArrayList<GT_MetaTileEntity_Hatch_Rack> eRacks = new ArrayList<>();
-
//region Structure
private static final String[][] front = new String[][]{{"A ", "A ", "A. ", "A ",},};
private static final String[][] terminator = new String[][]{{"A ", "A ", "A ", "A ",},};
@@ -85,9 +62,34 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{1, 3};
private static final String[] description = new String[]{
- EnumChatFormatting.AQUA+"Hint Details:",
- "1 - Classic/Data Hatches or Computer casing",
- "2 - Rack Hatches or Advanced computer casing",
+ EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":",
+ StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.hint.0"),//1 - Classic/Data Hatches or Computer casing
+ StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.hint.1"),//2 - Rack Hatches or Advanced computer casing
+ };
+ //endregion
+
+ //region parameters
+ protected Parameters.Group.ParameterIn overclock, overvolt;
+ protected Parameters.Group.ParameterOut maxCurrentTemp, availableData;
+
+ private static final INameFunction<GT_MetaTileEntity_EM_computer> OC_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.0");//Overclock ratio
+ private static final INameFunction<GT_MetaTileEntity_EM_computer> OV_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgi.1");//Overvoltage ratio
+ private static final INameFunction<GT_MetaTileEntity_EM_computer> MAX_TEMP_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.0");//Current max. heat
+ private static final INameFunction<GT_MetaTileEntity_EM_computer> COMPUTE_NAME = (base, p) -> StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.cfgo.1");//Produced computation
+ private static final IStatusFunction<GT_MetaTileEntity_EM_computer> OC_STATUS =
+ (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), 0, 1, 1, 3);
+ private static final IStatusFunction<GT_MetaTileEntity_EM_computer> OV_STATUS =
+ (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), .7, .8, 1.2, 2);
+ private static final IStatusFunction<GT_MetaTileEntity_EM_computer> MAX_TEMP_STATUS =
+ (base, p) -> LedStatus.fromLimitsInclusiveOuterBoundary(p.get(), -10000, 0, 0, 5000);
+ private static final IStatusFunction<GT_MetaTileEntity_EM_computer> COMPUTE_STATUS = (base, p) -> {
+ if (base.eAvailableData < 0) {
+ return STATUS_TOO_LOW;
+ }
+ if (base.eAvailableData == 0) {
+ return STATUS_NEUTRAL;
+ }
+ return STATUS_OK;
};
//endregion
@@ -105,16 +107,16 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
protected void parametersInstantiation_EM() {
- Parameters.Group hatch_0=parametrization.getGroup(0);
- overclock=hatch_0.makeInParameter(0,1,OC_NAME,OC_STATUS);
- overvolt=hatch_0.makeInParameter(1,1,OV_NAME,OV_STATUS);
- maxCurrentTemp=hatch_0.makeOutParameter(0,0,MAX_TEMP_NAME,MAX_TEMP_STATUS);
- availableData=hatch_0.makeOutParameter(1,0,COMPUTE_NAME,COMPUTE_STATUS);
+ Parameters.Group hatch_0 = parametrization.getGroup(0);
+ overclock = hatch_0.makeInParameter(0, 1, OC_NAME, OC_STATUS);
+ overvolt = hatch_0.makeInParameter(1, 1, OV_NAME, OV_STATUS);
+ maxCurrentTemp = hatch_0.makeOutParameter(0, 0, MAX_TEMP_NAME, MAX_TEMP_STATUS);
+ availableData = hatch_0.makeOutParameter(1, 0, COMPUTE_NAME, COMPUTE_STATUS);
}
@Override
@SideOnly(Side.CLIENT)
- protected ResourceLocation getActivitySound(){
+ protected ResourceLocation getActivitySound() {
return GT_MetaTileEntity_EM_switch.activitySound;
}
@@ -141,20 +143,20 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
public boolean checkRecipe_EM(ItemStack itemStack) {
- parametrization.setToDefaults(false,true);
+ parametrization.setToDefaults(false, true);
eAvailableData = 0;
- double maxTemp=0;
- double overClockRatio= overclock.get();
- double overVoltageRatio= overvolt.get();
- if(Double.isNaN(overClockRatio) || Double.isNaN(overVoltageRatio)) {
+ double maxTemp = 0;
+ double overClockRatio = overclock.get();
+ double overVoltageRatio = overvolt.get();
+ if (Double.isNaN(overClockRatio) || Double.isNaN(overVoltageRatio)) {
return false;
}
- if(overclock.getStatus(true).isOk && overvolt.getStatus(true).isOk){
- float eut=V[8] * (float)overVoltageRatio * (float)overClockRatio;
- if(eut<Integer.MAX_VALUE-7) {
+ if (overclock.getStatus(true).isOk && overvolt.getStatus(true).isOk) {
+ float eut = V[8] * (float) overVoltageRatio * (float) overClockRatio;
+ if (eut < Integer.MAX_VALUE - 7) {
mEUt = -(int) eut;
- } else{
- mEUt = -(int)V[8];
+ } else {
+ mEUt = -(int) V[8];
return false;
}
short thingsActive = 0;
@@ -165,7 +167,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
continue;
}
if (rack.heat > maxTemp) {
- maxTemp=rack.heat;
+ maxTemp = rack.heat;
}
rackComputation = rack.tickComponents((float) overClockRatio, (float) overVoltageRatio);
if (rackComputation > 0) {
@@ -191,8 +193,8 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
availableData.set(eAvailableData);
return true;
} else {
- eAvailableData=0;
- mEUt = -(int)V[8];
+ eAvailableData = 0;
+ mEUt = -(int) V[8];
eAmpereFlow = 1;
mMaxProgresstime = 20;
mEfficiencyIncrease = 10000;
@@ -209,7 +211,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
if (!eOutputData.isEmpty()) {
Vec3pos pos = new Vec3pos(getBaseMetaTileEntity());
QuantumDataPacket pack = new QuantumDataPacket(eAvailableData / eOutputData.size()).unifyTraceWith(pos);
- if(pack==null){
+ if (pack == null) {
return;
}
for (GT_MetaTileEntity_Hatch_InputData hatch : eInputData) {
@@ -256,7 +258,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
public void stopMachine() {
super.stopMachine();
- eAvailableData=0;
+ eAvailableData = 0;
for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) {
rack.getBaseMetaTileEntity().setActive(false);
@@ -306,17 +308,17 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(int stackSize, boolean hintsOnly) {
- IGregTechTileEntity igt=getBaseMetaTileEntity();
- StructureBuilderExtreme(front, blockType, blockMeta, 1, 2, 0, igt,this,hintsOnly);
- StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, -1, igt,this,hintsOnly);
+ IGregTechTileEntity igt = getBaseMetaTileEntity();
+ StructureBuilderExtreme(front, blockType, blockMeta, 1, 2, 0, igt, this, hintsOnly);
+ StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, -1, igt, this, hintsOnly);
- byte offset=-2;
- for (int rackSlices = stackSize >12?12: stackSize; rackSlices>0 ; rackSlices--) {
- StructureBuilderExtreme(slice, blockType, blockMeta, 1, 2, offset--, igt,this,hintsOnly);
+ byte offset = -2;
+ for (int rackSlices = stackSize > 12 ? 12 : stackSize; rackSlices > 0; rackSlices--) {
+ StructureBuilderExtreme(slice, blockType, blockMeta, 1, 2, offset--, igt, this, hintsOnly);
}
- StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, offset--, igt,this,hintsOnly);
- StructureBuilderExtreme(terminator, blockType, blockMeta, 1, 2, offset,igt,this,hintsOnly);
+ StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, offset--, igt, this, hintsOnly);
+ StructureBuilderExtreme(terminator, blockType, blockMeta, 1, 2, offset, igt, this, hintsOnly);
}
@Override
@@ -336,7 +338,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
return new String[]{
CommonValues.TEC_MARK_EM,
Util.intBitsToString(TecTech.RANDOM.nextInt()),
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "You need it to process the number above"
+ EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.computer.desc")//You need it to process the number above
};
}
@@ -355,4 +357,4 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
}
return false;
}
-}
+} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
index 1c5d1bccdd..be244e6820 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
@@ -23,6 +23,7 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
import static com.github.technus.tectech.CommonValues.V;
import static com.github.technus.tectech.Util.StructureBuilderExtreme;
@@ -34,40 +35,40 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStat
/**
* Created by danie_000 on 17.12.2016.
*/
-public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable{
+public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
//region Structure
private static final String[][] shape = new String[][]{
- {" "," . "," ",},
- {" "," 0 "," ",},
- {" "," "," ",},
+ {" ", " . ", " ",},
+ {" ", " 0 ", " ",},
+ {" ", " ", " ",},
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{3};
private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList};
- private static final short[] casingTextures = new short[]{textureOffset+1};
+ private static final short[] casingTextures = new short[]{textureOffset + 1};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{1};
private static final String[] description = new String[]{
- EnumChatFormatting.AQUA+"Hint Details:",
- "1 - Classic/Data Hatches or Computer casing",
+ EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":",
+ "1 - Classic/Data Hatches or Computer casing",//1 - Classic/Data Hatches or Computer casing
};
//endregion
//region parameters
- private static final INameFunction<GT_MetaTileEntity_EM_switch> ROUTE_NAME=
- (base,p)->(p.parameterId()==0?"Destination ":"Weight ")+p.hatchId();
+ private static final INameFunction<GT_MetaTileEntity_EM_switch> ROUTE_NAME =
+ (base, p) -> (p.parameterId() == 0 ? StatCollector.translateToLocal("tt.keyword.Destination") + " " : StatCollector.translateToLocal("tt.keyword.Weight") + " ") + p.hatchId();
private static final IStatusFunction<GT_MetaTileEntity_EM_switch> WEI_STATUS =
- (base,p)-> {
- double v=p.get();
+ (base, p) -> {
+ double v = p.get();
if (Double.isNaN(v)) return STATUS_WRONG;
- if(v<0) return STATUS_TOO_LOW;
- if(v==0) return STATUS_LOW;
- if(Double.isInfinite(v)) return STATUS_HIGH;
+ if (v < 0) return STATUS_TOO_LOW;
+ if (v == 0) return STATUS_LOW;
+ if (Double.isInfinite(v)) return STATUS_HIGH;
return STATUS_OK;
};
private static final IStatusFunction<GT_MetaTileEntity_EM_switch> DST_STATUS =
- (base,p)->{
- if(base.weight[p.hatchId()].getStatus(false).isOk) {
+ (base, p) -> {
+ if (base.weight[p.hatchId()].getStatus(false).isOk) {
double v = p.get();
if (Double.isNaN(v)) return STATUS_WRONG;
v = (int) v;
@@ -91,20 +92,20 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
@Override
protected void parametersInstantiation_EM() {
- dst=new Parameters.Group.ParameterIn[10];
- weight =new Parameters.Group.ParameterIn[10];
+ dst = new Parameters.Group.ParameterIn[10];
+ weight = new Parameters.Group.ParameterIn[10];
for (int i = 0; i < 10; i++) {
Parameters.Group hatch = parametrization.getGroup(i);
dst[i] = hatch.makeInParameter(0, i, ROUTE_NAME, DST_STATUS);
- weight[i] = hatch.makeInParameter(1,0, ROUTE_NAME, WEI_STATUS);
+ weight[i] = hatch.makeInParameter(1, 0, ROUTE_NAME, WEI_STATUS);
}
}
- public final static ResourceLocation activitySound=new ResourceLocation(Reference.MODID+":fx_hi_freq");
+ public final static ResourceLocation activitySound = new ResourceLocation(Reference.MODID + ":fx_hi_freq");
@Override
@SideOnly(Side.CLIENT)
- protected ResourceLocation getActivitySound(){
+ protected ResourceLocation getActivitySound() {
return activitySound;
}
@@ -128,7 +129,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
@Override
public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta,1, 1, 0, getBaseMetaTileEntity(),this,hintsOnly);
+ StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), this, hintsOnly);
}
@Override
@@ -162,7 +163,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
double total = 0;
double weight;
for (int i = 0; i < 10; i++) {//each param pair
- weight= this.weight[i].get();
+ weight = this.weight[i].get();
if (weight > 0 && dst[i].get() >= 0) {
total += weight;//Total weighted div
}
@@ -170,7 +171,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
Vec3pos pos = new Vec3pos(getBaseMetaTileEntity());
QuantumDataPacket pack = new QuantumDataPacket(0L).unifyTraceWith(pos);
- if(pack==null) {
+ if (pack == null) {
return;
}
for (GT_MetaTileEntity_Hatch_InputData hatch : eInputData) {
@@ -187,27 +188,27 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
double dest;
for (int i = 0; i < 10; i++) {
- dest= dst[i].get();
- weight= this.weight[i].get();
+ dest = dst[i].get();
+ weight = this.weight[i].get();
if (weight > 0 && dest >= 0) {
- int outIndex = (int)dest - 1;
+ int outIndex = (int) dest - 1;
if (outIndex < 0 || outIndex >= eOutputData.size()) {
continue;
}
GT_MetaTileEntity_Hatch_OutputData out = eOutputData.get(outIndex);
- if(Double.isInfinite(total)){
- if(Double.isInfinite(weight)){
+ if (Double.isInfinite(total)) {
+ if (Double.isInfinite(weight)) {
out.q = new QuantumDataPacket(remaining).unifyTraceWith(pack);
break;
}
- }else{
+ } else {
long part = (long) Math.floor(pack.getContent() * weight / total);
if (part > 0) {
remaining -= part;
if (remaining > 0) {
out.q = new QuantumDataPacket(part).unifyTraceWith(pack);
} else if (part + remaining > 0) {
- out.q = new QuantumDataPacket( part + remaining).unifyTraceWith(pack);
+ out.q = new QuantumDataPacket(part + remaining).unifyTraceWith(pack);
break;
} else {
break;
@@ -223,8 +224,8 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
public String[] getDescription() {
return new String[]{
CommonValues.TEC_MARK_EM,
- "User controlled computation power routing",
- EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Quality of service is a must"
+ StatCollector.translateToLocal("gt.blockmachines.multimachine.em.switch.desc.0"),//User controlled computation power routing
+ EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + StatCollector.translateToLocal("gt.blockmachines.multimachine.em.switch.desc.1")//Quality of service is a must
};
}
-}
+} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
index 26d447cf69..76ee59977c 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
@@ -44,7 +44,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0};
private static final String[] description = new String[]{
- EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":",
+ EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":",
StatCollector.translateToLocal("gt.blockmachines.multimachine.em.transformer.hint"),//1 - Energy IO Hatches or High Power Casing
};
//endregion
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
index 25a74a8a9b..f0feb4a635 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
@@ -53,7 +53,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4};
private static final byte[] blockMetaFallback = new byte[]{1};
private static final String[] description = new String[]{
- EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":",
+ EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":",
StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing
StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus
};
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
index 87a480fd36..40ea3084c8 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
@@ -98,7 +98,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null};
private static final byte[] blockMetaFallback = new byte[]{6, 0};
private static final String[] description = new String[]{
- EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyword.Hint_Details") + ":",
+ EnumChatFormatting.AQUA + StatCollector.translateToLocal("tt.keyphrase.Hint_Details") + ":",
StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing
StatCollector.translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames
};