mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
Reformed Forestry!
* Updated for BC 6.0.x compatibility * Re-implemented the Pipes plugin * Converted to vanilla assets lang system * Converted to standard gradle file structure * General warnings cleanup
This commit is contained in:
1 parent
36248c02f1
commit
8f2d802f11
1602 files changed
+724
-736
No files matched your search
@@ -0,0 +1,63 @@
|
||||
/*******************************************************************************
|
||||
* 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.energy.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
import forestry.core.gui.ContainerForestry;
|
||||
import forestry.core.gui.slots.SlotClosed;
|
||||
import forestry.energy.gadgets.EngineCopper;
|
||||
|
||||
public class ContainerEngineCopper extends ContainerForestry {
|
||||
protected EngineCopper engine;
|
||||
|
||||
public ContainerEngineCopper(InventoryPlayer player, EngineCopper tile) {
|
||||
super(tile);
|
||||
|
||||
this.engine = tile;
|
||||
this.addSlot(new Slot(tile, 0, 44, 46));
|
||||
|
||||
this.addSlot(new SlotClosed(tile, 1, 98, 35));
|
||||
this.addSlot(new SlotClosed(tile, 2, 98, 53));
|
||||
this.addSlot(new SlotClosed(tile, 3, 116, 35));
|
||||
this.addSlot(new SlotClosed(tile, 4, 116, 53));
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
for (int j = 0; j < 9; ++j)
|
||||
this.addSlot(new Slot(player, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
this.addSlot(new Slot(player, i, 8 + i * 18, 142));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if (engine != null)
|
||||
engine.getGUINetworkData(i, j);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (int i = 0; i < crafters.size(); i++)
|
||||
engine.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return engine.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user