Auto-format spaces to tabs (#2)

This commit is contained in:
mezz committed 2016-10-27 02:49:49 -07:00
1 parent 25be7fd254
commit 5bb4b5d9a5
756 files changed
+49198 -48489

No files matched your search

@@ -14,36 +14,36 @@ import net.minecraft.item.ItemStack;
import java.util.Random;
public class ControlSequencerProgress extends ControlProgressBase {
ControlText textControl;
ControlText textControl;
public ControlSequencerProgress(final IWidget parent, final int x, final int y) {
super(parent, x, y, 100.0f, 52.0f);
final Panel panel = new Panel(this, 0.0f, 0.0f, 100.0f, 52.0f, MinecraftGUI.PanelType.Gray);
this.textControl = new ControlText(panel, new IArea(4.0f, 4.0f, 92.0f, 44.0f), "", TextJustification.MiddleCenter);
}
public ControlSequencerProgress(final IWidget parent, final int x, final int y) {
super(parent, x, y, 100.0f, 52.0f);
final Panel panel = new Panel(this, 0.0f, 0.0f, 100.0f, 52.0f, MinecraftGUI.PanelType.Gray);
this.textControl = new ControlText(panel, new IArea(4.0f, 4.0f, 92.0f, 44.0f), "", TextJustification.MiddleCenter);
}
@Override
public void onUpdateClient() {
super.onUpdateClient();
final ItemStack stack = Machine.getMachine(Window.get(this).getInventory()).getMachineUtil().getStack(5);
if (stack == null) {
this.textControl.setValue("");
} else {
final Random rand = new Random(stack.getDisplayName().length());
String text = "";
final String[] codes = {"A", "T", "G", "C"};
final String[] colors = {"a", "d", "b", "c"};
for (int i = 0; i < 65; ++i) {
final int k = rand.nextInt(4);
final String code = codes[k];
if (rand.nextFloat() < this.progress) {
final String col = "§" + colors[k];
text = text + "§r" + col + "§l" + code;
} else {
text = text + "§r§7§k§l" + code;
}
}
this.textControl.setValue(text);
}
}
@Override
public void onUpdateClient() {
super.onUpdateClient();
final ItemStack stack = Machine.getMachine(Window.get(this).getInventory()).getMachineUtil().getStack(5);
if (stack == null) {
this.textControl.setValue("");
} else {
final Random rand = new Random(stack.getDisplayName().length());
String text = "";
final String[] codes = {"A", "T", "G", "C"};
final String[] colors = {"a", "d", "b", "c"};
for (int i = 0; i < 65; ++i) {
final int k = rand.nextInt(4);
final String code = codes[k];
if (rand.nextFloat() < this.progress) {
final String col = "§" + colors[k];
text = text + "§r" + col + "§l" + code;
} else {
text = text + "§r§7§k§l" + code;
}
}
this.textControl.setValue(text);
}
}
}