Fixed Output of extractor (#679)
* Add CraftTweaker support for the Compressor * Fix Extractor insertion and extraction * Oops
This commit is contained in:
parent
48cbda6453
commit
166f9a924f
5 changed files with 69 additions and 70 deletions
|
@ -1,34 +1,48 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.api.tile.IContainerLayout;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotInput;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.api.gui.SlotUpgrade;
|
||||
import techreborn.tiles.teir1.TileExtractor;
|
||||
|
||||
public class ContainerExtractor extends ContainerCrafting
|
||||
public class ContainerExtractor extends ContainerCrafting implements IContainerLayout<TileExtractor>
|
||||
{
|
||||
|
||||
public int connectionStatus;
|
||||
EntityPlayer player;
|
||||
TileExtractor tile;
|
||||
TileExtractor tileExtractor;
|
||||
|
||||
public ContainerExtractor(TileExtractor tileGrinder, EntityPlayer player)
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
super(tileGrinder.crafter);
|
||||
tile = tileGrinder;
|
||||
this.player = player;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInventorySlots() {
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 1, 116, 34));
|
||||
this.addSlotToContainer(new SlotInput(tileExtractor.inventory, 0, 56, 34));
|
||||
this.addSlotToContainer(new SlotOutput(tileExtractor.inventory, 1, 116, 34));
|
||||
|
||||
// upgrades
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 2, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 3, 152, 26));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 4, 152, 44));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileGrinder.inventory, 5, 152, 62));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileExtractor.inventory, 2, 152, 8));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileExtractor.inventory, 3, 152, 26));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileExtractor.inventory, 4, 152, 44));
|
||||
this.addSlotToContainer(new SlotUpgrade(tileExtractor.inventory, 5, 152, 62));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPlayerSlots() {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
|
@ -46,35 +60,30 @@ public class ContainerExtractor extends ContainerCrafting
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
return true;
|
||||
public void setTile(TileExtractor tile) {
|
||||
this.tileExtractor = tile;
|
||||
setCrafter(tile.crafter);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void addListener(IContainerListener crafting) {
|
||||
// super.addListener(crafting);
|
||||
// crafting.sendProgressBarUpdate(this, 0, (int) tile.getProgressScaled(0));
|
||||
// crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
|
||||
// }
|
||||
//
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// @Override
|
||||
// public void updateProgressBar(int id, int value) {
|
||||
// if (id == 0) {
|
||||
// this.progress = value;
|
||||
// }
|
||||
// else if (id == 2) {
|
||||
// this.energy = value;
|
||||
// }
|
||||
// this.tile.setEnergy(energy);
|
||||
// }
|
||||
@Override
|
||||
public TileExtractor getTile() {
|
||||
return tileExtractor;
|
||||
}
|
||||
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// @Override
|
||||
// public void updateProgressBar(int id, int value) {
|
||||
// if (id == 10) {
|
||||
// this.connectionStatus = value;
|
||||
// }
|
||||
// }
|
||||
@Override
|
||||
public void setPlayer(EntityPlayer player) {
|
||||
this.player = player;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPlayer getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public List<Integer> getSlotsForSide(EnumFacing facing) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue