Package net.neoforged.neoforge.client
Class ClientHooks
java.lang.Object
net.neoforged.neoforge.client.ClientHooks
Class for various client-side-only hooks.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Marker
static String
Contains the *extra* GUI layers.private static final ResourceLocation
private static boolean
private static final Map
<ModelLayerLocation, Supplier<LayerDefinition>> private static final org.apache.logging.log4j.Logger
private static int
private static final com.google.common.collect.BiMap
<ResourceLocation, SpriteSourceType> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAdditionalGeometry
(List<AddSectionGeometryEvent.AdditionalSectionRenderer> additionalRenderers, Function<RenderType, VertexConsumer> getOrCreateBuilder, RenderChunkRegion region, PoseStack transformation) static boolean
calculateFaceWithoutAO
(BlockAndTintGetter getter, BlockState state, BlockPos pos, BakedQuad quad, boolean isFaceCubic, float[] brightness, int[] lightmap) static void
clearGuiLayers
(Minecraft minecraft) static <T extends LivingEntity>
voidcopyModelProperties
(HumanoidModel<T> original, HumanoidModel<?> replacement) Copies humanoid model properties from the original model to another, used for armor modelsstatic void
dispatchRenderStage
(RenderType renderType, LevelRenderer levelRenderer, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, int renderTick, Camera camera, Frustum frustum) static void
dispatchRenderStage
(RenderLevelStageEvent.Stage stage, LevelRenderer levelRenderer, @Nullable PoseStack poseStack, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, int renderTick, Camera camera, Frustum frustum) static void
drawScreen
(Screen screen, GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) private static void
drawScreenInternal
(Screen screen, GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) static void
fillNormal
(int[] faceData, Direction facing) internal, relies on fixed format of FaceBakerystatic void
FiresClientTickEvent.Post
.static void
FiresClientTickEvent.Pre
.static void
firePlayerLogin
(MultiPlayerGameMode pc, LocalPlayer player, Connection networkManager) static void
firePlayerLogout
(@Nullable MultiPlayerGameMode pc, @Nullable LocalPlayer player) static void
firePlayerRespawn
(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager) static void
fireRenderFramePost
(float partialRick) FiresRenderFrameEvent.Post
.static void
fireRenderFramePre
(float partialTick) FiresRenderFrameEvent.Pre
.static String
static List
<BlockElement> fixItemModelSeams
(List<BlockElement> elements, 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
(BlockPos sectionOrigin, Level level) static List
<ClientTooltipComponent> gatherTooltipComponents
(ItemStack stack, List<? extends FormattedText> textElements, int mouseX, int screenWidth, int screenHeight, Font fallbackFont) static List
<ClientTooltipComponent> gatherTooltipComponents
(ItemStack stack, List<? extends FormattedText> textElements, Optional<TooltipComponent> itemComponent, int mouseX, int screenWidth, int screenHeight, Font fallbackFont) static Model
getArmorModel
(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlot slot, HumanoidModel<?> _default) static ResourceLocation
getArmorTexture
(Entity entity, ItemStack armor, ArmorMaterial.Layer layer, boolean innerModel, EquipmentSlot slot) static Material
static double
getDetachedCameraDistance
(Camera camera, boolean flipped, float entityScale, double distance) static RenderType
getEntityRenderType
(RenderType chunkRenderType, boolean cull) Mimics the behavior ofItemBlockRenderTypes.getRenderType(BlockState, boolean)
for the inputRenderType
.static double
getFieldOfView
(GameRenderer renderer, Camera camera, double partialTick, double fov, boolean usedConfiguredFov) static float
getFieldOfViewModifier
(Player entity, float fovModifier) static org.joml.Vector3f
getFogColor
(Camera camera, float partialTick, ClientLevel level, int renderDistance, float darkenWorldAmount, float fogRed, float fogGreen, float fogBlue) static float
static int
getMaxMipmapLevel
(int width, int height) static ResourceLocation
getShaderImportLocation
(String basePath, boolean isRelative, String importPath) static Font
getTooltipFont
(ItemStack stack, Font fallbackFont) static CalculatePlayerTurnEvent
getTurnPlayerValues
(double mouseSensitivity, boolean cinematicCameraEnabled) private static org.joml.Vector3f
getVertexPos
(int[] data, int vertex) static BakedModel
handleCameraTransforms
(PoseStack poseStack, BakedModel model, ItemDisplayContext cameraTransformType, boolean applyLeftHandTransform) static void
initClientHooks
(Minecraft mc, ReloadableResourceManager resourceManager) static <T extends BlockEntity>
booleanisBlockEntityRendererVisible
(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity, Frustum frustum) static boolean
isBlockInSolidLayer
(BlockState state) static boolean
isNameplateInRenderDistance
(Entity entity, double squareDistance) static void
loadEntityShader
(Entity entity, GameRenderer entityRenderer) static void
loadLayerDefinitions
(com.google.common.collect.ImmutableMap.Builder<ModelLayerLocation, LayerDefinition> builder) static Comparator
<ParticleRenderType> makeParticleRenderTypeComparator
(List<ParticleRenderType> renderOrder) static com.google.common.collect.BiMap
<ResourceLocation, SpriteSourceType> static void
onBlockColorsInit
(BlockColors blockColors) onCameraSetup
(GameRenderer renderer, Camera camera, float partial) onClickInput
(int button, KeyMapping keyBinding, InteractionHand hand) static void
onClientChangeGameType
(PlayerInfo info, GameType currentGameMode, GameType newGameMode) static @Nullable Component
onClientChat
(ChatType.Bound boundChatType, Component message, UUID sender) static void
onClientPauseChangePost
(boolean pause) static boolean
onClientPauseChangePre
(boolean pause) static @Nullable Component
onClientPlayerChat
(ChatType.Bound boundChatType, Component message, PlayerChatMessage playerChatMessage, UUID sender) static String
onClientSendMessage
(String message) static @Nullable Component
onClientSystemChat
(Component message, boolean overlay) onCustomizeBossEventProgress
(GuiGraphics guiGraphics, Window window, LerpingBossEvent bossInfo, int x, int y, int increment) static boolean
onDrawHighlight
(LevelRenderer context, Camera camera, HitResult target, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource) static void
onFogRender
(FogRenderer.FogMode mode, FogType type, Camera camera, float partialTick, float renderDistance, float nearDistance, float farDistance, FogShape shape) static void
onItemColorsInit
(ItemColors itemColors, BlockColors blockColors) static void
onKeyInput
(int key, int scanCode, int action, int modifiers) static void
onModelBake
(ModelManager modelManager, Map<ResourceLocation, BakedModel> models, ModelBakery modelBakery) static void
onModifyBakingResult
(Map<ResourceLocation, BakedModel> models, Map<ResourceLocation, AtlasSet.StitchResult> stitchResults, ModelBakery modelBakery) static void
onMouseButtonPost
(int button, int action, int mods) static boolean
onMouseButtonPre
(int button, int action, int mods) static boolean
onMouseScroll
(MouseHandler mouseHelper, double scrollDeltaX, double scrollDeltaY) static void
onMovementInputUpdate
(Player player, Input movementInput) static void
static void
onRegisterAdditionalModels
(Set<ResourceLocation> additionalModels) static void
onRegisterKeyMappings
(Options options) static void
onRegisterParticleProviders
(ParticleEngine particleEngine) static RenderTooltipEvent.Color
onRenderTooltipColor
(ItemStack stack, GuiGraphics graphics, int x, int y, Font font, List<ClientTooltipComponent> components) static RenderTooltipEvent.Pre
onRenderTooltipPre
(ItemStack stack, GuiGraphics graphics, int x, int y, int screenWidth, int screenHeight, List<ClientTooltipComponent> components, Font fallbackFont, ClientTooltipPositioner positioner) static void
onScreenCharTypedPost
(Screen guiScreen, char codePoint, int modifiers) static boolean
onScreenCharTypedPre
(Screen guiScreen, char codePoint, int modifiers) static boolean
onScreenKeyPressedPost
(Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyPressedPre
(Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyReleasedPost
(Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyReleasedPre
(Screen guiScreen, int keyCode, int scanCode, int modifiers) static boolean
onScreenMouseClickedPost
(Screen guiScreen, double mouseX, double mouseY, int button, boolean handled) static boolean
onScreenMouseClickedPre
(Screen guiScreen, double mouseX, double mouseY, int button) static void
onScreenMouseDragPost
(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY) static boolean
onScreenMouseDragPre
(Screen guiScreen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY) static boolean
onScreenMouseReleasedPost
(Screen guiScreen, double mouseX, double mouseY, int button, boolean handled) static boolean
onScreenMouseReleasedPre
(Screen guiScreen, double mouseX, double mouseY, int button) static void
onScreenMouseScrollPost
(MouseHandler mouseHelper, Screen guiScreen, double scrollDeltaX, double scrollDeltaY) static boolean
onScreenMouseScrollPre
(MouseHandler mouseHelper, Screen guiScreen, double scrollDeltaX, double scrollDeltaY) onScreenPotionSize
(Screen screen, int availableSpace, boolean compact, int horizontalOffset) static ScreenshotEvent
onScreenshot
(NativeImage image, File screenshotFile) static void
static boolean
onToastAdd
(Toast toast) static @Nullable SoundInstance
playSound
(SoundEngine manager, SoundInstance sound) static void
popGuiLayer
(Minecraft minecraft) private static void
popGuiLayerInternal
(Minecraft minecraft) static void
pushGuiLayer
(Minecraft minecraft, Screen screen) static void
registerLayerDefinition
(ModelLayerLocation layerLocation, Supplier<LayerDefinition> supplier) static void
static boolean
renderBlockOverlay
(Player player, PoseStack mat, RenderBlockScreenEffectEvent.OverlayType type, BlockState block, BlockPos pos) static boolean
renderFireOverlay
(Player player, PoseStack mat) static void
renderMainMenu
(TitleScreen gui, GuiGraphics guiGraphics, Font font, int width, int height, int alpha) static void
renderPistonMovedBlocks
(BlockPos pos, BlockState state, PoseStack stack, MultiBufferSource bufferSource, Level level, boolean checkSides, int packedOverlay, BlockRenderDispatcher blockRenderer) static boolean
renderSpecificFirstPersonArm
(PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, AbstractClientPlayer player, HumanoidArm arm) static boolean
renderSpecificFirstPersonHand
(InteractionHand hand, PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, float partialTick, float interpPitch, float swingProgress, float equipProgress, ItemStack stack) static boolean
renderWaterOverlay
(Player player, PoseStack mat) static void
resizeGuiLayers
(Minecraft minecraft, int width, int height) static boolean
shouldCauseReequipAnimation
(ItemStack from, ItemStack to, int slot) static boolean
shouldRenderEffect
(MobEffectInstance effectInstance) private static Stream
<ClientTooltipComponent> splitLine
(FormattedText text, 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. -
forgeStatusLine
-
slotMainHand
private static int slotMainHand -
layerDefinitions
-
ICON_SHEET
-
SPRITE_SOURCE_TYPES_MAP
private static final com.google.common.collect.BiMap<ResourceLocation,SpriteSourceType> SPRITE_SOURCE_TYPES_MAP -
initializedClientHooks
private static boolean initializedClientHooks
-
-
Constructor Details
-
ClientHooks
public ClientHooks()
-
-
Method Details
-
resizeGuiLayers
-
clearGuiLayers
-
popGuiLayerInternal
-
pushGuiLayer
-
popGuiLayer
-
getGuiFarPlane
public static float getGuiFarPlane() -
getArmorTexture
public static ResourceLocation getArmorTexture(Entity entity, ItemStack armor, ArmorMaterial.Layer layer, boolean innerModel, EquipmentSlot slot) -
onClientPauseChangePre
public static boolean onClientPauseChangePre(boolean pause) -
onClientPauseChangePost
public static void onClientPauseChangePost(boolean pause) -
onDrawHighlight
public static boolean onDrawHighlight(LevelRenderer context, Camera camera, HitResult target, float partialTick, PoseStack poseStack, MultiBufferSource bufferSource) -
dispatchRenderStage
public static void dispatchRenderStage(RenderLevelStageEvent.Stage stage, LevelRenderer levelRenderer, @Nullable @Nullable PoseStack poseStack, org.joml.Matrix4f modelViewMatrix, org.joml.Matrix4f projectionMatrix, int renderTick, Camera camera, Frustum frustum) -
dispatchRenderStage
public static void dispatchRenderStage(RenderType renderType, LevelRenderer levelRenderer, org.joml.Matrix4f modelViewMatrix, 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) -
onTextureAtlasStitched
-
onBlockColorsInit
-
onItemColorsInit
-
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
-
getFieldOfViewModifier
-
getFieldOfView
public static double getFieldOfView(GameRenderer renderer, Camera camera, double partialTick, double fov, boolean usedConfiguredFov) -
getTurnPlayerValues
public static CalculatePlayerTurnEvent getTurnPlayerValues(double mouseSensitivity, boolean cinematicCameraEnabled) -
getDetachedCameraDistance
public static double getDetachedCameraDistance(Camera camera, boolean flipped, float entityScale, double distance) -
renderMainMenu
public static void renderMainMenu(TitleScreen gui, GuiGraphics guiGraphics, Font font, int width, int height, int alpha) -
playSound
-
drawScreen
public static void drawScreen(Screen screen, GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) -
drawScreenInternal
private static void drawScreenInternal(Screen screen, GuiGraphics guiGraphics, 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, Map<ResourceLocation, AtlasSet.StitchResult> stitchResults, ModelBakery modelBakery) -
onModelBake
public static void onModelBake(ModelManager modelManager, Map<ResourceLocation, BakedModel> models, ModelBakery modelBakery) -
handleCameraTransforms
public static BakedModel handleCameraTransforms(PoseStack poseStack, BakedModel model, ItemDisplayContext cameraTransformType, boolean applyLeftHandTransform) -
getBlockMaterial
-
fillNormal
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
-
shouldCauseReequipAnimation
-
onCustomizeBossEventProgress
public static CustomizeGuiOverlayEvent.BossEventProgress onCustomizeBossEventProgress(GuiGraphics guiGraphics, Window window, LerpingBossEvent bossInfo, int x, int y, int increment) -
onScreenshot
-
onClientChangeGameType
public static void onClientChangeGameType(PlayerInfo info, GameType currentGameMode, GameType newGameMode) -
onMovementInputUpdate
-
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 scrollDeltaX, double scrollDeltaY) -
onScreenMouseScrollPost
public static void onScreenMouseScrollPost(MouseHandler mouseHelper, Screen guiScreen, double scrollDeltaX, double scrollDeltaY) -
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
-
onScreenCharTypedPost
-
onRecipesUpdated
-
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 scrollDeltaX, double scrollDeltaY) -
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
-
renderPistonMovedBlocks
public static void renderPistonMovedBlocks(BlockPos pos, BlockState state, PoseStack stack, MultiBufferSource bufferSource, Level level, boolean checkSides, int packedOverlay, BlockRenderDispatcher blockRenderer) -
shouldRenderEffect
-
registerLayerDefinition
public static void registerLayerDefinition(ModelLayerLocation layerLocation, Supplier<LayerDefinition> supplier) -
loadLayerDefinitions
public static void loadLayerDefinitions(com.google.common.collect.ImmutableMap.Builder<ModelLayerLocation, LayerDefinition> builder) -
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
-
onRegisterKeyMappings
-
onRegisterAdditionalModels
-
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
-
onClientSendMessage
-
getEntityRenderType
Mimics the behavior ofItemBlockRenderTypes.getRenderType(BlockState, boolean)
for the inputRenderType
. -
getTooltipFont
-
onRenderTooltipPre
public static RenderTooltipEvent.Pre onRenderTooltipPre(ItemStack stack, GuiGraphics graphics, int x, int y, int screenWidth, int screenHeight, List<ClientTooltipComponent> components, Font fallbackFont, ClientTooltipPositioner positioner) -
onRenderTooltipColor
public static RenderTooltipEvent.Color onRenderTooltipColor(ItemStack stack, GuiGraphics graphics, int x, int y, Font font, List<ClientTooltipComponent> components) -
gatherTooltipComponents
public static List<ClientTooltipComponent> gatherTooltipComponents(ItemStack stack, List<? extends FormattedText> textElements, int mouseX, int screenWidth, int screenHeight, Font fallbackFont) -
gatherTooltipComponents
public static List<ClientTooltipComponent> gatherTooltipComponents(ItemStack stack, List<? extends FormattedText> textElements, Optional<TooltipComponent> itemComponent, int mouseX, int screenWidth, int screenHeight, Font fallbackFont) -
splitLine
private static Stream<ClientTooltipComponent> splitLine(FormattedText text, Font font, int maxWidth) -
makeParticleRenderTypeComparator
public static Comparator<ParticleRenderType> makeParticleRenderTypeComparator(List<ParticleRenderType> renderOrder) -
onScreenPotionSize
public static ScreenEvent.RenderInventoryMobEffects onScreenPotionSize(Screen screen, int availableSpace, boolean compact, int horizontalOffset) -
onToastAdd
-
isBlockInSolidLayer
-
renderFireOverlay
-
renderWaterOverlay
-
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) -
makeSpriteSourceTypesMap
public static com.google.common.collect.BiMap<ResourceLocation,SpriteSourceType> makeSpriteSourceTypesMap() -
registerSpriteSourceTypes
@Internal public static void registerSpriteSourceTypes() -
isBlockEntityRendererVisible
@Internal public static <T extends BlockEntity> boolean isBlockEntityRendererVisible(BlockEntityRenderDispatcher dispatcher, BlockEntity blockEntity, Frustum frustum) -
fixItemModelSeams
public static List<BlockElement> fixItemModelSeams(List<BlockElement> elements, 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(BlockPos sectionOrigin, Level level) -
addAdditionalGeometry
public static void addAdditionalGeometry(List<AddSectionGeometryEvent.AdditionalSectionRenderer> additionalRenderers, Function<RenderType, VertexConsumer> getOrCreateBuilder, RenderChunkRegion region, PoseStack transformation) -
initClientHooks
@Internal public static void initClientHooks(Minecraft mc, ReloadableResourceManager resourceManager) -
fireRenderFramePre
public static void fireRenderFramePre(float partialTick) FiresRenderFrameEvent.Pre
. Called just beforeGameRenderer.render(float, long, boolean)
inMinecraft.runTick(boolean)
.Fired before the profiler section for "gameRenderer" is started.
- Parameters:
partialTick
- The current partial tick
-
fireRenderFramePost
public static void fireRenderFramePost(float partialRick) FiresRenderFrameEvent.Post
. Called just afterGameRenderer.render(float, long, boolean)
inMinecraft.runTick(boolean)
.Fired after the profiler section for "gameRenderer" is ended.
- Parameters:
partialTick
- The current partial tick
-
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()
.
-