use of com.simibubi.create.foundation.gui.AllGuiTextures in project Create by Creators-of-Create.
the class ToolboxHandlerClient method renderOverlay.
public static void renderOverlay(ForgeIngameGui gui, PoseStack poseStack, float partialTicks, int width, int height) {
int x = width / 2 - 90;
int y = height - 23;
RenderSystem.enableDepthTest();
Player player = Minecraft.getInstance().player;
CompoundTag persistentData = player.getPersistentData();
if (!persistentData.contains("CreateToolboxData"))
return;
CompoundTag compound = player.getPersistentData().getCompound("CreateToolboxData");
if (compound.isEmpty())
return;
poseStack.pushPose();
for (int slot = 0; slot < 9; slot++) {
String key = String.valueOf(slot);
if (!compound.contains(key))
continue;
BlockPos pos = NbtUtils.readBlockPos(compound.getCompound(key).getCompound("Pos"));
double max = ToolboxHandler.getMaxRange(player);
boolean selected = player.getInventory().selected == slot;
int offset = selected ? 1 : 0;
AllGuiTextures texture = ToolboxHandler.distance(player.position(), pos) < max * max ? selected ? TOOLBELT_SELECTED_ON : TOOLBELT_HOTBAR_ON : selected ? TOOLBELT_SELECTED_OFF : TOOLBELT_HOTBAR_OFF;
texture.render(poseStack, x + 20 * slot - offset, y + offset);
}
poseStack.popPose();
}
use of com.simibubi.create.foundation.gui.AllGuiTextures in project Create by Creators-of-Create.
the class SchematicannonScreen method renderPrintingProgress.
protected void renderPrintingProgress(PoseStack matrixStack, int x, int y, float progress) {
progress = Math.min(progress, 1);
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_PROGRESS;
sprite.bind();
blit(matrixStack, x + 44, y + 64, sprite.startX, sprite.startY, (int) (sprite.width * progress), sprite.height);
}
use of com.simibubi.create.foundation.gui.AllGuiTextures in project Create by Creators-of-Create.
the class SchematicannonScreen method renderChecklistPrinterProgress.
protected void renderChecklistPrinterProgress(PoseStack matrixStack, int x, int y, float progress) {
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_CHECKLIST_PROGRESS;
sprite.bind();
blit(matrixStack, x + 154, y + 20, sprite.startX, sprite.startY, (int) (sprite.width * progress), sprite.height);
}
use of com.simibubi.create.foundation.gui.AllGuiTextures in project Create by Creators-of-Create.
the class BasinCategory method draw.
@Override
public void draw(BasinRecipe recipe, PoseStack matrixStack, double mouseX, double mouseY) {
List<Pair<Ingredient, MutableInt>> actualIngredients = ItemHelper.condenseIngredients(recipe.getIngredients());
int size = actualIngredients.size() + recipe.getFluidIngredients().size();
int outSize = recipe.getFluidResults().size() + recipe.getRollableResults().size();
int xOffset = size < 3 ? (3 - size) * 19 / 2 : 0;
HeatCondition requiredHeat = recipe.getRequiredHeat();
int yOffset = 0;
for (int i = 0; i < size; i++) AllGuiTextures.JEI_SLOT.render(matrixStack, 16 + xOffset + (i % 3) * 19, 50 - (i / 3) * 19 + yOffset);
boolean noHeat = requiredHeat == HeatCondition.NONE;
int vRows = (1 + outSize) / 2;
for (int i = 0; i < outSize; i++) AllGuiTextures.JEI_SLOT.render(matrixStack, 141 - (outSize % 2 != 0 && i == outSize - 1 ? 0 : i % 2 == 0 ? 10 : -9), -19 * (i / 2) + 50 + yOffset);
if (vRows <= 2)
AllGuiTextures.JEI_DOWN_ARROW.render(matrixStack, 136, -19 * (vRows - 1) + 32 + yOffset);
AllGuiTextures shadow = noHeat ? AllGuiTextures.JEI_SHADOW : AllGuiTextures.JEI_LIGHT;
shadow.render(matrixStack, 81, 58 + (noHeat ? 10 : 30));
if (!needsHeating)
return;
AllGuiTextures heatBar = noHeat ? AllGuiTextures.JEI_NO_HEAT_BAR : AllGuiTextures.JEI_HEAT_BAR;
heatBar.render(matrixStack, 4, 80);
Minecraft.getInstance().font.draw(matrixStack, Lang.translate(requiredHeat.getTranslationKey()), 9, 86, requiredHeat.getColor());
}
use of com.simibubi.create.foundation.gui.AllGuiTextures in project Create by Creators-of-Create.
the class SchematicannonScreen method renderFuelBar.
protected void renderFuelBar(PoseStack matrixStack, int x, int y, float amount) {
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_FUEL;
if (menu.contentHolder.hasCreativeCrate) {
AllGuiTextures.SCHEMATICANNON_FUEL_CREATIVE.render(matrixStack, x + 36, y + 19, this);
return;
}
sprite.bind();
blit(matrixStack, x + 36, y + 19, sprite.startX, sprite.startY, (int) (sprite.width * amount), sprite.height);
}
Aggregations