Package net.minecraftforge.client.event
Class RenderItemInFrameEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RenderItemInFrameEvent
public class RenderItemInFrameEvent
extends net.minecraftforge.eventbus.api.Event
Fired before an item stack is rendered in an item frame.
This can be used to prevent normal rendering or add custom rendering.
This event is cancellable, and does not have a result. If the event is cancelled, then the item stack will not be rendered
This event is fired on the main Forge event bus, only on the logical client.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ItemFrame
private final ItemStack
private final MultiBufferSource
private final int
private final PoseStack
private final ItemFrameRenderer
<?> -
Constructor Summary
ConstructorDescriptionRenderItemInFrameEvent
(ItemFrame itemFrame, ItemFrameRenderer<?> renderItemFrame, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) -
Method Summary
Modifier and TypeMethodDescriptionReturns the item frame entity.Returns the item stack being rendered.Returns the source of rendering buffers.int
Returns the amount of packed (sky and block) light for rendering.Returns the pose stack used for rendering.Returns the renderer for the item frame entity.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
itemStack
-
itemFrameEntity
-
renderer
-
poseStack
-
multiBufferSource
-
packedLight
private final int packedLight
-
-
Constructor Details
-
RenderItemInFrameEvent
@Internal public RenderItemInFrameEvent(ItemFrame itemFrame, ItemFrameRenderer<?> renderItemFrame, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight)
-
-
Method Details
-
getItemStack
Returns the item stack being rendered.- Returns:
- the item stack being rendered
-
getItemFrameEntity
Returns the item frame entity.- Returns:
- the item frame entity
-
getRenderer
Returns the renderer for the item frame entity.- Returns:
- the renderer for the item frame entity
-
getPoseStack
Returns the pose stack used for rendering.- Returns:
- the pose stack used for rendering
-
getMultiBufferSource
Returns the source of rendering buffers.- Returns:
- the source of rendering buffers
-
getPackedLight
public int getPackedLight()Returns the amount of packed (sky and block) light for rendering.- Returns:
- the amount of packed (sky and block) light for rendering
- See Also:
-