Multiblock fixes (compressor, freezer, grinder), grinder recipes fixes, freezer JEI recipe show fix.
This commit is contained in:
parent
0011553cf7
commit
b42b5274b5
31 changed files with 1162 additions and 1175 deletions
|
@ -4,7 +4,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.inventory.IContainerListener;
|
||||
import reborncore.client.gui.BaseSlot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
import techreborn.tiles.multiblock.TileBlastFurnace;
|
||||
|
||||
public class ContainerBlastFurnace extends ContainerCrafting
|
||||
{
|
||||
|
|
|
@ -16,7 +16,6 @@ public abstract class ContainerCrafting extends RebornContainer
|
|||
int currentNeededTicks = 0;
|
||||
int energy;
|
||||
|
||||
@Deprecated
|
||||
public ContainerCrafting(RecipeCrafter crafter)
|
||||
{
|
||||
this();
|
||||
|
|
|
@ -6,7 +6,7 @@ import reborncore.client.gui.BaseSlot;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileImplosionCompressor;
|
||||
import techreborn.tiles.multiblock.TileImplosionCompressor;
|
||||
|
||||
public class ContainerImplosionCompressor extends ContainerCrafting
|
||||
{
|
||||
|
|
|
@ -6,82 +6,44 @@ import reborncore.client.gui.BaseSlot;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileIndustrialGrinder;
|
||||
import techreborn.tiles.multiblock.TileIndustrialGrinder;
|
||||
|
||||
public class ContainerIndustrialGrinder extends ContainerCrafting
|
||||
{
|
||||
public class ContainerIndustrialGrinder extends ContainerCrafting {
|
||||
|
||||
public int connectionStatus;
|
||||
EntityPlayer player;
|
||||
TileIndustrialGrinder tile;
|
||||
EntityPlayer player;
|
||||
TileIndustrialGrinder tile;
|
||||
|
||||
public ContainerIndustrialGrinder(TileIndustrialGrinder tileGrinder, EntityPlayer player)
|
||||
{
|
||||
super(tileGrinder.crafter);
|
||||
tile = tileGrinder;
|
||||
this.player = player;
|
||||
public ContainerIndustrialGrinder(TileIndustrialGrinder tileGrinder, EntityPlayer player) {
|
||||
super(tileGrinder.crafter);
|
||||
tile = tileGrinder;
|
||||
this.player = player;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 1, 32, 44));
|
||||
// input
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 0, 32, 26));
|
||||
this.addSlotToContainer(new BaseSlot(tileGrinder.inventory, 1, 32, 44));
|
||||
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 2, 77, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 3, 95, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 4, 113, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 5, 131, 35));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 2, 77, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 3, 95, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 4, 113, 35));
|
||||
this.addSlotToContainer(new SlotOutput(tileGrinder.inventory, 5, 131, 35));
|
||||
|
||||
int i;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer p_75145_1_)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.listeners.size(); i++)
|
||||
{
|
||||
IContainerListener IContainerListener = this.listeners.get(i);
|
||||
if (this.connectionStatus != tile.connectionStatus)
|
||||
{
|
||||
IContainerListener.sendProgressBarUpdate(this, 10, tile.connectionStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListener(IContainerListener crafting)
|
||||
{
|
||||
super.addListener(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 10, tile.connectionStatus);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value)
|
||||
{
|
||||
if (id == 10)
|
||||
{
|
||||
this.connectionStatus = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,78 +6,38 @@ import reborncore.client.gui.BaseSlot;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileVacuumFreezer;
|
||||
import techreborn.tiles.multiblock.TileVacuumFreezer;
|
||||
|
||||
public class ContainerVacuumFreezer extends ContainerCrafting
|
||||
{
|
||||
public class ContainerVacuumFreezer extends ContainerCrafting {
|
||||
|
||||
public int tickTime;
|
||||
public int machineStatus;
|
||||
EntityPlayer player;
|
||||
TileVacuumFreezer tile;
|
||||
public ContainerVacuumFreezer(TileVacuumFreezer tileAlloysmelter, EntityPlayer player)
|
||||
{
|
||||
super(tileAlloysmelter.crafter);
|
||||
tile = tileAlloysmelter;
|
||||
this.player = player;
|
||||
EntityPlayer player;
|
||||
TileVacuumFreezer tile;
|
||||
|
||||
// input
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloysmelter.inventory, 0, 56, 34));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 1, 116, 35));
|
||||
public ContainerVacuumFreezer(TileVacuumFreezer tileAlloysmelter, EntityPlayer player) {
|
||||
super(tileAlloysmelter.crafter);
|
||||
tile = tileAlloysmelter;
|
||||
this.player = player;
|
||||
|
||||
int i;
|
||||
// input
|
||||
this.addSlotToContainer(new BaseSlot(tileAlloysmelter.inventory, 0, 56, 34));
|
||||
// outputs
|
||||
this.addSlotToContainer(new SlotOutput(tileAlloysmelter.inventory, 1, 116, 35));
|
||||
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
for (int j = 0; j < 9; ++j)
|
||||
{
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
for (int j = 0; j < 9; ++j) {
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
{
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
this.addSlotToContainer(new BaseSlot(player.inventory, i, 8 + i * 18, 142));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges()
|
||||
{
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.listeners.size(); i++)
|
||||
{
|
||||
IContainerListener IContainerListener = this.listeners.get(i);
|
||||
if (this.machineStatus != tile.multiBlockStatus)
|
||||
{
|
||||
IContainerListener.sendProgressBarUpdate(this, 3, tile.multiBlockStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListener(IContainerListener crafting)
|
||||
{
|
||||
super.addListener(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 3, tile.multiBlockStatus);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value)
|
||||
{
|
||||
super.updateProgressBar(id, value);
|
||||
if (id == 3)
|
||||
{
|
||||
machineStatus = value;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue