From b733dfc25e36fb9b1fb8f8b67cfdb6216f33380c Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 18 Mar 2024 15:29:18 +0100 Subject: [PATCH] fixed F1 in NEI --- changelog | 6 ++++++ gradle.properties | 2 +- .../com/hbm/main/ModEventHandlerClient.java | 21 ++++++++++++------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/changelog b/changelog index 254aff747..f05221f27 100644 --- a/changelog +++ b/changelog @@ -28,6 +28,10 @@ * Compressing blood no longer creates oil, rather it makes heavy oil (250mB) * Tier 2 pickaxes (bismuth and up) now use the large item renderer * Added the metal block material to the sellafite conversion list of nuclear explosions +* Changed the mechanics for schottky particle diodes + * Instead of randomizing directions, schottky diodes will now split particles into "virtual particles" which take mutliple paths at once + * The particles will collapse as soon as the first virtual particle with a valid outcome reaches the end + * This change allows branching accelerators to be made, where the particle will always take the shortest path necessary to complete the operation. In essence, it allows a single accelerator to do any recipe, without requiring to power the entire accelerator, as only the path of the finishing particle will use up energy. ## Fixed * WarTec should now be compatible again @@ -39,3 +43,5 @@ * Fixed schrabidium conversion happening outside the main crater instead of inside * Fixed wood burning generator creating smoke even if no power is being generated * Fixed one of the woodburner's ports being offset in certain orientations +* Fixed fog caching causing weird behavior with the sky color change in response to crater biomes (or lack thereof) +* Fixed "F1 for help" keybind not working on non-standard inventories such as the NEI item list diff --git a/gradle.properties b/gradle.properties index 204129933..6cf1c03a5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion al \ custom machine holograms, I18n improvements), SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC),\ \ 70k (textures, glyphid AI, strand caster), Maksymisio (polish localization) Ice-Arrow (research reactor tweaks),\ \ 245tt (anvil GUI improvements), MellowArpeggiation (new animation system, turbine sounds, sound fixes,\ - \ industrial lights), FOlkvangrField (custom machine parts) + \ industrial lights, better particle diodes), FOlkvangrField (custom machine parts) diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index 4a3ad255e..38f1102ee 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -1,7 +1,6 @@ package com.hbm.main; import java.lang.reflect.Method; -import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Random; @@ -13,10 +12,6 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockAshes; -import com.hbm.blocks.rail.IRailNTM; -import com.hbm.blocks.rail.IRailNTM.MoveContext; -import com.hbm.blocks.rail.IRailNTM.RailCheckType; -import com.hbm.blocks.rail.IRailNTM.RailContext; import com.hbm.config.GeneralConfig; import com.hbm.entity.mob.EntityHunterChopper; import com.hbm.entity.projectile.EntityChopperMine; @@ -822,6 +817,8 @@ public class ModEventHandlerClient { CanneryBase cannery = Jars.canneries.get(comp); if(cannery != null) { list.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey("cannery.f1")); + lastCannery = comp; + canneryTimestamp = System.currentTimeMillis(); } } catch(Exception ex) { list.add(EnumChatFormatting.RED + "Error loading cannery: " + ex.getLocalizedMessage()); @@ -837,6 +834,9 @@ public class ModEventHandlerClient { }*/ } + private static long canneryTimestamp; + private static ComparableStack lastCannery = null; + private ResourceLocation ashes = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_ash.png"); @SideOnly(Side.CLIENT) @@ -948,9 +948,14 @@ public class ModEventHandlerClient { if(Keyboard.isKeyDown(Keyboard.KEY_F1)) { - ItemStack stack = getMouseOverStack(); - if(stack != null) { - ComparableStack comp = new ComparableStack(stack).makeSingular(); + ComparableStack comp = canneryTimestamp > System.currentTimeMillis() - 100 ? lastCannery : null; + + if(comp == null) { + ItemStack stack = getMouseOverStack(); + if(stack != null) comp = new ComparableStack(stack).makeSingular(); + } + + if(comp != null) { CanneryBase cannery = Jars.canneries.get(comp); if(cannery != null) { FMLCommonHandler.instance().showGuiScreen(new GuiWorldInAJar(cannery.createScript(), cannery.getName(), cannery.getIcon(), cannery.seeAlso()));