Finish off the rendering for the upgrades.
This commit is contained in:
parent
e05c132c3a
commit
5487584f04
6 changed files with 23 additions and 4 deletions
|
@ -100,9 +100,10 @@ public class GuiBase extends GuiContainer {
|
|||
if(tile instanceof IUpgradeable){
|
||||
IUpgradeable upgradeable = (IUpgradeable) tile;
|
||||
if(upgradeable.canBeUpgraded()){
|
||||
for (int i = 0; i < upgradeable.getUpgradeSlotCount(); i++) {
|
||||
drawSlot(-22, i * 22 + 5, Layer.BACKGROUND);
|
||||
}
|
||||
// for (int i = 0; i < upgradeable.getUpgradeSlotCount(); i++) {
|
||||
// drawSlot(-22, i * 22 + 5, Layer.BACKGROUND);
|
||||
// }
|
||||
builder.drawUpgrades(this, upgradeable, guiLeft, guiTop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import net.minecraft.util.text.translation.I18n;
|
|||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import reborncore.api.tile.IUpgradeable;
|
||||
import reborncore.client.guibuilder.GuiBuilder;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
@ -330,6 +331,11 @@ public class TRBuilder extends GuiBuilder {
|
|||
gui.drawTexturedModalRect(posX, posY, 150, 0, 18, 18);
|
||||
}
|
||||
|
||||
public void drawUpgrades(GuiScreen gui, IUpgradeable upgradeable, int posX, int posY) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(GUI_SHEET);
|
||||
gui.drawTexturedModalRect(posX -27, posY + 4, 126, 151, 30, 87);
|
||||
}
|
||||
|
||||
public void drawOutputSlot(GuiScreen gui, int posX, int posY) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(GUI_SHEET);
|
||||
gui.drawTexturedModalRect(posX, posY, 150, 18, 26, 26);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue