mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-25 22:44:38 +00:00
Use diamond operator everywhere
This commit is contained in:
1 parent
9812ddc4ce
commit
55c58cf5d9
140 files changed
+305
-305
No files matched your search
@@ -30,7 +30,7 @@ public class ControlSpeciesBox extends ControlListBox<IAlleleSpecies> {
|
||||
public void setBranch(final IClassification branch) {
|
||||
if (branch != this.branch) {
|
||||
this.branch = branch;
|
||||
final List<IAlleleSpecies> speciesList2 = new ArrayList<IAlleleSpecies>();
|
||||
final List<IAlleleSpecies> speciesList2 = new ArrayList<>();
|
||||
this.movePercentage(-100.0f);
|
||||
this.setOptions(speciesList2);
|
||||
final EntityPlayer player = Window.get(this).getPlayer();
|
||||
|
||||
@@ -17,7 +17,7 @@ public class PageBranchOverview extends PageBranch {
|
||||
|
||||
public PageBranchOverview(final IWidget parent, final DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
this.pageBranchOverview_branchDescription = new ArrayList<ControlText>();
|
||||
this.pageBranchOverview_branchDescription = new ArrayList<>();
|
||||
this.pageBranchOverview_branchName = new ControlTextCentered(this, 8.0f, "");
|
||||
this.pageBranchOverview_branchScientific = new ControlTextCentered(this, 32.0f, "");
|
||||
this.pageBranchOverview_branchAuthority = new ControlTextCentered(this, 44.0f, "");
|
||||
@@ -37,7 +37,7 @@ public class PageBranchOverview extends PageBranch {
|
||||
desc = "No Description Provided.";
|
||||
}
|
||||
String line = "";
|
||||
final List<String> descLines = new ArrayList<String>();
|
||||
final List<String> descLines = new ArrayList<>();
|
||||
for (final String str : desc.split(" ")) {
|
||||
if (CraftGUI.Render.textWidth(line + " " + str) > 134) {
|
||||
descLines.add("§o" + line + "§r");
|
||||
|
||||
@@ -15,7 +15,7 @@ public class PageSpeciesClassification extends PageSpecies {
|
||||
|
||||
public PageSpeciesClassification(final IWidget parent, final DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
this.levels = new LinkedHashMap<IClassification.EnumClassLevel, ControlText>();
|
||||
this.levels = new LinkedHashMap<>();
|
||||
int y = 16;
|
||||
for (final IClassification.EnumClassLevel level : IClassification.EnumClassLevel.values()) {
|
||||
final ControlText text = new ControlTextCentered(this, y, "");
|
||||
|
||||
@@ -55,7 +55,7 @@ public abstract class WindowAbstractDatabase extends Window {
|
||||
public WindowAbstractDatabase(final EntityPlayer player, final Side side, final boolean nei, final BreedingSystem system, final float wid) {
|
||||
super(100.0f, 192.0f, player, null, side);
|
||||
this.selectionBoxWidth = 95.0f;
|
||||
this.modes = new HashMap<IDatabaseMode, ModeWidgets>();
|
||||
this.modes = new HashMap<>();
|
||||
this.panelInformation = null;
|
||||
this.panelSearch = null;
|
||||
this.modePages = null;
|
||||
@@ -129,7 +129,7 @@ public abstract class WindowAbstractDatabase extends Window {
|
||||
new ControlHelp(this, 4.0f, 4.0f);
|
||||
(this.panelInformation = new Panel(this, 24.0f, 24.0f, 144.0f, 176.0f, MinecraftGUI.PanelType.Black)).setColour(860416);
|
||||
(this.panelSearch = new Panel(this, 176.0f, 24.0f, this.selectionBoxWidth, 160.0f, MinecraftGUI.PanelType.Black)).setColour(860416);
|
||||
this.modePages = new ControlPages<IDatabaseMode>(this, 0.0f, 0.0f, this.getSize().x(), this.getSize().y());
|
||||
this.modePages = new ControlPages<>(this, 0.0f, 0.0f, this.getSize().x(), this.getSize().y());
|
||||
new ControlTextEdit(this, 176.0f, 184.0f, this.selectionBoxWidth, 16.0f);
|
||||
this.createMode(Mode.Species, new ModeWidgets(Mode.Species, this) {
|
||||
@Override
|
||||
@@ -228,12 +228,12 @@ public abstract class WindowAbstractDatabase extends Window {
|
||||
|
||||
public ModeWidgets(final IDatabaseMode mode, final WindowAbstractDatabase database) {
|
||||
this.database = database;
|
||||
this.modePage = new ControlPage<IDatabaseMode>(database.modePages, 0.0f, 0.0f, database.getSize().x(), database.getSize().y(), mode);
|
||||
this.modePage = new ControlPage<>(database.modePages, 0.0f, 0.0f, database.getSize().x(), database.getSize().y(), mode);
|
||||
final IArea listBoxArea = database.panelSearch.area().inset(2);
|
||||
this.createListBox(listBoxArea);
|
||||
CraftGUIUtil.alignToWidget(this.listBox, database.panelSearch);
|
||||
CraftGUIUtil.moveWidget(this.listBox, new IPoint(2.0f, 2.0f));
|
||||
CraftGUIUtil.alignToWidget(this.infoPages = new ControlPages<DatabaseTab>(this.modePage, 0.0f, 0.0f, 144.0f, 176.0f), database.panelInformation);
|
||||
CraftGUIUtil.alignToWidget(this.infoPages = new ControlPages<>(this.modePage, 0.0f, 0.0f, 144.0f, 176.0f), database.panelInformation);
|
||||
}
|
||||
|
||||
public abstract void createListBox(final IArea p0);
|
||||
|
||||
Reference in new issue
Block a user