use of WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack in project BloodMagic by WayofTime.
the class TEBellJarItemRenderer method renderConduitItem.
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) {
GL11.glPushMatrix();
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 0);
GL11.glPopMatrix();
GL11.glPopMatrix();
ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item);
if (info.length >= 1 && info[0] != null) {
ReagentStack reagentStack = info[0].reagent;
int capacity = info[0].capacity;
if (reagentStack != null && reagentStack.reagent != null) {
Reagent reagent = reagentStack.reagent;
this.renderTankContents(translateX, translateY, translateZ, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity);
}
}
GL11.glEnable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glPushMatrix();
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 1);
GL11.glPopMatrix();
GL11.glPopMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
}
use of WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack in project BloodMagic by WayofTime.
the class RenderHelper method onTickInGame.
public static boolean onTickInGame(Minecraft mc) {
if (enabled && (mc.inGameHasFocus || mc.currentScreen == null || (mc.currentScreen instanceof GuiChat && showInChat)) && !mc.gameSettings.showDebugInfo) {
EntityPlayer player = mc.thePlayer;
player.getEntityData();
if (SpellHelper.canPlayerSeeAlchemy(player)) {
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
scaledResolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
displayArmorStatus(mc);
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
}
ItemStack stack = player.inventory.armorItemInSlot(2);
if (stack != null && stack.getItem() instanceof OmegaArmour) {
int maxAmount = (int) APISpellHelper.getPlayerMaxReagentAmount(player);
if (maxAmount > 0) {
float val = APISpellHelper.getPlayerCurrentReagentAmount(player);
ReagentStack reagentStack = new ReagentStack(APISpellHelper.getPlayerReagentType(player), (int) val);
if (reagentStack != null && reagentStack.amount > 0) {
renderTestHUD(mc, reagentStack, maxAmount);
}
}
}
if (SpellHelper.canPlayerSeeLPBar(player)) {
int max = APISpellHelper.getPlayerMaxLPTag(player);
if (max > 1) {
renderLPHUD(mc, APISpellHelper.getPlayerLPTag(player), max);
}
}
float maxHP = APISpellHelper.getCurrentAdditionalMaxHP(player);
// System.out.println("MaxHP: " + maxHP);
if (maxHP > 0) {
renderHPHUD(mc, APISpellHelper.getCurrentAdditionalHP(player), maxHP);
}
}
return true;
}
Aggregations