Class ForgeHooksClient

java.lang.Object
net.minecraftforge.client.ForgeHooksClient

public class ForgeHooksClient extends Object
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • CLIENTHOOKS

      private static final org.apache.logging.log4j.Marker CLIENTHOOKS
    • guiLayers

      private static final Stack<Screen> guiLayers
      Contains the *extra* GUI layers. The current top layer stays in Minecraft#currentScreen, and the rest serve as a background for it.
    • renderLayer

      static final ThreadLocal<RenderType> renderLayer
    • forgeStatusLine

      public static String forgeStatusLine
    • worldRenderPass

      static int worldRenderPass
    • flipX

      private static final Matrix4f flipX
    • flipXNormal

      private static final Matrix3f flipXNormal
    • slotMainHand

      private static int slotMainHand
    • layerDefinitions

      private static final Map<ModelLayerLocation,​Supplier<LayerDefinition>> layerDefinitions
    • ICON_SHEET

      private static final ResourceLocation ICON_SHEET
  • Constructor Details

    • ForgeHooksClient

      public ForgeHooksClient()
  • Method Details

    • resizeGuiLayers

      public static void resizeGuiLayers​(Minecraft minecraft, int width, int height)
    • clearGuiLayers

      public static void clearGuiLayers​(Minecraft minecraft)
    • popGuiLayerInternal

      private static void popGuiLayerInternal​(Minecraft minecraft)
    • pushGuiLayer

      public static void pushGuiLayer​(Minecraft minecraft, Screen screen)
    • popGuiLayer

      public static void popGuiLayer​(Minecraft minecraft)
    • getGuiFarPlane

      public static float getGuiFarPlane()
    • getArmorTexture

      public static String getArmorTexture​(Entity entity, ItemStack armor, String _default, EquipmentSlot slot, String type)
    • onDrawBlockHighlight

      public static boolean onDrawBlockHighlight​(LevelRenderer context, Camera info, HitResult target, float partialTicks, PoseStack matrix, MultiBufferSource buffers)
    • dispatchRenderLast

      public static void dispatchRenderLast​(LevelRenderer context, PoseStack mat, float partialTicks, Matrix4f projectionMatrix, long finishTimeNano)
    • renderSpecificFirstPersonHand

      public static boolean renderSpecificFirstPersonHand​(InteractionHand hand, PoseStack mat, MultiBufferSource buffers, int light, float partialTicks, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
    • onTextureStitchedPre

      public static void onTextureStitchedPre​(TextureAtlas map, Set<ResourceLocation> resourceLocations)
    • onTextureStitchedPost

      public static void onTextureStitchedPost​(TextureAtlas map)
    • onBlockColorsInit

      public static void onBlockColorsInit​(BlockColors blockColors)
    • onItemColorsInit

      public static void onItemColorsInit​(ItemColors itemColors, BlockColors blockColors)
    • setRenderLayer

      public static void setRenderLayer​(RenderType layer)
    • getArmorModel

      public static <A extends HumanoidModel<?>> A getArmorModel​(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot slot, A _default)
    • fixDomain

      public static String fixDomain​(String base, String complex)
    • getOffsetFOV

      public static float getOffsetFOV​(Player entity, float fov)
    • getFOVModifier

      public static double getFOVModifier​(GameRenderer renderer, Camera info, double renderPartialTicks, double fov)
    • renderMainMenu

      public static void renderMainMenu​(TitleScreen gui, PoseStack mStack, Font font, int width, int height, int alpha)
    • playSound

      public static SoundInstance playSound​(SoundEngine manager, SoundInstance sound)
    • getWorldRenderPass

      public static int getWorldRenderPass()
    • drawScreen

      public static void drawScreen​(Screen screen, PoseStack mStack, int mouseX, int mouseY, float partialTicks)
    • drawScreenInternal

      private static void drawScreenInternal​(Screen screen, PoseStack mStack, int mouseX, int mouseY, float partialTicks)
    • getFogDensity

      public static float getFogDensity​(FogRenderer.FogMode type, Camera info, float partial, float density)
    • onFogRender

      public static void onFogRender​(FogRenderer.FogMode type, Camera info, float partial, float distance)
    • onCameraSetup

      public static EntityViewRenderEvent.CameraSetup onCameraSetup​(GameRenderer renderer, Camera info, float partial)
    • onModelBake

      public static void onModelBake​(ModelManager modelManager, Map<ResourceLocation,​BakedModel> modelRegistry, ModelLoader modelLoader)
    • handleCameraTransforms

      public static BakedModel handleCameraTransforms​(PoseStack matrixStack, BakedModel model, ItemTransforms.TransformType cameraTransformType, boolean leftHandHackery)
    • preDraw

      public static void preDraw​(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, ByteBuffer buffer)
    • postDraw

      public static void postDraw​(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, ByteBuffer buffer)
    • getColorIndex

      public static int getColorIndex​(VertexFormat fmt)
    • getFluidSprites

      public static TextureAtlasSprite[] getFluidSprites​(BlockAndTintGetter world, BlockPos pos, FluidState fluidStateIn)
    • gatherFluidTextures

      public static void gatherFluidTextures​(Set<Material> textures)
    • getFluidMaterials

      public static Stream<Material> getFluidMaterials​(Fluid fluid)
    • getBlockMaterial

      public static Material getBlockMaterial​(ResourceLocation loc)
    • fillNormal

      public static void fillNormal​(int[] faceData, Direction facing)
      internal, relies on fixed format of FaceBakery
    • getVertexPos

      private static Vector3f getVertexPos​(int[] data, int vertex)
    • loadEntityShader

      public static void loadEntityShader​(Entity entity, GameRenderer entityRenderer)
    • shouldCauseReequipAnimation

      public static boolean shouldCauseReequipAnimation​(@Nonnull ItemStack from, @Nonnull ItemStack to, int slot)
    • bossBarRenderPre

      public static RenderGameOverlayEvent.BossInfo bossBarRenderPre​(PoseStack mStack, Window res, LerpingBossEvent bossInfo, int x, int y, int increment)
    • bossBarRenderPost

      public static void bossBarRenderPost​(PoseStack mStack, Window res)
    • onScreenshot

      public static ScreenshotEvent onScreenshot​(NativeImage image, File screenshotFile)
    • onClientChangeGameMode

      public static void onClientChangeGameMode​(PlayerInfo info, GameType currentGameMode, GameType newGameMode)
    • handlePerspective

      public static BakedModel handlePerspective​(BakedModel model, ItemTransforms.TransformType type, PoseStack stack)
    • onInputUpdate

      public static void onInputUpdate​(Player player, Input movementInput)
    • refreshResources

      @Deprecated(since="1.17.1", forRemoval=true) public static void refreshResources​(Minecraft mc, VanillaResourceType... types)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • onGuiMouseClickedPre

      public static boolean onGuiMouseClickedPre​(Screen guiScreen, double mouseX, double mouseY, int button)
    • onGuiMouseClickedPost

      public static boolean onGuiMouseClickedPost​(Screen guiScreen, double mouseX, double mouseY, int button, boolean handled)
    • onGuiMouseReleasedPre

      public static boolean onGuiMouseReleasedPre​(Screen guiScreen, double mouseX, double mouseY, int button)
    • onGuiMouseReleasedPost

      public static boolean onGuiMouseReleasedPost​(Screen guiScreen, double mouseX, double mouseY, int button, boolean handled)
    • onGuiMouseDragPre

      public static boolean onGuiMouseDragPre​(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
    • onGuiMouseDragPost

      public static boolean onGuiMouseDragPost​(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
    • onGuiMouseScrollPre

      public static boolean onGuiMouseScrollPre​(MouseHandler mouseHelper, Screen guiScreen, double scrollDelta)
    • onGuiMouseScrollPost

      public static boolean onGuiMouseScrollPost​(MouseHandler mouseHelper, Screen guiScreen, double scrollDelta)
    • onGuiKeyPressedPre

      public static boolean onGuiKeyPressedPre​(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onGuiKeyPressedPost

      public static boolean onGuiKeyPressedPost​(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onGuiKeyReleasedPre

      public static boolean onGuiKeyReleasedPre​(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onGuiKeyReleasedPost

      public static boolean onGuiKeyReleasedPost​(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onGuiCharTypedPre

      public static boolean onGuiCharTypedPre​(Screen guiScreen, char codePoint, int modifiers)
    • onGuiCharTypedPost

      public static boolean onGuiCharTypedPost​(Screen guiScreen, char codePoint, int modifiers)
    • onRecipesUpdated

      public static void onRecipesUpdated​(RecipeManager mgr)
    • fireMouseInput

      public static void fireMouseInput​(int button, int action, int mods)
    • fireKeyInput

      public static void fireKeyInput​(int key, int scanCode, int action, int modifiers)
    • onMouseScroll

      public static boolean onMouseScroll​(MouseHandler mouseHelper, double scrollDelta)
    • onRawMouseClicked

      public static boolean onRawMouseClicked​(int button, int action, int mods)
    • onClickInput

      public static InputEvent.ClickInputEvent onClickInput​(int button, KeyMapping keyBinding, InteractionHand hand)
    • drawItemLayered

      public static void drawItemLayered​(ItemRenderer renderer, BakedModel modelIn, ItemStack itemStackIn, PoseStack matrixStackIn, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn, boolean fabulous)
    • isNameplateInRenderDistance

      public static boolean isNameplateInRenderDistance​(Entity entity, double squareDistance)
    • renderPistonMovedBlocks

      public static void renderPistonMovedBlocks​(BlockPos pos, BlockState state, PoseStack stack, MultiBufferSource buffer, Level world, boolean checkSides, int combinedOverlay, BlockRenderDispatcher blockRenderer)
    • registerForgeWorldTypeScreens

      public static void registerForgeWorldTypeScreens()
    • getBiomeGeneratorTypeScreenFactory

      public static WorldPreset.PresetEditor getBiomeGeneratorTypeScreenFactory​(Optional<WorldPreset> generator, @Nullable WorldPreset.PresetEditor biomegeneratortypescreens$ifactory)
    • hasBiomeGeneratorSettingsOptionsScreen

      public static boolean hasBiomeGeneratorSettingsOptionsScreen​(Optional<WorldPreset> generator)
    • getWorldTypeFromGenerator

      public static Optional<WorldPreset> getWorldTypeFromGenerator​(WorldGenSettings dimensionGeneratorSettings)
    • getDefaultWorldType

      public static Optional<WorldPreset> getDefaultWorldType()
    • shouldRender

      public static boolean shouldRender​(MobEffectInstance effectInstance)
    • loadTextureAtlasSprite

      @Nullable public static TextureAtlasSprite loadTextureAtlasSprite​(TextureAtlas textureAtlas, ResourceManager resourceManager, TextureAtlasSprite.Info textureInfo, Resource resource, int atlasWidth, int atlasHeight, int spriteX, int spriteY, int mipmapLevel, NativeImage image)
    • registerLayerDefinition

      public static void registerLayerDefinition​(ModelLayerLocation layerLocation, Supplier<LayerDefinition> supplier)
    • loadLayerDefinitions

      public static void loadLayerDefinitions​(com.google.common.collect.ImmutableMap.Builder<ModelLayerLocation,​LayerDefinition> builder)
    • processForgeListPingData

      public static void processForgeListPingData​(ServerStatus packet, ServerData target)
    • drawForgePingInfo

      public static void drawForgePingInfo​(JoinMultiplayerScreen gui, ServerData target, PoseStack mStack, int x, int y, int width, int relativeMouseX, int relativeMouseY)
    • getClientToServerNetworkManager

      private static Connection getClientToServerNetworkManager()
    • handleClientWorldClosing

      public static void handleClientWorldClosing​(ClientLevel world)
    • firePlayerLogin

      public static void firePlayerLogin​(MultiPlayerGameMode pc, LocalPlayer player, Connection networkManager)
    • firePlayerLogout

      public static void firePlayerLogout​(MultiPlayerGameMode pc, LocalPlayer player)
    • firePlayerRespawn

      public static void firePlayerRespawn​(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager)
    • getTooltipFont

      public static Font getTooltipFont​(@Nullable Font forcedFont, @Nonnull ItemStack stack, Font fallbackFont)
    • preTooltipEvent

      public static RenderTooltipEvent.Pre preTooltipEvent​(@Nonnull ItemStack stack, PoseStack matrixStack, int x, int y, int screenWidth, int screenHeight, @Nonnull List<ClientTooltipComponent> components, @Nullable Font forcedFont, @Nonnull Font fallbackFont)
    • colorTooltipEvent

      public static RenderTooltipEvent.Color colorTooltipEvent​(@Nonnull ItemStack stack, PoseStack matrixStack, int x, int y, @Nonnull Font font, @Nonnull List<ClientTooltipComponent> components)
    • gatherTooltipComponents

      public static List<ClientTooltipComponent> gatherTooltipComponents​(ItemStack stack, List<? extends FormattedText> textElements, int mouseX, int screenWidth, int screenHeight, @Nullable Font forcedFont, Font fallbackFont)
    • gatherTooltipComponents

      public static List<ClientTooltipComponent> gatherTooltipComponents​(ItemStack stack, List<? extends FormattedText> textElements, Optional<TooltipComponent> itemComponent, int mouseX, int screenWidth, int screenHeight, @Nullable Font forcedFont, Font fallbackFont)