mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
I'm listening to you
This commit is contained in:
parent
a0b9acd011
commit
7749cf4adf
@ -162,7 +162,7 @@ public class RefineryRecipeHandler extends TemplateRecipeHandler implements ICom
|
|||||||
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||||
|
|
||||||
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 36 - 27, 23, 36, 18), "refinery"));
|
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 36 - 27, 23, 36, 18), "refinery"));
|
||||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(48, 5, 31, 101), "refinery"));
|
transferRectsGui.add(new RecipeTransferRect(new Rectangle(34, 34, 14, 34), "refinery"));
|
||||||
guiGui.add(GUIMachineRefinery.class);
|
guiGui.add(GUIMachineRefinery.class);
|
||||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||||
|
|||||||
@ -19,31 +19,31 @@ public class ContainerMachineRefinery extends Container {
|
|||||||
testNuke = tedf;
|
testNuke = tedf;
|
||||||
|
|
||||||
//Battery
|
//Battery
|
||||||
this.addSlotToContainer(new Slot(tedf, 0, 186, 72));
|
this.addSlotToContainer(new Slot(tedf, 0, 158, 108));
|
||||||
//Canister Input
|
//Canister Input
|
||||||
this.addSlotToContainer(new Slot(tedf, 1, 8, 99));
|
this.addSlotToContainer(new Slot(tedf, 1, 12, 90));
|
||||||
//Canister Output
|
//Canister Output
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 2, 8, 119));
|
this.addSlotToContainer(new SlotTakeOnly(tedf, 2, 12, 108));
|
||||||
//Heavy Oil Input
|
//Heavy Oil Input
|
||||||
this.addSlotToContainer(new Slot(tedf, 3, 86, 99));
|
this.addSlotToContainer(new Slot(tedf, 3, 64, 90));
|
||||||
//Heavy Oil Output
|
//Heavy Oil Output
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 4, 86, 119));
|
this.addSlotToContainer(new SlotTakeOnly(tedf, 4, 64, 108));
|
||||||
//Naphtha Input
|
//Naphtha Input
|
||||||
this.addSlotToContainer(new Slot(tedf, 5, 106, 99));
|
this.addSlotToContainer(new Slot(tedf, 5, 82, 90));
|
||||||
//Naphtha Output
|
//Naphtha Output
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 6, 106, 119));
|
this.addSlotToContainer(new SlotTakeOnly(tedf, 6, 82, 108));
|
||||||
//Light Oil Input
|
//Light Oil Input
|
||||||
this.addSlotToContainer(new Slot(tedf, 7, 126, 99));
|
this.addSlotToContainer(new Slot(tedf, 7, 100, 90));
|
||||||
//Light Oil Output
|
//Light Oil Output
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 8, 126, 119));
|
this.addSlotToContainer(new SlotTakeOnly(tedf, 8, 100, 108));
|
||||||
//Petroleum Input
|
//Petroleum Input
|
||||||
this.addSlotToContainer(new Slot(tedf, 9, 146, 99));
|
this.addSlotToContainer(new Slot(tedf, 9, 118, 90));
|
||||||
//Petroleum Output
|
//Petroleum Output
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 10, 146, 119));
|
this.addSlotToContainer(new SlotTakeOnly(tedf, 10, 118, 108));
|
||||||
//Sulfur Output
|
//Sulfur Output
|
||||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 11, 58, 119));
|
this.addSlotToContainer(new SlotTakeOnly(tedf, 11, 38, 90));
|
||||||
//Fluid ID
|
//Fluid ID
|
||||||
this.addSlotToContainer(new Slot(tedf, 12, 186, 106));
|
this.addSlotToContainer(new Slot(tedf, 12, 38, 108));
|
||||||
|
|
||||||
for(int i = 0; i < 3; i++) {
|
for(int i = 0; i < 3; i++) {
|
||||||
for(int j = 0; j < 9; j++) {
|
for(int j = 0; j < 9; j++) {
|
||||||
|
|||||||
@ -26,27 +26,27 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
super(new ContainerMachineRefinery(invPlayer, tedf));
|
super(new ContainerMachineRefinery(invPlayer, tedf));
|
||||||
refinery = tedf;
|
refinery = tedf;
|
||||||
|
|
||||||
this.xSize = 210;
|
this.xSize = 182;
|
||||||
this.ySize = 231;
|
this.ySize = 240;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||||
super.drawScreen(mouseX, mouseY, f);
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
refinery.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 30, guiTop + 27, 21, 104); // Render tooltip for column.
|
refinery.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 12, guiTop + 17, 16, 70); // Render tooltip for column.
|
||||||
refinery.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 86, guiTop + 42, 16, 52);
|
refinery.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 64, guiTop + 35, 16, 52);
|
||||||
refinery.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 106, guiTop + 42, 16, 52);
|
refinery.tanks[2].renderTankInfo(this, mouseX, mouseY, guiLeft + 82, guiTop + 35, 16, 52);
|
||||||
refinery.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 126, guiTop + 42, 16, 52);
|
refinery.tanks[3].renderTankInfo(this, mouseX, mouseY, guiLeft + 100, guiTop + 35, 16, 52);
|
||||||
refinery.tanks[4].renderTankInfo(this, mouseX, mouseY, guiLeft + 146, guiTop + 42, 16, 52);
|
refinery.tanks[4].renderTankInfo(this, mouseX, mouseY, guiLeft + 118, guiTop + 35, 16, 52);
|
||||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 186, guiTop + 18, 16, 52, refinery.power, refinery.maxPower);
|
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 158, guiTop + 18, 16, 88, refinery.power, refinery.maxPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||||
String name = this.refinery.hasCustomInventoryName() ? this.refinery.getInventoryName() : I18n.format(this.refinery.getInventoryName());
|
String name = this.refinery.hasCustomInventoryName() ? this.refinery.getInventoryName() : I18n.format(this.refinery.getInventoryName());
|
||||||
|
|
||||||
this.fontRendererObj.drawString(name, this.xSize / 2 - 34/2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
this.fontRendererObj.drawString(name, this.xSize / 2 - 36 / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 4, 4210752);
|
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 4, 4210752);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,25 +54,19 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
func_146110_a(guiLeft, guiTop, 0, 0, xSize, ySize, 350, 256);
|
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||||
|
|
||||||
// power
|
// power
|
||||||
int j = (int)refinery.getPowerScaled(50);
|
int j = (int)refinery.getPowerScaled(88);
|
||||||
func_146110_a(guiLeft + 186, guiTop + 69 - j, 210, 52 - j, 16, j, 350, 256);
|
drawTexturedModalRect(guiLeft + 158, guiTop + 106 - j, 182, 88 - j, 16, j);
|
||||||
|
|
||||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0); // default
|
OpenGlHelper.glBlendFunc(770, 771, 1, 0); // default
|
||||||
|
|
||||||
// input tank
|
// input tank
|
||||||
FluidTank inputOil = refinery.tanks[0];
|
FluidTank inputOil = refinery.tanks[0];
|
||||||
if (inputOil.getFill() != 0) {
|
if (inputOil.getFill() != 0) {
|
||||||
|
refinery.tanks[0].renderTank(guiLeft + 12, guiTop + 88, this.zLevel, 16, 70);
|
||||||
int targetHeight = inputOil.getFill() * 101 / inputOil.getMaxFill();
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
Color color = new Color(inputOil.getTankType().getColor());
|
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
|
||||||
func_146110_a(guiLeft + 33, guiTop + 130 - targetHeight, 226, 101 - targetHeight, 16, targetHeight, 350, 256);
|
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fucking kgjhgdfjgdhjfg
|
// fucking kgjhgdfjgdhjfg
|
||||||
@ -84,10 +78,10 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
RefineryRecipe recipe = RefineryRecipes.getRefinery(inputOil.getTankType());
|
RefineryRecipe recipe = RefineryRecipes.getRefinery(inputOil.getTankType());
|
||||||
|
|
||||||
if(recipe == null) {
|
if(recipe == null) {
|
||||||
func_146110_a(guiLeft + 52, guiTop + 63, 247, 1, 33, 48, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 30, 0, 248, 43, 4, 256, 256);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 32, 247, 50, 66, 52, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 26, 0, 240, 61, 8, 256, 256);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 24, 247, 145, 86, 35, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 22, 61, 240, 79, 12, 256, 256);
|
||||||
func_146110_a(guiLeft + 36, guiTop + 16, 211, 119, 122, 25, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 18, 140, 240, 97, 16, 256, 256);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Heavy Oil Products
|
// Heavy Oil Products
|
||||||
@ -95,31 +89,31 @@ public class GUIMachineRefinery extends GuiInfoContainer {
|
|||||||
|
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 63, 247, 1, 33, 48, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 30, 0, 248, 43, 4, 256, 256);
|
||||||
|
|
||||||
// Naphtha Oil Products
|
// Naphtha Oil Products
|
||||||
color = new Color(recipe.outputs[1].type.getColor());
|
color = new Color(recipe.outputs[1].type.getColor());
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 32, 247, 50, 66, 52, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 26, 0, 240, 61, 8, 256, 256);
|
||||||
|
|
||||||
// Light Oil Products
|
// Light Oil Products
|
||||||
color = new Color(recipe.outputs[2].type.getColor());
|
color = new Color(recipe.outputs[2].type.getColor());
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 52, guiTop + 24, 247, 145, 86, 35, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 22, 61, 240, 79, 12, 256, 256);
|
||||||
|
|
||||||
// Gaseous Products
|
// Gaseous Products
|
||||||
color = new Color(recipe.outputs[3].type.getColor());
|
color = new Color(recipe.outputs[3].type.getColor());
|
||||||
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
GL11.glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1F);
|
||||||
func_146110_a(guiLeft + 36, guiTop + 16, 211, 119, 122, 25, 350, 256);
|
func_146110_a(guiLeft + 30, guiTop + 18, 140, 240, 97, 16, 256, 256);
|
||||||
|
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
// output tanks
|
// output tanks
|
||||||
refinery.tanks[1].renderTank(guiLeft + 86, guiTop + 95, this.zLevel, 16, 52);
|
refinery.tanks[1].renderTank(guiLeft + 64, guiTop + 88, this.zLevel, 16, 52);
|
||||||
refinery.tanks[2].renderTank(guiLeft + 106, guiTop + 95, this.zLevel, 16, 52);
|
refinery.tanks[2].renderTank(guiLeft + 82, guiTop + 88, this.zLevel, 16, 52);
|
||||||
refinery.tanks[3].renderTank(guiLeft + 126, guiTop + 95, this.zLevel, 16, 52);
|
refinery.tanks[3].renderTank(guiLeft + 100, guiTop + 88, this.zLevel, 16, 52);
|
||||||
refinery.tanks[4].renderTank(guiLeft + 146, guiTop + 95, this.zLevel, 16, 52);
|
refinery.tanks[4].renderTank(guiLeft + 118, guiTop + 88, this.zLevel, 16, 52);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 3.9 KiB |
Loading…
x
Reference in New Issue
Block a user