mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 03:59:45 +00:00
Close #477 Auto-Format code with new formatting settings
This commit is contained in:
1 parent
8e92d16320
commit
5b8b0c78b0
763 files changed
+13174
-8868
No files matched your search
@@ -4,25 +4,28 @@
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.GameMode;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.RecipeUtil;
|
||||
import java.util.ArrayList;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Plugin(pluginID = "Natura", name = "Natura", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.natura.description")
|
||||
public class PluginNatura extends ForestryPlugin {
|
||||
@@ -58,10 +61,12 @@ public class PluginNatura extends ForestryPlugin {
|
||||
|
||||
ArrayList<String> saplingItemKeys = new ArrayList<String>();
|
||||
|
||||
if (saplingNatura != null)
|
||||
if (saplingNatura != null) {
|
||||
saplingItemKeys.add("florasapling");
|
||||
if (saplingNaturaRare != null)
|
||||
}
|
||||
if (saplingNaturaRare != null) {
|
||||
saplingItemKeys.add("Rare Sapling");
|
||||
}
|
||||
|
||||
for (String key : saplingItemKeys) {
|
||||
Item saplingItem = GameRegistry.findItem(NATURA, key);
|
||||
@@ -80,14 +85,17 @@ public class PluginNatura extends ForestryPlugin {
|
||||
ItemStack seedCotton = GameRegistry.findItemStack(NATURA, "seedCotton", 1);
|
||||
|
||||
ArrayList<ItemStack> seedList = new ArrayList<ItemStack>();
|
||||
if (seedBarley != null)
|
||||
if (seedBarley != null) {
|
||||
seedList.add(seedBarley);
|
||||
if (seedCotton != null)
|
||||
}
|
||||
if (seedCotton != null) {
|
||||
seedList.add(seedCotton);
|
||||
}
|
||||
|
||||
int amount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.seed");
|
||||
for (ItemStack aSeedList : seedList)
|
||||
for (ItemStack aSeedList : seedList) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{aSeedList}, Fluids.SEEDOIL.getFluid(amount));
|
||||
}
|
||||
|
||||
ItemStack berryBlight = GameRegistry.findItemStack(NATURA, "berryBlight", 1);
|
||||
ItemStack berryDusk = GameRegistry.findItemStack(NATURA, "berryDusk", 1);
|
||||
@@ -99,31 +107,41 @@ public class PluginNatura extends ForestryPlugin {
|
||||
ItemStack berryMalo = GameRegistry.findItemStack(NATURA, "berryMalo", 1);
|
||||
|
||||
ArrayList<ItemStack> berries = new ArrayList<ItemStack>();
|
||||
if (berryBlight != null)
|
||||
if (berryBlight != null) {
|
||||
berries.add(berryBlight);
|
||||
if (berryDusk != null)
|
||||
}
|
||||
if (berryDusk != null) {
|
||||
berries.add(berryDusk);
|
||||
if (berrySky != null)
|
||||
}
|
||||
if (berrySky != null) {
|
||||
berries.add(berrySky);
|
||||
if (berrySting != null)
|
||||
}
|
||||
if (berrySting != null) {
|
||||
berries.add(berrySting);
|
||||
if (berryRasp != null)
|
||||
}
|
||||
if (berryRasp != null) {
|
||||
berries.add(berryRasp);
|
||||
if (berryBlue != null)
|
||||
}
|
||||
if (berryBlue != null) {
|
||||
berries.add(berryBlue);
|
||||
if (berryBlack != null)
|
||||
}
|
||||
if (berryBlack != null) {
|
||||
berries.add(berryBlack);
|
||||
if (berryMalo != null)
|
||||
}
|
||||
if (berryMalo != null) {
|
||||
berries.add(berryMalo);
|
||||
}
|
||||
|
||||
amount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.apple") / 25;
|
||||
amount = (amount > 1) ? amount : 1; // Produce at least 1 mb of juice.
|
||||
for (ItemStack berry : berries)
|
||||
for (ItemStack berry : berries) {
|
||||
RecipeManagers.squeezerManager.addRecipe(3, new ItemStack[]{berry}, Fluids.JUICE.getFluid(amount));
|
||||
}
|
||||
|
||||
ItemStack itemBarley = GameRegistry.findItemStack(NATURA, "barleyFood", 1);
|
||||
if (itemBarley != null)
|
||||
if (itemBarley != null) {
|
||||
RecipeUtil.injectLeveledRecipe(itemBarley, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user