mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 06:14:46 +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.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
import forestry.core.interfaces.IOreDictionaryHandler;
|
||||
import forestry.core.interfaces.IPacketHandler;
|
||||
import forestry.core.interfaces.IPickupHandler;
|
||||
import forestry.core.interfaces.IResupplyHandler;
|
||||
import forestry.core.interfaces.ISaveEventHandler;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
public abstract class ForestryPlugin {
|
||||
|
||||
@@ -107,8 +110,9 @@ public abstract class ForestryPlugin {
|
||||
@Override
|
||||
public String toString() {
|
||||
Plugin info = getClass().getAnnotation(Plugin.class);
|
||||
if (info == null)
|
||||
if (info == null) {
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
return info.name() + " Plugin";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
@@ -10,7 +10,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* Optional annotation to provide additional information on IPlugins. This information will be available via the "/forestry plugin info $pluginID" command ingame.
|
||||
*
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -28,11 +28,13 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
@@ -43,6 +45,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.apiculture.FlowerManager;
|
||||
@@ -61,12 +64,12 @@ import forestry.api.genetics.IClassification.EnumClassLevel;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.api.storage.ICrateRegistry;
|
||||
import forestry.api.storage.StorageManager;
|
||||
import forestry.apiculture.flowers.FlowerProvider;
|
||||
import forestry.apiculture.GuiHandlerApiculture;
|
||||
import forestry.apiculture.PacketHandlerApiculture;
|
||||
import forestry.apiculture.SaveEventHandlerApiculture;
|
||||
import forestry.apiculture.VillageHandlerApiculture;
|
||||
import forestry.apiculture.commands.CommandBee;
|
||||
import forestry.apiculture.flowers.FlowerProvider;
|
||||
import forestry.apiculture.flowers.FlowerRegistry;
|
||||
import forestry.apiculture.gadgets.BlockAlveary;
|
||||
import forestry.apiculture.gadgets.BlockBeehives;
|
||||
@@ -382,14 +385,14 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
OreDictionary.registerOre("dropHoney", ForestryItem.honeyDrop.getItemStack());
|
||||
|
||||
ForestryItem.pollenCluster.registerItem(new ItemOverlay(Tabs.tabApiculture,
|
||||
new OverlayInfo("normal", 0xa28a25, 0xa28a25),
|
||||
new OverlayInfo("crystalline", 0xffffff, 0xc5feff)),
|
||||
new OverlayInfo("normal", 0xa28a25, 0xa28a25),
|
||||
new OverlayInfo("crystalline", 0xffffff, 0xc5feff)),
|
||||
"pollen");
|
||||
OreDictionary.registerOre("itemPollen", ForestryItem.pollenCluster.getItemStack());
|
||||
|
||||
ForestryItem.propolis.registerItem(new ItemOverlay(Tabs.tabApiculture,
|
||||
new OverlayInfo("normal", 0xc5b24e), new OverlayInfo("sticky", 0xc68e57), new OverlayInfo("pulsating", 0x2ccdb1).setIsSecret(),
|
||||
new OverlayInfo("silky", 0xddff00)),
|
||||
new OverlayInfo("normal", 0xc5b24e), new OverlayInfo("sticky", 0xc68e57), new OverlayInfo("pulsating", 0x2ccdb1).setIsSecret(),
|
||||
new OverlayInfo("silky", 0xddff00)),
|
||||
"propolis");
|
||||
|
||||
ForestryItem.honeydew.registerItem(new ItemForestry().setCreativeTab(Tabs.tabApiculture), "honeydew");
|
||||
@@ -486,22 +489,25 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
'S', Items.string);
|
||||
|
||||
// FOOD STUFF
|
||||
if (ForestryItem.honeyedSlice.item() != null)
|
||||
if (ForestryItem.honeyedSlice.item() != null) {
|
||||
Proxies.common.addRecipe(ForestryItem.honeyedSlice.getItemStack(4),
|
||||
"###", "#X#", "###",
|
||||
'#', ForestryItem.honeyDrop,
|
||||
'X', Items.bread);
|
||||
if (ForestryItem.honeyPot.item() != null)
|
||||
}
|
||||
if (ForestryItem.honeyPot.item() != null) {
|
||||
Proxies.common.addRecipe(ForestryItem.honeyPot.getItemStack(1),
|
||||
"# #", " X ", "# #",
|
||||
'#', ForestryItem.honeyDrop,
|
||||
'X', ForestryItem.waxCapsule);
|
||||
if (ForestryItem.ambrosia.item() != null)
|
||||
}
|
||||
if (ForestryItem.ambrosia.item() != null) {
|
||||
Proxies.common.addRecipe(ForestryItem.ambrosia.getItemStack(),
|
||||
"#Y#", "XXX", "###",
|
||||
'#', ForestryItem.honeydew,
|
||||
'X', ForestryItem.royalJelly,
|
||||
'Y', ForestryItem.waxCapsule);
|
||||
}
|
||||
|
||||
// / CAPSULES
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.capsule"), "###", '#', ForestryItem.beeswax);
|
||||
@@ -712,10 +718,11 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
|
||||
private void registerDungeonLoot() {
|
||||
int rarity;
|
||||
if (Config.dungeonLootRare)
|
||||
if (Config.dungeonLootRare) {
|
||||
rarity = 5;
|
||||
else
|
||||
} else {
|
||||
rarity = 10;
|
||||
}
|
||||
|
||||
ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(getBeeItemFromTemplate(BeeTemplates.getSteadfastTemplate(), EnumBeeType.DRONE), 1, 1, rarity));
|
||||
|
||||
@@ -740,13 +747,13 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
IBee bee = new Bee(PluginApiculture.beeInterface.templateAsGenome(template));
|
||||
ItemStack beeItem;
|
||||
switch (beeType) {
|
||||
default:
|
||||
case DRONE:
|
||||
beeItem = ForestryItem.beeDroneGE.getItemStack();
|
||||
break;
|
||||
case PRINCESS:
|
||||
beeItem = ForestryItem.beePrincessGE.getItemStack();
|
||||
break;
|
||||
default:
|
||||
case DRONE:
|
||||
beeItem = ForestryItem.beeDroneGE.getItemStack();
|
||||
break;
|
||||
case PRINCESS:
|
||||
beeItem = ForestryItem.beePrincessGE.getItemStack();
|
||||
break;
|
||||
}
|
||||
NBTTagCompound nbtTagCompound = new NBTTagCompound();
|
||||
bee.writeToNBT(nbtTagCompound);
|
||||
@@ -981,7 +988,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
Allele.speciesMiry = new AlleleBeeSpecies("speciesMiry", true, "bees.species.miry", boggy, "humidium", 0x92AF42, 0xffdc16).addProduct(
|
||||
ForestryItem.beeComb.getItemStack(1, 15), 36).setHumidity(EnumHumidity.DAMP).setIsSecret();
|
||||
Allele.speciesBoggy = new AlleleBeeSpecies("speciesBoggy", true, "bees.species.boggy", boggy, "paluster", 0x698948, 0xffdc16).addProduct(
|
||||
ForestryItem.beeComb.getItemStack(1, 15), 39).addSpecialty(ForestryItem.peat.getItemStack(1), 8).setHumidity(EnumHumidity.DAMP).setIsSecret();
|
||||
ForestryItem.beeComb.getItemStack(1, 15), 39).addSpecialty(ForestryItem.peat.getItemStack(1), 8).setHumidity(EnumHumidity.DAMP).setIsSecret();
|
||||
|
||||
// Monastic branch
|
||||
Allele.speciesMonastic = new AlleleBeeSpecies("speciesMonastic", false, "bees.species.monastic", monastic, "monachus", 0x42371c, 0xfff7b6)
|
||||
@@ -1191,8 +1198,9 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
String[] parts = list.split("[;]+");
|
||||
|
||||
for (String part : parts) {
|
||||
if (part.isEmpty())
|
||||
if (part.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String[] ident = part.split("[:]+");
|
||||
|
||||
@@ -1225,8 +1233,9 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
String[] items = list.split("[;]+");
|
||||
|
||||
for (String item : items) {
|
||||
if (item.isEmpty())
|
||||
if (item.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
FMLCommonHandler.instance().getFMLLogger().debug("Blacklisting bee species identified by " + item);
|
||||
AlleleManager.alleleRegistry.blacklistAllele(item);
|
||||
@@ -1245,42 +1254,47 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
public void populateChunk(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated) {
|
||||
if (Config.generateBeehives)
|
||||
if (Config.generateBeehives) {
|
||||
HiveDecorator.instance().decorateHives(chunkProvider, world, rand, chunkX, chunkZ, hasVillageGenerated);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void populateChunkRetroGen(World world, Random rand, int chunkX, int chunkZ) {
|
||||
if (Config.generateBeehives)
|
||||
if (Config.generateBeehives) {
|
||||
HiveDecorator.instance().decorateHives(world, rand, chunkX, chunkZ);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processIMCMessage(IMCMessage message) {
|
||||
if (message.key.equals("add-candle-lighting-id")) {
|
||||
ItemStack value = message.getItemStackValue();
|
||||
if (value != null)
|
||||
if (value != null) {
|
||||
((BlockCandle) ForestryBlock.candle.block()).addItemToLightingList(value.getItem());
|
||||
else
|
||||
} else {
|
||||
Logger.getLogger("Forestry").log(Level.WARNING,
|
||||
"Received an invalid 'add-candle-lighting-id' request from mod %s. Please contact the author and report this issue.",
|
||||
message.getSender());
|
||||
}
|
||||
return true;
|
||||
} else if (message.key.equals("add-alveary-slab") && message.isStringMessage())
|
||||
} else if (message.key.equals("add-alveary-slab") && message.isStringMessage()) {
|
||||
try {
|
||||
Block block = GameData.getBlockRegistry().getRaw(message.getStringValue());
|
||||
|
||||
if (block == null || block == Blocks.air)
|
||||
if (block == null || block == Blocks.air) {
|
||||
Logger.getLogger("Forestry").log(Level.WARNING,
|
||||
"Received an invalid 'add-alveary-slab' request from mod %s. Please contact the author and report this issue.",
|
||||
message.getSender());
|
||||
else
|
||||
} else {
|
||||
StructureLogicAlveary.slabBlocks.add(block);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger("Forestry").log(Level.WARNING,
|
||||
"Received an invalid 'add-alveary-slab' request from mod %s. Please contact the author and report this issue.",
|
||||
message.getSender());
|
||||
}
|
||||
}
|
||||
return super.processIMCMessage(message);
|
||||
}
|
||||
|
||||
@@ -1289,8 +1303,9 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
public void textureHook(TextureStitchEvent.Pre event) {
|
||||
if (event.map.getTextureType() == 1) {
|
||||
EntitySnowFX.icons = new IIcon[3];
|
||||
for (int i = 0; i < EntitySnowFX.icons.length; i++)
|
||||
for (int i = 0; i < EntitySnowFX.icons.length; i++) {
|
||||
EntitySnowFX.icons[i] = event.map.registerIcon("forestry:particles/snow." + (i + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -364,21 +364,26 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
@Override
|
||||
protected void registerBackpackItems() {
|
||||
|
||||
for (ForestryBlock block : logs)
|
||||
for (ForestryBlock block : logs) {
|
||||
BackpackManager.definitions.get("forester").addValidItem(block.getWildcard());
|
||||
}
|
||||
|
||||
for (ForestryBlock block : fireproofLogs)
|
||||
for (ForestryBlock block : fireproofLogs) {
|
||||
BackpackManager.definitions.get("forester").addValidItem(block.getWildcard());
|
||||
}
|
||||
|
||||
BackpackManager.definitions.get("forester").addValidItem(ForestryItem.sapling.getWildcard());
|
||||
BackpackManager.definitions.get("forester").addValidItem(ForestryItem.fruits.getWildcard());
|
||||
|
||||
for (ForestryBlock block : slabs)
|
||||
for (ForestryBlock block : slabs) {
|
||||
BackpackManager.definitions.get("builder").addValidItem(block.getWildcard());
|
||||
for (ForestryBlock block : fences)
|
||||
}
|
||||
for (ForestryBlock block : fences) {
|
||||
BackpackManager.definitions.get("builder").addValidItem(block.getWildcard());
|
||||
for (ForestryBlock block : planks)
|
||||
}
|
||||
for (ForestryBlock block : planks) {
|
||||
BackpackManager.definitions.get("builder").addValidItem(block.getWildcard());
|
||||
}
|
||||
|
||||
BackpackManager.definitions.get("builder").addValidItem(ForestryBlock.stairs.getWildcard());
|
||||
}
|
||||
@@ -390,26 +395,35 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
@Override
|
||||
protected void registerRecipes() {
|
||||
|
||||
for (ForestryBlock log : logs)
|
||||
for (ForestryBlock log : logs) {
|
||||
Proxies.common.addSmelting(log.getWildcard(), new ItemStack(Items.coal, 1, 1), 0.15F);
|
||||
}
|
||||
|
||||
// / Plank recipes
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks1.getItemStack(4, i), ForestryBlock.log1.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks1.getItemStack(4, 4 + i), ForestryBlock.log2.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks1.getItemStack(4, 8 + i), ForestryBlock.log3.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks1.getItemStack(4, 12 + i), ForestryBlock.log4.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks2.getItemStack(4, i), ForestryBlock.log5.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks2.getItemStack(4, 4 + i), ForestryBlock.log6.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks2.getItemStack(4, 8 + i), ForestryBlock.log7.getItemStack(1, i));
|
||||
for (int i = 0; i < 1; i++)
|
||||
}
|
||||
for (int i = 0; i < 1; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.planks2.getItemStack(4, 12 + i), ForestryBlock.log8.getItemStack(1, i));
|
||||
}
|
||||
|
||||
// Fabricator recipes
|
||||
if (PluginManager.Module.FACTORY.isEnabled() && PluginManager.Module.APICULTURE.isEnabled()) {
|
||||
@@ -420,8 +434,9 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
ForestryBlock fireproofLog = BlockFireproofLog.getFireproofLog(blockLog);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (forestryBlock == ForestryBlock.log8 && i > 0)
|
||||
if (forestryBlock == ForestryBlock.log8 && i > 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
ItemStack logStack = forestryBlock.getItemStack(1, i);
|
||||
ItemStack fireproofLogStack = fireproofLog.getItemStack(1, i);
|
||||
@@ -437,7 +452,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
// Fireproof plank recipes
|
||||
ForestryBlock plank = ForestryBlock.planks1;
|
||||
for (int i = 0; i < 16; i++) {
|
||||
ForestryBlock fireproofPlank = BlockFireproofPlanks.getFireproofPlanks((BlockPlanks)plank.block());
|
||||
ForestryBlock fireproofPlank = BlockFireproofPlanks.getFireproofPlanks((BlockPlanks) plank.block());
|
||||
ItemStack plankStack = plank.getItemStack(1, i);
|
||||
ItemStack fireproofPlankStack = fireproofPlank.getItemStack(5, i);
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), fireproofPlankStack, new Object[]{
|
||||
@@ -449,7 +464,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
}
|
||||
plank = ForestryBlock.planks2;
|
||||
for (int i = 0; i < 12; i++) {
|
||||
ForestryBlock fireproofPlank = BlockFireproofPlanks.getFireproofPlanks((BlockPlanks)plank.block());
|
||||
ForestryBlock fireproofPlank = BlockFireproofPlanks.getFireproofPlanks((BlockPlanks) plank.block());
|
||||
ItemStack plankStack = plank.getItemStack(1, i);
|
||||
ItemStack fireproofPlankStack = fireproofPlank.getItemStack(5, i);
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), fireproofPlankStack, new Object[]{
|
||||
@@ -462,47 +477,57 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
}
|
||||
|
||||
// / Fireproof Plank recipes
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks1.getItemStack(4, i), ForestryBlock.fireproofLog1.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks1.getItemStack(4, 4 + i), ForestryBlock.fireproofLog2.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks1.getItemStack(4, 8 + i), ForestryBlock.fireproofLog3.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks1.getItemStack(4, 12 + i), ForestryBlock.fireproofLog4.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks2.getItemStack(4, i), ForestryBlock.fireproofLog5.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks2.getItemStack(4, 4 + i), ForestryBlock.fireproofLog6.getItemStack(1, i));
|
||||
for (int i = 0; i < 4; i++)
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks2.getItemStack(4, 8 + i), ForestryBlock.fireproofLog7.getItemStack(1, i));
|
||||
for (int i = 0; i < 1; i++)
|
||||
}
|
||||
for (int i = 0; i < 1; i++) {
|
||||
Proxies.common.addShapelessRecipe(ForestryBlock.fireproofPlanks2.getItemStack(4, 12 + i), ForestryBlock.fireproofLog8.getItemStack(1, i));
|
||||
}
|
||||
|
||||
// Slab recipes
|
||||
for (WoodType woodType : WoodType.values()) {
|
||||
int i = woodType.ordinal();
|
||||
if (i < 8)
|
||||
if (i < 8) {
|
||||
Proxies.common.addPriorityRecipe(ForestryBlock.slabs1.getItemStack(6, i % 8), "###", '#', ForestryBlock.planks1.getItemStack(1, i % 16));
|
||||
else if (i < 16)
|
||||
} else if (i < 16) {
|
||||
Proxies.common.addPriorityRecipe(ForestryBlock.slabs2.getItemStack(6, i % 8), "###", '#', ForestryBlock.planks1.getItemStack(1, i % 16));
|
||||
else if (i < 24)
|
||||
} else if (i < 24) {
|
||||
Proxies.common.addPriorityRecipe(ForestryBlock.slabs3.getItemStack(6, i % 8), "###", '#', ForestryBlock.planks2.getItemStack(1, i % 16));
|
||||
else if (i < 32)
|
||||
} else if (i < 32) {
|
||||
Proxies.common.addPriorityRecipe(ForestryBlock.slabs4.getItemStack(6, i % 8), "###", '#', ForestryBlock.planks2.getItemStack(1, i % 16));
|
||||
else
|
||||
} else {
|
||||
throw new RuntimeException("Wood type has no slabs defined");
|
||||
}
|
||||
}
|
||||
|
||||
// Fence recipes
|
||||
for (WoodType woodType : WoodType.values()) {
|
||||
int i = woodType.ordinal();
|
||||
if (i < 16)
|
||||
if (i < 16) {
|
||||
Proxies.common.addRecipe(ForestryBlock.fences1.getItemStack(4, i % 16), "###", "# #", '#', ForestryBlock.planks1.getItemStack(1, i % 16));
|
||||
else if (i < 32)
|
||||
} else if (i < 32) {
|
||||
Proxies.common.addRecipe(ForestryBlock.fences2.getItemStack(4, i % 16), "###", "# #", '#', ForestryBlock.planks2.getItemStack(1, i % 16));
|
||||
else
|
||||
} else {
|
||||
throw new RuntimeException("Wood type has no fences defined");
|
||||
}
|
||||
}
|
||||
|
||||
if (PluginManager.Module.FACTORY.isEnabled()) {
|
||||
@@ -532,12 +557,13 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
for (WoodType woodType : WoodType.values()) {
|
||||
ForestryBlock planks;
|
||||
int i = woodType.ordinal();
|
||||
if (i < 16)
|
||||
if (i < 16) {
|
||||
planks = ForestryBlock.planks1;
|
||||
else if (i < 32)
|
||||
} else if (i < 32) {
|
||||
planks = ForestryBlock.planks2;
|
||||
else
|
||||
} else {
|
||||
throw new RuntimeException("Wood type has no planks defined");
|
||||
}
|
||||
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
woodType.saveToCompound(compound);
|
||||
@@ -782,50 +808,50 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
IFruitFamily nux = new FruitFamily("nuts", "Nux");
|
||||
|
||||
/* Logs */
|
||||
final ItemStack oakLog = new ItemStack(Blocks.log, 1, 0);
|
||||
final ItemStack oakLog = new ItemStack(Blocks.log, 1, 0);
|
||||
final ItemStack spruceLog = new ItemStack(Blocks.log, 1, 1);
|
||||
final ItemStack birchLog = new ItemStack(Blocks.log, 1, 2);
|
||||
final ItemStack birchLog = new ItemStack(Blocks.log, 1, 2);
|
||||
final ItemStack jungleLog = new ItemStack(Blocks.log, 1, 3);
|
||||
|
||||
final ItemStack acaciaLog = new ItemStack(Blocks.log2, 1, 0);
|
||||
final ItemStack acaciaLog = new ItemStack(Blocks.log2, 1, 0);
|
||||
final ItemStack darkOakLog = new ItemStack(Blocks.log2, 1, 1);
|
||||
|
||||
final ItemStack larchLog = ForestryBlock.log1.getItemStack(1, 0);
|
||||
final ItemStack teakLog = ForestryBlock.log1.getItemStack(1, 1);
|
||||
final ItemStack larchLog = ForestryBlock.log1.getItemStack(1, 0);
|
||||
final ItemStack teakLog = ForestryBlock.log1.getItemStack(1, 1);
|
||||
final ItemStack desertAcaciaLog = ForestryBlock.log1.getItemStack(1, 2);
|
||||
final ItemStack limeLog = ForestryBlock.log1.getItemStack(1, 3);
|
||||
final ItemStack limeLog = ForestryBlock.log1.getItemStack(1, 3);
|
||||
|
||||
final ItemStack chestnutLog = ForestryBlock.log2.getItemStack(1, 0);
|
||||
final ItemStack wengeLog = ForestryBlock.log2.getItemStack(1, 1);
|
||||
final ItemStack baobabLog = ForestryBlock.log2.getItemStack(1, 2);
|
||||
final ItemStack sequioaLog = ForestryBlock.log2.getItemStack(1, 3);
|
||||
final ItemStack wengeLog = ForestryBlock.log2.getItemStack(1, 1);
|
||||
final ItemStack baobabLog = ForestryBlock.log2.getItemStack(1, 2);
|
||||
final ItemStack sequioaLog = ForestryBlock.log2.getItemStack(1, 3);
|
||||
|
||||
final ItemStack kapokLog = ForestryBlock.log3.getItemStack(1, 0);
|
||||
final ItemStack ebonyLog = ForestryBlock.log3.getItemStack(1, 1);
|
||||
final ItemStack kapokLog = ForestryBlock.log3.getItemStack(1, 0);
|
||||
final ItemStack ebonyLog = ForestryBlock.log3.getItemStack(1, 1);
|
||||
final ItemStack mahoganyLog = ForestryBlock.log3.getItemStack(1, 2);
|
||||
final ItemStack balsaLog = ForestryBlock.log3.getItemStack(1, 3);
|
||||
final ItemStack balsaLog = ForestryBlock.log3.getItemStack(1, 3);
|
||||
|
||||
final ItemStack willowLog = ForestryBlock.log4.getItemStack(1, 0);
|
||||
final ItemStack walnutLog = ForestryBlock.log4.getItemStack(1, 1);
|
||||
final ItemStack sipiriLog = ForestryBlock.log4.getItemStack(1, 2);
|
||||
final ItemStack cherryLog = ForestryBlock.log4.getItemStack(1, 3);
|
||||
|
||||
final ItemStack mahoeLog = ForestryBlock.log5.getItemStack(1, 0);
|
||||
final ItemStack mahoeLog = ForestryBlock.log5.getItemStack(1, 0);
|
||||
final ItemStack poplarLog = ForestryBlock.log5.getItemStack(1, 1);
|
||||
final ItemStack dateLog = ForestryBlock.log5.getItemStack(1, 2);
|
||||
final ItemStack dateLog = ForestryBlock.log5.getItemStack(1, 2);
|
||||
final ItemStack papayaLog = ForestryBlock.log5.getItemStack(1, 3);
|
||||
|
||||
final ItemStack pineLog = ForestryBlock.log6.getItemStack(1, 0);
|
||||
final ItemStack plumLog = ForestryBlock.log6.getItemStack(1, 1);
|
||||
final ItemStack pineLog = ForestryBlock.log6.getItemStack(1, 0);
|
||||
final ItemStack plumLog = ForestryBlock.log6.getItemStack(1, 1);
|
||||
final ItemStack mapleLog = ForestryBlock.log6.getItemStack(1, 2);
|
||||
final ItemStack lemonLog = ForestryBlock.log6.getItemStack(1, 3);
|
||||
|
||||
final ItemStack giganteumLog = ForestryBlock.log7.getItemStack(1, 0);
|
||||
final ItemStack ipeLog = ForestryBlock.log7.getItemStack(1, 1);
|
||||
final ItemStack padaukLog = ForestryBlock.log7.getItemStack(1, 2);
|
||||
final ItemStack cocoboloLog = ForestryBlock.log7.getItemStack(1, 3);
|
||||
final ItemStack ipeLog = ForestryBlock.log7.getItemStack(1, 1);
|
||||
final ItemStack padaukLog = ForestryBlock.log7.getItemStack(1, 2);
|
||||
final ItemStack cocoboloLog = ForestryBlock.log7.getItemStack(1, 3);
|
||||
|
||||
final ItemStack zebrawoodLog = ForestryBlock.log8.getItemStack(1, 0);
|
||||
final ItemStack zebrawoodLog = ForestryBlock.log8.getItemStack(1, 0);
|
||||
|
||||
// Deciduous
|
||||
Allele.treeOak = new AlleleTreeSpecies("treeOak", false, "appleOak", quercus, "robur",
|
||||
@@ -860,7 +886,7 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
.addFruitFamily(pomes);
|
||||
Allele.treeLemon = new AlleleTreeSpecies("treeLemon", true, "lemon", citrus, "limon",
|
||||
0x88af54, 0xa3b850, WorldGenLemon.class, lemonLog).addFruitFamily(pomes).addFruitFamily(
|
||||
prunes);
|
||||
prunes);
|
||||
Allele.treePlum = new AlleleTreeSpecies("treePlum", true, "plum", prunus, "domestica",
|
||||
0x589246, 0xa3b850, WorldGenPlum.class, plumLog).addFruitFamily(pomes)
|
||||
.addFruitFamily(prunes);
|
||||
@@ -881,10 +907,10 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
|
||||
Allele.treeSequioa = new AlleleTreeSpecies("treeSequioa", false, "coastSequoia", sequoia,
|
||||
"sempervirens", 0x418e71, 0x569896, WorldGenSequoia.class, sequioaLog).setLeafIndices(
|
||||
"conifers").setGirth(3);
|
||||
"conifers").setGirth(3);
|
||||
Allele.treeGiganteum = new AlleleTreeSpecies("treeGigant", false, "giantSequoia",
|
||||
sequoiadendron, "giganteum", 0x738434, WorldGenGiganteum.class, giganteumLog).setLeafIndices(
|
||||
"conifers").setGirth(4);
|
||||
"conifers").setGirth(4);
|
||||
|
||||
// Jungle
|
||||
Allele.treeJungle = new AlleleTreeSpecies("treeJungle", false, "jungle", tropical,
|
||||
@@ -893,8 +919,8 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
Allele.treeTeak = new AlleleTreeSpecies("treeTeak", true, "teak", tectona, "grandis",
|
||||
0xfeff8f, 0xffd98f, WorldGenTeak.class, teakLog)
|
||||
.addFruitFamily(jungle).setLeafIndices("jungle");
|
||||
Allele.treeIpe = new AlleleTreeSpecies("treeIpe", true, "ipe", tabebuia, "serratifolia",
|
||||
0xfdd207, 0xad8f04, WorldGenIpe.class, ipeLog)
|
||||
Allele.treeIpe = new AlleleTreeSpecies("treeIpe", true, "ipe", tabebuia, "serratifolia",
|
||||
0xfdd207, 0xad8f04, WorldGenIpe.class, ipeLog)
|
||||
.addFruitFamily(jungle).setLeafIndices("jungle").setGirth(2);
|
||||
Allele.treeKapok = new AlleleTreeSpecies("treeKapok", true, "kapok", ceiba, "pentandra",
|
||||
0x89987b, 0x89aa9e, WorldGenKapok.class, kapokLog).addFruitFamily(jungle)
|
||||
@@ -1149,17 +1175,17 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
|
||||
TreeTemplates.willowA = new TreeMutation(Allele.treeOak, Allele.treeBirch,
|
||||
TreeTemplates.getWillowTemplate(), 10).setTemperatureRainfall(0.7f, 1.5f, 0.9f,
|
||||
2.0f);
|
||||
2.0f);
|
||||
TreeTemplates.willowB = new TreeMutation(Allele.treeOak, Allele.treeLime,
|
||||
TreeTemplates.getWillowTemplate(), 10).setTemperatureRainfall(0.7f, 1.5f, 0.9f,
|
||||
2.0f);
|
||||
2.0f);
|
||||
TreeTemplates.willowC = new TreeMutation(Allele.treeLime, Allele.treeBirch,
|
||||
TreeTemplates.getWillowTemplate(), 10).setTemperatureRainfall(0.7f, 1.5f, 0.9f,
|
||||
2.0f);
|
||||
2.0f);
|
||||
|
||||
TreeTemplates.sipiriA = new TreeMutation(Allele.treeKapok, Allele.treeMahogany,
|
||||
TreeTemplates.getSipiriTemplate(), 10).setTemperatureRainfall(0.9f, 1.9f, 0.9f,
|
||||
2.0f);
|
||||
2.0f);
|
||||
|
||||
TreeTemplates.poplarA = new TreeMutation(Allele.treeBirch, Allele.treeWillow,
|
||||
TreeTemplates.getPoplarTemplate(), 5);
|
||||
@@ -1180,8 +1206,9 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
return new IFuelHandler() {
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (ForestryItem.sapling.isItemEqual(fuel))
|
||||
if (ForestryItem.sapling.isItemEqual(fuel)) {
|
||||
return 100;
|
||||
}
|
||||
|
||||
for (ForestryBlock slab : slabs) {
|
||||
if (slab.isItemEqual(fuel)) {
|
||||
@@ -1204,10 +1231,11 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
if (message.key.equals("add-fence-block") && message.isStringMessage()) {
|
||||
Block block = GameData.getBlockRegistry().getRaw(message.getStringValue());
|
||||
|
||||
if (block == null || block == Blocks.air)
|
||||
if (block == null || block == Blocks.air) {
|
||||
Proxies.log.warning("invalid add-fence-block IMC: can't resolve block name %s.", message.getStringValue());
|
||||
else
|
||||
} else {
|
||||
validFences.add(block);
|
||||
}
|
||||
}
|
||||
return super.processIMCMessage(message);
|
||||
}
|
||||
@@ -1234,12 +1262,12 @@ public class PluginArboriculture extends ForestryPlugin {
|
||||
ITree tree = new Tree(PluginArboriculture.treeInterface.templateAsGenome(template));
|
||||
ItemStack treeItem;
|
||||
switch (type) {
|
||||
default:
|
||||
case POLLEN:
|
||||
treeItem = ForestryItem.pollenFertile.getItemStack();
|
||||
break;
|
||||
case SAPLING:
|
||||
treeItem = ForestryItem.sapling.getItemStack();
|
||||
default:
|
||||
case POLLEN:
|
||||
treeItem = ForestryItem.pollenFertile.getItemStack();
|
||||
break;
|
||||
case SAPLING:
|
||||
treeItem = ForestryItem.sapling.getItemStack();
|
||||
}
|
||||
NBTTagCompound nbtTagCompound = new NBTTagCompound();
|
||||
tree.writeToNBT(nbtTagCompound);
|
||||
|
||||
@@ -4,18 +4,20 @@
|
||||
* 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 buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
||||
|
||||
@Plugin(pluginID = "BC6|Recipes", name = "BuildCraft 6 Recipes", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
|
||||
public class PluginBuildCraftRecipes extends ForestryPlugin {
|
||||
|
||||
|
||||
@@ -10,17 +10,22 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
import buildcraft.api.statements.IStatementContainer;
|
||||
import buildcraft.api.statements.ITriggerExternal;
|
||||
import buildcraft.api.statements.ITriggerInternal;
|
||||
import buildcraft.api.statements.ITriggerProvider;
|
||||
import buildcraft.api.statements.StatementManager;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import java.util.Collection;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Plugin(pluginID = "BC6|Statements", name = "BuildCraft 6 Statements", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
|
||||
@Optional.Interface(iface = "buildcraft.api.statements.ITriggerProvider", modid = "BuildCraftAPI|statements")
|
||||
@@ -49,8 +54,9 @@ public class PluginBuildCraftStatements extends ForestryPlugin implements ITrigg
|
||||
@Override
|
||||
public Collection<ITriggerInternal> getInternalTriggers(IStatementContainer container) {
|
||||
TileEntity tile = container.getTile();
|
||||
if (tile instanceof ITriggerProvider)
|
||||
if (tile instanceof ITriggerProvider) {
|
||||
return ((ITriggerProvider) tile).getInternalTriggers(container);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -58,8 +64,9 @@ public class PluginBuildCraftStatements extends ForestryPlugin implements ITrigg
|
||||
@Optional.Method(modid = "BuildCraftAPI|statements")
|
||||
@Override
|
||||
public Collection<ITriggerExternal> getExternalTriggers(ForgeDirection side, TileEntity tile) {
|
||||
if (tile instanceof ITriggerProvider)
|
||||
if (tile instanceof ITriggerProvider) {
|
||||
return ((ITriggerProvider) tile).getExternalTriggers(side, tile);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Plugin(pluginID = "BC6|Transport", name = "BuildCraft 6 Transport", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
|
||||
public class PluginBuildCraftTransport extends ForestryPlugin {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -324,8 +324,9 @@ public class PluginCore extends ForestryPlugin {
|
||||
Proxies.common.addSmelting(ForestryBlock.resources.getItemStack(1, 2), ForestryItem.ingotTin.getItemStack(), 0.5f);
|
||||
|
||||
/* BRONZE INGOTS */
|
||||
if (Config.isCraftingBronzeEnabled())
|
||||
if (Config.isCraftingBronzeEnabled()) {
|
||||
Proxies.common.addShapelessRecipe(ForestryItem.ingotBronze.getItemStack(4), "ingotTin", "ingotCopper", "ingotCopper", "ingotCopper");
|
||||
}
|
||||
|
||||
/* STURDY MACHINE */
|
||||
Proxies.common.addRecipe(ForestryItem.sturdyCasing.getItemStack(), "###", "# #", "###", '#', "ingotBronze");
|
||||
@@ -358,24 +359,31 @@ public class PluginCore extends ForestryPlugin {
|
||||
Proxies.common.addRecipe(ForestryItem.wrench.getItemStack(), "# #", " # ", " # ", '#', "ingotBronze");
|
||||
|
||||
// Manure and Fertilizer
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat").stackSize > 0)
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat"), " X ", "X#X", " X ", '#', Blocks.dirt, 'X', Items.wheat);
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.compost.ash").stackSize > 0)
|
||||
}
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.compost.ash").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.compost.ash"), " X ", "X#X", " X ", '#', Blocks.dirt, 'X', "dustAsh");
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.fertilizer.apatite").stackSize > 0)
|
||||
}
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.fertilizer.apatite").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.fertilizer.apatite"), " # ", " X ", " # ", '#', Blocks.sand, 'X', "gemApatite");
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.fertilizer.ash").stackSize > 0)
|
||||
}
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.fertilizer.ash").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.fertilizer.ash"), "###", "#X#", "###", '#', "dustAsh", 'X', "gemApatite");
|
||||
}
|
||||
|
||||
// Humus
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.humus.compost").stackSize > 0)
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.humus.compost").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.humus.compost"), "###", "#X#", "###", '#', Blocks.dirt, 'X', ForestryItem.fertilizerBio);
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.humus.fertilizer").stackSize > 0)
|
||||
}
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.humus.fertilizer").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.humus.fertilizer"), "###", "#X#", "###", '#', Blocks.dirt, 'X', ForestryItem.fertilizerCompound);
|
||||
}
|
||||
|
||||
// Bog earth
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.bogearth.bucket").stackSize > 0)
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.bogearth.bucket").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.bogearth.bucket"), "#Y#", "YXY", "#Y#", '#', Blocks.dirt, 'X', Items.water_bucket, 'Y', Blocks.sand);
|
||||
}
|
||||
|
||||
if (GameMode.getGameMode().getStackSetting("recipe.output.bogearth.can").stackSize > 0) {
|
||||
Proxies.common.addRecipe(GameMode.getGameMode().getStackSetting("recipe.output.bogearth.can"), "#Y#", "YXY", "#Y#", '#', Blocks.dirt, 'X', ForestryItem.canWater, 'Y', Blocks.sand);
|
||||
@@ -419,10 +427,12 @@ public class PluginCore extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.peat.item())
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.peat.item()) {
|
||||
return 2000;
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.bituminousPeat.item())
|
||||
}
|
||||
if (fuel != null && fuel.getItem() == ForestryItem.bituminousPeat.item()) {
|
||||
return 4200;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,19 @@
|
||||
* 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.lang.reflect.Field;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import forestry.apiculture.genetics.AlleleBeeSpecies;
|
||||
@@ -20,10 +27,6 @@ import forestry.apiculture.genetics.MutationEMC;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.genetics.Allele;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import java.lang.reflect.Field;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
||||
@Plugin(pluginID = "EqEx2", name = "Equivalent Exchange 2", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.ee2.description")
|
||||
public class PluginEE extends ForestryPlugin {
|
||||
|
||||
@@ -4,14 +4,19 @@
|
||||
* 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 net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
import forestry.core.GameMode;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
@@ -28,9 +33,6 @@ import forestry.energy.gadgets.EngineClockwork;
|
||||
import forestry.energy.gadgets.EngineCopper;
|
||||
import forestry.energy.gadgets.EngineDefinition;
|
||||
import forestry.energy.proxy.ProxyEnergy;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
|
||||
@Plugin(pluginID = "Energy", name = "Energy", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.energy.description")
|
||||
public class PluginEnergy extends ForestryPlugin {
|
||||
@@ -49,27 +51,27 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
|
||||
definitionEngineCopper = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECOPPER_META, "forestry.EngineCopper", EngineCopper.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_copper_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECOPPER_META),
|
||||
"###",
|
||||
" X ",
|
||||
"YVY",
|
||||
'#', "ingotCopper",
|
||||
'X', Blocks.glass,
|
||||
'Y', "gearCopper",
|
||||
'V', Blocks.piston)));
|
||||
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECOPPER_META),
|
||||
"###",
|
||||
" X ",
|
||||
"YVY",
|
||||
'#', "ingotCopper",
|
||||
'X', Blocks.glass,
|
||||
'Y', "gearCopper",
|
||||
'V', Blocks.piston)));
|
||||
definitionEngineBronze = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINEBRONZE_META, "forestry.EngineBronze", EngineBronze.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_bronze_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINEBRONZE_META),
|
||||
"###",
|
||||
" X ",
|
||||
"YVY",
|
||||
'#', "ingotBronze",
|
||||
'X', Blocks.glass,
|
||||
'Y', "gearBronze",
|
||||
'V', Blocks.piston)));
|
||||
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINEBRONZE_META),
|
||||
"###",
|
||||
" X ",
|
||||
"YVY",
|
||||
'#', "ingotBronze",
|
||||
'X', Blocks.glass,
|
||||
'Y', "gearBronze",
|
||||
'V', Blocks.piston)));
|
||||
|
||||
ShapedRecipeCustom clockworkRecipe = null;
|
||||
if (GameMode.getGameMode().getBooleanSetting("energy.engine.clockwork"))
|
||||
if (GameMode.getGameMode().getBooleanSetting("energy.engine.clockwork")) {
|
||||
clockworkRecipe = ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECLOCKWORK_META),
|
||||
"###",
|
||||
@@ -80,6 +82,7 @@ public class PluginEnergy extends ForestryPlugin {
|
||||
'Y', Items.clock,
|
||||
'Z', ForestryItem.gearCopper,
|
||||
'V', Blocks.piston);
|
||||
}
|
||||
|
||||
definitionEngineClockwork = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECLOCKWORK_META, "forestry.EngineClockwork", EngineClockwork.class,
|
||||
PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_clock_"), clockworkRecipe));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -71,13 +71,13 @@ public class PluginFactory extends ForestryPlugin {
|
||||
super.preInit();
|
||||
|
||||
RecipeManagers.craftingProviders = Arrays.asList(
|
||||
RecipeManagers.carpenterManager = new MachineCarpenter.RecipeManager(),
|
||||
RecipeManagers.centrifugeManager = new MachineCentrifuge.RecipeManager(),
|
||||
RecipeManagers.fabricatorManager = new MachineFabricator.RecipeManager(),
|
||||
RecipeManagers.fermenterManager = new MachineFermenter.RecipeManager(),
|
||||
RecipeManagers.moistenerManager = new MachineMoistener.RecipeManager(),
|
||||
RecipeManagers.squeezerManager = new MachineSqueezer.RecipeManager(),
|
||||
RecipeManagers.stillManager = new MachineStill.RecipeManager()
|
||||
RecipeManagers.carpenterManager = new MachineCarpenter.RecipeManager(),
|
||||
RecipeManagers.centrifugeManager = new MachineCentrifuge.RecipeManager(),
|
||||
RecipeManagers.fabricatorManager = new MachineFabricator.RecipeManager(),
|
||||
RecipeManagers.fermenterManager = new MachineFermenter.RecipeManager(),
|
||||
RecipeManagers.moistenerManager = new MachineMoistener.RecipeManager(),
|
||||
RecipeManagers.squeezerManager = new MachineSqueezer.RecipeManager(),
|
||||
RecipeManagers.stillManager = new MachineStill.RecipeManager()
|
||||
);
|
||||
|
||||
ForestryBlock.factoryTESR.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "factory");
|
||||
@@ -86,83 +86,83 @@ public class PluginFactory extends ForestryPlugin {
|
||||
|
||||
definitionBottler = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_BOTTLER_META, "forestry.Bottler", MachineBottler.class,
|
||||
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/bottler_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_BOTTLER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', ForestryItem.canEmpty,
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_BOTTLER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', ForestryItem.canEmpty,
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
|
||||
definitionCarpenter = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_CARPENTER_META, "forestry.Carpenter", MachineCarpenter.class,
|
||||
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/carpenter_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CARPENTER_META),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "ingotBronze",
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CARPENTER_META),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "ingotBronze",
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
|
||||
definitionCentrifuge = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_CENTRIFUGE_META, "forestry.Centrifuge", MachineCentrifuge.class,
|
||||
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/centrifuge_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CENTRIFUGE_META),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "ingotCopper",
|
||||
'Y', ForestryItem.sturdyCasing.getItemStack())));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CENTRIFUGE_META),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "ingotCopper",
|
||||
'Y', ForestryItem.sturdyCasing.getItemStack())));
|
||||
|
||||
definitionFermenter = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_FERMENTER_META, "forestry.Fermenter", MachineFermenter.class,
|
||||
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/fermenter_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_FERMENTER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "gearBronze",
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_FERMENTER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "gearBronze",
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
|
||||
definitionMoistener = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_MOISTENER_META, "forestry.Moistener", MachineMoistener.class,
|
||||
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/moistener_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_MOISTENER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "gearCopper",
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_MOISTENER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "gearCopper",
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
|
||||
definitionSqueezer = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_SQUEEZER_META, "forestry.Squeezer", MachineSqueezer.class,
|
||||
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/squeezer_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_SQUEEZER_META),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "ingotTin",
|
||||
'Y', ForestryItem.sturdyCasing.getItemStack())));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_SQUEEZER_META),
|
||||
"X#X",
|
||||
"XYX",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "ingotTin",
|
||||
'Y', ForestryItem.sturdyCasing.getItemStack())));
|
||||
|
||||
definitionStill = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_STILL_META, "forestry.Still", MachineStill.class,
|
||||
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/still_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_STILL_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', Items.redstone,
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_STILL_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', Items.redstone,
|
||||
'Y', ForestryItem.sturdyCasing)));
|
||||
|
||||
definitionRainmaker = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_RAINMAKER_META, "forestry.Rainmaker", MillRainmaker.class,
|
||||
Proxies.render.getRenderMill(Defaults.TEXTURE_PATH_BLOCKS + "/rainmaker_"), ShapedRecipeCustom.createShapedRecipe(
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_RAINMAKER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "gearTin",
|
||||
'Y', ForestryItem.hardenedCasing)));
|
||||
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_RAINMAKER_META),
|
||||
"X#X",
|
||||
"#Y#",
|
||||
"X#X",
|
||||
'#', Blocks.glass,
|
||||
'X', "gearTin",
|
||||
'Y', ForestryItem.hardenedCasing)));
|
||||
|
||||
ForestryBlock.factoryPlain.registerBlock(new BlockBase(Material.iron), ItemNBTTile.class, "factory2");
|
||||
|
||||
@@ -228,10 +228,11 @@ public class PluginFactory extends ForestryPlugin {
|
||||
public void postInit() {
|
||||
super.postInit();
|
||||
|
||||
if (Proxies.common.isModLoaded("craftguide"))
|
||||
if (Proxies.common.isModLoaded("craftguide")) {
|
||||
CraftGuideIntegration.register();
|
||||
else
|
||||
} else {
|
||||
Proxies.log.info("Skipping CraftGuide integration.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -248,36 +249,37 @@ public class PluginFactory extends ForestryPlugin {
|
||||
// / FABRICATOR
|
||||
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 0), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotCopper"});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotCopper"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 1), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotTin"});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotTin"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 2), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotBronze"});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', "ingotBronze"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 3), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.iron_ingot});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.iron_ingot});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 4), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.gold_ingot});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.gold_ingot});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 5), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.diamond});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.diamond});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 6), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Blocks.obsidian});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Blocks.obsidian});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 7), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.blaze_powder});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.blaze_powder});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 9), new Object[]{
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.emerald});
|
||||
" X ", "#X#", "XXX", '#', Items.redstone, 'X', Items.emerald});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 10),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', Items.redstone, 'X', "gemApatite"});
|
||||
RecipeManagers.fabricatorManager.addRecipe(null, Fluids.GLASS.getFluid(500), ForestryItem.tubes.getItemStack(4, 11),
|
||||
new Object[]{" X ", "#X#", "XXX", '#', Items.redstone, 'X', new ItemStack(Items.dye, 1, 4)});
|
||||
|
||||
String[] dyes = {"dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime",
|
||||
"dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite"};
|
||||
"dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite"};
|
||||
|
||||
if (PluginManager.Module.APICULTURE.isEnabled()) {
|
||||
FluidStack liquidGlass = Fluids.GLASS.getFluid(Defaults.BUCKET_VOLUME);
|
||||
for (int i = 0; i < 16; i++)
|
||||
for (int i = 0; i < 16; i++) {
|
||||
RecipeManagers.fabricatorManager.addRecipe(ForestryItem.waxCast.getItemStack(1, Defaults.WILDCARD), liquidGlass, ForestryBlock.glass.getItemStack(1, 15 - i), new Object[]{"#", "X", '#', dyes[i],
|
||||
'X', ForestryItem.propolis.getItemStack(1, Defaults.WILDCARD)});
|
||||
}
|
||||
}
|
||||
|
||||
// / SQUEEZER
|
||||
@@ -308,8 +310,9 @@ public class PluginFactory extends ForestryPlugin {
|
||||
RecipeManagers.moistenerManager.addRecipe(new ItemStack(Blocks.stonebrick), new ItemStack(Blocks.stonebrick, 1, 1), 20000);
|
||||
|
||||
// FERMENTER
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i < 4; i++) {
|
||||
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.sapling, 1, i), GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
|
||||
}
|
||||
|
||||
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.cactus), GameMode.getGameMode().getIntegerSetting("fermenter.yield.cactus"), Fluids.BIOMASS);
|
||||
RecipeUtil.injectLeveledRecipe(new ItemStack(Items.wheat), GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
@@ -422,11 +425,11 @@ public class PluginFactory extends ForestryPlugin {
|
||||
|
||||
// Assembly Kits
|
||||
RecipeManagers.carpenterManager.addRecipe(20, null, ForestryItem.carton.getItemStack(), ForestryItem.kitPickaxe.getItemStack(), new Object[]{
|
||||
"###",
|
||||
" X ",
|
||||
" X ",
|
||||
'#', "ingotBronze",
|
||||
'X', "stickWood"});
|
||||
"###",
|
||||
" X ",
|
||||
" X ",
|
||||
'#', "ingotBronze",
|
||||
'X', "stickWood"});
|
||||
|
||||
RecipeManagers.carpenterManager.addRecipe(20, null, ForestryItem.carton.getItemStack(), ForestryItem.kitShovel.getItemStack(),
|
||||
new Object[]{" # ", " X ", " X ", '#', "ingotBronze", 'X', "stickWood"});
|
||||
|
||||
@@ -4,23 +4,25 @@
|
||||
* 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 forestry.api.farming.Farmables;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.farming.logic.FarmableFarmCraftory;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import forestry.api.farming.Farmables;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.farming.logic.FarmableFarmCraftory;
|
||||
|
||||
@Plugin(pluginID = "FarmCraftory", name = "FarmCraftory", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.farmcraftory.description")
|
||||
public class PluginFarmCraftory extends ForestryPlugin {
|
||||
|
||||
@@ -35,10 +37,10 @@ public class PluginFarmCraftory extends ForestryPlugin {
|
||||
|
||||
public static final HashMap<String, ItemStack> vegetableSeeds = new HashMap<String, ItemStack>();
|
||||
public static final String[] seedIdentifiers = new String[]{"turnipSeedBag", "cabbageSeedBag", "onionSeedBag", "spinachSeedBag", "leekSeedBag",
|
||||
"cucumberSeedBag", "tomatoSeedBag", "eggplantSeedBag", "greenPepperSeedBag", "yamSeedBag", "strawberrySeedBag", "pineappleSeedBag"};
|
||||
"cucumberSeedBag", "tomatoSeedBag", "eggplantSeedBag", "greenPepperSeedBag", "yamSeedBag", "strawberrySeedBag", "pineappleSeedBag"};
|
||||
public static final HashMap<String, ItemStack> vegetableItems = new HashMap<String, ItemStack>();
|
||||
public static final String[] vegetableIdentifiers = new String[]{"turnipItem", "cabbageItem", "onionItem", "spinachItem", "leekItem", "cucumberItem",
|
||||
"tomatoItem", "eggplantItem", "greenPepperItem", "yamItem", "strawberryItem", "pineappleItem"};
|
||||
"tomatoItem", "eggplantItem", "greenPepperItem", "yamItem", "strawberryItem", "pineappleItem"};
|
||||
|
||||
public static final HashMap<String, ItemStack> cerealSeeds = new HashMap<String, ItemStack>();
|
||||
public static final String[] cseedIdentifiers = new String[]{"cornSeedBag"};
|
||||
@@ -70,37 +72,41 @@ public class PluginFarmCraftory extends ForestryPlugin {
|
||||
methodGrowthSingle = classSingle.getMethod("getGrowthStage");
|
||||
methodGrowthMulti = classMulti.getMethod("getGrowthStage");
|
||||
|
||||
for (String str : seedIdentifiers)
|
||||
for (String str : seedIdentifiers) {
|
||||
try {
|
||||
vegetableSeeds.put(str, new ItemStack((Item) Class.forName("farmcraftory.FarmCraftory").getField(str).get(null)));
|
||||
} catch (Exception ex) {
|
||||
Proxies.log.info("FarmCraftory item '%s' could not be integrated.", str);
|
||||
Proxies.log.info(ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
for (String str : vegetableIdentifiers)
|
||||
for (String str : vegetableIdentifiers) {
|
||||
try {
|
||||
vegetableItems.put(str, new ItemStack((Item) Class.forName("farmcraftory.FarmCraftory").getField(str).get(null)));
|
||||
} catch (Exception ex) {
|
||||
Proxies.log.info("FarmCraftory item '%s' could not be integrated.", str);
|
||||
Proxies.log.info(ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
for (String str : cseedIdentifiers)
|
||||
for (String str : cseedIdentifiers) {
|
||||
try {
|
||||
cerealSeeds.put(str, new ItemStack((Item) Class.forName("farmcraftory.FarmCraftory").getField(str).get(null)));
|
||||
} catch (Exception ex) {
|
||||
Proxies.log.info("FarmCraftory item '%s' could not be integrated.", str);
|
||||
Proxies.log.info(ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
for (String str : cerealIdentifiers)
|
||||
for (String str : cerealIdentifiers) {
|
||||
try {
|
||||
cerealItems.put(str, new ItemStack((Item) Class.forName("farmcraftory.FarmCraftory").getField(str).get(null)));
|
||||
} catch (Exception ex) {
|
||||
Proxies.log.info("FarmCraftory item '%s' could not be integrated.", str);
|
||||
Proxies.log.info(ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if (blockMulti != null && blockSingle != null) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableFarmCraftory(cerealSeeds.values(), cerealItems.values()));
|
||||
@@ -115,10 +121,11 @@ public class PluginFarmCraftory extends ForestryPlugin {
|
||||
|
||||
public static int getGrowthStage(TileEntity tile) {
|
||||
try {
|
||||
if (classSingle.isInstance(tile))
|
||||
if (classSingle.isInstance(tile)) {
|
||||
return (Integer) methodGrowthSingle.invoke(tile);
|
||||
else if (classMulti.isInstance(tile))
|
||||
} else if (classMulti.isInstance(tile)) {
|
||||
return (Integer) methodGrowthMulti.invoke(tile);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -201,15 +201,17 @@ public class PluginFarming extends ForestryPlugin {
|
||||
|
||||
try {
|
||||
Block sapling = GameData.getBlockRegistry().getRaw(items[0]);
|
||||
if (sapling == null || sapling == Blocks.air)
|
||||
if (sapling == null || sapling == Blocks.air) {
|
||||
throw new RuntimeException("can't find block for " + items[0]);
|
||||
}
|
||||
|
||||
if (items.length == 2)
|
||||
if (items.length == 2) {
|
||||
Farmables.farmables.get(tokens[0]).add(new FarmableGenericSapling(sapling, Integer.parseInt(items[1])));
|
||||
else {
|
||||
} else {
|
||||
Item windfall = GameData.getItemRegistry().getRaw(items[2]);
|
||||
if (windfall == null)
|
||||
if (windfall == null) {
|
||||
throw new RuntimeException("can't find item for " + items[2]);
|
||||
}
|
||||
|
||||
Farmables.farmables.get(tokens[0]).add(
|
||||
new FarmableGenericSapling(sapling, Integer.parseInt(items[1]),
|
||||
@@ -242,11 +244,13 @@ public class PluginFarming extends ForestryPlugin {
|
||||
|
||||
try {
|
||||
Item seed = GameData.getItemRegistry().getRaw(items[0]);
|
||||
if (seed == null)
|
||||
if (seed == null) {
|
||||
throw new RuntimeException("can't find item for " + items[0]);
|
||||
}
|
||||
Block crop = GameData.getBlockRegistry().getRaw(items[2]);
|
||||
if (crop == null || crop == Blocks.air)
|
||||
if (crop == null || crop == Blocks.air) {
|
||||
throw new RuntimeException("can't find block for " + items[2]);
|
||||
}
|
||||
|
||||
Farmables.farmables.get(tokens[0]).add(
|
||||
new FarmableGenericCrop(new ItemStack(seed, 1, Integer.parseInt(items[1])),
|
||||
@@ -334,7 +338,8 @@ public class PluginFarming extends ForestryPlugin {
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, ForestryItem.tubes.getItemStack(1, 10), Circuit.farmShroomManual);
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, ForestryItem.tubes.getItemStack(1, 11), Circuit.farmCocoaManual);
|
||||
|
||||
if (PluginIC2.resin != null && PluginIC2.rubberwood != null)
|
||||
if (PluginIC2.resin != null && PluginIC2.rubberwood != null) {
|
||||
ChipsetManager.solderManager.addRecipe(layoutManual, ForestryItem.tubes.getItemStack(1, 8), Circuit.farmRubberManual);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,8 +107,9 @@ public class PluginFluids extends ForestryPlugin {
|
||||
|
||||
for (Fluids fluidType : Fluids.values()) {
|
||||
ForestryItem container = fluidType.getContainerForType(type);
|
||||
if (container == null)
|
||||
if (container == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemLiquidContainer liquidContainer = new ItemLiquidContainer(type, fluidType.getBlock(), fluidType.getColor());
|
||||
fluidType.setProperties(liquidContainer);
|
||||
@@ -120,13 +121,15 @@ public class PluginFluids extends ForestryPlugin {
|
||||
@Override
|
||||
public void doInit() {
|
||||
for (Fluids fluidType : Fluids.values()) {
|
||||
if (fluidType.getFluid() == null)
|
||||
if (fluidType.getFluid() == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (EnumContainerType type : EnumContainerType.values()) {
|
||||
ForestryItem container = fluidType.getContainerForType(type);
|
||||
if (container == null)
|
||||
if (container == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
LiquidHelper.injectLiquidContainer(fluidType, container.getItemStack());
|
||||
}
|
||||
@@ -146,8 +149,9 @@ public class PluginFluids extends ForestryPlugin {
|
||||
@Override
|
||||
public void postInit() {
|
||||
for (Fluids fluidType : Fluids.forestryFluids) {
|
||||
if (fluidType.getFluid() == null)
|
||||
if (fluidType.getFluid() == null) {
|
||||
throw new MissingFluidException(fluidType.getTag());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,8 +163,9 @@ public class PluginFluids extends ForestryPlugin {
|
||||
for (Fluids fluidType : forestryFluidsWithBlocks) {
|
||||
Fluid fluid = fluidType.getFluid();
|
||||
Block fluidBlock = fluidType.getBlock();
|
||||
if (fluid != null && fluidBlock != null)
|
||||
if (fluid != null && fluidBlock != null) {
|
||||
fluid.setIcons(fluidBlock.getBlockTextureFromSide(1), fluidBlock.getBlockTextureFromSide(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,17 @@
|
||||
* 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 net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
import forestry.api.food.BeverageManager;
|
||||
import forestry.api.food.IBeverageEffect;
|
||||
import forestry.core.config.Defaults;
|
||||
@@ -27,8 +31,6 @@ import forestry.food.items.ItemAmbrosia;
|
||||
import forestry.food.items.ItemBeverage;
|
||||
import forestry.food.items.ItemBeverage.BeverageInfo;
|
||||
import forestry.food.items.ItemInfuser;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Plugin(pluginID = "Food", name = "Food", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.food.description")
|
||||
public class PluginFood extends ForestryPlugin {
|
||||
@@ -54,8 +56,8 @@ public class PluginFood extends ForestryPlugin {
|
||||
// / FOOD ITEMS
|
||||
ForestryItem.honeyedSlice.registerItem(new ItemForestryFood(8, 0.6f), "honeyedSlice");
|
||||
ForestryItem.beverage.registerItem(new ItemBeverage(
|
||||
new BeverageInfo("meadShort", "glass", 0xec9a19, 0xffffff, 1, 0.2f, true),
|
||||
new BeverageInfo("meadCurative", "glass", 0xc5feff, 0xffffff, 1, 0.2f, true)),
|
||||
new BeverageInfo("meadShort", "glass", 0xec9a19, 0xffffff, 1, 0.2f, true),
|
||||
new BeverageInfo("meadCurative", "glass", 0xc5feff, 0xffffff, 1, 0.2f, true)),
|
||||
"beverage");
|
||||
ForestryItem.ambrosia.registerItem(new ItemAmbrosia().setIsDrink(), "ambrosia");
|
||||
ForestryItem.honeyPot.registerItem(new ItemForestryFood(2, 0.2f).setIsDrink(), "honeyPot");
|
||||
@@ -65,7 +67,7 @@ public class PluginFood extends ForestryPlugin {
|
||||
|
||||
// Mead
|
||||
ItemStack meadBottle = ForestryItem.beverage.getItemStack();
|
||||
((ItemBeverage) ForestryItem.beverage.item()).beverages[0].saveEffects(meadBottle, new IBeverageEffect[] { BeverageEffect.weakAlcoholic });
|
||||
((ItemBeverage) ForestryItem.beverage.item()).beverages[0].saveEffects(meadBottle, new IBeverageEffect[]{BeverageEffect.weakAlcoholic});
|
||||
|
||||
LiquidHelper.injectLiquidContainer(Fluids.SHORT_MEAD, Defaults.BUCKET_VOLUME, meadBottle, new ItemStack(Items.glass_bottle));
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -93,8 +93,9 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
public static ItemStack uuMatter;
|
||||
|
||||
public PluginIC2() {
|
||||
if (PluginIC2.instance == null)
|
||||
if (PluginIC2.instance == null) {
|
||||
PluginIC2.instance = this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -219,17 +220,22 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
@Override
|
||||
@Optional.Method(modid = "IC2")
|
||||
protected void registerBackpackItems() {
|
||||
if (BackpackManager.backpackItems == null)
|
||||
if (BackpackManager.backpackItems == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (resin != null)
|
||||
if (resin != null) {
|
||||
BackpackManager.definitions.get("forester").addValidItem(resin);
|
||||
if (rubber != null)
|
||||
}
|
||||
if (rubber != null) {
|
||||
BackpackManager.definitions.get("forester").addValidItem(rubber);
|
||||
if (rubbersapling != null)
|
||||
}
|
||||
if (rubbersapling != null) {
|
||||
BackpackManager.definitions.get("forester").addValidItem(rubbersapling);
|
||||
if (rubberleaves != null)
|
||||
}
|
||||
if (rubberleaves != null) {
|
||||
BackpackManager.definitions.get("forester").addValidItem(rubberleaves);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -278,15 +284,17 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
Proxies.log.fine("No IC2 plantballs found.");
|
||||
}
|
||||
|
||||
if (resin != null)
|
||||
if (resin != null) {
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, ForestryItem.propolis.getItemStack(), resin);
|
||||
else
|
||||
} else {
|
||||
Proxies.log.fine("Missing IC2 resin, skipping centrifuge recipe for propolis to resin.");
|
||||
}
|
||||
|
||||
if (rubbersapling != null) {
|
||||
RecipeUtil.injectLeveledRecipe(rubbersapling, GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
|
||||
} else
|
||||
} else {
|
||||
Proxies.log.fine("Missing IC2 rubber sapling, skipping fermenter recipe for converting rubber sapling to biomass.");
|
||||
}
|
||||
|
||||
if (rubbersapling != null && resin != null) {
|
||||
String saplingName = GameData.getBlockRegistry().getNameForObject(StackUtils.getBlock(rubbersapling));
|
||||
@@ -298,15 +306,17 @@ public class PluginIC2 extends ForestryPlugin {
|
||||
FMLInterModComms.sendMessage(Defaults.MOD, "add-farmable-sapling", imc);
|
||||
}
|
||||
|
||||
if (lavaCell != null)
|
||||
if (lavaCell != null) {
|
||||
LiquidHelper.injectTinContainer(Fluids.LAVA, Defaults.BUCKET_VOLUME, lavaCell, emptyCell);
|
||||
}
|
||||
|
||||
if (waterCell != null) {
|
||||
LiquidHelper.injectTinContainer(Fluids.WATER, Defaults.BUCKET_VOLUME, waterCell, emptyCell);
|
||||
|
||||
ItemStack bogEarthCan = GameMode.getGameMode().getStackSetting("recipe.output.bogearth.can");
|
||||
if (bogEarthCan.stackSize > 0)
|
||||
if (bogEarthCan.stackSize > 0) {
|
||||
Proxies.common.addRecipe(bogEarthCan, "#Y#", "YXY", "#Y#", '#', Blocks.dirt, 'X', waterCell, 'Y', Blocks.sand);
|
||||
}
|
||||
}
|
||||
|
||||
ICircuitLayout layout = ChipsetManager.circuitRegistry.getLayout("forestry.engine.tin");
|
||||
|
||||
@@ -4,14 +4,25 @@
|
||||
* 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.EnumSet;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
import forestry.api.arboriculture.ITreeRoot;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
@@ -48,13 +59,6 @@ import forestry.lepidopterology.genetics.ButterflyTemplates;
|
||||
import forestry.lepidopterology.items.ItemButterflyGE;
|
||||
import forestry.lepidopterology.items.ItemFlutterlyzer;
|
||||
import forestry.lepidopterology.proxy.ProxyLepidopterology;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Locale;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
|
||||
@Plugin(pluginID = "Lepidopterology", name = "Lepidopterology", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.lepidopterology.description")
|
||||
public class PluginLepidopterology extends ForestryPlugin {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -58,7 +58,7 @@ public class PluginMail extends ForestryPlugin {
|
||||
|
||||
@SidedProxy(clientSide = "forestry.mail.proxy.ClientProxyMail", serverSide = "forestry.mail.proxy.ProxyMail")
|
||||
public static ProxyMail proxy;
|
||||
public static MachineDefinition definitionMailbox;
|
||||
public static MachineDefinition definitionMailbox;
|
||||
public static MachineDefinition definitionTradestation;
|
||||
public static MachineDefinition definitionPhilatelist;
|
||||
public static StampInfo[] stampDefinitions;
|
||||
@@ -136,10 +136,10 @@ public class PluginMail extends ForestryPlugin {
|
||||
protected void registerItems() {
|
||||
|
||||
stampDefinitions = new StampInfo[]{
|
||||
new StampInfo("1n", EnumPostage.P_1, ForestryItem.apatite, 0x4a8ca7, 0xffffff), new StampInfo("2n", EnumPostage.P_2, "ingotCopper", 0xe8c814, 0xffffff),
|
||||
new StampInfo("5n", EnumPostage.P_5, "ingotTin", 0x9c0707, 0xffffff), new StampInfo("10n", EnumPostage.P_10, Items.gold_ingot, 0x7bd1b8, 0xffffff),
|
||||
new StampInfo("20n", EnumPostage.P_20, Items.diamond, 0xff9031, 0xfff7dd), new StampInfo("50n", EnumPostage.P_50, Items.emerald, 0x6431d7, 0xfff7dd),
|
||||
new StampInfo("100n", EnumPostage.P_100, Items.nether_star, 0xd731ba, 0xfff7dd)}; //new StampInfo("200n", EnumPostage.P_200, Item.netherStar, 0xcd9831, 0xfff7dd)};
|
||||
new StampInfo("1n", EnumPostage.P_1, ForestryItem.apatite, 0x4a8ca7, 0xffffff), new StampInfo("2n", EnumPostage.P_2, "ingotCopper", 0xe8c814, 0xffffff),
|
||||
new StampInfo("5n", EnumPostage.P_5, "ingotTin", 0x9c0707, 0xffffff), new StampInfo("10n", EnumPostage.P_10, Items.gold_ingot, 0x7bd1b8, 0xffffff),
|
||||
new StampInfo("20n", EnumPostage.P_20, Items.diamond, 0xff9031, 0xfff7dd), new StampInfo("50n", EnumPostage.P_50, Items.emerald, 0x6431d7, 0xfff7dd),
|
||||
new StampInfo("100n", EnumPostage.P_100, Items.nether_star, 0xd731ba, 0xfff7dd)}; //new StampInfo("200n", EnumPostage.P_200, Item.netherStar, 0xcd9831, 0xfff7dd)};
|
||||
|
||||
/* STAMPS */
|
||||
ForestryItem.stamps.registerItem(new ItemStamps(stampDefinitions), "stamps");
|
||||
@@ -172,10 +172,11 @@ public class PluginMail extends ForestryPlugin {
|
||||
stampGlue = Items.slime_ball;
|
||||
}
|
||||
|
||||
if (Config.craftingStampsEnabled)
|
||||
if (Config.craftingStampsEnabled) {
|
||||
for (int i = 0; i < stampDefinitions.length; i++) {
|
||||
if (Config.collectorStamps.contains(stampDefinitions[i].name))
|
||||
if (Config.collectorStamps.contains(stampDefinitions[i].name)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Proxies.common.addRecipe(ForestryItem.stamps.getItemStack(9, i),
|
||||
"XXX", "###", "ZZZ",
|
||||
@@ -187,6 +188,7 @@ public class PluginMail extends ForestryPlugin {
|
||||
'X', stampDefinitions[i].getCraftingIngredient(),
|
||||
'#', Items.paper);
|
||||
}
|
||||
}
|
||||
|
||||
// Recycling
|
||||
Proxies.common.addRecipe(new ItemStack(Items.paper), "###", '#', ForestryItem.letters.getItemStack(1, Defaults.WILDCARD));
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -12,17 +12,7 @@ package forestry.plugins;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.Forestry;
|
||||
import forestry.core.interfaces.IOreDictionaryHandler;
|
||||
import forestry.core.interfaces.IPacketHandler;
|
||||
import forestry.core.interfaces.IPickupHandler;
|
||||
import forestry.core.interfaces.IResupplyHandler;
|
||||
import forestry.core.interfaces.ISaveEventHandler;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
@@ -30,6 +20,7 @@ import java.util.Iterator;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.command.CommandHandler;
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -40,6 +31,19 @@ import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import forestry.Forestry;
|
||||
import forestry.core.interfaces.IOreDictionaryHandler;
|
||||
import forestry.core.interfaces.IPacketHandler;
|
||||
import forestry.core.interfaces.IPickupHandler;
|
||||
import forestry.core.interfaces.IResupplyHandler;
|
||||
import forestry.core.interfaces.ISaveEventHandler;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
public class PluginManager {
|
||||
|
||||
public static final String MODULE_CONFIG_FILE_NAME = "modules.cfg";
|
||||
@@ -148,8 +152,9 @@ public class PluginManager {
|
||||
Iterator<Module> it = toLoad.iterator();
|
||||
while (it.hasNext()) {
|
||||
Module m = it.next();
|
||||
if (!m.canBeDisabled())
|
||||
if (!m.canBeDisabled()) {
|
||||
continue;
|
||||
}
|
||||
if (!isEnabled(config, m)) {
|
||||
it.remove();
|
||||
Proxies.log.info("Module disabled: {0}", m);
|
||||
@@ -181,8 +186,9 @@ public class PluginManager {
|
||||
unloadedModules.removeAll(toLoad);
|
||||
loadedModules.addAll(toLoad);
|
||||
|
||||
if (config.hasChanged())
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
|
||||
Locale.setDefault(locale);
|
||||
|
||||
@@ -205,32 +211,39 @@ public class PluginManager {
|
||||
Proxies.log.fine("Registering Handlers for Plugin: {0}", plugin);
|
||||
|
||||
IGuiHandler guiHandler = plugin.getGuiHandler();
|
||||
if (guiHandler != null)
|
||||
if (guiHandler != null) {
|
||||
guiHandlers.add(guiHandler);
|
||||
}
|
||||
|
||||
IPacketHandler packetHandler = plugin.getPacketHandler();
|
||||
if (packetHandler != null)
|
||||
if (packetHandler != null) {
|
||||
packetHandlers.add(packetHandler);
|
||||
}
|
||||
|
||||
IPickupHandler pickupHandler = plugin.getPickupHandler();
|
||||
if (pickupHandler != null)
|
||||
if (pickupHandler != null) {
|
||||
pickupHandlers.add(pickupHandler);
|
||||
}
|
||||
|
||||
ISaveEventHandler saveHandler = plugin.getSaveEventHandler();
|
||||
if (saveHandler != null)
|
||||
if (saveHandler != null) {
|
||||
saveEventHandlers.add(saveHandler);
|
||||
}
|
||||
|
||||
IResupplyHandler resupplyHandler = plugin.getResupplyHandler();
|
||||
if (resupplyHandler != null)
|
||||
if (resupplyHandler != null) {
|
||||
resupplyHandlers.add(resupplyHandler);
|
||||
}
|
||||
|
||||
IOreDictionaryHandler dictionaryHandler = plugin.getDictionaryHandler();
|
||||
if (dictionaryHandler != null)
|
||||
if (dictionaryHandler != null) {
|
||||
dictionaryHandlers.add(dictionaryHandler);
|
||||
}
|
||||
|
||||
IFuelHandler fuelHandler = plugin.getFuelHandler();
|
||||
if (fuelHandler != null)
|
||||
if (fuelHandler != null) {
|
||||
GameRegistry.registerFuelHandler((fuelHandler));
|
||||
}
|
||||
}
|
||||
|
||||
public static void runInit() {
|
||||
@@ -275,20 +288,24 @@ public class PluginManager {
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
ICommand[] commands = plugin.getConsoleCommands();
|
||||
if (commands == null)
|
||||
if (commands == null) {
|
||||
continue;
|
||||
for (ICommand command : commands)
|
||||
}
|
||||
for (ICommand command : commands) {
|
||||
commandManager.registerCommand(command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void processIMCMessages(ImmutableList<FMLInterModComms.IMCMessage> messages) {
|
||||
for (FMLInterModComms.IMCMessage message : messages)
|
||||
for (FMLInterModComms.IMCMessage message : messages) {
|
||||
for (Module m : loadedModules) {
|
||||
ForestryPlugin plugin = m.instance;
|
||||
if (plugin.processIMCMessage(message))
|
||||
if (plugin.processIMCMessage(message)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void populateChunk(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated) {
|
||||
@@ -312,8 +329,9 @@ public class PluginManager {
|
||||
Property prop = config.get(CATEGORY_MODULES, m.configName(), true, comment);
|
||||
boolean enabled = prop.getBoolean();
|
||||
|
||||
if (!enabled)
|
||||
if (!enabled) {
|
||||
configDisabledModules.add(m);
|
||||
}
|
||||
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +1,19 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 by SirSengir
|
||||
*
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
|
||||
*
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/.
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.interfaces.IPacketHandler;
|
||||
@@ -16,8 +21,6 @@ import forestry.core.proxy.Proxies;
|
||||
import forestry.pipes.GuiHandlerPipes;
|
||||
import forestry.pipes.network.PacketHandlerPipes;
|
||||
import forestry.pipes.proxy.ProxyPipes;
|
||||
import java.util.EnumSet;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
@Plugin(pluginID = "Pipes", name = "Pipes", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.pipes.description")
|
||||
public class PluginPropolisPipe extends ForestryPlugin {
|
||||
@@ -48,13 +51,15 @@ public class PluginPropolisPipe extends ForestryPlugin {
|
||||
@Override
|
||||
public void postInit() {
|
||||
String proxyClass = "forestry.pipes.proxy.ProxyPipes";
|
||||
if (FMLCommonHandler.instance().getSide().isClient())
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
proxyClass = "forestry.pipes.proxy.ClientProxyPipes";
|
||||
}
|
||||
|
||||
proxy = (ProxyPipes) Proxies.common.instantiateIfModLoaded("BuildCraft|Transport", proxyClass);
|
||||
|
||||
if (proxy == null)
|
||||
if (proxy == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
proxy.initPropolisPipe();
|
||||
proxy.registerCraftingPropolis(ForestryItem.propolis.getItemStack());
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* 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
|
||||
******************************************************************************/
|
||||
@@ -98,7 +98,7 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
private Configuration config;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked","rawtypes"})
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void preInit() {
|
||||
BackpackManager.backpackInterface = new BackpackHelper();
|
||||
|
||||
@@ -166,8 +166,9 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
}
|
||||
|
||||
public static void addBackpackItem(String pack, ItemStack stack) {
|
||||
if (stack == null)
|
||||
if (stack == null) {
|
||||
return;
|
||||
}
|
||||
BackpackManager.definitions.get(pack).addValidItem(stack);
|
||||
}
|
||||
|
||||
@@ -180,7 +181,7 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
}
|
||||
|
||||
public static void scanForItems() {
|
||||
for (Object id : Block.blockRegistry.getKeys())
|
||||
for (Object id : Block.blockRegistry.getKeys()) {
|
||||
try {
|
||||
Block block = (Block) Block.blockRegistry.getObject(id);
|
||||
|
||||
@@ -188,8 +189,9 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
|| block instanceof IShearable
|
||||
|| block instanceof BlockLog
|
||||
|| block instanceof BlockMelon
|
||||
|| block instanceof BlockPumpkin)
|
||||
|| block instanceof BlockPumpkin) {
|
||||
addBackpackItem("forester", block);
|
||||
}
|
||||
if (block instanceof BlockStairs || block.getRenderType() == 10
|
||||
|| block instanceof BlockFence || block.getRenderType() == 11
|
||||
|| block instanceof BlockFenceGate || block.getRenderType() == 21
|
||||
@@ -204,25 +206,29 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
|| block instanceof BlockFurnace
|
||||
|| block instanceof BlockLadder || block.getRenderType() == 8
|
||||
|| block instanceof BlockTrapDoor
|
||||
|| block.getUnlocalizedName().contains("door"))
|
||||
|| block.getUnlocalizedName().contains("door")) {
|
||||
addBackpackItem("builder", block);
|
||||
}
|
||||
} catch (Throwable error) {
|
||||
error.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
for (Object id : Item.itemRegistry.getKeys())
|
||||
for (Object id : Item.itemRegistry.getKeys()) {
|
||||
try {
|
||||
Item item = (Item) Item.itemRegistry.getObject(id);
|
||||
|
||||
if (item instanceof IPlantable)
|
||||
if (item instanceof IPlantable) {
|
||||
addBackpackItem("forester", item);
|
||||
else if (item instanceof ItemFood)
|
||||
} else if (item instanceof ItemFood) {
|
||||
addBackpackItem("hunter", item);
|
||||
else if (item instanceof ItemDoor)
|
||||
} else if (item instanceof ItemDoor) {
|
||||
addBackpackItem("builder", item);
|
||||
}
|
||||
} catch (Throwable error) {
|
||||
error.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -561,8 +567,9 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
String[] parts = list.split("[;]+");
|
||||
|
||||
for (String part : parts) {
|
||||
if (part.isEmpty())
|
||||
if (part.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String[] ident = part.split("[:]+");
|
||||
|
||||
@@ -574,15 +581,16 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
String name = ident[0] + ":" + ident[1];
|
||||
int meta;
|
||||
|
||||
if (ident.length == 2)
|
||||
if (ident.length == 2) {
|
||||
meta = 0;
|
||||
else
|
||||
} else {
|
||||
try {
|
||||
meta = ident[2].equals("*") ? OreDictionary.WILDCARD_VALUE : NumberFormat.getIntegerInstance().parse(ident[2]).intValue();
|
||||
} catch (ParseException e) {
|
||||
Proxies.log.warning("Failed to add block/item of (" + part + ") to " + backpackIdent + " since its metadata isn't formatted properly. Suitable are integer values or *.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Item item = GameData.getItemRegistry().getRaw(name);
|
||||
|
||||
@@ -620,29 +628,30 @@ public class PluginStorage extends ForestryPlugin implements IOreDictionaryHandl
|
||||
return;
|
||||
}
|
||||
|
||||
if (name.startsWith("ingot"))
|
||||
if (name.startsWith("ingot")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("ore"))
|
||||
} else if (name.startsWith("ore")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("gem"))
|
||||
} else if (name.startsWith("gem")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("dust"))
|
||||
} else if (name.startsWith("dust")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("crystal"))
|
||||
} else if (name.startsWith("crystal")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("cluster"))
|
||||
} else if (name.startsWith("cluster")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("shard"))
|
||||
} else if (name.startsWith("shard")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.startsWith("clump"))
|
||||
} else if (name.startsWith("clump")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.matches("dropUranium"))
|
||||
} else if (name.matches("dropUranium")) {
|
||||
minerItems.add(ore);
|
||||
else if (name.equals("treeLeaves") || name.equals("treeSapling") || name.equals("logWood"))
|
||||
} else if (name.equals("treeLeaves") || name.equals("treeSapling") || name.equals("logWood")) {
|
||||
foresterItems.add(ore);
|
||||
else if (name.equals("stairWood") || name.equals("plankWood") || name.equals("slabWood"))
|
||||
} else if (name.equals("stairWood") || name.equals("plankWood") || name.equals("slabWood")) {
|
||||
builderItems.add(ore);
|
||||
else if (name.startsWith("wood"))
|
||||
} else if (name.startsWith("wood")) {
|
||||
foresterItems.add(ore);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user