Package net.minecraftforge.client
Class ForgeHooksClient
- java.lang.Object
-
- net.minecraftforge.client.ForgeHooksClient
-
public class ForgeHooksClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static Matrix4f
flipX
private static Matrix3f
flipXNormal
static java.lang.String
forgeStatusLine
private static java.util.Stack<Screen>
guiLayers
Contains the *extra* GUI layers.private static org.apache.logging.log4j.Logger
LOGGER
(package private) static java.lang.ThreadLocal<RenderType>
renderLayer
private static int
slotMainHand
(package private) static int
worldRenderPass
-
Constructor Summary
Constructors Constructor Description ForgeHooksClient()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
bossBarRenderPost(MatrixStack mStack, MainWindow res)
static RenderGameOverlayEvent.BossInfo
bossBarRenderPre(MatrixStack mStack, MainWindow res, ClientBossInfo bossInfo, int x, int y, int increment)
static void
clearGuiLayers(Minecraft minecraft)
static void
dispatchRenderLast(WorldRenderer context, MatrixStack mat, float partialTicks, Matrix4f projectionMatrix, long finishTimeNano)
static void
drawItemLayered(ItemRenderer renderer, IBakedModel modelIn, ItemStack itemStackIn, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn, boolean fabulous)
static void
drawScreen(Screen screen, MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
private static void
drawScreenInternal(Screen screen, MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
static void
fillNormal(int[] faceData, Direction facing)
internal, relies on fixed format of FaceBakerystatic void
fireKeyInput(int key, int scanCode, int action, int modifiers)
static void
fireMouseInput(int button, int action, int mods)
static java.lang.String
fixDomain(java.lang.String base, java.lang.String complex)
static void
gatherFluidTextures(java.util.Set<RenderMaterial> textures)
static <A extends BipedModel<?>>
AgetArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType slot, A _default)
static java.lang.String
getArmorTexture(Entity entity, ItemStack armor, java.lang.String _default, EquipmentSlotType slot, java.lang.String type)
static BiomeGeneratorTypeScreens.IFactory
getBiomeGeneratorTypeScreenFactory(java.util.Optional<BiomeGeneratorTypeScreens> generator, BiomeGeneratorTypeScreens.IFactory biomegeneratortypescreens$ifactory)
static RenderMaterial
getBlockMaterial(ResourceLocation loc)
static int
getColorIndex(VertexFormat fmt)
static java.util.Optional<BiomeGeneratorTypeScreens>
getDefaultWorldType()
static java.util.stream.Stream<RenderMaterial>
getFluidMaterials(Fluid fluid)
static TextureAtlasSprite[]
getFluidSprites(IBlockDisplayReader world, BlockPos pos, FluidState fluidStateIn)
static float
getFogDensity(FogRenderer.FogType type, ActiveRenderInfo info, float partial, float density)
static double
getFOVModifier(GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks, double fov)
static float
getGuiFarPlane()
static float
getOffsetFOV(PlayerEntity entity, float fov)
private static Vector3f
getVertexPos(int[] data, int vertex)
static int
getWorldRenderPass()
static java.util.Optional<BiomeGeneratorTypeScreens>
getWorldTypeFromGenerator(DimensionGeneratorSettings dimensionGeneratorSettings)
static IBakedModel
handleCameraTransforms(MatrixStack matrixStack, IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType, boolean leftHandHackery)
static IBakedModel
handlePerspective(IBakedModel model, ItemCameraTransforms.TransformType type, MatrixStack stack)
static boolean
hasBiomeGeneratorSettingsOptionsScreen(java.util.Optional<BiomeGeneratorTypeScreens> generator)
static void
invalidateLog4jThreadCache()
static boolean
isNameplateInRenderDistance(Entity entity, double squareDistance)
static void
loadEntityShader(Entity entity, GameRenderer entityRenderer)
static TextureAtlasSprite
loadTextureAtlasSprite(AtlasTexture atlasTexture, IResourceManager resourceManager, TextureAtlasSprite.Info textureInfo, IResource resource, int atlasWidth, int atlasHeight, int spriteX, int spriteY, int mipmapLevel, NativeImage image)
static void
onBlockColorsInit(BlockColors blockColors)
static EntityViewRenderEvent.CameraSetup
onCameraSetup(GameRenderer renderer, ActiveRenderInfo info, float partial)
static InputEvent.ClickInputEvent
onClickInput(int button, KeyBinding keyBinding, Hand hand)
static void
onClientChangeGameMode(NetworkPlayerInfo info, GameType currentGameMode, GameType newGameMode)
static boolean
onDrawBlockHighlight(WorldRenderer context, ActiveRenderInfo info, RayTraceResult target, float partialTicks, MatrixStack matrix, IRenderTypeBuffer buffers)
static void
onFogRender(FogRenderer.FogType type, ActiveRenderInfo info, float partial, float distance)
static boolean
onGuiCharTypedPost(Screen guiScreen, char codePoint, int modifiers)
static boolean
onGuiCharTypedPre(Screen guiScreen, char codePoint, int modifiers)
static boolean
onGuiKeyPressedPost(Screen guiScreen, int keyCode, int scanCode, int modifiers)
static boolean
onGuiKeyPressedPre(Screen guiScreen, int keyCode, int scanCode, int modifiers)
static boolean
onGuiKeyReleasedPost(Screen guiScreen, int keyCode, int scanCode, int modifiers)
static boolean
onGuiKeyReleasedPre(Screen guiScreen, int keyCode, int scanCode, int modifiers)
static boolean
onGuiMouseClickedPost(Screen guiScreen, double mouseX, double mouseY, int button)
static boolean
onGuiMouseClickedPre(Screen guiScreen, double mouseX, double mouseY, int button)
static boolean
onGuiMouseDragPost(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
static boolean
onGuiMouseDragPre(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
static boolean
onGuiMouseReleasedPost(Screen guiScreen, double mouseX, double mouseY, int button)
static boolean
onGuiMouseReleasedPre(Screen guiScreen, double mouseX, double mouseY, int button)
static boolean
onGuiMouseScrollPost(MouseHelper mouseHelper, Screen guiScreen, double scrollDelta)
static boolean
onGuiMouseScrollPre(MouseHelper mouseHelper, Screen guiScreen, double scrollDelta)
static void
onInputUpdate(PlayerEntity player, MovementInput movementInput)
static void
onItemColorsInit(ItemColors itemColors, BlockColors blockColors)
static void
onModelBake(ModelManager modelManager, java.util.Map<ResourceLocation,IBakedModel> modelRegistry, ModelLoader modelLoader)
static boolean
onMouseScroll(MouseHelper mouseHelper, double scrollDelta)
static boolean
onRawMouseClicked(int button, int action, int mods)
static void
onRecipesUpdated(RecipeManager mgr)
static ScreenshotEvent
onScreenshot(NativeImage image, java.io.File screenshotFile)
static void
onTextureStitchedPost(AtlasTexture map)
static void
onTextureStitchedPre(AtlasTexture map, java.util.Set<ResourceLocation> resourceLocations)
static ISound
playSound(SoundEngine manager, ISound sound)
static void
popGuiLayer(Minecraft minecraft)
private static void
popGuiLayerInternal(Minecraft minecraft)
static void
postDraw(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, java.nio.ByteBuffer buffer)
static void
preDraw(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, java.nio.ByteBuffer buffer)
static void
pushGuiLayer(Minecraft minecraft, Screen screen)
static void
refreshResources(Minecraft mc, VanillaResourceType... types)
static void
registerForgeWorldTypeScreens()
static void
renderMainMenu(MainMenuScreen gui, MatrixStack mStack, FontRenderer font, int width, int height)
Deprecated.static void
renderMainMenu(MainMenuScreen gui, MatrixStack mStack, FontRenderer font, int width, int height, int alpha)
static void
renderPistonMovedBlocks(BlockPos pos, BlockState state, MatrixStack stack, IRenderTypeBuffer buffer, World world, boolean checkSides, int combinedOverlay, BlockRendererDispatcher blockRenderer)
static boolean
renderSpecificFirstPersonArm(MatrixStack poseStack, IRenderTypeBuffer multiBufferSource, int packedLight, AbstractClientPlayerEntity player, HandSide arm)
static boolean
renderSpecificFirstPersonHand(Hand hand, MatrixStack mat, IRenderTypeBuffer buffers, int light, float partialTicks, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
static void
resizeGuiLayers(Minecraft minecraft, int width, int height)
static void
setRenderLayer(RenderType layer)
static boolean
shouldCauseReequipAnimation(ItemStack from, ItemStack to, int slot)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
guiLayers
private static final java.util.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 java.lang.ThreadLocal<RenderType> renderLayer
-
forgeStatusLine
public static java.lang.String forgeStatusLine
-
worldRenderPass
static int worldRenderPass
-
flipX
private static final Matrix4f flipX
-
flipXNormal
private static final Matrix3f flipXNormal
-
slotMainHand
private static int slotMainHand
-
-
Method Detail
-
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)
-
popGuiLayer
public static void popGuiLayer(Minecraft minecraft)
-
getGuiFarPlane
public static float getGuiFarPlane()
-
getArmorTexture
public static java.lang.String getArmorTexture(Entity entity, ItemStack armor, java.lang.String _default, EquipmentSlotType slot, java.lang.String type)
-
onDrawBlockHighlight
public static boolean onDrawBlockHighlight(WorldRenderer context, ActiveRenderInfo info, RayTraceResult target, float partialTicks, MatrixStack matrix, IRenderTypeBuffer buffers)
-
dispatchRenderLast
public static void dispatchRenderLast(WorldRenderer context, MatrixStack mat, float partialTicks, Matrix4f projectionMatrix, long finishTimeNano)
-
renderSpecificFirstPersonHand
public static boolean renderSpecificFirstPersonHand(Hand hand, MatrixStack mat, IRenderTypeBuffer buffers, int light, float partialTicks, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
-
renderSpecificFirstPersonArm
public static boolean renderSpecificFirstPersonArm(MatrixStack poseStack, IRenderTypeBuffer multiBufferSource, int packedLight, AbstractClientPlayerEntity player, HandSide arm)
-
onTextureStitchedPre
public static void onTextureStitchedPre(AtlasTexture map, java.util.Set<ResourceLocation> resourceLocations)
-
onTextureStitchedPost
public static void onTextureStitchedPost(AtlasTexture 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 BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType slot, A _default)
-
fixDomain
public static java.lang.String fixDomain(java.lang.String base, java.lang.String complex)
-
getOffsetFOV
public static float getOffsetFOV(PlayerEntity entity, float fov)
-
getFOVModifier
public static double getFOVModifier(GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks, double fov)
-
renderMainMenu
@Deprecated public static void renderMainMenu(MainMenuScreen gui, MatrixStack mStack, FontRenderer font, int width, int height)
Deprecated.
-
renderMainMenu
public static void renderMainMenu(MainMenuScreen gui, MatrixStack mStack, FontRenderer font, int width, int height, int alpha)
-
playSound
public static ISound playSound(SoundEngine manager, ISound sound)
-
getWorldRenderPass
public static int getWorldRenderPass()
-
drawScreen
public static void drawScreen(Screen screen, MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
-
drawScreenInternal
private static void drawScreenInternal(Screen screen, MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
-
getFogDensity
public static float getFogDensity(FogRenderer.FogType type, ActiveRenderInfo info, float partial, float density)
-
onFogRender
public static void onFogRender(FogRenderer.FogType type, ActiveRenderInfo info, float partial, float distance)
-
onCameraSetup
public static EntityViewRenderEvent.CameraSetup onCameraSetup(GameRenderer renderer, ActiveRenderInfo info, float partial)
-
onModelBake
public static void onModelBake(ModelManager modelManager, java.util.Map<ResourceLocation,IBakedModel> modelRegistry, ModelLoader modelLoader)
-
handleCameraTransforms
public static IBakedModel handleCameraTransforms(MatrixStack matrixStack, IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType, boolean leftHandHackery)
-
preDraw
public static void preDraw(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, java.nio.ByteBuffer buffer)
-
postDraw
public static void postDraw(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, java.nio.ByteBuffer buffer)
-
getColorIndex
public static int getColorIndex(VertexFormat fmt)
-
getFluidSprites
public static TextureAtlasSprite[] getFluidSprites(IBlockDisplayReader world, BlockPos pos, FluidState fluidStateIn)
-
gatherFluidTextures
public static void gatherFluidTextures(java.util.Set<RenderMaterial> textures)
-
getFluidMaterials
public static java.util.stream.Stream<RenderMaterial> getFluidMaterials(Fluid fluid)
-
getBlockMaterial
public static RenderMaterial 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(MatrixStack mStack, MainWindow res, ClientBossInfo bossInfo, int x, int y, int increment)
-
bossBarRenderPost
public static void bossBarRenderPost(MatrixStack mStack, MainWindow res)
-
onScreenshot
public static ScreenshotEvent onScreenshot(NativeImage image, java.io.File screenshotFile)
-
onClientChangeGameMode
public static void onClientChangeGameMode(NetworkPlayerInfo info, GameType currentGameMode, GameType newGameMode)
-
handlePerspective
public static IBakedModel handlePerspective(IBakedModel model, ItemCameraTransforms.TransformType type, MatrixStack stack)
-
onInputUpdate
public static void onInputUpdate(PlayerEntity player, MovementInput movementInput)
-
refreshResources
public static void refreshResources(Minecraft mc, VanillaResourceType... types)
-
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)
-
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)
-
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(MouseHelper mouseHelper, Screen guiScreen, double scrollDelta)
-
onGuiMouseScrollPost
public static boolean onGuiMouseScrollPost(MouseHelper 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)
-
invalidateLog4jThreadCache
public static void invalidateLog4jThreadCache()
-
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(MouseHelper mouseHelper, double scrollDelta)
-
onRawMouseClicked
public static boolean onRawMouseClicked(int button, int action, int mods)
-
onClickInput
public static InputEvent.ClickInputEvent onClickInput(int button, KeyBinding keyBinding, Hand hand)
-
drawItemLayered
public static void drawItemLayered(ItemRenderer renderer, IBakedModel modelIn, ItemStack itemStackIn, MatrixStack matrixStackIn, IRenderTypeBuffer 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, MatrixStack stack, IRenderTypeBuffer buffer, World world, boolean checkSides, int combinedOverlay, BlockRendererDispatcher blockRenderer)
-
registerForgeWorldTypeScreens
public static void registerForgeWorldTypeScreens()
-
getBiomeGeneratorTypeScreenFactory
public static BiomeGeneratorTypeScreens.IFactory getBiomeGeneratorTypeScreenFactory(java.util.Optional<BiomeGeneratorTypeScreens> generator, @Nullable BiomeGeneratorTypeScreens.IFactory biomegeneratortypescreens$ifactory)
-
hasBiomeGeneratorSettingsOptionsScreen
public static boolean hasBiomeGeneratorSettingsOptionsScreen(java.util.Optional<BiomeGeneratorTypeScreens> generator)
-
getWorldTypeFromGenerator
public static java.util.Optional<BiomeGeneratorTypeScreens> getWorldTypeFromGenerator(DimensionGeneratorSettings dimensionGeneratorSettings)
-
getDefaultWorldType
public static java.util.Optional<BiomeGeneratorTypeScreens> getDefaultWorldType()
-
loadTextureAtlasSprite
@Nullable public static TextureAtlasSprite loadTextureAtlasSprite(AtlasTexture atlasTexture, IResourceManager resourceManager, TextureAtlasSprite.Info textureInfo, IResource resource, int atlasWidth, int atlasHeight, int spriteX, int spriteY, int mipmapLevel, NativeImage image)
-
-