Package net.neoforged.neoforge.client
Class ClientHooks
java.lang.Object
net.neoforged.neoforge.client.ClientHooks
Class for various client-side-only hooks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static net.minecraft.world.inventory.RecipeBookType @Nullable []
private static final org.apache.logging.log4j.Marker
private static final Stack
<net.minecraft.client.gui.screens.Screen> Contains the *extra* GUI layers.private static final net.minecraft.resources.ResourceLocation
private static boolean
private static boolean
private static final Map
<net.minecraft.client.model.geom.ModelLayerLocation, Supplier<net.minecraft.client.model.geom.builders.LayerDefinition>> private static final org.apache.logging.log4j.Logger
private static final List
<net.minecraft.client.renderer.block.model.BlockModelPart> private static final net.minecraft.util.RandomSource
private static final net.neoforged.fml.common.asm.enumextension.ExtensionInfo
private static final net.minecraft.world.inventory.RecipeBookType[]
private static final Map
<net.minecraft.world.level.block.SkullBlock.Type, Function<net.minecraft.client.model.geom.EntityModelSet, net.minecraft.client.model.SkullModelBase>> private static int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAdditionalGeometry
(List<AddSectionGeometryEvent.AdditionalSectionRenderer> additionalRenderers, Function<net.minecraft.client.renderer.RenderType, com.mojang.blaze3d.vertex.VertexConsumer> getOrCreateBuilder, net.minecraft.client.renderer.chunk.RenderChunkRegion region, com.mojang.blaze3d.vertex.PoseStack transformation) static void
clearGuiLayers
(net.minecraft.client.Minecraft minecraft) static int
computeQuadNormal
(int[] vertices) Computes the packed normal of a quad based on the stored vertex positions.static <T extends net.minecraft.client.renderer.entity.state.HumanoidRenderState>
voidcopyModelProperties
(net.minecraft.client.model.HumanoidModel<T> original, net.minecraft.client.model.HumanoidModel<?> replacement) Copies humanoid model properties from the original model to another, used for armor modelsstatic net.minecraft.client.gui.screens.Overlay
createLoadingOverlay
(net.minecraft.client.Minecraft minecraft, net.minecraft.server.packs.resources.ReloadInstance reloadInstance, Consumer<Optional<Throwable>> errorHandler, boolean fadeIn) static void
dispatchRenderStage
(net.minecraft.client.renderer.RenderType renderType, net.minecraft.world.level.Level level, net.minecraft.client.renderer.LevelRenderer levelRenderer, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, int renderTick, net.minecraft.client.Camera camera, net.minecraft.client.renderer.culling.Frustum frustum) static void
dispatchRenderStage
(RenderLevelStageEvent.Stage stage, net.minecraft.world.level.Level level, net.minecraft.client.renderer.LevelRenderer levelRenderer, @Nullable com.mojang.blaze3d.vertex.PoseStack poseStack, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, int renderTick, net.minecraft.client.Camera camera, net.minecraft.client.renderer.culling.Frustum frustum) static void
drawScreen
(net.minecraft.client.gui.screens.Screen screen, net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) private static void
drawScreenInternal
(net.minecraft.client.gui.screens.Screen screen, net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) static void
fillNormal
(int[] faceData) Modifies the passedfaceData
to fill in the vertex normals.static void
FiresClientTickEvent.Post
.static void
FiresClientTickEvent.Pre
.static FrameGraphSetupEvent
fireFrameGraphSetup
(com.mojang.blaze3d.framegraph.FrameGraphBuilder builder, net.minecraft.client.renderer.LevelTargetBundle targets, com.mojang.blaze3d.resource.RenderTargetDescriptor renderTargetDescriptor, net.minecraft.client.renderer.culling.Frustum frustum, net.minecraft.client.Camera camera, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, net.minecraft.client.DeltaTracker deltaTracker, net.minecraft.util.profiling.ProfilerFiller profiler) static net.minecraft.client.gui.Gui.HeartType
firePlayerHeartTypeEvent
(net.minecraft.world.entity.player.Player player, net.minecraft.client.gui.Gui.HeartType heartType) Called byGui.HeartType.forPlayer(net.minecraft.world.entity.player.Player)
to allow for modification of the displayed heart type in the health bar.static void
firePlayerLogin
(net.minecraft.client.multiplayer.MultiPlayerGameMode pc, net.minecraft.client.player.LocalPlayer player, net.minecraft.network.Connection networkManager) static void
firePlayerLogout
(@Nullable net.minecraft.client.multiplayer.MultiPlayerGameMode pc, @Nullable net.minecraft.client.player.LocalPlayer player) static void
firePlayerRespawn
(net.minecraft.client.multiplayer.MultiPlayerGameMode pc, net.minecraft.client.player.LocalPlayer oldPlayer, net.minecraft.client.player.LocalPlayer newPlayer, net.minecraft.network.Connection networkManager) static void
fireRenderFramePost
(net.minecraft.client.DeltaTracker partialTick) FiresRenderFrameEvent.Post
.static void
fireRenderFramePre
(net.minecraft.client.DeltaTracker partialTick) FiresRenderFrameEvent.Pre
.static void
fireResourceLoadFinishedEvent
(boolean initial) static String
static List
<net.minecraft.client.renderer.block.model.BlockElement> fixItemModelSeams
(List<net.minecraft.client.renderer.block.model.BlockElement> elements, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) Modify the position and UVs of the edge quads of generated item models to account for sprite expansion of the front and back quad.gatherAdditionalRenderers
(net.minecraft.core.BlockPos sectionOrigin, net.minecraft.world.level.Level level) static Map
<net.minecraft.resources.ResourceLocation, net.minecraft.resources.ResourceLocation> gatherMaterialAtlases
(Map<net.minecraft.resources.ResourceLocation, net.minecraft.resources.ResourceLocation> vanillaAtlases) static List
<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> gatherTooltipComponents
(net.minecraft.world.item.ItemStack stack, List<? extends net.minecraft.network.chat.FormattedText> textElements, int mouseX, int screenWidth, int screenHeight, net.minecraft.client.gui.Font fallbackFont) static List
<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> gatherTooltipComponents
(net.minecraft.world.item.ItemStack stack, List<? extends net.minecraft.network.chat.FormattedText> textElements, Optional<net.minecraft.world.inventory.tooltip.TooltipComponent> itemComponent, int mouseX, int screenWidth, int screenHeight, net.minecraft.client.gui.Font fallbackFont) static List
<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> gatherTooltipComponentsFromElements
(net.minecraft.world.item.ItemStack stack, List<com.mojang.datafixers.util.Either<net.minecraft.network.chat.FormattedText, net.minecraft.world.inventory.tooltip.TooltipComponent>> elements, int mouseX, int screenWidth, int screenHeight, net.minecraft.client.gui.Font fallbackFont) static net.minecraft.resources.ResourceLocation
getArmorTexture
(net.minecraft.world.item.ItemStack armor, net.minecraft.client.resources.model.EquipmentClientInfo.LayerType type, net.minecraft.client.resources.model.EquipmentClientInfo.Layer layer, net.minecraft.resources.ResourceLocation _default) static net.minecraft.client.resources.model.Material
getBlockMaterial
(net.minecraft.resources.ResourceLocation loc) static float
getDetachedCameraDistance
(net.minecraft.client.Camera camera, boolean flipped, float entityScale, float distance) static List
<net.minecraft.network.chat.Component> getEffectTooltip
(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen, net.minecraft.world.effect.MobEffectInstance effectInst, List<net.minecraft.network.chat.Component> tooltip) Fires theGatherEffectScreenTooltipsEvent
and returns the resulting tooltip lines.static float
getFieldOfView
(net.minecraft.client.renderer.GameRenderer renderer, net.minecraft.client.Camera camera, float partialTick, float fov, boolean usedConfiguredFov) static float
getFieldOfViewModifier
(net.minecraft.world.entity.player.Player entity, float fovModifier, float fovScale) static net.minecraft.world.inventory.RecipeBookType[]
static org.joml.Vector4f
getFogColor
(net.minecraft.client.Camera camera, float partialTick, net.minecraft.client.multiplayer.ClientLevel level, int renderDistance, float darkenWorldAmount, float fogRed, float fogGreen, float fogBlue) static float
static int
getMaxMipmapLevel
(int width, int height) static @Nullable net.minecraft.client.model.SkullModelBase
getModdedSkullModel
(net.minecraft.client.model.geom.EntityModelSet modelSet, net.minecraft.world.level.block.SkullBlock.Type type) static com.mojang.blaze3d.textures.TextureFormat
static net.minecraft.client.gui.Font
getTooltipFont
(net.minecraft.world.item.ItemStack stack, net.minecraft.client.gui.Font fallbackFont) static CalculatePlayerTurnEvent
getTurnPlayerValues
(double mouseSensitivity, boolean cinematicCameraEnabled) static void
handleUpdateRecipes
(net.minecraft.client.multiplayer.ClientPacketListener packetListener, Consumer<net.minecraft.world.level.block.entity.FuelValues> fuelValuesSetter) static void
initClientHooks
(net.minecraft.client.Minecraft mc, net.minecraft.server.packs.resources.ReloadableResourceManager resourceManager) static void
static com.mojang.blaze3d.pipeline.MainTarget
instantiateMainTarget
(int width, int height) static <T extends net.minecraft.world.level.block.entity.BlockEntity>
booleanisBlockEntityRendererVisible
(net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher dispatcher, net.minecraft.world.level.block.entity.BlockEntity blockEntity, net.minecraft.client.renderer.culling.Frustum frustum) static boolean
isInTranslucentBlockOutlinePass
(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) static boolean
isNameplateInRenderDistance
(net.minecraft.world.entity.LivingEntity entity, double squareDistance) static void
loadEntityShader
(@Nullable net.minecraft.world.entity.Entity entity, net.minecraft.client.renderer.GameRenderer gameRenderer) static void
loadLayerDefinitions
(com.google.common.collect.ImmutableMap.Builder<net.minecraft.client.model.geom.ModelLayerLocation, net.minecraft.client.model.geom.builders.LayerDefinition> builder) static Comparator
<net.minecraft.client.particle.ParticleRenderType> makeParticleRenderTypeComparator
(List<net.minecraft.client.particle.ParticleRenderType> renderOrder) static void
onBlockColorsInit
(net.minecraft.client.color.block.BlockColors blockColors) onClickInput
(int button, net.minecraft.client.KeyMapping keyBinding, net.minecraft.world.InteractionHand hand) static void
onClientChangeGameType
(net.minecraft.client.multiplayer.PlayerInfo info, net.minecraft.world.level.GameType currentGameMode, net.minecraft.world.level.GameType newGameMode) static @Nullable net.minecraft.network.chat.Component
onClientChat
(net.minecraft.network.chat.ChatType.Bound boundChatType, net.minecraft.network.chat.Component message, UUID sender) static void
onClientPauseChangePost
(boolean pause) static boolean
onClientPauseChangePre
(boolean pause) static @Nullable net.minecraft.network.chat.Component
onClientPlayerChat
(net.minecraft.network.chat.ChatType.Bound boundChatType, net.minecraft.network.chat.Component message, net.minecraft.network.chat.PlayerChatMessage playerChatMessage, UUID sender) static String
onClientSendMessage
(String message) static @Nullable net.minecraft.network.chat.Component
onClientSystemChat
(net.minecraft.network.chat.Component message, boolean overlay) onCustomizeBossEventProgress
(net.minecraft.client.gui.GuiGraphics guiGraphics, com.mojang.blaze3d.platform.Window window, net.minecraft.client.gui.components.LerpingBossEvent bossInfo, int x, int y, int increment) static boolean
onDrawHighlight
(net.minecraft.client.renderer.LevelRenderer context, net.minecraft.client.Camera camera, net.minecraft.world.phys.BlockHitResult target, net.minecraft.client.DeltaTracker deltaTracker, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, boolean forTranslucentBlocks) static net.minecraft.client.renderer.FogParameters
onFogRender
(net.minecraft.client.renderer.FogRenderer.FogMode mode, net.minecraft.world.level.material.FogType type, net.minecraft.client.Camera camera, float partialTick, float renderDistance, net.minecraft.client.renderer.FogParameters fogParameters) static void
onKeyInput
(int key, int scanCode, int action, int modifiers) static void
onModelBake
(net.minecraft.client.resources.model.ModelManager modelManager, net.minecraft.client.resources.model.ModelBakery.BakingResult bakingResult, net.minecraft.client.resources.model.ModelBakery modelBakery) static void
onModifyBakingResult
(net.minecraft.client.resources.model.ModelBakery.BakingResult bakingResult, Map<net.minecraft.resources.ResourceLocation, net.minecraft.client.resources.model.AtlasSet.StitchResult> stitchResults, net.minecraft.client.resources.model.ModelBakery modelBakery) static void
onMouseButtonPost
(int button, int action, int mods) static boolean
onMouseButtonPre
(int button, int action, int mods) static boolean
onMouseScroll
(net.minecraft.client.MouseHandler mouseHelper, double scrollDeltaX, double scrollDeltaY) static void
onMovementInputUpdate
(net.minecraft.world.entity.player.Player player, net.minecraft.client.player.ClientInput movementInput) static void
onRegisterKeyMappings
(net.minecraft.client.Options options) static void
onRegisterParticleProviders
(net.minecraft.client.particle.ParticleEngine particleEngine) static RenderTooltipEvent.Pre
onRenderTooltipPre
(net.minecraft.world.item.ItemStack stack, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int screenWidth, int screenHeight, List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> components, net.minecraft.client.gui.Font fallbackFont, net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipPositioner positioner) static RenderTooltipEvent.Texture
onRenderTooltipTexture
(net.minecraft.world.item.ItemStack stack, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, net.minecraft.client.gui.Font font, List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> components, @Nullable net.minecraft.resources.ResourceLocation texture) static void
onScreenCharTypedPost
(net.minecraft.client.gui.screens.Screen guiScreen, char codePoint, int modifiers) static boolean
onScreenCharTypedPre
(net.minecraft.client.gui.screens.Screen guiScreen, char codePoint, int modifiers) static boolean
onScreenKeyPressedPost
(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyPressedPre
(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyReleasedPost
(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyReleasedPre
(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenMouseClickedPost
(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button, boolean handled) static boolean
onScreenMouseClickedPre
(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button) static void
onScreenMouseDragPost
(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY) static boolean
onScreenMouseDragPre
(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY) static boolean
onScreenMouseReleasedPost
(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button, boolean handled) static boolean
onScreenMouseReleasedPre
(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button) static void
onScreenMouseScrollPost
(net.minecraft.client.MouseHandler mouseHelper, net.minecraft.client.gui.screens.Screen guiScreen, double scrollDeltaX, double scrollDeltaY) static boolean
onScreenMouseScrollPre
(net.minecraft.client.MouseHandler mouseHelper, net.minecraft.client.gui.screens.Screen guiScreen, double scrollDeltaX, double scrollDeltaY) onScreenPotionSize
(net.minecraft.client.gui.screens.Screen screen, int availableSpace, boolean compact, int horizontalOffset) static ScreenshotEvent
onScreenshot
(com.mojang.blaze3d.platform.NativeImage image, File screenshotFile) static void
onTextureAtlasStitched
(net.minecraft.client.renderer.texture.TextureAtlas atlas) static boolean
onToastAdd
(net.minecraft.client.gui.components.toasts.Toast toast) static @Nullable net.minecraft.client.resources.sounds.SoundInstance
playSound
(net.minecraft.client.sounds.SoundEngine manager, net.minecraft.client.resources.sounds.SoundInstance sound) static void
popGuiLayer
(net.minecraft.client.Minecraft minecraft) private static void
popGuiLayerInternal
(net.minecraft.client.Minecraft minecraft) static void
pushGuiLayer
(net.minecraft.client.Minecraft minecraft, net.minecraft.client.gui.screens.Screen screen) static void
registerLayerDefinition
(net.minecraft.client.model.geom.ModelLayerLocation layerLocation, Supplier<net.minecraft.client.model.geom.builders.LayerDefinition> supplier) static void
static boolean
renderBlockOverlay
(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack mat, RenderBlockScreenEffectEvent.OverlayType type, net.minecraft.world.level.block.state.BlockState block, net.minecraft.core.BlockPos pos) static boolean
renderFireOverlay
(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack mat) static void
renderMainMenu
(net.minecraft.client.gui.screens.TitleScreen gui, net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, int width, int height, int alpha) static boolean
renderSpecificFirstPersonArm
(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, int packedLight, net.minecraft.client.player.AbstractClientPlayer player, net.minecraft.world.entity.HumanoidArm arm) static boolean
renderSpecificFirstPersonHand
(net.minecraft.world.InteractionHand hand, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int packedLight, float partialTick, float interpPitch, float swingProgress, float equipProgress, net.minecraft.world.item.ItemStack stack) static boolean
renderWaterOverlay
(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack mat) static void
resizeGuiLayers
(net.minecraft.client.Minecraft minecraft, int width, int height) static @Nullable net.minecraft.client.sounds.MusicInfo
selectMusic
(net.minecraft.client.sounds.MusicInfo situational, @Nullable net.minecraft.client.resources.sounds.SoundInstance playing) static boolean
shouldCauseReequipAnimation
(net.minecraft.world.item.ItemStack from, net.minecraft.world.item.ItemStack to, int slot) static boolean
shouldRenderEffect
(net.minecraft.world.effect.MobEffectInstance effectInstance) private static Stream
<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> splitLine
(net.minecraft.network.chat.FormattedText text, net.minecraft.client.gui.Font font, int maxWidth)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
CLIENTHOOKS
private static final org.apache.logging.log4j.Marker CLIENTHOOKS -
guiLayers
Contains the *extra* GUI layers. The current top layer stays in Minecraft#currentScreen, and the rest serve as a background for it. -
slotMainHand
private static int slotMainHand -
layerDefinitions
-
skullModelsByType
-
ICON_SHEET
private static final net.minecraft.resources.ResourceLocation ICON_SHEET -
initializedClientHooks
private static boolean initializedClientHooks -
initializedClientRegistries
private static boolean initializedClientRegistries -
RECIPE_BOOK_TYPE_EXTENSION_INFO
private static final net.neoforged.fml.common.asm.enumextension.ExtensionInfo RECIPE_BOOK_TYPE_EXTENSION_INFO -
RECIPE_BOOK_TYPES
private static final net.minecraft.world.inventory.RecipeBookType[] RECIPE_BOOK_TYPES -
cachedFilteredTypes
private static net.minecraft.world.inventory.RecipeBookType @Nullable [] cachedFilteredTypes -
OUTLINE_PASS_RANDOM
private static final net.minecraft.util.RandomSource OUTLINE_PASS_RANDOM -
OUTLINE_PART_SCRATCH_LIST
private static final List<net.minecraft.client.renderer.block.model.BlockModelPart> OUTLINE_PART_SCRATCH_LIST
-
-
Constructor Details
-
ClientHooks
public ClientHooks()
-
-
Method Details
-
resizeGuiLayers
public static void resizeGuiLayers(net.minecraft.client.Minecraft minecraft, int width, int height) -
clearGuiLayers
public static void clearGuiLayers(net.minecraft.client.Minecraft minecraft) -
popGuiLayerInternal
private static void popGuiLayerInternal(net.minecraft.client.Minecraft minecraft) -
pushGuiLayer
public static void pushGuiLayer(net.minecraft.client.Minecraft minecraft, net.minecraft.client.gui.screens.Screen screen) -
popGuiLayer
public static void popGuiLayer(net.minecraft.client.Minecraft minecraft) -
getGuiFarPlane
public static float getGuiFarPlane() -
firePlayerHeartTypeEvent
public static net.minecraft.client.gui.Gui.HeartType firePlayerHeartTypeEvent(net.minecraft.world.entity.player.Player player, net.minecraft.client.gui.Gui.HeartType heartType) Called byGui.HeartType.forPlayer(net.minecraft.world.entity.player.Player)
to allow for modification of the displayed heart type in the health bar.- Parameters:
player
- The localPlayer
heartType
- TheGui.HeartType
which would be displayed by vanilla- Returns:
- The heart type which should be displayed
-
getArmorTexture
public static net.minecraft.resources.ResourceLocation getArmorTexture(net.minecraft.world.item.ItemStack armor, net.minecraft.client.resources.model.EquipmentClientInfo.LayerType type, net.minecraft.client.resources.model.EquipmentClientInfo.Layer layer, net.minecraft.resources.ResourceLocation _default) -
onClientPauseChangePre
public static boolean onClientPauseChangePre(boolean pause) -
onClientPauseChangePost
public static void onClientPauseChangePost(boolean pause) -
onDrawHighlight
public static boolean onDrawHighlight(net.minecraft.client.renderer.LevelRenderer context, net.minecraft.client.Camera camera, net.minecraft.world.phys.BlockHitResult target, net.minecraft.client.DeltaTracker deltaTracker, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, boolean forTranslucentBlocks) -
dispatchRenderStage
public static void dispatchRenderStage(RenderLevelStageEvent.Stage stage, net.minecraft.world.level.Level level, net.minecraft.client.renderer.LevelRenderer levelRenderer, @Nullable @Nullable com.mojang.blaze3d.vertex.PoseStack poseStack, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, int renderTick, net.minecraft.client.Camera camera, net.minecraft.client.renderer.culling.Frustum frustum) -
dispatchRenderStage
public static void dispatchRenderStage(net.minecraft.client.renderer.RenderType renderType, net.minecraft.world.level.Level level, net.minecraft.client.renderer.LevelRenderer levelRenderer, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, int renderTick, net.minecraft.client.Camera camera, net.minecraft.client.renderer.culling.Frustum frustum) -
renderSpecificFirstPersonHand
public static boolean renderSpecificFirstPersonHand(net.minecraft.world.InteractionHand hand, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int packedLight, float partialTick, float interpPitch, float swingProgress, float equipProgress, net.minecraft.world.item.ItemStack stack) -
renderSpecificFirstPersonArm
public static boolean renderSpecificFirstPersonArm(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, int packedLight, net.minecraft.client.player.AbstractClientPlayer player, net.minecraft.world.entity.HumanoidArm arm) -
onTextureAtlasStitched
public static void onTextureAtlasStitched(net.minecraft.client.renderer.texture.TextureAtlas atlas) -
onBlockColorsInit
public static void onBlockColorsInit(net.minecraft.client.color.block.BlockColors blockColors) -
copyModelProperties
public static <T extends net.minecraft.client.renderer.entity.state.HumanoidRenderState> void copyModelProperties(net.minecraft.client.model.HumanoidModel<T> original, net.minecraft.client.model.HumanoidModel<?> replacement) Copies humanoid model properties from the original model to another, used for armor models -
fixDomain
-
getFieldOfViewModifier
public static float getFieldOfViewModifier(net.minecraft.world.entity.player.Player entity, float fovModifier, float fovScale) -
getFieldOfView
public static float getFieldOfView(net.minecraft.client.renderer.GameRenderer renderer, net.minecraft.client.Camera camera, float partialTick, float fov, boolean usedConfiguredFov) -
getTurnPlayerValues
public static CalculatePlayerTurnEvent getTurnPlayerValues(double mouseSensitivity, boolean cinematicCameraEnabled) -
getDetachedCameraDistance
public static float getDetachedCameraDistance(net.minecraft.client.Camera camera, boolean flipped, float entityScale, float distance) -
renderMainMenu
public static void renderMainMenu(net.minecraft.client.gui.screens.TitleScreen gui, net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font font, int width, int height, int alpha) -
playSound
@Nullable public static @Nullable net.minecraft.client.resources.sounds.SoundInstance playSound(net.minecraft.client.sounds.SoundEngine manager, net.minecraft.client.resources.sounds.SoundInstance sound) -
selectMusic
@Nullable public static @Nullable net.minecraft.client.sounds.MusicInfo selectMusic(net.minecraft.client.sounds.MusicInfo situational, @Nullable @Nullable net.minecraft.client.resources.sounds.SoundInstance playing) -
drawScreen
public static void drawScreen(net.minecraft.client.gui.screens.Screen screen, net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) -
drawScreenInternal
private static void drawScreenInternal(net.minecraft.client.gui.screens.Screen screen, net.minecraft.client.gui.GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) -
getFogColor
public static org.joml.Vector4f getFogColor(net.minecraft.client.Camera camera, float partialTick, net.minecraft.client.multiplayer.ClientLevel level, int renderDistance, float darkenWorldAmount, float fogRed, float fogGreen, float fogBlue) -
onFogRender
public static net.minecraft.client.renderer.FogParameters onFogRender(net.minecraft.client.renderer.FogRenderer.FogMode mode, net.minecraft.world.level.material.FogType type, net.minecraft.client.Camera camera, float partialTick, float renderDistance, net.minecraft.client.renderer.FogParameters fogParameters) -
onModifyBakingResult
public static void onModifyBakingResult(net.minecraft.client.resources.model.ModelBakery.BakingResult bakingResult, Map<net.minecraft.resources.ResourceLocation, net.minecraft.client.resources.model.AtlasSet.StitchResult> stitchResults, net.minecraft.client.resources.model.ModelBakery modelBakery) -
onModelBake
public static void onModelBake(net.minecraft.client.resources.model.ModelManager modelManager, net.minecraft.client.resources.model.ModelBakery.BakingResult bakingResult, net.minecraft.client.resources.model.ModelBakery modelBakery) -
getBlockMaterial
public static net.minecraft.client.resources.model.Material getBlockMaterial(net.minecraft.resources.ResourceLocation loc) -
computeQuadNormal
public static int computeQuadNormal(int[] vertices) Computes the packed normal of a quad based on the stored vertex positions. -
fillNormal
public static void fillNormal(int[] faceData) Modifies the passedfaceData
to fill in the vertex normals. The normals are computed from the vertex positions, seecomputeQuadNormal(int[])
. -
loadEntityShader
public static void loadEntityShader(@Nullable @Nullable net.minecraft.world.entity.Entity entity, net.minecraft.client.renderer.GameRenderer gameRenderer) -
shouldCauseReequipAnimation
public static boolean shouldCauseReequipAnimation(net.minecraft.world.item.ItemStack from, net.minecraft.world.item.ItemStack to, int slot) -
onCustomizeBossEventProgress
public static CustomizeGuiOverlayEvent.BossEventProgress onCustomizeBossEventProgress(net.minecraft.client.gui.GuiGraphics guiGraphics, com.mojang.blaze3d.platform.Window window, net.minecraft.client.gui.components.LerpingBossEvent bossInfo, int x, int y, int increment) -
onScreenshot
public static ScreenshotEvent onScreenshot(com.mojang.blaze3d.platform.NativeImage image, File screenshotFile) -
onClientChangeGameType
public static void onClientChangeGameType(net.minecraft.client.multiplayer.PlayerInfo info, net.minecraft.world.level.GameType currentGameMode, net.minecraft.world.level.GameType newGameMode) -
onMovementInputUpdate
public static void onMovementInputUpdate(net.minecraft.world.entity.player.Player player, net.minecraft.client.player.ClientInput movementInput) -
onScreenMouseClickedPre
public static boolean onScreenMouseClickedPre(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button) -
onScreenMouseClickedPost
public static boolean onScreenMouseClickedPost(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button, boolean handled) -
onScreenMouseReleasedPre
public static boolean onScreenMouseReleasedPre(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button) -
onScreenMouseReleasedPost
public static boolean onScreenMouseReleasedPost(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int button, boolean handled) -
onScreenMouseDragPre
public static boolean onScreenMouseDragPre(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY) -
onScreenMouseDragPost
public static void onScreenMouseDragPost(net.minecraft.client.gui.screens.Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY) -
onScreenMouseScrollPre
public static boolean onScreenMouseScrollPre(net.minecraft.client.MouseHandler mouseHelper, net.minecraft.client.gui.screens.Screen guiScreen, double scrollDeltaX, double scrollDeltaY) -
onScreenMouseScrollPost
public static void onScreenMouseScrollPost(net.minecraft.client.MouseHandler mouseHelper, net.minecraft.client.gui.screens.Screen guiScreen, double scrollDeltaX, double scrollDeltaY) -
onScreenKeyPressedPre
public static boolean onScreenKeyPressedPre(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) -
onScreenKeyPressedPost
public static boolean onScreenKeyPressedPost(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) -
onScreenKeyReleasedPre
public static boolean onScreenKeyReleasedPre(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) -
onScreenKeyReleasedPost
public static boolean onScreenKeyReleasedPost(net.minecraft.client.gui.screens.Screen guiScreen, int keyCode, int scanCode, int modifiers) -
onScreenCharTypedPre
public static boolean onScreenCharTypedPre(net.minecraft.client.gui.screens.Screen guiScreen, char codePoint, int modifiers) -
onScreenCharTypedPost
public static void onScreenCharTypedPost(net.minecraft.client.gui.screens.Screen guiScreen, char codePoint, int modifiers) -
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(net.minecraft.client.MouseHandler mouseHelper, double scrollDeltaX, double scrollDeltaY) -
onKeyInput
public static void onKeyInput(int key, int scanCode, int action, int modifiers) -
onClickInput
public static InputEvent.InteractionKeyMappingTriggered onClickInput(int button, net.minecraft.client.KeyMapping keyBinding, net.minecraft.world.InteractionHand hand) -
isNameplateInRenderDistance
public static boolean isNameplateInRenderDistance(net.minecraft.world.entity.LivingEntity entity, double squareDistance) -
shouldRenderEffect
public static boolean shouldRenderEffect(net.minecraft.world.effect.MobEffectInstance effectInstance) -
registerLayerDefinition
public static void registerLayerDefinition(net.minecraft.client.model.geom.ModelLayerLocation layerLocation, Supplier<net.minecraft.client.model.geom.builders.LayerDefinition> supplier) -
loadLayerDefinitions
public static void loadLayerDefinitions(com.google.common.collect.ImmutableMap.Builder<net.minecraft.client.model.geom.ModelLayerLocation, net.minecraft.client.model.geom.builders.LayerDefinition> builder) -
getModdedSkullModel
@Nullable public static @Nullable net.minecraft.client.model.SkullModelBase getModdedSkullModel(net.minecraft.client.model.geom.EntityModelSet modelSet, net.minecraft.world.level.block.SkullBlock.Type type) -
firePlayerLogin
public static void firePlayerLogin(net.minecraft.client.multiplayer.MultiPlayerGameMode pc, net.minecraft.client.player.LocalPlayer player, net.minecraft.network.Connection networkManager) -
firePlayerLogout
public static void firePlayerLogout(@Nullable @Nullable net.minecraft.client.multiplayer.MultiPlayerGameMode pc, @Nullable @Nullable net.minecraft.client.player.LocalPlayer player) -
firePlayerRespawn
public static void firePlayerRespawn(net.minecraft.client.multiplayer.MultiPlayerGameMode pc, net.minecraft.client.player.LocalPlayer oldPlayer, net.minecraft.client.player.LocalPlayer newPlayer, net.minecraft.network.Connection networkManager) -
onRegisterParticleProviders
public static void onRegisterParticleProviders(net.minecraft.client.particle.ParticleEngine particleEngine) -
onRegisterKeyMappings
public static void onRegisterKeyMappings(net.minecraft.client.Options options) -
onClientChat
@Nullable public static @Nullable net.minecraft.network.chat.Component onClientChat(net.minecraft.network.chat.ChatType.Bound boundChatType, net.minecraft.network.chat.Component message, UUID sender) -
onClientPlayerChat
@Nullable public static @Nullable net.minecraft.network.chat.Component onClientPlayerChat(net.minecraft.network.chat.ChatType.Bound boundChatType, net.minecraft.network.chat.Component message, net.minecraft.network.chat.PlayerChatMessage playerChatMessage, UUID sender) -
onClientSystemChat
@Nullable public static @Nullable net.minecraft.network.chat.Component onClientSystemChat(net.minecraft.network.chat.Component message, boolean overlay) -
onClientSendMessage
-
handleUpdateRecipes
@Internal public static void handleUpdateRecipes(net.minecraft.client.multiplayer.ClientPacketListener packetListener, Consumer<net.minecraft.world.level.block.entity.FuelValues> fuelValuesSetter) -
getTooltipFont
public static net.minecraft.client.gui.Font getTooltipFont(net.minecraft.world.item.ItemStack stack, net.minecraft.client.gui.Font fallbackFont) -
onRenderTooltipPre
public static RenderTooltipEvent.Pre onRenderTooltipPre(net.minecraft.world.item.ItemStack stack, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int screenWidth, int screenHeight, List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> components, net.minecraft.client.gui.Font fallbackFont, net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipPositioner positioner) -
onRenderTooltipTexture
public static RenderTooltipEvent.Texture onRenderTooltipTexture(net.minecraft.world.item.ItemStack stack, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, net.minecraft.client.gui.Font font, List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> components, @Nullable @Nullable net.minecraft.resources.ResourceLocation texture) -
gatherTooltipComponents
public static List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> gatherTooltipComponents(net.minecraft.world.item.ItemStack stack, List<? extends net.minecraft.network.chat.FormattedText> textElements, int mouseX, int screenWidth, int screenHeight, net.minecraft.client.gui.Font fallbackFont) -
gatherTooltipComponents
public static List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> gatherTooltipComponents(net.minecraft.world.item.ItemStack stack, List<? extends net.minecraft.network.chat.FormattedText> textElements, Optional<net.minecraft.world.inventory.tooltip.TooltipComponent> itemComponent, int mouseX, int screenWidth, int screenHeight, net.minecraft.client.gui.Font fallbackFont) -
gatherTooltipComponentsFromElements
public static List<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> gatherTooltipComponentsFromElements(net.minecraft.world.item.ItemStack stack, List<com.mojang.datafixers.util.Either<net.minecraft.network.chat.FormattedText, net.minecraft.world.inventory.tooltip.TooltipComponent>> elements, int mouseX, int screenWidth, int screenHeight, net.minecraft.client.gui.Font fallbackFont) -
splitLine
private static Stream<net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent> splitLine(net.minecraft.network.chat.FormattedText text, net.minecraft.client.gui.Font font, int maxWidth) -
makeParticleRenderTypeComparator
public static Comparator<net.minecraft.client.particle.ParticleRenderType> makeParticleRenderTypeComparator(List<net.minecraft.client.particle.ParticleRenderType> renderOrder) -
onScreenPotionSize
public static ScreenEvent.RenderInventoryMobEffects onScreenPotionSize(net.minecraft.client.gui.screens.Screen screen, int availableSpace, boolean compact, int horizontalOffset) -
onToastAdd
public static boolean onToastAdd(net.minecraft.client.gui.components.toasts.Toast toast) -
renderFireOverlay
public static boolean renderFireOverlay(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack mat) -
renderWaterOverlay
public static boolean renderWaterOverlay(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack mat) -
renderBlockOverlay
public static boolean renderBlockOverlay(net.minecraft.world.entity.player.Player player, com.mojang.blaze3d.vertex.PoseStack mat, RenderBlockScreenEffectEvent.OverlayType type, net.minecraft.world.level.block.state.BlockState block, net.minecraft.core.BlockPos pos) -
getMaxMipmapLevel
public static int getMaxMipmapLevel(int width, int height) -
isBlockEntityRendererVisible
@Internal public static <T extends net.minecraft.world.level.block.entity.BlockEntity> boolean isBlockEntityRendererVisible(net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher dispatcher, net.minecraft.world.level.block.entity.BlockEntity blockEntity, net.minecraft.client.renderer.culling.Frustum frustum) -
fixItemModelSeams
public static List<net.minecraft.client.renderer.block.model.BlockElement> fixItemModelSeams(List<net.minecraft.client.renderer.block.model.BlockElement> elements, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) Modify the position and UVs of the edge quads of generated item models to account for sprite expansion of the front and back quad. Fixes MC-73186 on generated item models.- Parameters:
elements
- The generated elements, may include the front and back facesprite
- The texture from which the elements were generated- Returns:
- the original elements list
-
gatherAdditionalRenderers
public static List<AddSectionGeometryEvent.AdditionalSectionRenderer> gatherAdditionalRenderers(net.minecraft.core.BlockPos sectionOrigin, net.minecraft.world.level.Level level) -
addAdditionalGeometry
public static void addAdditionalGeometry(List<AddSectionGeometryEvent.AdditionalSectionRenderer> additionalRenderers, Function<net.minecraft.client.renderer.RenderType, com.mojang.blaze3d.vertex.VertexConsumer> getOrCreateBuilder, net.minecraft.client.renderer.chunk.RenderChunkRegion region, com.mojang.blaze3d.vertex.PoseStack transformation) -
initClientHooks
@Internal public static void initClientHooks(net.minecraft.client.Minecraft mc, net.minecraft.server.packs.resources.ReloadableResourceManager resourceManager) -
initClientRegistries
public static void initClientRegistries() -
fireRenderFramePre
public static void fireRenderFramePre(net.minecraft.client.DeltaTracker partialTick) FiresRenderFrameEvent.Pre
. Called just beforeGameRenderer.render(DeltaTracker, boolean)
inMinecraft.runTick(boolean)
.Fired before the profiler section for "gameRenderer" is started.
- Parameters:
partialTick
- The current partial tick
-
fireRenderFramePost
public static void fireRenderFramePost(net.minecraft.client.DeltaTracker partialTick) FiresRenderFrameEvent.Post
. Called just afterGameRenderer.render(DeltaTracker, boolean)
inMinecraft.runTick(boolean)
.Fired after the profiler section for "gameRenderer" is ended.
- Parameters:
partialTick
- The current partial tick
-
fireResourceLoadFinishedEvent
public static void fireResourceLoadFinishedEvent(boolean initial) -
fireClientTickPre
public static void fireClientTickPre()FiresClientTickEvent.Pre
. Called from the head ofMinecraft.tick()
. -
fireClientTickPost
public static void fireClientTickPost()FiresClientTickEvent.Post
. Called from the tail ofMinecraft.tick()
. -
getEffectTooltip
public static List<net.minecraft.network.chat.Component> getEffectTooltip(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen, net.minecraft.world.effect.MobEffectInstance effectInst, List<net.minecraft.network.chat.Component> tooltip) Fires theGatherEffectScreenTooltipsEvent
and returns the resulting tooltip lines.Called from
EffectsInInventory.renderEffects(net.minecraft.client.gui.GuiGraphics, int, int)
just beforeGuiGraphics.renderTooltip(Font, List, Optional, int, int)
is called.- Parameters:
screen
- The screen rendering the tooltip.effectInst
- The effect instance whose tooltip is being rendered.tooltip
- An immutable list containing the existing tooltip lines, which consist of the name and the duration.- Returns:
- The new tooltip lines, modified by the event.
-
getFilteredRecipeBookTypeValues
public static net.minecraft.world.inventory.RecipeBookType[] getFilteredRecipeBookTypeValues() -
isInTranslucentBlockOutlinePass
public static boolean isInTranslucentBlockOutlinePass(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
reloadRenderer
public static void reloadRenderer() -
gatherMaterialAtlases
-
fireFrameGraphSetup
@Internal public static FrameGraphSetupEvent fireFrameGraphSetup(com.mojang.blaze3d.framegraph.FrameGraphBuilder builder, net.minecraft.client.renderer.LevelTargetBundle targets, com.mojang.blaze3d.resource.RenderTargetDescriptor renderTargetDescriptor, net.minecraft.client.renderer.culling.Frustum frustum, net.minecraft.client.Camera camera, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, net.minecraft.client.DeltaTracker deltaTracker, net.minecraft.util.profiling.ProfilerFiller profiler) -
instantiateMainTarget
@Internal public static com.mojang.blaze3d.pipeline.MainTarget instantiateMainTarget(int width, int height) -
getStencilFormat
@Internal public static com.mojang.blaze3d.textures.TextureFormat getStencilFormat() -
createLoadingOverlay
-