mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-28 07:56:01 +00:00
Minor cleanup and fixes
This commit is contained in:
1 parent
3bb678258f
commit
14c107ab71
30 files changed
+87
-117
No files matched your search
@@ -101,7 +101,7 @@ public enum ExtraBeeItems implements IItemMiscProvider {
|
||||
Item woodGear = null;
|
||||
try {
|
||||
woodGear = (Item) Class.forName("buildcraft.BuildCraftCore").getField("woodenGearItem").get(null);
|
||||
} catch (Exception ex) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
ItemStack gear = new ItemStack(Blocks.PLANKS, 1);
|
||||
if (woodGear != null) {
|
||||
|
||||
@@ -522,21 +522,21 @@ public enum ExtraBeesEffect implements IAlleleBeeEffect {
|
||||
}
|
||||
|
||||
public static class Birthday {
|
||||
int day;
|
||||
int month;
|
||||
String name;
|
||||
private final int month;
|
||||
private final int date;
|
||||
private final String name;
|
||||
|
||||
public boolean isToday() {
|
||||
return Calendar.getInstance().get(5) == this.month && Calendar.getInstance().get(2) == this.day;
|
||||
return Calendar.getInstance().get(Calendar.DATE) == this.date && Calendar.getInstance().get(Calendar.MONTH) == this.month;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
private Birthday(final int day, final int month, final String name) {
|
||||
this.day = day;
|
||||
this.month = month + 1;
|
||||
private Birthday(final int month, final int date, final String name) {
|
||||
this.month = month;
|
||||
this.date = date + 1;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,11 +58,11 @@ public class ControlPunnett extends Control {
|
||||
alleles.add(allele2);
|
||||
}
|
||||
}
|
||||
String text = "";
|
||||
StringBuilder text = new StringBuilder();
|
||||
for (final IAllele allele3 : alleles) {
|
||||
text = text + allele3.getName() + ": " + 25.0f / alleles.size() + "%\n";
|
||||
text.append(allele3.getName()).append(": ").append(25.0f / alleles.size()).append("%\n");
|
||||
}
|
||||
new ControlText(this, new Area(x * ControlPunnett.boxWidth, ControlPunnett.boxHeight * y, ControlPunnett.boxWidth, ControlPunnett.boxHeight), text, TextJustification.TopCenter).setColour(11184810);
|
||||
new ControlText(this, new Area(x * ControlPunnett.boxWidth, ControlPunnett.boxHeight * y, ControlPunnett.boxWidth, ControlPunnett.boxHeight), text.toString(), TextJustification.TopCenter).setColour(11184810);
|
||||
++y;
|
||||
}
|
||||
++x;
|
||||
|
||||
Reference in new issue
Block a user