aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/Forestry.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/trees/ForestryLeaf.java160
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/trees/ForestrySapling.java55
-rw-r--r--src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java26
-rw-r--r--src/Java/gtPlusPlus/xmod/psychedelicraft/fluids/PS_Fluids.java54
5 files changed, 2 insertions, 299 deletions
diff --git a/src/Java/gtPlusPlus/xmod/forestry/Forestry.java b/src/Java/gtPlusPlus/xmod/forestry/Forestry.java
index b21d9a154d..698e6a8d01 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/Forestry.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/Forestry.java
@@ -4,8 +4,6 @@ import static cpw.mods.fml.common.registry.GameRegistry.findBlock;
import static cpw.mods.fml.common.registry.GameRegistry.findItem;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.xmod.forestry.trees.ForestryLeaf;
-import gtPlusPlus.xmod.forestry.trees.ForestrySapling;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
@@ -46,7 +44,7 @@ public class Forestry {
item = findItem(name, "sapling");
Block block = findBlock(name, "saplingGE");
if (item != null && block != null) {
- ForestrySapling sapling = new ForestrySapling(item, block);
+ //ForestrySapling sapling = new ForestrySapling(item, block);
//MFRRegistry.registerPlantable(sapling);
//MFRRegistry.registerFertilizable(sapling);
} else
@@ -100,7 +98,7 @@ public class Forestry {
block = findBlock(name, "leaves");
if (block != null) {
- ForestryLeaf leaf = new ForestryLeaf(block);
+ //ForestryLeaf leaf = new ForestryLeaf(block);
//MFRRegistry.registerFertilizable(leaf);
//MFRRegistry.registerHarvestable(leaf);
//MFRRegistry.registerFruit(leaf);
diff --git a/src/Java/gtPlusPlus/xmod/forestry/trees/ForestryLeaf.java b/src/Java/gtPlusPlus/xmod/forestry/trees/ForestryLeaf.java
deleted file mode 100644
index e2550f4643..0000000000
--- a/src/Java/gtPlusPlus/xmod/forestry/trees/ForestryLeaf.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package gtPlusPlus.xmod.forestry.trees;
-
-import java.util.*;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import powercrystals.minefactoryreloaded.api.*;
-import powercrystals.minefactoryreloaded.farmables.harvestables.HarvestableTreeLeaves;
-import forestry.api.arboriculture.*;
-import forestry.api.genetics.*;
-
-
-public class ForestryLeaf extends HarvestableTreeLeaves implements IFactoryFruit
-{
- private ITreeRoot root;
- private ReplacementBlock repl;
- protected Item _item;
-
- public ForestryLeaf(Block block)
- {
- super(block);
- root = (ITreeRoot)AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees");
- repl = EmptyReplacement.INSTANCE;
- _item = Item.getItemFromBlock(block);
- }
-
- @Override
- public boolean canBePicked(World world, int x, int y, int z)
- {
- TileEntity te = world.getTileEntity(x, y, z);
- if (te instanceof IFruitBearer)
- {
- IFruitBearer fruit = (IFruitBearer)te;
- return fruit.getRipeness() >= 0.99f;
- }
- return false;
- }
-
- public boolean canFertilize(World world, int x, int y, int z)
- {
- return !canBePicked(world, x, y, z);
- }
-
- public boolean fertilize(World world, Random rand, int x, int y, int z)
- {
- TileEntity te = world.getTileEntity(x, y, z);
- if (te instanceof IFruitBearer)
- {
- IFruitBearer fruit = (IFruitBearer)te;
- fruit.addRipeness(1f);
- return true;
- }
- return false;
- }
-
- @Override
- public ReplacementBlock getReplacementBlock(World world, int x, int y, int z)
- {
- return repl;
- }
-
- @Override
- public void prePick(World world, int x, int y, int z)
- {
- }
-
- @Override // HARVESTER
- public List<ItemStack> getDrops(World world, Random rand, Map<String, Boolean> settings, int x, int y, int z)
- {
- ITree tree = getTree(world, x, y, z);
- if (tree == null)
- return null;
-
- ArrayList<ItemStack> prod = new ArrayList<ItemStack>();
-
- float modifier = 1f;
- if (settings.get("silkTouch") == Boolean.TRUE)
- {
- ItemStack item = new ItemStack(_item);
- NBTTagCompound tag = new NBTTagCompound();
- tree.writeToNBT(tag);
- item.setTagCompound(tag);
- prod.add(item);
- }
- else
- {
- boolean hasMate = tree.getMate() != null;
- for (ITree s : getSaplings(tree, world, x, y, z, modifier))
- if (s != null) {
- if ((hasMate && !s.isGeneticEqual(tree)) || rand.nextInt(32) == 0)
- if (rand.nextBoolean())
- prod.add(root.getMemberStack(s, EnumGermlingType.POLLEN.ordinal()));
-
- prod.add(root.getMemberStack(s, EnumGermlingType.SAPLING.ordinal()));
- }
-
- getFruits(world, x, y, z, tree, prod);
- }
-
- return prod;
- }
-
-
- private static ITree[] getSaplings(ITree tree, World world, int x, int y, int z, float modifier) {
- return tree.getSaplings(world, null, x, y, z, modifier);
- }
-
- @Override // FRUIT PICKER
- public List<ItemStack> getDrops(World world, Random rand, int x, int y, int z)
- {
- ITree tree = getTree(world, x, y, z);
- if (tree == null)
- return null;
-
- ArrayList<ItemStack> prod = new ArrayList<ItemStack>();
- getFruits(world, x, y, z, tree, prod);
- return prod;
- }
-
- private ITree getTree(World world, int x, int y, int z)
- {
- TileEntity te = world.getTileEntity(x, y, z);
- if (te instanceof IPollinatable) {
- IIndividual t = ((IPollinatable)te).getPollen();
- if (t instanceof ITree)
- return (ITree)t;
- }
- return null;
- }
-
- private void getFruits(World world, int x, int y, int z, ITree tree, ArrayList<ItemStack> prod)
- {
- TileEntity te = world.getTileEntity(x, y, z);
- if (te instanceof IFruitBearer)
- {
- IFruitBearer fruit = (IFruitBearer)te;
- if (fruit.hasFruit())
- {
- //int period = tree.getGenome().getFruitProvider().getRipeningPeriod();
- //ItemStack[] o = tree.produceStacks(world, x, y, z, (int)(fruit.getRipeness() * period + 0.1f));
- prod.addAll(fruit.pickFruit(null));
- }
- }
- }
-
- @Override
- public void postPick(World world, int x, int y, int z)
- {
- TileEntity te = world.getTileEntity(x, y, z);
- if (te instanceof IFruitBearer)
- {
- IFruitBearer fruit = (IFruitBearer)te;
- fruit.addRipeness(-fruit.getRipeness());
- }
- }
-}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/trees/ForestrySapling.java b/src/Java/gtPlusPlus/xmod/forestry/trees/ForestrySapling.java
deleted file mode 100644
index 7c81ea0928..0000000000
--- a/src/Java/gtPlusPlus/xmod/forestry/trees/ForestrySapling.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gtPlusPlus.xmod.forestry.trees;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import powercrystals.minefactoryreloaded.api.ReplacementBlock;
-import powercrystals.minefactoryreloaded.farmables.plantables.PlantableStandard;
-import forestry.api.arboriculture.ITreeRoot;
-import forestry.api.genetics.AlleleManager;
-
-public class ForestrySapling extends PlantableStandard
-{
- private ITreeRoot root;
-
- public ForestrySapling(Item item, Block block)
- {
- super(item, block, WILDCARD, null);
- root = (ITreeRoot)AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees");
- _plantedBlock = new ReplacementBlock((Block)null) {
- @Override
- public boolean replaceBlock(World world, int x, int y, int z, ItemStack stack) {
- return root.plantSapling(world, root.getMember(stack), null, x, y, z);
- }
- };
- }
-
- public Block getPlant()
- {
- return _block;
- }
-
- @Override
- public boolean canBePlantedHere(World world, int x, int y, int z, ItemStack stack)
- {
- if (!world.isAirBlock(x, y, z))
- return false;
-
- return root.getMember(stack).canStay(world, x, y, z);
- }
-
- public boolean canFertilize(World world, int x, int y, int z)
- {
- return true;
- }
-
- public boolean fertilize(World world, Random rand, int x, int y, int z)
- {
- Block block = world.getBlock(x, y, z);
- root.getTree(world, x, y, z).getTreeGenerator(world, x, y, z, true).generate(world, rand, x, y, z);
- return world.getBlock(x, y, z) != block;
- }
-}
diff --git a/src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java b/src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java
deleted file mode 100644
index 84faed5479..0000000000
--- a/src/Java/gtPlusPlus/xmod/psychedelicraft/HANDLER_Psych.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package gtPlusPlus.xmod.psychedelicraft;
-
-import gtPlusPlus.core.lib.LoadedMods;
-
-
-public class HANDLER_Psych {
-
- public static void preInit(){
- if (LoadedMods.Psychedelicraft){
- //PS_Fluids.registerFluids();
- }
- }
-
- public static void init(){
- if (LoadedMods.Psychedelicraft){
- //PS_Fluids.registerAlcohols();
- }
- }
-
- public static void postInit(){
- if (LoadedMods.Psychedelicraft){
-
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/xmod/psychedelicraft/fluids/PS_Fluids.java b/src/Java/gtPlusPlus/xmod/psychedelicraft/fluids/PS_Fluids.java
deleted file mode 100644
index 4de44c7efc..0000000000
--- a/src/Java/gtPlusPlus/xmod/psychedelicraft/fluids/PS_Fluids.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package gtPlusPlus.xmod.psychedelicraft.fluids;
-
-import gtPlusPlus.core.lib.CORE;
-import ivorius.ivtoolkit.gui.IntegerRange;
-import ivorius.psychedelicraft.blocks.TileEntityMashTub;
-import ivorius.psychedelicraft.config.PSConfig;
-import ivorius.psychedelicraft.fluids.FluidAlcohol;
-import ivorius.psychedelicraft.items.PSItems;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.ShapelessOreRecipe;
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class PS_Fluids {
-
- public static FluidAlcohol alcJD;
-
- public static void registerFluids(){
- alcJD = new FluidAlcohol("psc_JD", 2, 0.45D, 1.9D, 0.15D, PSConfig.alcInfoPotato);
- alcJD.addName(CORE.MODID + ":" + "drinkMash", new IntegerRange(0, -1), new IntegerRange(0, 0));
- alcJD.addName(CORE.MODID + ":" + "drinkAgedWhisky", new IntegerRange(0, 0), new IntegerRange(1, -1));
- alcJD.addName(CORE.MODID + ":" + "drinkWhisky", new IntegerRange(0, -1), new IntegerRange(1, -1));
- alcJD.setColor(-1426150904);
- alcJD.setStillIconName(CORE.MODID + ":" + "mash_still");
- alcJD.setFlowingIconName(CORE.MODID + ":" + "mash_flow");
- alcJD.addIcon(new IntegerRange(-1, -1), new IntegerRange(0, 3), new IntegerRange(2, -1), CORE.MODID + ":" + "clear_still", CORE.MODID + ":" + "clear_flow");
- alcJD.addIcon(new IntegerRange(-1, -1), new IntegerRange(4, 13), new IntegerRange(0, -1), CORE.MODID + ":" + "rum_semi_mature_still", CORE.MODID + ":" + "rum_semi_mature_flow");
- alcJD.addIcon(new IntegerRange(-1, -1), new IntegerRange(14, -1), new IntegerRange(0, -1), CORE.MODID + ":" + "rum_mature_still", CORE.MODID + ":" + "rum_mature_flow");
- FluidRegistry.registerFluid(alcJD);
- }
-
- public static void registerAlcohols(){
- addMashTubRecipe2(new FluidStack(alcJD, TileEntityMashTub.MASH_TUB_CAPACITY), new Object[] { "foodPotato", "foodPotato", "foodPotato", "foodPotato", "foodPotato", "foodBanana", "foodBanana", "foodBanana" });
- }
-
- private static void addMashTubRecipe2(FluidStack fluid, Object... ingredients)
- {
- ItemStack mashTubStack = new ItemStack(PSItems.itemMashTub);
- PSItems.itemMashTub.fill(mashTubStack, fluid, true);
-
- Object[] ing = new Object[ingredients.length + 1];
- System.arraycopy(ingredients, 0, ing, 1, ingredients.length);
- ing[0] = new ItemStack(PSItems.itemMashTub);
-
- addShapelessRecipe2(mashTubStack, ing);
- }
-
- private static void addShapelessRecipe2(ItemStack output, Object... params)
- {
- GameRegistry.addRecipe(new ShapelessOreRecipe(output, params));
- }
-
-}