Class ForgeHooksClient

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

@Internal 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.
    • forgeStatusLine

      public static String forgeStatusLine
    • slotMainHand

      private static int slotMainHand
    • layerDefinitions

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

      private static final ResourceLocation ICON_SHEET
    • SYSTEM_CHAT_TYPE_DECORATION

      private static final ChatTypeDecoration SYSTEM_CHAT_TYPE_DECORATION
    • SYSTEM_CHAT_TYPE

      private static final ChatType SYSTEM_CHAT_TYPE
    • SYSTEM_CHAT_TYPE_BOUND

      private static final ChatType.Bound SYSTEM_CHAT_TYPE_BOUND
  • 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)
    • onDrawHighlight

      public static boolean onDrawHighlight(LevelRenderer context, Camera camera, HitResult target, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource)
    • dispatchRenderLast

      @Deprecated(forRemoval=true, since="1.19") public static void dispatchRenderLast(LevelRenderer context, PoseStack poseStack, float partialTick, org.joml.Matrix4f projectionMatrix, long finishTimeNano)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • dispatchRenderStage

      public static void dispatchRenderStage(RenderLevelStageEvent.Stage stage, LevelRenderer levelRenderer, PoseStack poseStack, org.joml.Matrix4f projectionMatrix, int renderTick, Camera camera, Frustum frustum)
    • dispatchRenderStage

      public static void dispatchRenderStage(RenderType renderType, LevelRenderer levelRenderer, PoseStack poseStack, org.joml.Matrix4f projectionMatrix, int renderTick, Camera camera, Frustum frustum)
    • renderSpecificFirstPersonHand

      public static boolean renderSpecificFirstPersonHand(InteractionHand hand, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, float partialTick, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
    • renderSpecificFirstPersonArm

      public static boolean renderSpecificFirstPersonArm(PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, AbstractClientPlayer player, HumanoidArm arm)
    • onTextureStitchedPost

      public static void onTextureStitchedPost(TextureAtlas map)
    • onBlockColorsInit

      public static void onBlockColorsInit(BlockColors blockColors)
    • onItemColorsInit

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

      public static Model getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot slot, HumanoidModel<?> _default)
    • copyModelProperties

      public static <T extends LivingEntity> void copyModelProperties(HumanoidModel<T> original, HumanoidModel<?> replacement)
      Copies humanoid model properties from the original model to another, used for armor models
    • fixDomain

      public static String fixDomain(String base, String complex)
    • getFieldOfViewModifier

      public static float getFieldOfViewModifier(Player entity, float fovModifier)
    • getFieldOfView

      public static double getFieldOfView(GameRenderer renderer, Camera camera, double partialTick, double fov, boolean usedConfiguredFov)
    • renderMainMenu

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

      @Nullable public static @Nullable SoundInstance playSound(SoundEngine manager, SoundInstance sound)
    • drawScreen

      public static void drawScreen(Screen screen, PoseStack poseStack, int mouseX, int mouseY, float partialTick)
    • drawScreenInternal

      private static void drawScreenInternal(Screen screen, PoseStack poseStack, int mouseX, int mouseY, float partialTick)
    • getFogColor

      public static org.joml.Vector3f getFogColor(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount, float fogRed, float fogGreen, float fogBlue)
    • onFogRender

      public static void onFogRender(FogRenderer.FogMode mode, FogType type, Camera camera, float partialTick, float renderDistance, float nearDistance, float farDistance, FogShape shape)
    • onCameraSetup

      public static ViewportEvent.ComputeCameraAngles onCameraSetup(GameRenderer renderer, Camera camera, float partial)
    • onModifyBakingResult

      public static void onModifyBakingResult(Map<ResourceLocation,BakedModel> models, ModelBakery modelBakery)
    • onModelBake

      public static void onModelBake(ModelManager modelManager, Map<ResourceLocation,BakedModel> models, ModelBakery modelBakery)
    • handleCameraTransforms

      public static BakedModel handleCameraTransforms(PoseStack poseStack, BakedModel model, ItemTransforms.TransformType cameraTransformType, boolean applyLeftHandTransform)
    • getFluidSprites

      public static TextureAtlasSprite[] getFluidSprites(BlockAndTintGetter level, BlockPos pos, FluidState fluidStateIn)
    • 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 org.joml.Vector3f getVertexPos(int[] data, int vertex)
    • calculateFaceWithoutAO

      public static boolean calculateFaceWithoutAO(BlockAndTintGetter getter, BlockState state, BlockPos pos, BakedQuad quad, boolean isFaceCubic, float[] brightness, int[] lightmap)
    • loadEntityShader

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

      public static boolean shouldCauseReequipAnimation(@NotNull @NotNull ItemStack from, @NotNull @NotNull ItemStack to, int slot)
    • onCustomizeBossEventProgress

      public static CustomizeGuiOverlayEvent.BossEventProgress onCustomizeBossEventProgress(PoseStack poseStack, Window window, LerpingBossEvent bossInfo, int x, int y, int increment)
    • onScreenshot

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

      public static void onClientChangeGameType(PlayerInfo info, GameType currentGameMode, GameType newGameMode)
    • onMovementInputUpdate

      public static void onMovementInputUpdate(Player player, Input movementInput)
    • onScreenMouseClickedPre

      public static boolean onScreenMouseClickedPre(Screen guiScreen, double mouseX, double mouseY, int button)
    • onScreenMouseClickedPost

      public static boolean onScreenMouseClickedPost(Screen guiScreen, double mouseX, double mouseY, int button, boolean handled)
    • onScreenMouseReleasedPre

      public static boolean onScreenMouseReleasedPre(Screen guiScreen, double mouseX, double mouseY, int button)
    • onScreenMouseReleasedPost

      public static boolean onScreenMouseReleasedPost(Screen guiScreen, double mouseX, double mouseY, int button, boolean handled)
    • onScreenMouseDragPre

      public static boolean onScreenMouseDragPre(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
    • onScreenMouseDragPost

      public static void onScreenMouseDragPost(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
    • onScreenMouseScrollPre

      public static boolean onScreenMouseScrollPre(MouseHandler mouseHelper, Screen guiScreen, double scrollDelta)
    • onScreenMouseScrollPost

      public static void onScreenMouseScrollPost(MouseHandler mouseHelper, Screen guiScreen, double scrollDelta)
    • onScreenKeyPressedPre

      public static boolean onScreenKeyPressedPre(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onScreenKeyPressedPost

      public static boolean onScreenKeyPressedPost(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onScreenKeyReleasedPre

      public static boolean onScreenKeyReleasedPre(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onScreenKeyReleasedPost

      public static boolean onScreenKeyReleasedPost(Screen guiScreen, int keyCode, int scanCode, int modifiers)
    • onScreenCharTypedPre

      public static boolean onScreenCharTypedPre(Screen guiScreen, char codePoint, int modifiers)
    • onScreenCharTypedPost

      public static void onScreenCharTypedPost(Screen guiScreen, char codePoint, int modifiers)
    • onRecipesUpdated

      public static void onRecipesUpdated(RecipeManager mgr)
    • onMouseButtonPre

      public static boolean onMouseButtonPre(int button, int action, int mods)
    • onMouseButtonPost

      public static void onMouseButtonPost(int button, int action, int mods)
    • onMouseScroll

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

      public static void onKeyInput(int key, int scanCode, int action, int modifiers)
    • onClickInput

      public static InputEvent.InteractionKeyMappingTriggered onClickInput(int button, KeyMapping keyBinding, InteractionHand hand)
    • isNameplateInRenderDistance

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

      public static void renderPistonMovedBlocks(BlockPos pos, BlockState state, PoseStack stack, MultiBufferSource bufferSource, Level level, boolean checkSides, int packedOverlay, BlockRenderDispatcher blockRenderer)
    • shouldRenderEffect

      public static boolean shouldRenderEffect(MobEffectInstance effectInstance)
    • loadSpriteContents

      @Nullable public static @Nullable SpriteContents loadSpriteContents(ResourceLocation name, Resource resource, FrameSize frameSize, NativeImage image, AnimationMetadataSection animationMeta)
    • loadTextureAtlasSprite

      @Nullable public static @Nullable TextureAtlasSprite loadTextureAtlasSprite(ResourceLocation atlasName, SpriteContents contents, int atlasWidth, int atlasHeight, int spriteX, int spriteY, int mipmapLevel)
    • 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 poseStack, int x, int y, int width, int relativeMouseX, int relativeMouseY)
    • getClientConnection

      private static Connection getClientConnection()
    • handleClientLevelClosing

      public static void handleClientLevelClosing(ClientLevel level)
    • firePlayerLogin

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

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

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

      public static void onRegisterParticleProviders(ParticleEngine particleEngine)
    • onRegisterKeyMappings

      public static void onRegisterKeyMappings(Options options)
    • onRegisterAdditionalModels

      public static void onRegisterAdditionalModels(Set<ResourceLocation> additionalModels)
    • onClientChat

      @Nullable public static @Nullable Component onClientChat(ChatType.Bound boundChatType, Component message, UUID sender)
    • onClientPlayerChat

      @Nullable public static @Nullable Component onClientPlayerChat(ChatType.Bound boundChatType, Component message, PlayerChatMessage playerChatMessage, UUID sender)
    • onClientSystemChat

      @Nullable public static @Nullable Component onClientSystemChat(Component message, boolean overlay)
    • onClientSendMessage

      @NotNull public static @NotNull String onClientSendMessage(String message)
    • getEntityRenderType

      @NotNull public static @NotNull RenderType getEntityRenderType(RenderType chunkRenderType, boolean cull)
    • getTooltipFont

      public static Font getTooltipFont(@Nullable @Nullable Font forcedFont, @NotNull @NotNull ItemStack stack, Font fallbackFont)
    • onRenderTooltipPre

      public static RenderTooltipEvent.Pre onRenderTooltipPre(@NotNull @NotNull ItemStack stack, PoseStack poseStack, int x, int y, int screenWidth, int screenHeight, @NotNull @NotNull List<ClientTooltipComponent> components, @Nullable @Nullable Font forcedFont, @NotNull @NotNull Font fallbackFont)
    • onRenderTooltipColor

      public static RenderTooltipEvent.Color onRenderTooltipColor(@NotNull @NotNull ItemStack stack, PoseStack poseStack, int x, int y, @NotNull @NotNull Font font, @NotNull @NotNull List<ClientTooltipComponent> components)
    • gatherTooltipComponents

      public static List<ClientTooltipComponent> gatherTooltipComponents(ItemStack stack, List<? extends FormattedText> textElements, int mouseX, int screenWidth, int screenHeight, @Nullable @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 @Nullable Font forcedFont, Font fallbackFont)
    • makeParticleRenderTypeComparator

      public static Comparator<ParticleRenderType> makeParticleRenderTypeComparator(List<ParticleRenderType> renderOrder)
    • onScreenPotionSize

      public static ScreenEvent.RenderInventoryMobEffects onScreenPotionSize(Screen screen, int availableSpace, boolean compact, int horizontalOffset)
    • onToastAdd

      public static boolean onToastAdd(Toast toast)
    • isBlockInSolidLayer

      public static boolean isBlockInSolidLayer(BlockState state)
    • createWorldConfirmationScreen

      public static void createWorldConfirmationScreen(Runnable doConfirmedWorldLoad)
    • renderFireOverlay

      public static boolean renderFireOverlay(Player player, PoseStack mat)
    • renderWaterOverlay

      public static boolean renderWaterOverlay(Player player, PoseStack mat)
    • renderBlockOverlay

      public static boolean renderBlockOverlay(Player player, PoseStack mat, RenderBlockScreenEffectEvent.OverlayType type, BlockState block, BlockPos pos)
    • getMaxMipmapLevel

      public static int getMaxMipmapLevel(int width, int height)
    • getShaderImportLocation

      public static ResourceLocation getShaderImportLocation(String basePath, boolean isRelative, String importPath)
    • onCreativeModeTabBuildContents

      public static void onCreativeModeTabBuildContents(CreativeModeTab tab, CreativeModeTab.DisplayItemsGenerator originalGenerator, FeatureFlagSet flags, CreativeModeTab.Output output, boolean hasPermisions)