Refractored Code

+added Solar Factory
-removed unnessecary solar and essentia generator classes
+started gtnh researches
+added tooltip clearance on solars (maximal output)

Signed-off-by: bartimaeusnek <[email protected]>
This commit is contained in:
bartimaeusnek committed 2019-03-18 18:39:23 +01:00
1 parent 980df8516a
commit 0fecf28b65
397 files changed
+8693 -9288

No files matched your search

+59 -60
View File
@@ -17,6 +17,65 @@ import java.util.List;
public class CommandOutputs extends CommandBase {
public static ItemStack mkbook() {
String text = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + ": \n";
String text2 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t: \n";
String text3 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t singleblock: \n";
final String title = EMTTextHelper.localize("gui.EMT.book.aspect.output.eu.title");
final ArrayList<String> singleblock = new ArrayList<String>();
final ArrayList<String> bookL = new ArrayList<String>();
final ArrayList<String> bookL2 = new ArrayList<String>();
byte counter = 0;
for (final Aspect aspect : Aspect.aspects.values()) {
++counter;
if (aspect.equals(Aspect.ENERGY) || aspect.equals(Aspect.TREE) || aspect.equals(Aspect.FIRE) || aspect.equals(Aspect.AURA) || aspect.equals(Aspect.GREED) || aspect.equals(Aspect.AIR))
text3 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D / 20D) + "EU\n";
if (counter < 12) {
text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D) + "EU/t\n";
text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n";
} else {
text2 += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag()) / 20D) + "EU\n";
text += aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n";
bookL.add(text);
bookL2.add(text2);
text2 = "";
text = "";
counter = 0;
}
}
singleblock.add(text3);
if (counter != 0) {
bookL.add(text);
bookL2.add(text2);
}
final ItemStack book = new ItemStack(Items.written_book);
book.setTagInfo("author", new NBTTagString("Tombenpotter, bartimaeusnek"));
book.setTagInfo("title", new NBTTagString(title));
final NBTTagCompound nbttagcompound = book.getTagCompound();
final NBTTagList bookPages = new NBTTagList();
for (int i = 0; i < singleblock.size(); i++) {
bookPages.appendTag(new NBTTagString(singleblock.get(i)));
}
for (int i = 0; i < bookL.size(); i++) {
bookPages.appendTag(new NBTTagString(bookL.get(i)));
}
for (int i = 0; i < bookL2.size(); i++) {
bookPages.appendTag(new NBTTagString(bookL2.get(i)));
}
nbttagcompound.setTag("pages", bookPages);
return book;
}
@Override
public String getCommandName() {
return "emt_outputs";
@@ -54,64 +113,4 @@ public class CommandOutputs extends CommandBase {
command.getEntityWorld().getPlayerEntityByName(command.getCommandSenderName()).entityDropItem(book, 0);
}
public static ItemStack mkbook(){
String text = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + ": \n";
String text2 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t: \n";
String text3 = EMTTextHelper.localize("gui.EMT.book.aspect.output.essentia.eu") + " /t singleblock: \n";
final String title = EMTTextHelper.localize("gui.EMT.book.aspect.output.eu.title");
final ArrayList<String> singleblock = new ArrayList<String>();
final ArrayList<String> bookL = new ArrayList<String>();
final ArrayList<String> bookL2 = new ArrayList<String>();
byte counter = 0;
for (final Aspect aspect : Aspect.aspects.values()) {
++counter;
if (aspect.equals(Aspect.ENERGY)||aspect.equals(Aspect.TREE)||aspect.equals(Aspect.FIRE)||aspect.equals(Aspect.AURA)||aspect.equals(Aspect.GREED)||aspect.equals(Aspect.AIR))
text3 = text3 + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())/20D/20D) + "EU\n";
if (counter < 12){
text2 = text2 + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())/20D) + "EU/t\n";
text = text + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n";
}
else {
text2 = text2+ aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())/20D) + "EU\n";
text = text + aspect.getTag() + ": " + String.valueOf(EMTEssentiasOutputs.outputs.get(aspect.getTag())) + "EU\n";
bookL.add(text);
bookL2.add(text2);
text2 = new String("");
text = new String("");
counter = 0;
}
}
singleblock.add(text3);
if (counter != 0){
bookL.add(text);
bookL2.add(text2);
}
final ItemStack book = new ItemStack(Items.written_book);
book.setTagInfo("author", new NBTTagString("Tombenpotter, bartimaeusnek"));
book.setTagInfo("title", new NBTTagString(title));
final NBTTagCompound nbttagcompound = book.getTagCompound();
final NBTTagList bookPages = new NBTTagList();
for (int i = 0; i < singleblock.size(); i++) {
bookPages.appendTag(new NBTTagString(singleblock.get(i)));
}
for (int i = 0; i < bookL.size(); i++) {
bookPages.appendTag(new NBTTagString(bookL.get(i)));
}
for (int i = 0; i < bookL2.size(); i++) {
bookPages.appendTag(new NBTTagString(bookL2.get(i)));
}
nbttagcompound.setTag("pages", bookPages);
return book;
}
}