aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-10-02 14:44:06 +1000
committerAlkalus <draknyte1@hotmail.com>2017-10-02 14:44:06 +1000
commit04cb1921bd93e91fd526800d0cc36ff4b1df616c (patch)
tree83891415efa34465788935bb1a01dd3db7e80d29 /src/Java/gtPlusPlus
parent0a671c03811dce0ed11844cc503db3652c4ee2ef (diff)
downloadGT5-Unofficial-04cb1921bd93e91fd526800d0cc36ff4b1df616c.tar.gz
GT5-Unofficial-04cb1921bd93e91fd526800d0cc36ff4b1df616c.tar.bz2
GT5-Unofficial-04cb1921bd93e91fd526800d0cc36ff4b1df616c.zip
$ Fixed Toluene handling.
% Adjusted Eglin base Compound slightly. - Disabled new, non-working Forestry content.
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java68
-rw-r--r--src/Java/gtPlusPlus/core/material/ALLOY.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java42
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java97
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java100
10 files changed, 385 insertions, 35 deletions
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java b/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java
index 6de5184edc..9ac7b4a818 100644
--- a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java
+++ b/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java
@@ -4,70 +4,76 @@ import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.reflect.AddGregtechRecipe;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
public class CoalTar {
+
+ private static Fluid Coal_Gas;
+ private static Fluid Ethylene;
+ private static Fluid Benzene;
+ private static Fluid Ethylbenzene;
+ private static Fluid Anthracene;
+ private static Fluid Toluene;
+ private static Fluid Coal_Tar;
+ private static Fluid Coal_Tar_Oil;
+ private static Fluid Sulfuric_Coal_Tar_Oil;
+ private static Fluid Naphthalene;
+ private static Fluid Phthalic_Acid;
+ private static Fluid Ethylanthraquinone2;
+ private static Fluid Ethylanthrahydroquinone2;
+ private static Fluid Hydrogen_Peroxide;
+ private static Fluid Lithium_Peroxide;
public static void run(){
//Special Compatibility for Coke
ItemUtils.addItemToOreDictionary(ItemUtils.getSimpleStack(ModItems.itemCoalCoke, 1), "fuelCoke");
-
-
//Create Coal Gas
- FluidUtils.generateFluidNonMolten("CoalGas", "Coal Gas", 500, new short[]{48, 48, 48, 100}, null, null);
-
-
-
-
+ Coal_Gas = FluidUtils.generateFluidNonMolten("CoalGas", "Coal Gas", 500, new short[]{48, 48, 48, 100}, null, null);
//Ethanol
// v - Dehydrate cells to remove water
//Create Ethylene
- FluidUtils.generateFluidNonMolten("Ethylene", "Ethylene", -103, new short[]{255, 255, 255, 100}, null, null);
+ Ethylene = FluidUtils.generateFluidNonMolten("Ethylene", "Ethylene", -103, new short[]{255, 255, 255, 100}, null, null);
//Create Benzene - (Toluene + Hydrogen | 95% Benzene / 5% methane)
- FluidUtils.generateFluidNonMolten("Benzene", "Benzene", 81, new short[]{150, 75, 0, 100}, null, null);
+ Benzene = FluidUtils.generateFluidNonMolten("Benzene", "Benzene", 81, new short[]{150, 75, 0, 100}, null, null);
//Create Ethylbenzene - Ethylbenzene is produced in on a large scale by combining benzene and ethylene in an acid-catalyzed chemical reaction
//Use Chemical Reactor
- FluidUtils.generateFluidNonMolten("Ethylbenzene", "Ethylbenzene", 136, new short[]{255, 255, 255, 100}, null, null);
-
-
-
+ Ethylbenzene = FluidUtils.generateFluidNonMolten("Ethylbenzene", "Ethylbenzene", 136, new short[]{255, 255, 255, 100}, null, null);
//Create Anthracene
- FluidUtils.generateFluidNonMolten("Anthracene", "Anthracene", 340, new short[]{255, 255, 255, 100}, null, null);
-
- //Toluene
- FluidStack fluidToluene = null;
-
+ Anthracene = FluidUtils.generateFluidNonMolten("Anthracene", "Anthracene", 340, new short[]{255, 255, 255, 100}, null, null);
+ //Toluene
if (FluidUtils.getFluidStack("liquid_toluene", 1) == null){
- fluidToluene = FluidUtils.getFluidStack(FluidUtils.generateFluidNonMolten("Toluene", "Toluene", -95, new short[]{140, 70, 20, 100}, null, null),1000);
-
+ Toluene = FluidUtils.generateFluidNonMolten("Toluene", "Toluene", -95, new short[]{140, 70, 20, 100}, null, null);
}
else {
- fluidToluene = FluidUtils.getFluidStack("liquid_toluene", 1000);
+ Toluene = FluidUtils.getFluidStack("liquid_toluene", 1000).getFluid();
+ Item itemCellToluene = new BaseItemComponent("Toluene", "Toluene", new short[]{140, 70, 20, 100});
}
-
//Create Coal Tar
- FluidUtils.generateFluidNonMolten("CoalTar", "Coal Tar", 450, new short[]{32, 32, 32, 100}, null, null);
+ Coal_Tar = FluidUtils.generateFluidNonMolten("CoalTar", "Coal Tar", 450, new short[]{32, 32, 32, 100}, null, null);
// v - Distill (60% Tar oil/15% Naphtha/20% Ethylbenzene/5% Anthracene)
//Create Coal Tar Oil
- FluidUtils.generateFluidNonMolten("CoalTarOil", "Coal Tar Oil", 240, new short[]{240, 240, 150, 100}, null, null);
+ Coal_Tar_Oil = FluidUtils.generateFluidNonMolten("CoalTarOil", "Coal Tar Oil", 240, new short[]{240, 240, 150, 100}, null, null);
// v - Wash With Sulfuric Acid
//Create Sulfuric Coal Tar Oil
- FluidUtils.generateFluidNonMolten("SulfuricCoalTarOil", "Sulfuric Coal Tar Oil", 240, new short[]{250, 170, 12, 100}, null, null);
+ Sulfuric_Coal_Tar_Oil = FluidUtils.generateFluidNonMolten("SulfuricCoalTarOil", "Sulfuric Coal Tar Oil", 240, new short[]{250, 170, 12, 100}, null, null);
// v - Distill (No loss, just time consuming)
//Create Naphthalene
- FluidUtils.generateFluidNonMolten("Naphthalene", "Naphthalene", 115, new short[]{210, 185, 135, 100}, null, null);
+ Naphthalene = FluidUtils.generateFluidNonMolten("Naphthalene", "Naphthalene", 115, new short[]{210, 185, 135, 100}, null, null);
// v - Oxidize with mercury and nitric acid
//Create Phthalic Acid
- FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null);
+ Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null);
// v - Dehydrate at 180C+
//Create Phthalic Anhydride
ItemUtils.generateSpecialUseDusts("PhthalicAnhydride", "Phthalic Anhydride", Utils.rgbtoHexValue(175, 175, 175));
@@ -76,13 +82,13 @@ public class CoalTar {
//Create 2-Ethylanthraquinone
//2-Ethylanthraquinone is prepared from the reaction of phthalic anhydride and ethylbenzene
- FluidUtils.generateFluidNonMolten("2Ethylanthraquinone", "2-Ethylanthraquinone", 415, new short[]{227, 255, 159, 100}, null, null);
+ Ethylanthraquinone2 = FluidUtils.generateFluidNonMolten("2Ethylanthraquinone", "2-Ethylanthraquinone", 415, new short[]{227, 255, 159, 100}, null, null);
//Create 2-Ethylanthrahydroquinone
//Palladium plate + Hydrogen(250) + 2-Ethylanthraquinone(500) = 600 Ethylanthrahydroquinone
- FluidUtils.generateFluidNonMolten("2Ethylanthrahydroquinone", "2-Ethylanthrahydroquinone", 415, new short[]{207, 225, 129, 100}, null, null);
+ Ethylanthrahydroquinone2 = FluidUtils.generateFluidNonMolten("2Ethylanthrahydroquinone", "2-Ethylanthrahydroquinone", 415, new short[]{207, 225, 129, 100}, null, null);
//Create Hydrogen Peroxide
//Compressed Air(1500) + Ethylanthrahydroquinone(500) + Anthracene(5) = 450 Ethylanthraquinone && 200 Peroxide
- FluidUtils.generateFluidNonMolten("HydrogenPeroxide", "Hydrogen Peroxide", 150, new short[]{210, 255, 255, 100}, null, null);
+ Hydrogen_Peroxide = FluidUtils.generateFluidNonMolten("HydrogenPeroxide", "Hydrogen Peroxide", 150, new short[]{210, 255, 255, 100}, null, null);
@@ -90,7 +96,7 @@ public class CoalTar {
ItemUtils.generateSpecialUseDusts("LithiumHydroperoxide", "Lithium Hydroperoxide", Utils.rgbtoHexValue(125, 125, 125));
// v - Dehydrate
//Lithium Peroxide - 2 LiOOH → Li2O2 + H2O2 + 2 H2O
- FluidUtils.generateFluidNonMolten("LithiumPeroxide", "Lithium Peroxide", 446, new short[]{135, 135, 135, 100}, null, null);
+ Lithium_Peroxide = FluidUtils.generateFluidNonMolten("LithiumPeroxide", "Lithium Peroxide", 446, new short[]{135, 135, 135, 100}, null, null);
//Burn the coal gas!
GT_Values.RA.addFuel(ItemUtils.getItemStackOfAmountFromOreDict("cellCoalGas", 1), null, 64, 1);
diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java
index 0bcf081ea9..4ea723a164 100644
--- a/src/Java/gtPlusPlus/core/material/ALLOY.java
+++ b/src/Java/gtPlusPlus/core/material/ALLOY.java
@@ -524,7 +524,7 @@ public final class ALLOY {
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
- new MaterialStack(ELEMENT.getInstance().IRON, 13),
+ new MaterialStack(ELEMENT.getInstance().IRON, 12),
new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Kanthal), 3),
new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Invar), 15)
});
diff --git a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
index fd9fd940c8..71ccb5be51 100644
--- a/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
+++ b/src/Java/gtPlusPlus/xmod/forestry/HANDLER_FR.java
@@ -29,9 +29,9 @@ public class HANDLER_FR extends BlockRegistry {
public static void Init(){
if (LoadedMods.Forestry){
- apiculture = new BlockDenseBeeHouse();
- apiculture.setBlockName("gtpp." + "beehouse");
- GameRegistry.registerBlock(apiculture, ItemBlockForestry.class, StringUtil.cleanBlockName(apiculture));
+ //apiculture = new BlockDenseBeeHouse();
+ //apiculture.setBlockName("gtpp." + "beehouse");
+ //GameRegistry.registerBlock(apiculture, ItemBlockForestry.class, StringUtil.cleanBlockName(apiculture));
}
}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java
new file mode 100644
index 0000000000..77ee15c5d5
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/BlockDenseBeeHouse.java
@@ -0,0 +1,24 @@
+
+/*******************************************************************************
+ * 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 gtPlusPlus.xmod.forestry.bees.blocks;
+
+import forestry.apiculture.blocks.BlockApicultureType;
+import forestry.core.blocks.BlockBase;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+
+public class BlockDenseBeeHouse extends BlockBase<BlockApicultureType> {
+ public BlockDenseBeeHouse() {
+ super();
+ setCreativeTab(AddToCreativeTab.tabBOP);
+ setHarvestLevel("axe", 0);
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java b/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java
new file mode 100644
index 0000000000..f896dcd05c
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/blocks/FR_BlockRegistry.java
@@ -0,0 +1,24 @@
+package gtPlusPlus.xmod.forestry.bees.blocks;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import forestry.core.utils.StringUtil;
+import forestry.plugins.PluginManager;
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
+
+public abstract class FR_BlockRegistry {
+ protected static <T extends Block> T registerBlock(T block, Class<? extends ItemBlock> itemClass, String name) {
+ if (PluginManager.getStage() != PluginManager.Stage.SETUP) {
+ throw new RuntimeException("Tried to register Block outside of Setup");
+ }
+ block.setBlockName("for." + name);
+ GameRegistry.registerBlock(block, itemClass, StringUtil.cleanBlockName(block));
+ return block;
+ }
+
+ protected static void registerOreDictWildcard(String oreDictName, Block block) {
+ OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, 32767));
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java
new file mode 100644
index 0000000000..91ab60f8bb
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/gui/ContainerBeeHouse.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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 gtPlusPlus.xmod.forestry.bees.gui;
+
+import net.minecraft.entity.player.InventoryPlayer;
+import forestry.apiculture.gui.ContainerBeeHelper;
+import forestry.apiculture.gui.IContainerBeeHousing;
+import forestry.apiculture.tiles.TileBeeHousingBase;
+import forestry.core.gui.ContainerTile;
+import forestry.core.network.IForestryPacketClient;
+import forestry.core.network.packets.PacketGuiUpdate;
+
+public class ContainerBeeHouse extends ContainerTile<TileBeeHousingBase> implements IContainerBeeHousing {
+
+ public ContainerBeeHouse(InventoryPlayer player, TileBeeHousingBase tile, boolean hasFrames) {
+ super(tile, player, 8, 108);
+ ContainerBeeHelper.addSlots(this, tile, hasFrames);
+ }
+
+ private int beeProgress = 0;
+
+ @Override
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+
+ int beeProgress = tile.getBeekeepingLogic().getBeeProgressPercent();
+ if (this.beeProgress != beeProgress) {
+ this.beeProgress = beeProgress;
+ IForestryPacketClient packet = new PacketGuiUpdate(tile);
+ sendPacketToCrafters(packet);
+ }
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java
new file mode 100644
index 0000000000..b510b7a4d6
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/gui/GuiBeeHouse.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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 gtPlusPlus.xmod.forestry.bees.gui;
+
+import net.minecraft.inventory.Container;
+import forestry.apiculture.gui.IContainerBeeHousing;
+import forestry.apiculture.gui.IGuiBeeHousingInventory;
+import forestry.core.config.Constants;
+import forestry.core.gui.GuiForestryTitled;
+import forestry.core.render.EnumTankLevel;
+
+public class GuiBeeHouse<C extends Container & IContainerBeeHousing> extends GuiForestryTitled<C, IGuiBeeHousingInventory> {
+
+ public enum Icon {
+ APIARY("/apiary.png"),
+ BEE_HOUSE("/alveary.png");
+
+ private final String path;
+
+ Icon(String path) {
+ this.path = path;
+ }
+ }
+
+ public GuiBeeHouse(IGuiBeeHousingInventory tile, C container, Icon icon) {
+ super(Constants.TEXTURE_PATH_GUI + icon.path, container, tile);
+ ySize = 190;
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
+ super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
+
+ drawHealthMeter(guiLeft + 20, guiTop + 37, inventory.getHealthScaled(46), EnumTankLevel.rateTankLevel(inventory.getHealthScaled(100)));
+ }
+
+ private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) {
+ int i = 176 + rated.getLevelScaled(16);
+ int k = 0;
+
+ this.drawTexturedModalRect(x, y + 46 - height, i, k + 46 - height, 4, height);
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
new file mode 100644
index 0000000000..6b21461b62
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/inventory/InventoryDenseBeeHouse.java
@@ -0,0 +1,97 @@
+/*******************************************************************************
+ * 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 gtPlusPlus.xmod.forestry.bees.inventory;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+import forestry.api.apiculture.BeeManager;
+import forestry.api.apiculture.IBee;
+import forestry.api.apiculture.IBeeHousing;
+import forestry.api.apiculture.IBeekeepingMode;
+import forestry.api.apiculture.IHiveFrame;
+import forestry.apiculture.InventoryBeeHousing;
+import forestry.apiculture.inventory.IApiaryInventory;
+import forestry.core.access.IAccessHandler;
+import forestry.core.utils.SlotUtil;
+
+public class InventoryDenseBeeHouse extends InventoryBeeHousing implements IApiaryInventory {
+ public static final int SLOT_FRAMES_1 = 9;
+ public static final int SLOT_FRAMES_COUNT = 3;
+
+ public InventoryDenseBeeHouse(IAccessHandler accessHandler) {
+ super(12, accessHandler);
+ }
+
+ @Override
+ public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
+ if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
+ return (itemStack.getItem() instanceof IHiveFrame) && (getStackInSlot(slotIndex) == null);
+ }
+
+ return super.canSlotAccept(slotIndex, itemStack);
+ }
+
+ // override for pipe automation
+ @Override
+ public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
+ if (SlotUtil.isSlotInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
+ return false;
+ }
+ return super.isItemValidForSlot(slotIndex, itemStack);
+ }
+
+ public Collection<IHiveFrame> getFrames() {
+ Collection<IHiveFrame> hiveFrames = new ArrayList<>(SLOT_FRAMES_COUNT);
+
+ for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) {
+ ItemStack stackInSlot = getStackInSlot(i);
+ if (stackInSlot == null) {
+ continue;
+ }
+
+ Item itemInSlot = stackInSlot.getItem();
+ if (itemInSlot instanceof IHiveFrame) {
+ hiveFrames.add((IHiveFrame) itemInSlot);
+ }
+ }
+
+ return hiveFrames;
+ }
+
+ public void wearOutFrames(IBeeHousing beeHousing, int amount) {
+ IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(beeHousing.getWorld());
+ int wear = Math.round(amount * beekeepingMode.getWearModifier());
+
+ for (int i = SLOT_FRAMES_1; i < SLOT_FRAMES_1 + SLOT_FRAMES_COUNT; i++) {
+ ItemStack hiveFrameStack = getStackInSlot(i);
+ if (hiveFrameStack == null) {
+ continue;
+ }
+
+ Item hiveFrameItem = hiveFrameStack.getItem();
+ if (!(hiveFrameItem instanceof IHiveFrame)) {
+ continue;
+ }
+
+ IHiveFrame hiveFrame = (IHiveFrame) hiveFrameItem;
+
+ ItemStack queenStack = getQueen();
+ IBee queen = BeeManager.beeRoot.getMember(queenStack);
+ ItemStack usedFrame = hiveFrame.frameUsed(beeHousing, hiveFrameStack, queen, wear);
+
+ setInventorySlotContents(i, usedFrame);
+ }
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java b/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java
new file mode 100644
index 0000000000..7d9a9e231b
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/items/FR_CustomBee.java
@@ -0,0 +1,5 @@
+package gtPlusPlus.xmod.forestry.bees.items;
+
+public class FR_CustomBee {
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java b/src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java
new file mode 100644
index 0000000000..d121c920b2
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/forestry/bees/tileentities/TileDenseBeeHouse.java
@@ -0,0 +1,100 @@
+/*******************************************************************************
+ * 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 gtPlusPlus.xmod.forestry.bees.tileentities;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+
+import net.minecraftforge.common.util.ForgeDirection;
+
+import cpw.mods.fml.common.Optional;
+
+import forestry.api.apiculture.IBeeHousingInventory;
+import forestry.api.apiculture.IBeeListener;
+import forestry.api.apiculture.IBeeModifier;
+import forestry.api.apiculture.IHiveFrame;
+import forestry.apiculture.ApiaryBeeListener;
+import forestry.apiculture.ApiaryBeeModifier;
+import forestry.apiculture.IApiary;
+import forestry.apiculture.inventory.IApiaryInventory;
+import forestry.apiculture.inventory.InventoryApiary;
+import forestry.apiculture.tiles.TileBeeHousingBase;
+import forestry.apiculture.trigger.ApicultureTriggers;
+import gtPlusPlus.xmod.forestry.bees.gui.ContainerBeeHouse;
+import gtPlusPlus.xmod.forestry.bees.gui.GuiBeeHouse;
+import buildcraft.api.statements.ITriggerExternal;
+
+public class TileDenseBeeHouse extends TileBeeHousingBase implements IApiary {
+ private final IBeeModifier beeModifier = new ApiaryBeeModifier();
+ private final IBeeListener beeListener = new ApiaryBeeListener(this);
+ private final InventoryApiary inventory = new InventoryApiary(getAccessHandler());
+
+ public TileDenseBeeHouse() {
+ super("apiary2");
+ setInternalInventory(inventory);
+ }
+
+ @Override
+ public IBeeHousingInventory getBeeInventory() {
+ return inventory;
+ }
+
+ @Override
+ public IApiaryInventory getApiaryInventory() {
+ return inventory;
+ }
+
+ @Override
+ public Collection<IBeeModifier> getBeeModifiers() {
+ List<IBeeModifier> beeModifiers = new ArrayList<>();
+
+ beeModifiers.add(beeModifier);
+
+ for (IHiveFrame frame : inventory.getFrames()) {
+ beeModifiers.add(frame.getBeeModifier());
+ }
+
+ return beeModifiers;
+ }
+
+ @Override
+ public Iterable<IBeeListener> getBeeListeners() {
+ return Collections.singleton(beeListener);
+ }
+
+ /* ITRIGGERPROVIDER */
+ @Optional.Method(modid = "BuildCraftAPI|statements")
+ @Override
+ public Collection<ITriggerExternal> getExternalTriggers(ForgeDirection side, TileEntity tile) {
+ LinkedList<ITriggerExternal> res = new LinkedList<>();
+ res.add(ApicultureTriggers.missingQueen);
+ res.add(ApicultureTriggers.missingDrone);
+ res.add(ApicultureTriggers.noFrames);
+ return res;
+ }
+
+ @Override
+ public Object getGui(EntityPlayer player, int data) {
+ ContainerBeeHouse container = new ContainerBeeHouse(player.inventory, this, true);
+ return new GuiBeeHouse<>(this, container, GuiBeeHouse.Icon.APIARY);
+ }
+
+ @Override
+ public Object getContainer(EntityPlayer player, int data) {
+ return new ContainerBeeHouse(player.inventory, this, true);
+ }
+}