aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-07-01 10:41:19 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-07-01 10:41:19 +1000
commit4bcf341fe8ea61e5555d6c9f60d11289d5a18694 (patch)
tree622f97d5a9b6fb2c70711f58c6567ee048459b95 /src/Java/miscutil/core
parent867af762b9a04c6e8456a583d3f4aa1702aabf18 (diff)
downloadGT5-Unofficial-4bcf341fe8ea61e5555d6c9f60d11289d5a18694.tar.gz
GT5-Unofficial-4bcf341fe8ea61e5555d6c9f60d11289d5a18694.tar.bz2
GT5-Unofficial-4bcf341fe8ea61e5555d6c9f60d11289d5a18694.zip
%Changed the way the Foresty xmod stuff runs in a non-dev situation.
%Improved Growthcraft Booze handling
Diffstat (limited to 'src/Java/miscutil/core')
-rw-r--r--src/Java/miscutil/core/lib/CORE.java2
-rw-r--r--src/Java/miscutil/core/xmod/forestry/HANDLER_Forestry.java10
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockAlveary.java219
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockRegistryApiculture.java41
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemHiveFrame.java67
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemRegistry.java (renamed from src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemRegistryApiculture.java)28
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/FR_StringUtil.java (renamed from src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/FR_StringManager.java)12
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_FrameType.java (renamed from src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_HiveFrameType.java)8
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_ItemFrame.java (renamed from src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_ItemMagicHiveFrame.java)49
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/FR_TileAlveary.java199
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/TileAlvearyMutatron.java232
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_ContainerAlvearyMutatron.java28
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_GuiAlvearyMutatron.java26
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_InventoryMutatron.java29
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/MutatronHandler.java22
-rw-r--r--src/Java/miscutil/core/xmod/forestry/apiculture/tiles/FR_TileHandler.java14
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/gui/FR_FontRenderer.java111
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestry.java272
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestryTitled.java33
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiUtil.java145
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/gui/FR_WidgetManager.java90
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/HANDLER_Gregtech.java3
-rw-r--r--src/Java/miscutil/core/xmod/growthcraft/HANDLER_Growthcraft.java55
-rw-r--r--src/Java/miscutil/core/xmod/growthcraft/booze/Register_Booze.java64
24 files changed, 140 insertions, 1619 deletions
diff --git a/src/Java/miscutil/core/lib/CORE.java b/src/Java/miscutil/core/lib/CORE.java
index e8315a2446..570059b00c 100644
--- a/src/Java/miscutil/core/lib/CORE.java
+++ b/src/Java/miscutil/core/lib/CORE.java
@@ -15,7 +15,7 @@ public class CORE {
public static final String name = "Misc. Utils";
public static final String MODID = "miscutils";
- public static final String VERSION = "1.2.2";
+ public static final String VERSION = "1.2.5";
public static final boolean DEBUG = false;
public static final boolean LOAD_ALL_CONTENT = false;
public static final int GREG_FIRST_ID = 760;
diff --git a/src/Java/miscutil/core/xmod/forestry/HANDLER_Forestry.java b/src/Java/miscutil/core/xmod/forestry/HANDLER_Forestry.java
index 94beb5618e..50b07e7535 100644
--- a/src/Java/miscutil/core/xmod/forestry/HANDLER_Forestry.java
+++ b/src/Java/miscutil/core/xmod/forestry/HANDLER_Forestry.java
@@ -1,22 +1,20 @@
package miscutil.core.xmod.forestry;
import miscutil.core.lib.LoadedMods;
-import miscutil.core.xmod.forestry.apiculture.blocks.FR_BlockRegistryApiculture;
-import miscutil.core.xmod.forestry.apiculture.items.FR_ItemRegistryApiculture;
-import miscutil.core.xmod.forestry.apiculture.tiles.FR_TileHandler;
+import miscutil.core.xmod.forestry.apiculture.items.FR_ItemRegistry;
public class HANDLER_Forestry {
public static void preInit(){
if (LoadedMods.Forestry){
- FR_ItemRegistryApiculture.RegisterApiculture();
- FR_BlockRegistryApiculture.RegistryApiculture();
+ FR_ItemRegistry.Register();
+ //FR_BlockRegistryApiculture.RegistryApiculture();
}
}
public static void Init(){
if (LoadedMods.Forestry){
- FR_TileHandler.init();
+ //FR_TileHandler.init();
}
}
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockAlveary.java b/src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockAlveary.java
deleted file mode 100644
index 62669ef8d0..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockAlveary.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.apiculture.blocks;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import miscutil.core.creative.AddToCreativeTab;
-import miscutil.core.xmod.forestry.apiculture.multiblock.TileAlvearyMutatron;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import forestry.apiculture.MaterialBeehive;
-import forestry.apiculture.multiblock.TileAlveary;
-import forestry.core.blocks.BlockStructure;
-import forestry.core.render.TextureManager;
-
-public class FR_BlockAlveary extends BlockStructure {
- public enum Type {
- PLAIN,
- MUTATRON;
- public static final Type[] VALUES = values();
- }
-
- public FR_BlockAlveary() {
- super(new MaterialBeehive(false));
- setHardness(1.0f);
- setCreativeTab(AddToCreativeTab.tabMisc);
- setHarvestLevel("axe", 0);
- }
-
- @SuppressWarnings({"rawtypes", "unchecked"})
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item item, CreativeTabs tab, List list) {
- for (int i = 0; i < 8; i++) {
- if (i == 1) {
- continue;
- }
- list.add(new ItemStack(item, 1, i));
- }
- }
-
- @Override
- public int getRenderType() {
- return 0;
- }
-
- @Override
- public boolean renderAsNormalBlock() {
- return true;
- }
-
- @Override
- public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
- ArrayList<ItemStack> drop = new ArrayList<>();
- drop.add(new ItemStack(this, 1, metadata != 1 ? metadata : 0));
- return drop;
- }
-
- @Override
- public int getDamageValue(World world, int x, int y, int z) {
- int meta = world.getBlockMetadata(x, y, z);
- return meta != 1 ? meta : 0;
- }
-
- /* TILE ENTITY CREATION */
- @Override
- public TileEntity createTileEntity(World world, int metadata) {
- if (metadata < 0 || metadata > Type.VALUES.length) {
- return null;
- }
- return new TileAlvearyMutatron();
- }
-
- @Override
- public TileEntity createNewTileEntity(World world, int meta) {
- return createTileEntity(world, meta);
- }
-
- /* ICONS */
- public static final int PLAIN = 0;
- public static final int ENTRANCE = 1;
- public static final int BOTTOM = 2;
- public static final int LEFT = 3;
- public static final int RIGHT = 4;
- public static final int MUTATRON_OFF = 5;
- public static final int MUTATRON_ON = 6;
-
- @SideOnly(Side.CLIENT)
- private IIcon[] icons;
-
- @SideOnly(Side.CLIENT)
- @Override
- public void registerBlockIcons(IIconRegister register) {
- icons = new IIcon[7];
- icons[0] = TextureManager.registerTex(register, "apiculture/alveary.plain");
- icons[1] = TextureManager.registerTex(register, "apiculture/alveary.entrance");
- icons[2] = TextureManager.registerTex(register, "apiculture/alveary.bottom");
- icons[3] = TextureManager.registerTex(register, "apiculture/alveary.left");
- icons[4] = TextureManager.registerTex(register, "apiculture/alveary.right");
- icons[5] = TextureManager.registerTex(register, "apiculture/alveary.mutatron.off");
- icons[6] = TextureManager.registerTex(register, "apiculture/alveary.mutatron.on");
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public IIcon getIcon(int side, int metadata) {
- if ((metadata <= 1 /*|| metadata == Type.MUTATRON.ordinal()*/) && (side == 1 || side == 0)) {
- return icons[BOTTOM];
- }
- return icons[MUTATRON_OFF];
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
- int meta = world.getBlockMetadata(x, y, z);
-
- if (meta == 1) {
- return this.getIcon(side, meta);
- } else if (meta > 1) {
- return getBlockTextureFromSideAndTile(world, x, y, z, side);
- }
-
- Block blockXP = world.getBlock(x + 1, y, z);
- Block blockXM = world.getBlock(x - 1, y, z);
-
- if (blockXP == this && blockXM != this) {
-
- if (world.getBlockMetadata(x + 1, y, z) == 1) {
-
- if (world.getBlock(x, y, z + 1) != this) {
- return switchForSide(42, side);
- } else {
- return switchForSide(41, side);
- }
-
- } else {
- return this.getIcon(side, meta);
- }
-
- } else if (blockXP != this && blockXM == this) {
- if (world.getBlockMetadata(x - 1, y, z) == 1) {
-
- if (world.getBlock(x, y, z + 1) != this) {
- return switchForSide(41, side);
- } else {
- return switchForSide(42, side);
- }
-
- } else {
- return this.getIcon(side, meta);
- }
- }
-
- return this.getIcon(side, meta);
- }
-
- @SideOnly(Side.CLIENT)
- private IIcon getBlockTextureFromSideAndTile(IBlockAccess world, int x, int y, int z, int side) {
- TileEntity tile = world.getTileEntity(x, y, z);
- if (!(tile instanceof TileAlveary)) {
- return getIcon(side, 0);
- }
-
- return icons[((TileAlveary) tile).getIcon(side)];
- }
-
- @SideOnly(Side.CLIENT)
- private IIcon switchForSide(int textureId, int side) {
-
- if (side == 4 || side == 5) {
- if (textureId == 41) {
- return icons[LEFT];
- } else {
- return icons[RIGHT];
- }
- } else if (textureId == 41) {
- return icons[RIGHT];
- } else {
- return icons[LEFT];
- }
-
- }
-
- @Override
- public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
- super.onNeighborBlockChange(world, x, y, z, block);
-
- TileEntity tileEntity = world.getTileEntity(x, y, z);
- if (tileEntity instanceof TileAlveary) {
- TileAlveary tileAlveary = (TileAlveary) tileEntity;
-
- // We must check that the slabs on top were not removed
- tileAlveary.getMultiblockLogic().getController().reassemble();
- }
- }
-
- public ItemStack get(Type type) {
- return new ItemStack(this, 1, type.ordinal());
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockRegistryApiculture.java b/src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockRegistryApiculture.java
deleted file mode 100644
index ebde18655f..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/blocks/FR_BlockRegistryApiculture.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.apiculture.blocks;
-
-import miscutil.core.lib.CORE;
-import net.minecraft.block.Block;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.oredict.OreDictionary;
-import cpw.mods.fml.common.registry.GameRegistry;
-import forestry.core.blocks.BlockRegistry;
-import forestry.core.items.ItemBlockForestry;
-import forestry.core.utils.StringUtil;
-public class FR_BlockRegistryApiculture extends BlockRegistry {
-
- public static FR_BlockAlveary alveary;
-
- public static void RegistryApiculture() {
- if (CORE.DEBUG){
- alveary = registerBlock2(new FR_BlockAlveary(), ItemBlockForestry.class, "alveary");
- }
- }
-
- protected static <T extends Block> T registerBlock2(T block, Class<? extends ItemBlock> itemClass, String name, Object... itemCtorArgs) {
- block.setBlockName(name);
- GameRegistry.registerBlock(block, itemClass, StringUtil.cleanBlockName(block), itemCtorArgs);
- return block;
- }
-
- protected static void registerOreDictWildcard(String oreDictName, Block block) {
- OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE));
- }
-} \ No newline at end of file
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemHiveFrame.java b/src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemHiveFrame.java
deleted file mode 100644
index cd517fd1ad..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemHiveFrame.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.apiculture.items;
-
-import miscutil.core.creative.AddToCreativeTab;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import forestry.api.apiculture.DefaultBeeModifier;
-import forestry.api.apiculture.IBee;
-import forestry.api.apiculture.IBeeGenome;
-import forestry.api.apiculture.IBeeHousing;
-import forestry.api.apiculture.IBeeModifier;
-import forestry.api.apiculture.IHiveFrame;
-
-public class FR_ItemHiveFrame extends Item implements IHiveFrame {
-
- private final IBeeModifier beeModifier;
-
- public FR_ItemHiveFrame(int maxDamage, float geneticDecay) {
- setMaxStackSize(1);
- setMaxDamage(maxDamage);
- setCreativeTab(AddToCreativeTab.tabMisc);
-
- this.beeModifier = new HiveFrameBeeModifier(geneticDecay);
- }
-
- @Override
- public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) {
- frame.setItemDamage(frame.getItemDamage() + wear);
- if (frame.getItemDamage() >= frame.getMaxDamage()) {
- return null;
- } else {
- return frame;
- }
- }
-
- @Override
- public IBeeModifier getBeeModifier() {
- return beeModifier;
- }
-
- private static class HiveFrameBeeModifier extends DefaultBeeModifier {
- private final float geneticDecay;
-
- public HiveFrameBeeModifier(float geneticDecay) {
- this.geneticDecay = geneticDecay;
- }
-
- @Override
- public float getProductionModifier(IBeeGenome genome, float currentModifier) {
- return (currentModifier < 10f) ? 2f : 1f;
- }
-
- @Override
- public float getGeneticDecay(IBeeGenome genome, float currentModifier) {
- return this.geneticDecay;
- }
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemRegistryApiculture.java b/src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemRegistry.java
index f2a64a9f90..3772d70918 100644
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemRegistryApiculture.java
+++ b/src/Java/miscutil/core/xmod/forestry/apiculture/items/FR_ItemRegistry.java
@@ -9,28 +9,28 @@
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package miscutil.core.xmod.forestry.apiculture.items;
-import miscutil.core.xmod.forestry.apiculture.items.magicbees.MB_HiveFrameType;
-import miscutil.core.xmod.forestry.apiculture.items.magicbees.MB_ItemMagicHiveFrame;
+import miscutil.core.xmod.forestry.apiculture.items.magicbees.MB_FrameType;
+import miscutil.core.xmod.forestry.apiculture.items.magicbees.MB_ItemFrame;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
import cpw.mods.fml.common.registry.GameRegistry;
-import forestry.core.items.ItemRegistry;
import forestry.core.utils.StringUtil;
-public class FR_ItemRegistryApiculture extends ItemRegistry {
+public class FR_ItemRegistry {
//----- Apiary Frames ----------------------
- public static FR_ItemHiveFrame frameUntreated;
- public static FR_ItemHiveFrame frameImpregnated;
- public static FR_ItemHiveFrame frameProven;
+ //public static FR_ItemHiveFrame frameUntreated;
+ //public static FR_ItemHiveFrame frameImpregnated;
+ //public static FR_ItemHiveFrame frameProven;
+
//Magic Bee Frame Items
- public static MB_ItemMagicHiveFrame hiveFrameMetabolic;
- public static MB_ItemMagicHiveFrame hiveFrameOblivion;
+ public static MB_ItemFrame hiveFrameAccelerated;
+ public static MB_ItemFrame hiveFrameVoid;
- public static void RegisterApiculture() {
+ public static void Register() {
//Forestry Frames
//frameUntreated = registerItem(new FR_ItemHiveFrame(80, 0.9f), "frameUntreated");
@@ -38,10 +38,10 @@ public class FR_ItemRegistryApiculture extends ItemRegistry {
//frameProven = registerItem(new FR_ItemHiveFrame(720, 0.3f), "frameProven");
//Magic Bee like Frames
- hiveFrameMetabolic = new MB_ItemMagicHiveFrame(MB_HiveFrameType.ACCELERATED);
- hiveFrameOblivion = new MB_ItemMagicHiveFrame(MB_HiveFrameType.VOID);
- ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameOblivion), 1, 1, 18));
- ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameOblivion), 1, 3, 23));
+ hiveFrameAccelerated = new MB_ItemFrame(MB_FrameType.ACCELERATED);
+ hiveFrameVoid = new MB_ItemFrame(MB_FrameType.VOID);
+ ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 1, 18));
+ ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameVoid), 1, 3, 23));
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/FR_StringManager.java b/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/FR_StringUtil.java
index f08f1fd542..235566f4ef 100644
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/FR_StringManager.java
+++ b/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/FR_StringUtil.java
@@ -2,7 +2,7 @@ package miscutil.core.xmod.forestry.apiculture.items.magicbees;
import net.minecraft.util.StatCollector;
-public class FR_StringManager
+public class FR_StringUtil
{
public static String getLocalizedString(String key)
{
@@ -10,10 +10,7 @@ public class FR_StringManager
{
return StatCollector.translateToLocal(key);
}
- else
- {
- return StatCollector.translateToFallback(key);
- }
+ return StatCollector.translateToFallback(key);
}
public static String getLocalizedString(String key, Object... objects)
@@ -22,9 +19,6 @@ public class FR_StringManager
{
return String.format(StatCollector.translateToLocal(key), objects);
}
- else
- {
- return String.format(StatCollector.translateToFallback(key), objects);
- }
+ return String.format(StatCollector.translateToFallback(key), objects);
}
}
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_HiveFrameType.java b/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_FrameType.java
index 5921867eae..0d322d4498 100644
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_HiveFrameType.java
+++ b/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_FrameType.java
@@ -3,7 +3,7 @@ package miscutil.core.xmod.forestry.apiculture.items.magicbees;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeModifier;
-public enum MB_HiveFrameType implements IBeeModifier
+public enum MB_FrameType implements IBeeModifier
{
ACCELERATED("Accelerated", 175, 1f, 2.5f, 0.9f, 1.8f, 1f),
VOID("Void", 20, 1f, 1f, 0.0001f, 10f, 1f);
@@ -22,11 +22,11 @@ public enum MB_HiveFrameType implements IBeeModifier
private final boolean isSunlit;
private final boolean isHellish;
- MB_HiveFrameType(String name, int damage, float territory, float mutation, float lifespan, float production, float geneticDecay) {
+ MB_FrameType(String name, int damage, float territory, float mutation, float lifespan, float production, float geneticDecay) {
this(name, damage, territory, mutation, lifespan, production, 1f, geneticDecay, false, false, false, false);
}
- MB_HiveFrameType(String name, int damage,
+ MB_FrameType(String name, int damage,
float territory, float mutation, float lifespan, float production, float flowering, float geneticDecay,
boolean sealed, boolean lit, boolean sunlit, boolean hellish)
{
@@ -52,7 +52,7 @@ public enum MB_HiveFrameType implements IBeeModifier
public String getLocalizedName()
{
- return FR_StringManager.getLocalizedString("frame." + this.frameName);
+ return FR_StringUtil.getLocalizedString("frame." + this.frameName);
}
@Override
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_ItemMagicHiveFrame.java b/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_ItemFrame.java
index 78e0afb55b..b12f29340c 100644
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_ItemMagicHiveFrame.java
+++ b/src/Java/miscutil/core/xmod/forestry/apiculture/items/magicbees/MB_ItemFrame.java
@@ -9,15 +9,16 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.IBee;
+import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeeModifier;
import forestry.api.apiculture.IHiveFrame;
-public class MB_ItemMagicHiveFrame extends Item implements IHiveFrame
+public class MB_ItemFrame extends Item implements IHiveFrame
{
- private MB_HiveFrameType type;
+ private MB_FrameType type;
- public MB_ItemMagicHiveFrame(MB_HiveFrameType frameType)
+ public MB_ItemFrame(MB_FrameType frameType)
{
super();
this.type = frameType;
@@ -28,6 +29,7 @@ public class MB_ItemMagicHiveFrame extends Item implements IHiveFrame
GameRegistry.registerItem(this, "frame" + frameType.getName());
}
+ @Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister)
{
@@ -48,7 +50,6 @@ public class MB_ItemMagicHiveFrame extends Item implements IHiveFrame
return frame;
}
- @Override
public IBeeModifier getBeeModifier() {
return type;
}
@@ -58,5 +59,45 @@ public class MB_ItemMagicHiveFrame extends Item implements IHiveFrame
{
return false;
}
+
+ public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
+ return type.getTerritoryModifier(genome, currentModifier);
+ }
+
+ public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
+ return type.getMutationModifier(genome, mate, currentModifier);
+ }
+
+ public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
+ return type.getLifespanModifier(genome, mate, currentModifier);
+ }
+
+ public float getProductionModifier(IBeeGenome genome, float currentModifier) {
+ return type.getProductionModifier(genome, currentModifier);
+ }
+
+ public float getFloweringModifier(IBeeGenome genome, float currentModifier) {
+ return type.getFloweringModifier(genome, currentModifier);
+ }
+
+ public float getGeneticDecay(IBeeGenome genome, float currentModifier) {
+ return type.getGeneticDecay(genome, currentModifier);
+ }
+
+ public boolean isSealed() {
+ return type.isSealed();
+ }
+
+ public boolean isSelfLighted() {
+ return type.isSelfLighted();
+ }
+
+ public boolean isSunlightSimulated() {
+ return type.isSunlightSimulated();
+ }
+
+ public boolean isHellish(){
+ return type.isHellish();
+ }
}
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/FR_TileAlveary.java b/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/FR_TileAlveary.java
deleted file mode 100644
index 06633a87cf..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/FR_TileAlveary.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.apiculture.multiblock;
-
-import java.io.IOException;
-import java.util.List;
-
-import miscutil.core.xmod.forestry.apiculture.blocks.FR_BlockAlveary;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.util.ChunkCoordinates;
-import net.minecraft.util.Vec3;
-import net.minecraft.world.biome.BiomeGenBase;
-import forestry.api.apiculture.IBeeHousing;
-import forestry.api.apiculture.IBeeHousingInventory;
-import forestry.api.apiculture.IBeeListener;
-import forestry.api.apiculture.IBeeModifier;
-import forestry.api.apiculture.IBeekeepingLogic;
-import forestry.api.core.EnumHumidity;
-import forestry.api.core.EnumTemperature;
-import forestry.api.core.IErrorLogic;
-import forestry.api.multiblock.IAlvearyComponent;
-import forestry.api.multiblock.IMultiblockController;
-import forestry.apiculture.multiblock.MultiblockLogicAlveary;
-import forestry.core.access.EnumAccess;
-import forestry.core.access.IAccessHandler;
-import forestry.core.access.IRestrictedAccess;
-import forestry.core.config.Config;
-import forestry.core.gui.IHintSource;
-import forestry.core.inventory.IInventoryAdapter;
-import forestry.core.multiblock.MultiblockTileEntityForestry;
-import forestry.core.network.DataInputStreamForestry;
-import forestry.core.network.DataOutputStreamForestry;
-import forestry.core.network.IStreamableGui;
-import forestry.core.tiles.IClimatised;
-import forestry.core.tiles.ITitled;
-
-public abstract class FR_TileAlveary extends MultiblockTileEntityForestry<MultiblockLogicAlveary> implements IBeeHousing, IAlvearyComponent, IRestrictedAccess, IStreamableGui, ITitled, IClimatised, IHintSource {
- private final String unlocalizedTitle;
-
- protected FR_TileAlveary() {
- this(FR_BlockAlveary.Type.PLAIN);
- }
-
- protected FR_TileAlveary(FR_BlockAlveary.Type type) {
- super(new MultiblockLogicAlveary());
- this.unlocalizedTitle = "tile.alveary." + type.ordinal() + ".name";
- }
-
- /* TEXTURES */
- public int getIcon(int side) {
- return FR_BlockAlveary.PLAIN;
- }
-
- @Override
- public void onMachineAssembled(IMultiblockController multiblockController, ChunkCoordinates minCoord, ChunkCoordinates maxCoord) {
- // Re-render this block on the client
- if (worldObj.isRemote) {
- this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- }
- worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
- markDirty();
- }
-
- @Override
- public void onMachineBroken() {
- // Re-render this block on the client
- if (worldObj.isRemote) {
- this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- }
- worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
- markDirty();
- }
-
- /* IHousing */
- @Override
- public BiomeGenBase getBiome() {
- return getMultiblockLogic().getController().getBiome();
- }
-
- /* IBeeHousing */
- @Override
- public Iterable<IBeeModifier> getBeeModifiers() {
- return getMultiblockLogic().getController().getBeeModifiers();
- }
-
- @Override
- public Iterable<IBeeListener> getBeeListeners() {
- return getMultiblockLogic().getController().getBeeListeners();
- }
-
- @Override
- public IBeeHousingInventory getBeeInventory() {
- return getMultiblockLogic().getController().getBeeInventory();
- }
-
- @Override
- public IBeekeepingLogic getBeekeepingLogic() {
- return getMultiblockLogic().getController().getBeekeepingLogic();
- }
-
- @Override
- public Vec3 getBeeFXCoordinates() {
- return getMultiblockLogic().getController().getBeeFXCoordinates();
- }
-
- /* IClimatised */
- @Override
- public EnumTemperature getTemperature() {
- return getMultiblockLogic().getController().getTemperature();
- }
-
- @Override
- public EnumHumidity getHumidity() {
- return getMultiblockLogic().getController().getHumidity();
- }
-
- @Override
- public int getBlockLightValue() {
- return getMultiblockLogic().getController().getBlockLightValue();
- }
-
- @Override
- public boolean canBlockSeeTheSky() {
- return getMultiblockLogic().getController().canBlockSeeTheSky();
- }
-
- @Override
- public IErrorLogic getErrorLogic() {
- return getMultiblockLogic().getController().getErrorLogic();
- }
-
- @Override
- public IAccessHandler getAccessHandler() {
- return getMultiblockLogic().getController().getAccessHandler();
- }
-
- @Override
- public void onSwitchAccess(EnumAccess oldAccess, EnumAccess newAccess) {
- getMultiblockLogic().getController().onSwitchAccess(oldAccess, newAccess);
- }
-
- @Override
- public IInventoryAdapter getInternalInventory() {
- return getMultiblockLogic().getController().getInternalInventory();
- }
-
- @Override
- public String getUnlocalizedTitle() {
- return unlocalizedTitle;
- }
-
- /* IHintSource */
- @Override
- public List<String> getHints() {
- return Config.hints.get("apiary");
- }
-
- /* IClimatised */
- @Override
- public float getExactTemperature() {
- return getMultiblockLogic().getController().getExactTemperature();
- }
-
- @Override
- public float getExactHumidity() {
- return getMultiblockLogic().getController().getExactHumidity();
- }
-
- /* IStreamableGui */
- @Override
- public void writeGuiData(DataOutputStreamForestry data) throws IOException {
- getMultiblockLogic().getController().writeGuiData(data);
- }
-
- @Override
- public void readGuiData(DataInputStreamForestry data) throws IOException {
- getMultiblockLogic().getController().readGuiData(data);
- }
-
- @Override
- public Object getGui(EntityPlayer player, int data) {
- //return new GuiAlveary(player.inventory, this);
- return null; //TODO
- }
-
- @Override
- public Object getContainer(EntityPlayer player, int data) {
- //return new ContainerAlveary(player.inventory, this);
- return null; //TODO
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/TileAlvearyMutatron.java b/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/TileAlvearyMutatron.java
deleted file mode 100644
index c784f69ea7..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/TileAlvearyMutatron.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.apiculture.multiblock;
-
-import java.util.Map.Entry;
-import java.util.Stack;
-
-import miscutil.core.xmod.forestry.apiculture.blocks.FR_BlockAlveary;
-import miscutil.core.xmod.forestry.apiculture.multiblock.inventory.FR_ContainerAlvearyMutatron;
-import miscutil.core.xmod.forestry.apiculture.multiblock.inventory.FR_GuiAlvearyMutatron;
-import miscutil.core.xmod.forestry.apiculture.multiblock.inventory.FR_InventoryMutatron;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.ISidedInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import forestry.api.apiculture.BeeManager;
-import forestry.api.apiculture.EnumBeeType;
-import forestry.api.apiculture.IBee;
-import forestry.api.multiblock.IAlvearyComponent;
-import forestry.apiculture.blocks.BlockAlveary;
-import forestry.apiculture.network.packets.PacketActiveUpdate;
-import forestry.apiculture.worldgen.Hive;
-import forestry.apiculture.worldgen.HiveDecorator;
-import forestry.apiculture.worldgen.HiveDescriptionSwarmer;
-import forestry.core.inventory.IInventoryAdapter;
-import forestry.core.inventory.wrappers.IInvSlot;
-import forestry.core.inventory.wrappers.InventoryIterator;
-import forestry.core.proxy.Proxies;
-import forestry.core.tiles.IActivatable;
-import forestry.core.utils.ItemStackUtil;
-
-public class TileAlvearyMutatron extends FR_TileAlveary implements ISidedInventory, IActivatable, IAlvearyComponent.Active {
-
- private final FR_InventoryMutatron inventory;
- private final Stack<ItemStack> pendingSpawns = new Stack<>();
- private boolean active;
-
- public TileAlvearyMutatron() {
- super(FR_BlockAlveary.Type.MUTATRON);
- this.inventory = new FR_InventoryMutatron(this);
- }
-
- @Override
- public IInventoryAdapter getInternalInventory() {
- return inventory;
- }
-
- @Override
- public boolean allowsAutomation() {
- return true;
- }
-
- /* UPDATING */
- @Override
- public void updateServer(int tickCount) {
- if (pendingSpawns.size() > 0) {
- setActive(true);
- if (tickCount % 1000 == 0) {
- trySpawnSwarm();
- }
- } else {
- setActive(false);
- }
-
- if (tickCount % 500 != 0) {
- return;
- }
-
- ItemStack princessStack = getPrincessStack();
- if (princessStack == null) {
- return;
- }
-
- int chance = consumeInducerAndGetChance();
- if (chance == 0) {
- return;
- }
-
- // Try to spawn princess
- if (worldObj.rand.nextInt(1000) >= chance) {
- return;
- }
-
- // Queue swarm spawn
- IBee princess = BeeManager.beeRoot.getMember(princessStack);
- princess.setIsNatural(false);
- pendingSpawns.push(BeeManager.beeRoot.getMemberStack(princess, EnumBeeType.PRINCESS.ordinal()));
- }
-
- @Override
- public void updateClient(int tickCount) {
-
- }
-
- private ItemStack getPrincessStack() {
- ItemStack princessStack = getMultiblockLogic().getController().getBeeInventory().getQueen();
-
- if (BeeManager.beeRoot.isMated(princessStack)) {
- return princessStack;
- }
-
- return null;
- }
-
- private int consumeInducerAndGetChance() {
- if (getInternalInventory() == null) {
- return 0;
- }
-
- for (IInvSlot slot : InventoryIterator.getIterable(getInternalInventory())) {
- ItemStack stack = slot.getStackInSlot();
- for (Entry<ItemStack, Integer> entry : BeeManager.inducers.entrySet()) {
- if (ItemStackUtil.isIdenticalItem(entry.getKey(), stack)) {
- slot.decreaseStackInSlot();
- return entry.getValue();
- }
- }
- }
-
- return 0;
- }
-
- private void trySpawnSwarm() {
-
- ItemStack toSpawn = pendingSpawns.peek();
- HiveDescriptionSwarmer hiveDescription = new HiveDescriptionSwarmer(toSpawn);
- Hive hive = new Hive(hiveDescription);
-
- int chunkX = (xCoord + worldObj.rand.nextInt(40 * 2) - 40) / 16;
- int chunkZ = (zCoord + worldObj.rand.nextInt(40 * 2) - 40) / 16;
-
- if (HiveDecorator.genHive(worldObj, worldObj.rand, chunkX, chunkZ, hive)) {
- pendingSpawns.pop();
- }
- }
-
- /* NETWORK */
-
- @Override
- protected void encodeDescriptionPacket(NBTTagCompound packetData) {
- super.encodeDescriptionPacket(packetData);
- packetData.setBoolean("Active", active);
- }
-
- @Override
- protected void decodeDescriptionPacket(NBTTagCompound packetData) {
- super.decodeDescriptionPacket(packetData);
- setActive(packetData.getBoolean("Active"));
- }
-
- /* TEXTURES */
- @Override
- public int getIcon(int side) {
- if (side == 0 || side == 1) {
- return BlockAlveary.BOTTOM;
- }
-
- if (active) {
- return BlockAlveary.ALVEARY_SWARMER_ON;
- } else {
- return BlockAlveary.ALVEARY_SWARMER_OFF;
- }
- }
-
- /* SAVING & LOADING */
- @Override
- public void readFromNBT(NBTTagCompound nbttagcompound) {
- super.readFromNBT(nbttagcompound);
- setActive(nbttagcompound.getBoolean("Active"));
-
- NBTTagList nbttaglist = nbttagcompound.getTagList("PendingSpawns", 10);
- for (int i = 0; i < nbttaglist.tagCount(); i++) {
- NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
- pendingSpawns.add(ItemStack.loadItemStackFromNBT(nbttagcompound1));
- }
- }
-
- @Override
- public void writeToNBT(NBTTagCompound nbttagcompound) {
- super.writeToNBT(nbttagcompound);
- nbttagcompound.setBoolean("Active", active);
-
- NBTTagList nbttaglist = new NBTTagList();
- ItemStack[] offspring = pendingSpawns.toArray(new ItemStack[pendingSpawns.size()]);
- for (int i = 0; i < offspring.length; i++) {
- if (offspring[i] != null) {
- NBTTagCompound nbttagcompound1 = new NBTTagCompound();
- nbttagcompound1.setByte("Slot", (byte) i);
- offspring[i].writeToNBT(nbttagcompound1);
- nbttaglist.appendTag(nbttagcompound1);
- }
- }
- nbttagcompound.setTag("PendingSpawns", nbttaglist);
- }
-
- @Override
- public boolean isActive() {
- return active;
- }
-
- @Override
- public void setActive(boolean active) {
- if (this.active == active) {
- return;
- }
-
- this.active = active;
-
- if (!worldObj.isRemote) {
- Proxies.net.sendNetworkPacket(new PacketActiveUpdate(this), worldObj);
- }
- }
-
- @Override
- public Object getGui(EntityPlayer player, int data) {
- return new FR_GuiAlvearyMutatron(player.inventory, this);
- }
-
- @Override
- public Object getContainer(EntityPlayer player, int data) {
- return new FR_ContainerAlvearyMutatron(player.inventory, this);
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_ContainerAlvearyMutatron.java b/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_ContainerAlvearyMutatron.java
deleted file mode 100644
index 5af0978631..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_ContainerAlvearyMutatron.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package miscutil.core.xmod.forestry.apiculture.multiblock.inventory;
-
-import miscutil.core.xmod.forestry.apiculture.multiblock.TileAlvearyMutatron;
-import net.minecraft.entity.player.InventoryPlayer;
-import forestry.core.gui.ContainerTile;
-import forestry.core.gui.slots.SlotFiltered;
-
-public class FR_ContainerAlvearyMutatron extends ContainerTile<TileAlvearyMutatron> {
- public FR_ContainerAlvearyMutatron(InventoryPlayer player, TileAlvearyMutatron tile) {
- super(tile, player, 8, 87);
- this.addSlotToContainer(new SlotFiltered(tile, 0, 79, 52));
- this.addSlotToContainer(new SlotFiltered(tile, 1, 100, 39));
- this.addSlotToContainer(new SlotFiltered(tile, 2, 58, 39));
- this.addSlotToContainer(new SlotFiltered(tile, 3, 79, 26));
- }
-}
-
-
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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
- ******************************************************************************/
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_GuiAlvearyMutatron.java b/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_GuiAlvearyMutatron.java
deleted file mode 100644
index b85d5e38a0..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_GuiAlvearyMutatron.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package miscutil.core.xmod.forestry.apiculture.multiblock.inventory;
-
-import miscutil.core.lib.CORE;
-import miscutil.core.xmod.forestry.apiculture.multiblock.TileAlvearyMutatron;
-import miscutil.core.xmod.forestry.core.gui.FR_GuiForestryTitled;
-import net.minecraft.entity.player.InventoryPlayer;
-
-public class FR_GuiAlvearyMutatron extends FR_GuiForestryTitled<FR_ContainerAlvearyMutatron, TileAlvearyMutatron> {
-
- public FR_GuiAlvearyMutatron(InventoryPlayer inventory, TileAlvearyMutatron tile) {
- super(CORE.MODID+"/swarmer.png", new FR_ContainerAlvearyMutatron(inventory, tile), tile);
- }
-
- }
-
-
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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
- ******************************************************************************/ \ No newline at end of file
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_InventoryMutatron.java b/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_InventoryMutatron.java
deleted file mode 100644
index aa51d3ebb1..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/FR_InventoryMutatron.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package miscutil.core.xmod.forestry.apiculture.multiblock.inventory;
-
-import miscutil.core.xmod.forestry.apiculture.multiblock.TileAlvearyMutatron;
-import net.minecraft.item.ItemStack;
-import forestry.api.apiculture.BeeManager;
-import forestry.core.inventory.InventoryAdapterTile;
-import forestry.core.utils.ItemStackUtil;
-
-public class FR_InventoryMutatron extends InventoryAdapterTile<TileAlvearyMutatron> {
- public FR_InventoryMutatron(TileAlvearyMutatron alvearyMutatron) {
- super(alvearyMutatron, 4, "mutatronInv");
- }
- @Override
- public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
- return ItemStackUtil.containsItemStack(BeeManager.inducers.keySet(), itemStack);
- }
-}
-
-
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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
- ******************************************************************************/ \ No newline at end of file
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/MutatronHandler.java b/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/MutatronHandler.java
deleted file mode 100644
index e629eeca51..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/multiblock/inventory/MutatronHandler.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.apiculture.multiblock.inventory;
-
-public class MutatronHandler {
-
-
-
-
-
-
-
-
-} \ No newline at end of file
diff --git a/src/Java/miscutil/core/xmod/forestry/apiculture/tiles/FR_TileHandler.java b/src/Java/miscutil/core/xmod/forestry/apiculture/tiles/FR_TileHandler.java
deleted file mode 100644
index 7ab787052b..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/apiculture/tiles/FR_TileHandler.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package miscutil.core.xmod.forestry.apiculture.tiles;
-
-import miscutil.core.lib.CORE;
-import miscutil.core.xmod.forestry.apiculture.multiblock.TileAlvearyMutatron;
-import cpw.mods.fml.common.registry.GameRegistry;
-
-public class FR_TileHandler {
-
- public static void init(){
- if (CORE.DEBUG){
- GameRegistry.registerTileEntity(TileAlvearyMutatron.class, "MiscUtils.AlvearyMutatron");
- }
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_FontRenderer.java b/src/Java/miscutil/core/xmod/forestry/core/gui/FR_FontRenderer.java
deleted file mode 100644
index 27de0a712c..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_FontRenderer.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.core.gui;
-
-import net.minecraft.client.gui.FontRenderer;
-
-import org.lwjgl.opengl.GL11;
-
-import forestry.core.render.FontColour;
-
-public class FR_FontRenderer {
- private static final int LINE_HEIGHT = 12;
-
- private final FR_GuiForestry guiForestry;
- private final int defaultFontColor;
- private FontRenderer fontRendererObj;
-
- public int column0;
- public int column1;
- public int column2;
- public int line;
-
- public FR_FontRenderer(FR_GuiForestry guiForestry, FontColour fontColour) {
- this.guiForestry = guiForestry;
- this.defaultFontColor = fontColour.get("gui.screen");
- }
-
- public void setFontRendererObj(FontRenderer fontRendererObj) {
- this.fontRendererObj = fontRendererObj;
- }
-
- public void startPage() {
- line = LINE_HEIGHT;
- GL11.glPushMatrix();
- }
-
- public void startPage(int column0, int column1, int column2) {
-
- this.column0 = column0;
- this.column1 = column1;
- this.column2 = column2;
-
- startPage();
- }
-
- public int getLineY() {
- return line;
- }
-
- public void newLine() {
- line += LINE_HEIGHT;
- }
-
- public void newLineCompressed() {
- line += (LINE_HEIGHT - 2);
- }
-
- public void newLine(int lineHeight) {
- line += lineHeight;
- }
-
- public void endPage() {
- GL11.glPopMatrix();
- }
-
- public void drawRow(String text0, String text1, String text2, int colour0, int colour1, int colour2) {
- drawLine(text0, column0, colour0);
- drawLine(text1, column1, colour1);
- drawLine(text2, column2, colour2);
- }
-
- public void drawLine(String text, int x) {
- drawLine(text, x, defaultFontColor);
- }
-
- public void drawSplitLine(String text, int x, int maxWidth) {
- drawSplitLine(text, x, maxWidth, defaultFontColor);
- }
-
- public void drawCenteredLine(String text, int x, int color) {
- drawCenteredLine(text, x, guiForestry.getSizeX(), color);
- }
-
- public void drawCenteredLine(String text, int x, int width, int color) {
- fontRendererObj.drawString(text, guiForestry.getGuiLeft() + x + getCenteredOffset(text, width), guiForestry.getGuiTop() + line, color);
- }
-
- public void drawLine(String text, int x, int color) {
- fontRendererObj.drawString(text, guiForestry.getGuiLeft() + x, guiForestry.getGuiTop() + line, color);
- }
-
- public void drawSplitLine(String text, int x, int maxWidth, int color) {
- fontRendererObj.drawSplitString(text, guiForestry.getGuiLeft() + x, guiForestry.getGuiTop() + line, maxWidth, color);
- }
-
- public int getCenteredOffset(String string) {
- return getCenteredOffset(string, guiForestry.getSizeX());
- }
-
- public int getCenteredOffset(String string, int xWidth) {
- return (xWidth - fontRendererObj.getStringWidth(string)) / 2;
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestry.java b/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestry.java
deleted file mode 100644
index 1a2863a528..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestry.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.core.gui;
-
-import java.util.List;
-
-import miscutil.core.lib.CORE;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.inventory.GuiContainer;
-import net.minecraft.client.renderer.OpenGlHelper;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.util.ResourceLocation;
-
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL12;
-
-import forestry.api.core.IErrorLogicSource;
-import forestry.api.core.IErrorSource;
-import forestry.core.access.IRestrictedAccess;
-import forestry.core.config.Config;
-import forestry.core.gui.IHintSource;
-import forestry.core.gui.ledgers.ClimateLedger;
-import forestry.core.gui.ledgers.HintLedger;
-import forestry.core.gui.ledgers.LedgerManager;
-import forestry.core.gui.ledgers.OwnerLedger;
-import forestry.core.gui.ledgers.PowerLedger;
-import forestry.core.proxy.Proxies;
-import forestry.core.render.FontColour;
-import forestry.core.tiles.IClimatised;
-import forestry.core.tiles.IPowerHandler;
-
-public abstract class FR_GuiForestry<C extends Container, I extends IInventory> extends GuiContainer {
- protected final I inventory;
- protected final C container;
-
- public final ResourceLocation textureFile;
- protected final FR_WidgetManager widgetManager;
- protected LedgerManager ledgerManager;
- protected FR_FontRenderer textLayout;
- protected FontColour fontColor;
-
- protected FR_GuiForestry(String texture, C container, I inventory) {
- this(new ResourceLocation(CORE.MODID, texture), container, inventory);
- }
-
- protected FR_GuiForestry(ResourceLocation texture, C container, I inventory) {
- super(container);
-
- this.widgetManager = new FR_WidgetManager(this);
-
- this.textureFile = texture;
-
- this.inventory = inventory;
- this.container = container;
-
- this.fontColor = new FontColour(Proxies.render.getSelectedTexturePack());
- this.textLayout = new FR_FontRenderer(this, this.fontColor);
- }
-
- @Override
- public void setWorldAndResolution(Minecraft minecraft, int width, int height) {
- super.setWorldAndResolution(minecraft, width, height);
- textLayout.setFontRendererObj(fontRendererObj);
- }
-
- /* LEDGERS */
- @Override
- public void initGui() {
- super.initGui();
-
- int maxLedgerWidth = (this.width - this.xSize) / 2;
- //this.ledgerManager = new LedgerManager(this, maxLedgerWidth);
-
- addLedgers();
- }
-
- protected void addLedgers() {
- if (inventory instanceof IErrorSource) {
- ledgerManager.add((IErrorSource) inventory);
- }
-
- if (inventory instanceof IErrorLogicSource) {
- IErrorLogicSource errorLogicSource = (IErrorLogicSource) inventory;
- ledgerManager.add(errorLogicSource.getErrorLogic());
- }
-
- if (inventory instanceof IClimatised) {
- ledgerManager.add(new ClimateLedger(ledgerManager, (IClimatised) inventory));
- }
-
- if (Config.enableEnergyStat && inventory instanceof IPowerHandler && ((IPowerHandler) inventory).getEnergyManager().getMaxEnergyStored() > 0) {
- ledgerManager.add(new PowerLedger(ledgerManager, (IPowerHandler) inventory));
- }
-
- if (Config.enableHints && inventory instanceof IHintSource) {
- IHintSource hintSource = (IHintSource) inventory;
- List<String> hints = hintSource.getHints();
- if (hints != null && hints.size() > 0) {
- ledgerManager.add(new HintLedger(ledgerManager, hintSource));
- }
- }
-
- if (inventory instanceof IRestrictedAccess) {
- ledgerManager.add(new OwnerLedger(ledgerManager, (IRestrictedAccess) inventory));
- }
- }
-
- @Override
- public void onGuiClosed() {
- super.onGuiClosed();
- ledgerManager.onGuiClosed();
- }
-
- public FontColour getFontColor() {
- return fontColor;
- }
-
- public FontRenderer getFontRenderer() {
- return fontRendererObj;
- }
-
- @Override
- protected void mouseClicked(int xPos, int yPos, int mouseButton) {
- super.mouseClicked(xPos, yPos, mouseButton);
-
- // / Handle ledger clicks
- ledgerManager.handleMouseClicked(xPos, yPos, mouseButton);
- widgetManager.handleMouseClicked(xPos, yPos, mouseButton);
- }
-
- @Override
- protected void mouseMovedOrUp(int mouseX, int mouseY, int eventType) {
- super.mouseMovedOrUp(mouseX, mouseY, eventType);
-
- widgetManager.handleMouseRelease(mouseX, mouseY, eventType);
- }
-
- @Override
- protected void mouseClickMove(int mouseX, int mouseY, int mouseButton, long time) {
-
- widgetManager.handleMouseMove(mouseX, mouseY, mouseButton, time);
-
- super.mouseClickMove(mouseX, mouseY, mouseButton, time);
- }
-
- protected Slot getSlotAtPosition(int par1, int par2) {
- for (int k = 0; k < this.inventorySlots.inventorySlots.size(); ++k) {
- Slot slot = (Slot) this.inventorySlots.inventorySlots.get(k);
-
- if (isMouseOverSlot(slot, par1, par2)) {
- return slot;
- }
- }
-
- return null;
- }
-
- private boolean isMouseOverSlot(Slot par1Slot, int par2, int par3) {
- return this.func_146978_c(par1Slot.xDisplayPosition, par1Slot.yDisplayPosition, 16, 16, par2, par3);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- {
- RenderHelper.enableGUIStandardItemLighting();
- GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glDisable(GL11.GL_DEPTH_TEST);
- OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240 / 1.0F, 240 / 1.0F);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
- ledgerManager.drawTooltips(mouseX, mouseY);
-
- InventoryPlayer playerInv = mc.thePlayer.inventory;
-
- if (playerInv.getItemStack() == null) {
- FR_GuiUtil.drawToolTips(this, widgetManager.getWidgets(), mouseX, mouseY);
- FR_GuiUtil.drawToolTips(this, buttonList, mouseX, mouseY);
- FR_GuiUtil.drawToolTips(this, inventorySlots.inventorySlots, mouseX, mouseY);
- }
- }
- GL11.glPopAttrib();
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
- bindTexture(textureFile);
-
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
-
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- {
- RenderHelper.enableGUIStandardItemLighting();
- GL11.glDisable(GL11.GL_LIGHTING);
- GL11.glDisable(GL11.GL_DEPTH_TEST);
- GL11.glPushMatrix();
- {
- GL11.glTranslatef(guiLeft, guiTop, 0.0F);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
- GL11.glEnable(GL12.GL_RESCALE_NORMAL);
- OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240 / 1.0F, 240 / 1.0F);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
- drawWidgets();
- }
- GL11.glPopMatrix();
- }
- GL11.glPopAttrib();
-
- bindTexture(textureFile);
- }
-
- protected void drawWidgets() {
- ledgerManager.drawLedgers();
- widgetManager.drawWidgets();
- }
-
- protected void bindTexture(ResourceLocation texturePath) {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- Proxies.render.bindTexture(texturePath);
- }
-
- public void setZLevel(float level) {
- this.zLevel = level;
- }
-
- public static RenderItem getItemRenderer() {
- return itemRender;
- }
-
- public int getSizeX() {
- return xSize;
- }
-
- public int getSizeY() {
- return ySize;
- }
-
- public int getGuiLeft() {
- return guiLeft;
- }
-
- public int getGuiTop() {
- return guiTop;
- }
-
- @Override
- public void drawGradientRect(int par1, int par2, int par3, int par4, int par5, int par6) {
- super.drawGradientRect(par1, par2, par3, par4, par5, par6);
- }
-}
-
-
-
-
diff --git a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestryTitled.java b/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestryTitled.java
deleted file mode 100644
index 95a08da1bd..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiForestryTitled.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.core.gui;
-
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.util.StatCollector;
-import forestry.core.tiles.ITitled;
-
-public abstract class FR_GuiForestryTitled<C extends Container, I extends ITitled & IInventory> extends FR_GuiForestry<C, I> {
-
- protected FR_GuiForestryTitled(String texture, C container, I inventory) {
- super(texture, container, inventory);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
- super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
-
- String name = StatCollector.translateToLocal(inventory.getUnlocalizedTitle());
- textLayout.line = 6;
- textLayout.drawCenteredLine(name, 0, fontColor.get("gui.title"));
- bindTexture(textureFile);
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiUtil.java b/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiUtil.java
deleted file mode 100644
index d30324041f..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_GuiUtil.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.core.gui;
-
-import java.awt.Color;
-import java.util.Collection;
-
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.client.renderer.entity.RenderItem;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-
-import org.lwjgl.opengl.GL11;
-
-import forestry.core.gui.tooltips.IToolTipProvider;
-import forestry.core.gui.tooltips.ToolTip;
-import forestry.core.gui.tooltips.ToolTipLine;
-
-public class FR_GuiUtil {
- public static void drawItemStack(FR_GuiForestry gui, ItemStack stack, int xPos, int yPos) {
- GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
- RenderHelper.enableGUIStandardItemLighting();
-
- RenderItem itemRender = FR_GuiForestry.getItemRenderer();
-
- GL11.glTranslatef(0.0F, 0.0F, 32.0F);
- gui.setZLevel(100.0F);
- itemRender.zLevel = 100.0F;
- FontRenderer font = null;
- if (stack != null) {
- font = stack.getItem().getFontRenderer(stack);
- }
- if (font == null) {
- font = gui.getFontRenderer();
- }
- itemRender.renderItemAndEffectIntoGUI(font, gui.mc.getTextureManager(), stack, xPos, yPos);
- itemRender.renderItemOverlayIntoGUI(font, gui.mc.getTextureManager(), stack, xPos, yPos);
- gui.setZLevel(0.0F);
- itemRender.zLevel = 0.0F;
-
- RenderHelper.disableStandardItemLighting();
- GL11.glPopAttrib();
- }
-
- public static void drawToolTips(FR_GuiForestry gui, ToolTip toolTips, int mouseX, int mouseY) {
- if (toolTips == null) {
- return;
- }
- if (toolTips.isEmpty()) {
- return;
- }
-
- RenderItem itemRender = FR_GuiForestry.getItemRenderer();
- FontRenderer fontRendererObj = gui.getFontRenderer();
-
- int left = gui.getGuiLeft();
- int top = gui.getGuiTop();
- int length = 0;
- int height = 0;
- int x;
- int y;
-
- for (ToolTipLine tip : toolTips) {
- y = fontRendererObj.getStringWidth(tip.toString());
-
- height += 10 + tip.getSpacing();
- if (y > length) {
- length = y;
- }
- }
-
- x = mouseX - left + 12;
- y = mouseY - top - 12;
-
- gui.setZLevel(300.0F);
- itemRender.zLevel = 300.0F;
- Color backgroundColor = new Color(16, 0, 16, 240);
- int backgroundColorInt = backgroundColor.getRGB();
- gui.drawGradientRect(x - 3, y - 4, x + length + 2, y - 3, backgroundColorInt, backgroundColorInt);
- gui.drawGradientRect(x - 3, y + height + 1, x + length + 2, y + height + 2, backgroundColorInt, backgroundColorInt);
- gui.drawGradientRect(x - 3, y - 3, x + length + 2, y + height + 1, backgroundColorInt, backgroundColorInt);
- gui.drawGradientRect(x - 4, y - 3, x - 3, y + height + 1, backgroundColorInt, backgroundColorInt);
- gui.drawGradientRect(x + length + 2, y - 3, x + length + 3, y + height + 1, backgroundColorInt, backgroundColorInt);
-
- Color borderColorTop = new Color(80, 0, 255, 80);
- int borderColorTopInt = borderColorTop.getRGB();
- Color borderColorBottom = new Color((borderColorTopInt & 0xfefefe) >> 1 | borderColorTopInt & -0x1000000, true);
- int borderColorBottomInt = borderColorBottom.getRGB();
- gui.drawGradientRect(x - 3, y - 3 + 1, x - 3 + 1, y + height, borderColorTopInt, borderColorBottomInt);
- gui.drawGradientRect(x + length + 1, y - 3 + 1, x + length + 2, y + height, borderColorTopInt, borderColorBottomInt);
- gui.drawGradientRect(x - 3, y - 3, x + length + 2, y - 3 + 1, borderColorTopInt, borderColorTopInt);
- gui.drawGradientRect(x - 3, y + height, x + length + 2, y + height + 1, borderColorBottomInt, borderColorBottomInt);
-
- boolean firstLine = true;
- for (ToolTipLine tip : toolTips) {
- String line;
-
- if (firstLine) {
- line = tip.toString();
- } else {
- line = EnumChatFormatting.GRAY + tip.toString();
- }
-
- fontRendererObj.drawStringWithShadow(line, x, y, -1);
-
- y += 10 + tip.getSpacing();
-
- firstLine = false;
- }
-
- gui.setZLevel(0.0F);
- itemRender.zLevel = 0.0F;
- }
-
- public static void drawToolTips(FR_GuiForestry gui, Collection<?> objects, int mouseX, int mouseY) {
- for (Object obj : objects) {
- if (!(obj instanceof IToolTipProvider)) {
- continue;
- }
- IToolTipProvider provider = (IToolTipProvider) obj;
- if (!provider.isToolTipVisible()) {
- continue;
- }
- ToolTip tips = provider.getToolTip(mouseX - gui.getGuiLeft(), mouseY - gui.getGuiTop());
- if (tips == null) {
- continue;
- }
- boolean mouseOver = provider.isMouseOver(mouseX - gui.getGuiLeft(), mouseY - gui.getGuiTop());
- tips.onTick(mouseOver);
- if (mouseOver && tips.isReady()) {
- tips.refresh();
- drawToolTips(gui, tips, mouseX, mouseY);
- }
- }
- }
-}
diff --git a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_WidgetManager.java b/src/Java/miscutil/core/xmod/forestry/core/gui/FR_WidgetManager.java
deleted file mode 100644
index ce809c1066..0000000000
--- a/src/Java/miscutil/core/xmod/forestry/core/gui/FR_WidgetManager.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011-2014 SirSengir.
- * All rights reserved. This program and the accompanying materials
- * 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 miscutil.core.xmod.forestry.core.gui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import net.minecraft.client.Minecraft;
-
-import org.lwjgl.opengl.GL11;
-
-import forestry.core.gui.widgets.Widget;
-import forestry.core.proxy.Proxies;
-
-public class FR_WidgetManager {
-
- public final FR_GuiForestry gui;
- public final Minecraft minecraft;
- protected final List<Widget> widgets = new ArrayList<>();
-
- public FR_WidgetManager(FR_GuiForestry gui) {
- this.gui = gui;
- this.minecraft = Proxies.common.getClientInstance();
- }
-
- public void add(Widget slot) {
- this.widgets.add(slot);
- }
-
- public void remove(Widget slot) {
- this.widgets.remove(slot);
- }
-
- public void clear() {
- this.widgets.clear();
- }
-
- public List<Widget> getWidgets() {
- return widgets;
- }
-
- public Widget getAtPosition(int mX, int mY) {
- for (Widget slot : widgets) {
- if (slot.isMouseOver(mX, mY)) {
- return slot;
- }
- }
-
- return null;
- }
-
- public void drawWidgets() {
- gui.setZLevel(100.0F);
- FR_GuiForestry.getItemRenderer().zLevel = 100.0F;
- for (Widget slot : widgets) {
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- slot.draw(0, 0);
- }
- gui.setZLevel(0.0F);
- FR_GuiForestry.getItemRenderer().zLevel = 0.0F;
-
- }
-
- public void handleMouseClicked(int mouseX, int mouseY, int mouseButton) {
- Widget slot = getAtPosition(mouseX - gui.getGuiLeft(), mouseY - gui.getGuiTop());
- if (slot != null) {
- slot.handleMouseClick(mouseX, mouseY, mouseButton);
- }
- }
-
- public void handleMouseRelease(int mouseX, int mouseY, int eventType) {
- for (Widget slot : widgets) {
- slot.handleMouseRelease(mouseX, mouseY, eventType);
- }
- }
-
- public void handleMouseMove(int mouseX, int mouseY, int mouseButton, long time) {
- for (Widget slot : widgets) {
- slot.handleMouseMove(mouseX, mouseY, mouseButton, time);
- }
- }
-}
diff --git a/src/Java/miscutil/core/xmod/gregtech/HANDLER_Gregtech.java b/src/Java/miscutil/core/xmod/gregtech/HANDLER_Gregtech.java
index 3f07b08f9b..3bfb136edf 100644
--- a/src/Java/miscutil/core/xmod/gregtech/HANDLER_Gregtech.java
+++ b/src/Java/miscutil/core/xmod/gregtech/HANDLER_Gregtech.java
@@ -11,7 +11,7 @@ public class HANDLER_Gregtech {
public static void preInit(){
if (mMaterialProperties != null){
GT_Materials.init(mMaterialProperties);
- GregtechFluidHandler.run();
+
//new Processing_Ingot1();
//new Processing_Plate1();
//new Processing_Block();
@@ -20,6 +20,7 @@ public class HANDLER_Gregtech {
}
public static void init(){
+ GregtechFluidHandler.run();
/*if (Meta_GT_Proxy.mSortToTheEnd) {
new GT_ItemIterator().run();
Meta_GT_Proxy.registerUnificationEntries();
diff --git a/src/Java/miscutil/core/xmod/growthcraft/HANDLER_Growthcraft.java b/src/Java/miscutil/core/xmod/growthcraft/HANDLER_Growthcraft.java
index f227b1dc46..f56830bbb9 100644
--- a/src/Java/miscutil/core/xmod/growthcraft/HANDLER_Growthcraft.java
+++ b/src/Java/miscutil/core/xmod/growthcraft/HANDLER_Growthcraft.java
@@ -1,65 +1,16 @@
package miscutil.core.xmod.growthcraft;
-import growthcraft.api.cellar.Booze;
-import growthcraft.api.cellar.CellarRegistry;
-import growthcraft.cellar.block.BlockFluidBooze;
-import growthcraft.cellar.item.ItemBoozeBottle;
-import growthcraft.cellar.item.ItemBoozeBucketDEPRECATED;
-import growthcraft.cellar.item.ItemBucketBooze;
-import growthcraft.cellar.utils.BoozeRegistryHelper;
-import growthcraft.core.GrowthCraftCore;
-import growthcraft.hops.GrowthCraftHops;
import miscutil.core.lib.LoadedMods;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.potion.Potion;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidRegistry;
-import cpw.mods.fml.common.registry.GameRegistry;
+import miscutil.core.xmod.growthcraft.booze.Register_Booze;
public class HANDLER_Growthcraft {
- public static BlockFluidBooze[] jackDanielsWhiskeyFluids;
- public static Item jackDaniels;
- public static Item jackDanielsSeeds;
- public static Item jackDanielsWhiskey;
- public static Item jackDanielsWhiskeyBucket_deprecated;
- public static ItemBucketBooze[] jackDanielsWhiskeyBuckets;
- public static Fluid[] jackDanielsWhiskeyBooze;
- //private static int internalColour = FluidRegistry.getFluid("fluidJackDaniels").getColor();
- private static int internalColour = 0000000;
//Run me during Pre-Init
public static void preInit(){
- if (LoadedMods.Growthcraft || GrowthCraftCore.instance != null){
- start();
+ if (LoadedMods.Growthcraft){
+ Register_Booze.preInit();
}
}
- private static void start(){
- jackDaniels = GrowthCraftHops.hops;
- jackDanielsSeeds = GrowthCraftHops.hopSeeds;
-
- jackDanielsWhiskeyBooze = new Booze[5];
- jackDanielsWhiskeyFluids = new BlockFluidBooze[jackDanielsWhiskeyBooze.length];
- jackDanielsWhiskeyBuckets = new ItemBucketBooze[jackDanielsWhiskeyBooze.length];
- BoozeRegistryHelper.initializeBooze(jackDanielsWhiskeyBooze, jackDanielsWhiskeyFluids, jackDanielsWhiskeyBuckets, "grc.jackDanielsWhiskey", internalColour);
-
- jackDanielsWhiskey = new ItemBoozeBottle(6, -0.5F, jackDanielsWhiskeyBooze).setColor(internalColour).setTipsy(0.7F, 900).setPotionEffects(new int[] { Potion.digSpeed.id }, new int[] { 3600 });
- jackDanielsWhiskeyBucket_deprecated = new ItemBoozeBucketDEPRECATED(jackDanielsWhiskeyBooze).setColor(internalColour);
-
-
- //GameRegistry.registerItem(jackDaniels, "grc.jackDaniels");
- //GameRegistry.registerItem(jackDanielsSeeds, "grc.jackDanielsSeeds");
- GameRegistry.registerItem(jackDanielsWhiskey, "grc.jackDanielsWhiskey");
- GameRegistry.registerItem(jackDanielsWhiskeyBucket_deprecated, "grc.jackDanielsWhiskey_bucket");
-
- BoozeRegistryHelper.registerBooze(jackDanielsWhiskeyBooze, jackDanielsWhiskeyFluids, jackDanielsWhiskeyBuckets, jackDanielsWhiskey, "grc.jackDanielsWhiskey", jackDanielsWhiskeyBucket_deprecated);
-
- CellarRegistry.instance().brew().addBrewing(FluidRegistry.WATER, Items.wheat, jackDanielsWhiskeyBooze[4], 200, 60, 0.4F);
- CellarRegistry.instance().brew().addBrewing(jackDanielsWhiskeyBooze[4], jackDaniels, jackDanielsWhiskeyBooze[0], 350, 60, 0.1F);
-
-
- }
-
}
diff --git a/src/Java/miscutil/core/xmod/growthcraft/booze/Register_Booze.java b/src/Java/miscutil/core/xmod/growthcraft/booze/Register_Booze.java
new file mode 100644
index 0000000000..7c26d90c31
--- /dev/null
+++ b/src/Java/miscutil/core/xmod/growthcraft/booze/Register_Booze.java
@@ -0,0 +1,64 @@
+package miscutil.core.xmod.growthcraft.booze;
+
+import growthcraft.api.cellar.Booze;
+import growthcraft.api.cellar.CellarRegistry;
+import growthcraft.cellar.block.BlockFluidBooze;
+import growthcraft.cellar.item.ItemBoozeBottle;
+import growthcraft.cellar.item.ItemBoozeBucketDEPRECATED;
+import growthcraft.cellar.item.ItemBucketBooze;
+import growthcraft.cellar.utils.BoozeRegistryHelper;
+import growthcraft.hops.GrowthCraftHops;
+import miscutil.core.lib.LoadedMods;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.potion.Potion;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class Register_Booze {
+
+ public static BlockFluidBooze[] jackDanielsWhiskeyFluids;
+ public static Item jackDaniels;
+ public static Item jackDanielsSeeds;
+ public static Item jackDanielsWhiskey;
+ public static Item jackDanielsWhiskeyBucket_deprecated;
+ public static ItemBucketBooze[] jackDanielsWhiskeyBuckets;
+ public static Fluid[] jackDanielsWhiskeyBooze;
+ //private static int internalColour = FluidRegistry.getFluid("fluidJackDaniels").getColor();
+ private static int internalColour = 0000000;
+
+ //Run me during Pre-Init
+ public static void preInit(){
+ if (LoadedMods.Growthcraft){
+ start();
+ }
+ }
+
+ private static void start(){
+ jackDaniels = GrowthCraftHops.hops;
+ jackDanielsSeeds = GrowthCraftHops.hopSeeds;
+
+ jackDanielsWhiskeyBooze = new Booze[5];
+ jackDanielsWhiskeyFluids = new BlockFluidBooze[jackDanielsWhiskeyBooze.length];
+ jackDanielsWhiskeyBuckets = new ItemBucketBooze[jackDanielsWhiskeyBooze.length];
+ BoozeRegistryHelper.initializeBooze(jackDanielsWhiskeyBooze, jackDanielsWhiskeyFluids, jackDanielsWhiskeyBuckets, "grc.jackDanielsWhiskey", internalColour);
+
+ jackDanielsWhiskey = new ItemBoozeBottle(6, -0.5F, jackDanielsWhiskeyBooze).setColor(internalColour).setTipsy(0.7F, 900).setPotionEffects(new int[] { Potion.digSpeed.id }, new int[] { 3600 });
+ jackDanielsWhiskeyBucket_deprecated = new ItemBoozeBucketDEPRECATED(jackDanielsWhiskeyBooze).setColor(internalColour);
+
+
+ //GameRegistry.registerItem(jackDaniels, "grc.jackDaniels");
+ //GameRegistry.registerItem(jackDanielsSeeds, "grc.jackDanielsSeeds");
+ GameRegistry.registerItem(jackDanielsWhiskey, "grc.jackDanielsWhiskey");
+ GameRegistry.registerItem(jackDanielsWhiskeyBucket_deprecated, "grc.jackDanielsWhiskey_bucket");
+
+ BoozeRegistryHelper.registerBooze(jackDanielsWhiskeyBooze, jackDanielsWhiskeyFluids, jackDanielsWhiskeyBuckets, jackDanielsWhiskey, "grc.jackDanielsWhiskey", jackDanielsWhiskeyBucket_deprecated);
+
+ CellarRegistry.instance().brew().addBrewing(FluidRegistry.WATER, Items.wheat, jackDanielsWhiskeyBooze[4], 200, 60, 0.4F);
+ CellarRegistry.instance().brew().addBrewing(jackDanielsWhiskeyBooze[4], jackDaniels, jackDanielsWhiskeyBooze[0], 350, 60, 0.1F);
+
+
+ }
+
+}