mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
better highlighting on stack tooltips, some funky
This commit is contained in:
parent
11a83911a3
commit
6c74dd71b4
@ -68,7 +68,7 @@ public abstract class GUITurretBase extends GuiInfoContainer {
|
||||
if(this.mc.thePlayer.inventory.getItemStack() == null && this.guiLeft + 79 <= mouseX && guiLeft + 79 + 54 > mouseX && guiTop + 62 < mouseY && guiTop + 62 + 54 >= mouseY) {
|
||||
|
||||
boolean draw = true;
|
||||
for(int i = 0; i < 9; i++) {
|
||||
for(int i = 1; i < 10; i++) {
|
||||
if(this.isMouseOverSlot(this.inventorySlots.getSlot(i), mouseX, mouseY) && this.inventorySlots.getSlot(i).getHasStack()) {
|
||||
draw = false;
|
||||
break;
|
||||
|
||||
@ -13,13 +13,11 @@ import com.hbm.util.BobMathUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public abstract class GuiInfoContainer extends GuiContainer {
|
||||
@ -190,8 +188,13 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
} else {
|
||||
ItemStack stack = (ItemStack) o;
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
if(stack.stackSize == 0) {
|
||||
this.drawGradientRect(minX + indent - 1, minY - 1, minX + indent + 17, minY + 17, 0xffff0000, 0xffff0000);
|
||||
this.drawGradientRect(minX + indent, minY, minX + indent + 16, minY + 16, 0xffb0b0b0, 0xffb0b0b0);
|
||||
}
|
||||
itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY);
|
||||
itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY, stack.stackSize == 0 ? (EnumChatFormatting.RED + "_ _") : null);
|
||||
itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY, null);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
indent += 18;
|
||||
|
||||
@ -149,8 +149,8 @@ public class ChemplantRecipes extends SerializableRecipe {
|
||||
new ComparableStack(ModItems.catalyst_clay, 8))
|
||||
.outputItems(
|
||||
new ItemStack(ModItems.ingot_schrabidium),
|
||||
new ItemStack(ModItems.powder_desh),
|
||||
new ItemStack(ModItems.powder_desh_mix))
|
||||
new ItemStack(ModItems.powder_desh, 12),
|
||||
new ItemStack(ModItems.powder_desh_mix, 12))
|
||||
.outputFluids(new FluidStack(Fluids.WATZ, 50)));
|
||||
recipes.add(new ChemRecipe(51, "DYN_EUPH", 3600)
|
||||
.inputItems(
|
||||
|
||||
@ -118,6 +118,30 @@ public class ModEventHandlerClient {
|
||||
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
/*if(event.type == ElementType.CROSSHAIRS) {
|
||||
int width = event.resolution.getScaledWidth();
|
||||
int height = event.resolution.getScaledHeight();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.0F);
|
||||
GL11.glDepthMask(false);
|
||||
tess.startDrawingQuads();
|
||||
float brightness = (int)(System.currentTimeMillis() % 10000) / 10000F;
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (1 - brightness) * 0.8F);
|
||||
tess.addVertex(width, 0, 0);
|
||||
tess.addVertex(0, 0, 0);
|
||||
tess.addVertex(0, height, 0);
|
||||
tess.addVertex(width, height, 0);
|
||||
tess.draw();
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDepthMask(true);
|
||||
return;
|
||||
}*/
|
||||
|
||||
/// HANDLE GUN OVERLAYS ///
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IItemHUD) {
|
||||
((IItemHUD)player.getHeldItem().getItem()).renderHUD(event, event.type, player, player.getHeldItem());
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/turret/maxwellLoop.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/turret/maxwellLoop.ogg
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user