Merge remote-tracking branch 'remotes/origin/master' into 1.8.8
# Conflicts: # src/main/java/techreborn/client/gui/GuiGrinder.java # src/main/java/techreborn/tiles/TileGrinder.java
This commit is contained in:
commit
eedabb9e7d
5 changed files with 54 additions and 20 deletions
|
@ -1,6 +1,9 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileGrinder;
|
||||
|
@ -11,7 +14,7 @@ public class ContainerGrinder extends ContainerCrafting {
|
|||
|
||||
TileGrinder tile;
|
||||
|
||||
public int tickTime;
|
||||
public int connectionStatus;
|
||||
|
||||
public ContainerGrinder(TileGrinder tileGrinder,
|
||||
EntityPlayer player) {
|
||||
|
@ -50,4 +53,29 @@ public class ContainerGrinder extends ContainerCrafting {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.connectionStatus != tile.connectionStatus) {
|
||||
icrafting.sendProgressBarUpdate(this, 10, tile.connectionStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 10, tile.connectionStatus);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void updateProgressBar(int id, int value) {
|
||||
if (id == 10) {
|
||||
this.connectionStatus = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,12 +13,14 @@ public class GuiGrinder extends GuiContainer {
|
|||
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_grinder.png");
|
||||
|
||||
TileGrinder grinder;
|
||||
ContainerGrinder containerGrinder;
|
||||
|
||||
public GuiGrinder(EntityPlayer player, TileGrinder tilegrinder) {
|
||||
super(new ContainerGrinder(tilegrinder, player));
|
||||
this.xSize = 176;
|
||||
this.ySize = 167;
|
||||
grinder = tilegrinder;
|
||||
containerGrinder = (ContainerGrinder) this.inventorySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -40,7 +42,7 @@ public class GuiGrinder extends GuiContainer {
|
|||
this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2);
|
||||
}
|
||||
|
||||
if (grinder.getMutliBlock() != true) {
|
||||
if (containerGrinder.connectionStatus != 1) {
|
||||
// GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - j, 114, 10);
|
||||
this.fontRendererObj.drawString(StatCollector.translateToLocal("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12 - j, -1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue