mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 19:59:49 +00:00
Refactor Brewing Recipes
This commit is contained in:
1 parent
f0d8d6b89d
commit
427f030110
21 files changed
+753
-632
No files matched your search
@@ -12,7 +12,8 @@ import binnie.craftgui.minecraft.control.ControlProgressBase;
|
||||
import binnie.craftgui.resource.Texture;
|
||||
import binnie.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.extratrees.core.ExtraTreeTexture;
|
||||
import binnie.extratrees.machines.Brewery;
|
||||
import binnie.extratrees.machines.brewery.BreweryLogic;
|
||||
import binnie.extratrees.machines.brewery.BreweryRecipes;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -26,28 +27,28 @@ public class ControlBreweryProgress extends ControlProgressBase {
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(ControlBreweryProgress.Brewery, new IPoint(0.0f, 0.0f));
|
||||
final Brewery.ComponentBreweryLogic logic = Machine.getInterface(Brewery.ComponentBreweryLogic.class, Window.get(this).getInventory());
|
||||
if (logic == null || logic.currentCrafting == null || logic.currentCrafting.currentInput == null) {
|
||||
final BreweryLogic logic = Machine.getInterface(BreweryLogic.class, Window.get(this).getInventory());
|
||||
if (logic == null || logic.currentCrafting == null || logic.currentCrafting.inputFluid == null) {
|
||||
return;
|
||||
}
|
||||
final int fermentedHeight = (int) (32.0f * logic.getProgress() / 100.0f);
|
||||
CraftGUI.Render.limitArea(new IArea(new IPoint(1.0f, 6.0f).add(this.getAbsolutePosition()), new IPoint(32.0f, 32 - fermentedHeight)));
|
||||
GL11.glEnable(3089);
|
||||
this.renderFluid(logic.currentCrafting.currentInput, new IPoint(1.0f, 6.0f));
|
||||
this.renderFluid(logic.currentCrafting.currentInput, new IPoint(17.0f, 6.0f));
|
||||
this.renderFluid(logic.currentCrafting.currentInput, new IPoint(1.0f, 22.0f));
|
||||
this.renderFluid(logic.currentCrafting.currentInput, new IPoint(17.0f, 22.0f));
|
||||
this.renderFluid(logic.currentCrafting.inputFluid, new IPoint(1.0f, 6.0f));
|
||||
this.renderFluid(logic.currentCrafting.inputFluid, new IPoint(17.0f, 6.0f));
|
||||
this.renderFluid(logic.currentCrafting.inputFluid, new IPoint(1.0f, 22.0f));
|
||||
this.renderFluid(logic.currentCrafting.inputFluid, new IPoint(17.0f, 22.0f));
|
||||
GL11.glDisable(3089);
|
||||
CraftGUI.Render.limitArea(new IArea(new IPoint(1.0f, 38 - fermentedHeight).add(this.getAbsolutePosition()), new IPoint(32.0f, fermentedHeight)));
|
||||
GL11.glEnable(3089);
|
||||
this.renderFluid(binnie.extratrees.machines.Brewery.getOutput(logic.currentCrafting), new IPoint(1.0f, 6.0f));
|
||||
this.renderFluid(binnie.extratrees.machines.Brewery.getOutput(logic.currentCrafting), new IPoint(17.0f, 6.0f));
|
||||
this.renderFluid(binnie.extratrees.machines.Brewery.getOutput(logic.currentCrafting), new IPoint(1.0f, 22.0f));
|
||||
this.renderFluid(binnie.extratrees.machines.Brewery.getOutput(logic.currentCrafting), new IPoint(17.0f, 22.0f));
|
||||
this.renderFluid(BreweryRecipes.getOutput(logic.currentCrafting), new IPoint(1.0f, 6.0f));
|
||||
this.renderFluid(BreweryRecipes.getOutput(logic.currentCrafting), new IPoint(17.0f, 6.0f));
|
||||
this.renderFluid(BreweryRecipes.getOutput(logic.currentCrafting), new IPoint(1.0f, 22.0f));
|
||||
this.renderFluid(BreweryRecipes.getOutput(logic.currentCrafting), new IPoint(17.0f, 22.0f));
|
||||
GL11.glDisable(3089);
|
||||
final ItemStackSet stacks = new ItemStackSet();
|
||||
Collections.addAll(stacks, logic.currentCrafting.inputs);
|
||||
stacks.add(logic.currentCrafting.ingr);
|
||||
Collections.addAll(stacks, logic.currentCrafting.inputGrains);
|
||||
stacks.add(logic.currentCrafting.ingredient);
|
||||
int x = 1;
|
||||
int y = 6;
|
||||
for (final ItemStack stack : stacks) {
|
||||
|
||||
Reference in new issue
Block a user