Package org.cyclops.cyclopscore.helper
Class RenderHelpers
java.lang.Object
org.cyclops.cyclopscore.helper.RenderHelpers
Deprecated.
A helper for rendering.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.Runnable forrenderFluidContext(FluidStack, PoseStack, IFluidContextRender)}}. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final com.google.common.base.Function<net.minecraft.resources.ResourceLocation, net.minecraft.client.renderer.texture.TextureAtlasSprite> Deprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddBlockHitEffects(net.minecraft.client.particle.ParticleEngine particleManager, net.minecraft.client.multiplayer.ClientLevel world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) Deprecated.A custom way of spawning block hit effects.static voidbindTexture(net.minecraft.resources.ResourceLocation texture) Deprecated.Bind a texture to the rendering engine.static voidblitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, float u, float v, int width, int height, float r, float g, float b, float a) Deprecated.static voidblitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, int width, int height, float u0, float u1, float v0, float v1, float r, float g, float b, float a) Deprecated.static voiddrawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.static voiddrawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.static voiddrawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.static voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text with the given width and desired scale.static voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text and scale it to the max width.static voiddrawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text and scale it to the max width.static voiddrawScaledString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.static voiddrawScaledString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text with the given scale with a shadow.static voidemitParticle(net.minecraft.client.particle.Particle particle) Deprecated.Add a particle to the world.static net.minecraft.client.resources.model.BakedModelgetBakedModel(net.minecraft.world.level.block.state.BlockState blockState) Deprecated.Retrieve the baked model from a given block state.static net.minecraft.client.renderer.texture.TextureAtlasSpritegetBlockIcon(net.minecraft.world.level.block.Block block) Deprecated.Get the default icon from a block.static net.minecraft.client.resources.model.BakedModelgetDynamicBakedModel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Retrieve the potentially dynamic baked model for a position.static intgetFluidBakedQuadColor(net.neoforged.neoforge.fluids.FluidStack fluidStack) Deprecated.Get the fluid color to use in a baked quad.static net.minecraft.client.renderer.texture.TextureAtlasSpritegetFluidIcon(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction side) Deprecated.Get the icon of a fluid for a side in a safe way.static net.minecraft.client.renderer.texture.TextureAtlasSpritegetFluidIcon(net.neoforged.neoforge.fluids.FluidStack fluid, net.minecraft.core.Direction side) Deprecated.Get the icon of a fluid for a side in a safe way.getFluidVertexBufferColor(net.neoforged.neoforge.fluids.FluidStack fluidStack) Deprecated.Get the fluid color to use in buffer rendering.static booleanisPointInButton(net.minecraft.client.gui.components.Button button, int pointX, int pointY) Deprecated.Check if a point is inside a button's region.static booleanisPointInRegion(int left, int top, int width, int height, double pointX, double pointY) Deprecated.Check if a point is inside a region.static booleanisPointInRegion(Rectangle region, Point point) Deprecated.Check if a point is inside a region.static voidrenderFluidContext(net.neoforged.neoforge.fluids.FluidStack fluid, com.mojang.blaze3d.vertex.PoseStack matrixStack, RenderHelpers.IFluidContextRender render) Deprecated.Prepare a render system context for rendering fluids.
-
Field Details
-
SLOT_SIZE
public static final int SLOT_SIZEDeprecated.- See Also:
-
TEXTURE_GETTER
public static final com.google.common.base.Function<net.minecraft.resources.ResourceLocation,net.minecraft.client.renderer.texture.TextureAtlasSprite> TEXTURE_GETTERDeprecated.
-
-
Constructor Details
-
RenderHelpers
public RenderHelpers()Deprecated.
-
-
Method Details
-
bindTexture
public static void bindTexture(net.minecraft.resources.ResourceLocation texture) Deprecated.Bind a texture to the rendering engine.- Parameters:
texture- The texture to bind.
-
emitParticle
public static void emitParticle(net.minecraft.client.particle.Particle particle) Deprecated.Add a particle to the world.- Parameters:
particle- A particle.
-
drawScaledString
public static void drawScaledString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text with the given scale with a shadow.- Parameters:
guiGraphics- The gui graphicsfontRenderer- The font rendererstring- The string to drawx- The center Xy- The center Yscale- The scale to render the string by.color- The color to drawshadow- If a shadow should be drawndisplayMode- The display mode
-
drawScaledString
@Deprecated public static void drawScaledString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text with the given scale with a shadow.- Parameters:
matrixStack- The matrix stackmultiBufferSource- The buffer sourcefontRenderer- The font rendererstring- The string to drawx- The center Xy- The center Yscale- The scale to render the string by.color- The color to drawshadow- If a shadow should be drawndisplayMode- The display mode
-
drawScaledCenteredString
public static void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text and scale it to the max width.- Parameters:
guiGraphics- The gui graphicsfontRenderer- The font rendererstring- The string to drawx- The center Xy- The center YmaxWidth- The maximum width to scale tocolor- The color to drawshadow- If a shadow should be drawndisplayMode- The display mode
-
drawScaledCenteredString
@Deprecated public static void drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text and scale it to the max width.- Parameters:
matrixStack- The matrix stackmultiBufferSource- The buffer sourcefontRenderer- The font rendererstring- The string to drawx- The center Xy- The center YmaxWidth- The maximum width to scale tocolor- The color to drawshadow- If a shadow should be drawndisplayMode- The display mode
-
drawScaledCenteredString
public static void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text and scale it to the max width. The given string may already be scaled and its width must be passed in that case.- Parameters:
guiGraphics- The gui graphicsfontRenderer- The font rendererstring- The string to drawx- The center Xy- The center Ywidth- The scaled widthoriginalScale- The original scalemaxWidth- The maximum width to scale toshadow- If a shadow should be drawndisplayMode- The display mode
-
drawScaledCenteredString
@Deprecated public static void drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text and scale it to the max width. The given string may already be scaled and its width must be passed in that case.- Parameters:
matrixStack- The matrix stackmultiBufferSource- The buffer sourcefontRenderer- The font rendererstring- The string to drawx- The center Xy- The center Ywidth- The scaled widthoriginalScale- The original scalemaxWidth- The maximum width to scale toshadow- If a shadow should be drawndisplayMode- The display mode
-
drawScaledCenteredString
public static void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text with the given width and desired scale.- Parameters:
guiGraphics- The gui graphicsfontRenderer- The font rendererstring- The string to drawx- The center Xy- The center Ywidth- The scaled widthscale- The desired scalecolor- The color to drawshadow- If a shadow should be drawndisplayMode- The font display mode
-
drawScaledCenteredString
@Deprecated public static void drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode) Deprecated.Draw the given text with the given width and desired scale.- Parameters:
matrixStack- The matrix stackmultiBufferSource- The buffer sourcefontRenderer- The font rendererstring- The string to drawx- The center Xy- The center Ywidth- The scaled widthscale- The desired scalecolor- The color to drawshadow- If a shadow should be drawndisplayMode- The font display mode
-
getBakedModel
public static net.minecraft.client.resources.model.BakedModel getBakedModel(net.minecraft.world.level.block.state.BlockState blockState) Deprecated.Retrieve the baked model from a given block state.- Parameters:
blockState- The block state.- Returns:
- The corresponding baked model.
-
getDynamicBakedModel
public static net.minecraft.client.resources.model.BakedModel getDynamicBakedModel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Deprecated.Retrieve the potentially dynamic baked model for a position. This will automatically take into account smart block models.- Parameters:
world- The world.pos- The position.- Returns:
- The baked model.
-
addBlockHitEffects
public static void addBlockHitEffects(net.minecraft.client.particle.ParticleEngine particleManager, net.minecraft.client.multiplayer.ClientLevel world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) Deprecated.A custom way of spawning block hit effects.- Parameters:
particleManager- The effect renderer.world- The world.blockState- The blockstate to render particles for.pos- The position.side- The hit side.
-
getBlockIcon
public static net.minecraft.client.renderer.texture.TextureAtlasSprite getBlockIcon(net.minecraft.world.level.block.Block block) Deprecated.Get the default icon from a block.- Parameters:
block- The block.- Returns:
- The icon.
-
getFluidIcon
public static net.minecraft.client.renderer.texture.TextureAtlasSprite getFluidIcon(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction side) Deprecated.Get the icon of a fluid for a side in a safe way.- Parameters:
fluid- The fluid.side- The side to get the icon from, UP if null.- Returns:
- The icon.
-
getFluidIcon
public static net.minecraft.client.renderer.texture.TextureAtlasSprite getFluidIcon(net.neoforged.neoforge.fluids.FluidStack fluid, net.minecraft.core.Direction side) Deprecated.Get the icon of a fluid for a side in a safe way.- Parameters:
fluid- The fluid stack.side- The side to get the icon from, UP if null.- Returns:
- The icon.
-
renderFluidContext
public static void renderFluidContext(net.neoforged.neoforge.fluids.FluidStack fluid, com.mojang.blaze3d.vertex.PoseStack matrixStack, RenderHelpers.IFluidContextRender render) Deprecated.Prepare a render system context for rendering fluids.- Parameters:
fluid- The fluid stack.matrixStack- The matrix stack.render- The actual fluid renderer.
-
getFluidVertexBufferColor
public static org.apache.commons.lang3.tuple.Triple<Float,Float, getFluidVertexBufferColorFloat> (net.neoforged.neoforge.fluids.FluidStack fluidStack) Deprecated.Get the fluid color to use in buffer rendering.- Parameters:
fluidStack- The fluid stack.- Returns:
- The RGB colors.
-
getFluidBakedQuadColor
public static int getFluidBakedQuadColor(net.neoforged.neoforge.fluids.FluidStack fluidStack) Deprecated.Get the fluid color to use in a baked quad.- Parameters:
fluidStack- The fluid stack.- Returns:
- The BGR colors.
-
isPointInRegion
public static boolean isPointInRegion(int left, int top, int width, int height, double pointX, double pointY) Deprecated.Check if a point is inside a region.- Parameters:
left- Left-top corner xtop- Left-top corner ywidth- The widthheight- The heightpointX- The point xpointY- The point y- Returns:
- If the point is inside the region.
-
isPointInRegion
Deprecated.Check if a point is inside a region.- Parameters:
region- The region.point- The point.- Returns:
- If the point is inside the region.
-
isPointInButton
public static boolean isPointInButton(net.minecraft.client.gui.components.Button button, int pointX, int pointY) Deprecated.Check if a point is inside a button's region.- Parameters:
button- The button.pointX- The point xpointY- The point y- Returns:
- If the point is inside the button's region.
-
blitColored
public static void blitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, float u, float v, int width, int height, float r, float g, float b, float a) Deprecated. -
blitColored
public static void blitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, int width, int height, float u0, float u1, float v0, float v1, float r, float g, float b, float a) Deprecated.
-