-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cocoon world genartion with config entry(default false) and add c…
…ocoon loot and a greenhouse butterfly hatch
- Loading branch information
Showing
35 changed files
with
748 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,4 +142,4 @@ public static void drawToolTips(GuiForestry gui, Collection<?> objects, int mous | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/forestry/greenhouse/gui/ContainerGreenhouseButterflyHatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 forestry.greenhouse.gui; | ||
|
||
import net.minecraft.entity.player.InventoryPlayer; | ||
import net.minecraftforge.fluids.IFluidTank; | ||
import forestry.core.gui.ContainerTile; | ||
import forestry.core.gui.slots.SlotOutput; | ||
import forestry.core.network.packets.PacketGuiUpdate; | ||
import forestry.greenhouse.tiles.TileGreenhouseButterflyHatch; | ||
|
||
public class ContainerGreenhouseButterflyHatch extends ContainerTile<TileGreenhouseButterflyHatch> { | ||
|
||
public ContainerGreenhouseButterflyHatch(InventoryPlayer playerInventory, TileGreenhouseButterflyHatch tile) { | ||
super(tile, playerInventory, 8, 84); | ||
|
||
addSlotToContainer(new SlotOutput(tile, 0, 60, 40)); | ||
addSlotToContainer(new SlotOutput(tile, 1, 80, 27)); | ||
addSlotToContainer(new SlotOutput(tile, 2, 101, 40)); | ||
addSlotToContainer(new SlotOutput(tile, 3, 80, 53)); | ||
} | ||
|
||
@Override | ||
public void detectAndSendChanges() { | ||
super.detectAndSendChanges(); | ||
PacketGuiUpdate packet = new PacketGuiUpdate(tile); | ||
sendPacketToCrafters(packet); | ||
} | ||
|
||
public IFluidTank getTank(int slot) { | ||
return tile.getMultiblockLogic().getController().getTankManager().getTank(slot); | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/forestry/greenhouse/gui/GuiGreenhouseButterflyHatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/******************************************************************************* | ||
* 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 forestry.greenhouse.gui; | ||
|
||
import net.minecraft.entity.player.EntityPlayer; | ||
import forestry.core.config.Constants; | ||
import forestry.core.gui.GuiForestryTitled; | ||
import forestry.core.gui.ledgers.ClimateLedger; | ||
import forestry.greenhouse.gui.widgets.WidgetCamouflageSlot; | ||
import forestry.greenhouse.multiblock.IGreenhouseControllerInternal; | ||
import forestry.greenhouse.tiles.TileGreenhouseButterflyHatch; | ||
|
||
public class GuiGreenhouseButterflyHatch extends GuiForestryTitled<ContainerGreenhouseButterflyHatch, TileGreenhouseButterflyHatch> { | ||
|
||
public GuiGreenhouseButterflyHatch(EntityPlayer player, TileGreenhouseButterflyHatch tile) { | ||
super(Constants.TEXTURE_PATH_GUI + "/greenhouse_butterfly_hatch.png", new ContainerGreenhouseButterflyHatch(player.inventory, tile), tile); | ||
|
||
//Add the tile camouflage slots | ||
widgetManager.add(new WidgetCamouflageSlot(widgetManager, 8, 17, inventory, tile.getCamouflageType())); | ||
} | ||
|
||
@Override | ||
protected void addLedgers() { | ||
IGreenhouseControllerInternal greenhouseController = inventory.getMultiblockLogic().getController(); | ||
|
||
ledgerManager.add(new ClimateLedger(ledgerManager, greenhouseController)); | ||
super.addLedgers(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/forestry/greenhouse/inventory/InventoryGreenhouseButterflyHatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 forestry.greenhouse.inventory; | ||
|
||
import forestry.core.inventory.InventoryAdapterTile; | ||
import forestry.greenhouse.tiles.TileGreenhouseButterflyHatch; | ||
|
||
public class InventoryGreenhouseButterflyHatch extends InventoryAdapterTile<TileGreenhouseButterflyHatch> { | ||
|
||
public static final int SLOTS = 4; | ||
|
||
public InventoryGreenhouseButterflyHatch(TileGreenhouseButterflyHatch tile) { | ||
super(tile, SLOTS, "Items"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.