Package net.minecraftforge.client
Class ForgeHooksClient
java.lang.Object
net.minecraftforge.client.ForgeHooksClient
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Matrix4f
private static final Matrix3f
static String
Contains the *extra* GUI layers.private static final org.apache.logging.log4j.Logger
(package private) static final ThreadLocal<RenderType>
private static int
(package private) static int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
bossBarRenderPost
(MatrixStack mStack, MainWindow res) 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 String
static void
gatherFluidTextures
(Set<RenderMaterial> textures) static <A extends BipedModel<?>>
AgetArmorModel
(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType slot, A _default) static String
getArmorTexture
(Entity entity, ItemStack armor, String _default, EquipmentSlotType slot, String type) getBiomeGeneratorTypeScreenFactory
(Optional<BiomeGeneratorTypeScreens> generator, BiomeGeneratorTypeScreens.IFactory biomegeneratortypescreens$ifactory) static RenderMaterial
static int
static Optional<BiomeGeneratorTypeScreens>
static 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
static float
getOffsetFOV
(PlayerEntity entity, float fov) private static Vector3f
getVertexPos
(int[] data, int vertex) static int
static 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
static void
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) 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, Map<ResourceLocation, IBakedModel> modelRegistry, ModelLoader modelLoader) static boolean
onMouseScroll
(MouseHelper mouseHelper, double scrollDelta) static boolean
onRawMouseClicked
(int button, int action, int mods) static void
static ScreenshotEvent
onScreenshot
(NativeImage image, File screenshotFile) static void
static void
onTextureStitchedPre
(AtlasTexture map, 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, ByteBuffer buffer) static void
preDraw
(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, ByteBuffer buffer) static void
pushGuiLayer
(Minecraft minecraft, Screen screen) static void
refreshResources
(Minecraft mc, VanillaResourceType... types) static void
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 Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
guiLayers
Contains the *extra* GUI layers. The current top layer stays in Minecraft#currentScreen, and the rest serve as a background for it. -
renderLayer
-
forgeStatusLine
-
worldRenderPass
static int worldRenderPass -
flipX
-
flipXNormal
-
slotMainHand
private static int slotMainHand
-
-
Constructor Details
-
ForgeHooksClient
public ForgeHooksClient()
-
-
Method Details
-
resizeGuiLayers
-
clearGuiLayers
-
popGuiLayerInternal
-
pushGuiLayer
-
popGuiLayer
-
getGuiFarPlane
public static float getGuiFarPlane() -
getArmorTexture
-
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
-
onTextureStitchedPost
-
onBlockColorsInit
-
onItemColorsInit
-
setRenderLayer
-
getArmorModel
public static <A extends BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType slot, A _default) -
fixDomain
-
getOffsetFOV
-
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
-
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, 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, ByteBuffer buffer) -
postDraw
public static void postDraw(VertexFormatElement.Usage attrType, VertexFormat format, int element, int stride, ByteBuffer buffer) -
getColorIndex
-
getFluidSprites
public static TextureAtlasSprite[] getFluidSprites(IBlockDisplayReader world, BlockPos pos, FluidState fluidStateIn) -
gatherFluidTextures
-
getFluidMaterials
-
getBlockMaterial
-
fillNormal
internal, relies on fixed format of FaceBakery -
getVertexPos
-
loadEntityShader
-
shouldCauseReequipAnimation
-
bossBarRenderPre
public static RenderGameOverlayEvent.BossInfo bossBarRenderPre(MatrixStack mStack, MainWindow res, ClientBossInfo bossInfo, int x, int y, int increment) -
bossBarRenderPost
-
onScreenshot
-
onClientChangeGameMode
public static void onClientChangeGameMode(NetworkPlayerInfo info, GameType currentGameMode, GameType newGameMode) -
handlePerspective
public static IBakedModel handlePerspective(IBakedModel model, ItemCameraTransforms.TransformType type, MatrixStack stack) -
onInputUpdate
-
refreshResources
-
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
-
onGuiCharTypedPost
-
onRecipesUpdated
-
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
-
onRawMouseClicked
public static boolean onRawMouseClicked(int button, int action, int mods) -
onClickInput
-
drawItemLayered
public static void drawItemLayered(ItemRenderer renderer, IBakedModel modelIn, ItemStack itemStackIn, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn, boolean fabulous) -
isNameplateInRenderDistance
-
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(Optional<BiomeGeneratorTypeScreens> generator, @Nullable BiomeGeneratorTypeScreens.IFactory biomegeneratortypescreens$ifactory) -
hasBiomeGeneratorSettingsOptionsScreen
public static boolean hasBiomeGeneratorSettingsOptionsScreen(Optional<BiomeGeneratorTypeScreens> generator) -
getWorldTypeFromGenerator
public static Optional<BiomeGeneratorTypeScreens> getWorldTypeFromGenerator(DimensionGeneratorSettings dimensionGeneratorSettings) -
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)
-