Package net.minecraftforge.client.event
Class ForgeEventFactoryClient
java.lang.Object
net.minecraftforge.client.event.ForgeEventFactoryClient
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static <E extends net.minecraftforge.eventbus.api.Event>
Efire
(E e) Post an event to theMinecraftForge.EVENT_BUS
, then return the event objectfireComputeCameraAngles
(GameRenderer renderer, Camera camera, float partial) static ViewportEvent.ComputeFov
fireComputeFov
(GameRenderer renderer, Camera camera, double partialTick, double fov, boolean usedConfiguredFov) 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 RenderNameTagEvent
fireRenderNameTagEvent
(Entity entity, Component content, EntityRenderer<?> entityRenderer, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, float partialTick) onClickInput
(int button, KeyMapping keyBinding, InteractionHand hand) static void
onContainerRenderBackground
(AbstractContainerScreen<?> screen, GuiGraphics graphics, int mouseX, int mouseY) static void
onContainerRenderForeground
(AbstractContainerScreen<?> screen, GuiGraphics graphics, int mouseX, int mouseY) static void
onGatherLayers
(Map<EntityType<?>, EntityRenderer<?>> renderers, Map<PlayerSkin.Model, EntityRenderer<? extends Player>> playerRenderers, EntityRendererProvider.Context context) static void
onMouseButtonPost
(int button, int action, int mods) static boolean
onMouseButtonPre
(int button, int action, int mods) static boolean
onMouseScroll
(MouseHandler mouseHelper, double deltaX, double deltaY) static void
onPlaySoundSource
(SoundEngine engine, SoundInstance sound, Channel channel) static void
onPlayStreamingSource
(SoundEngine engine, SoundInstance sound, Channel channel) static void
onRegisterShaders
(ResourceProvider resourceProvider, List<com.mojang.datafixers.util.Pair<ShaderInstance, Consumer<ShaderInstance>>> shaderList) static boolean
onRenderArm
(PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, AbstractClientPlayer player, HumanoidArm arm) static boolean
onRenderItemInFrame
(ItemFrame itemFrame, ItemFrameRenderer<?> renderItemFrame, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) static <T extends LivingEntity,
M extends EntityModel<T>>
booleanonRenderLivingPost
(LivingEntity entity, LivingEntityRenderer<T, M> renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) static <T extends LivingEntity,
M extends EntityModel<T>>
booleanonRenderLivingPre
(LivingEntity entity, LivingEntityRenderer<T, M> renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) static boolean
onRenderPlayerPost
(Player player, PlayerRenderer renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) static boolean
onRenderPlayerPre
(Player player, PlayerRenderer renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) static void
onRenderScreenBackground
(Screen screen, GuiGraphics guiGraphics) static void
onRenderTickEnd
(DeltaTracker timer) static void
onRenderTickStart
(DeltaTracker timer) static boolean
onScreenCharTypedPost
(Screen screen, char codePoint, int modifiers) static boolean
onScreenCharTypedPre
(Screen screen, char codePoint, int modifiers) static void
onScreenClose
(Screen screen) static boolean
onScreenKeyPressedPost
(Screen screen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyPressedPre
(Screen screen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyReleasedPost
(Screen screen, int keyCode, int scanCode, int modifiers) static boolean
onScreenKeyReleasedPre
(Screen screen, int keyCode, int scanCode, int modifiers) static void
onScreenMouseClicked
(boolean[] state, Screen screen, 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 void
onScreenMouseReleased
(boolean[] state, Screen screen, double mouseX, double mouseY, int button) static void
onScreenMouseScrollPost
(Screen guiScreen, double mouseX, double mouseY, double deltaX, double deltaY) static boolean
onScreenMouseScrollPre
(Screen guiScreen, double mouseX, double mouseY, double deltaX, double deltaY) static @Nullable Screen
onScreenOpening
(Screen old, Screen screen) static ScreenshotEvent
onScreenshot
(NativeImage image, File screenshotFile) private static boolean
post
(net.minecraftforge.eventbus.api.Event e) Post an event to theMinecraftForge.EVENT_BUS
private static <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
voidpostModBus
(T e) Post an event to theModLoader.get()
event bus
-
Field Details
-
ML
-
-
Constructor Details
-
ForgeEventFactoryClient
private ForgeEventFactoryClient()
-
-
Method Details
-
post
private static boolean post(net.minecraftforge.eventbus.api.Event e) Post an event to theMinecraftForge.EVENT_BUS
- Returns:
- true if the event is
Cancelable
and has been canceled
-
fire
private static <E extends net.minecraftforge.eventbus.api.Event> E fire(E e) Post an event to theMinecraftForge.EVENT_BUS
, then return the event object- Returns:
- the event object passed in and possibly modified by listeners
-
postModBus
private static <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent> void postModBus(T e) Post an event to theModLoader.get()
event bus -
onGatherLayers
public static void onGatherLayers(Map<EntityType<?>, EntityRenderer<?>> renderers, Map<PlayerSkin.Model, EntityRenderer<? extends Player>> playerRenderers, EntityRendererProvider.Context context) -
onRegisterShaders
public static void onRegisterShaders(ResourceProvider resourceProvider, List<com.mojang.datafixers.util.Pair<ShaderInstance, Consumer<ShaderInstance>>> shaderList) -
onScreenMouseReleased
public static void onScreenMouseReleased(boolean[] state, Screen screen, double mouseX, double mouseY, int button) -
onScreenMouseClicked
public static void onScreenMouseClicked(boolean[] state, Screen screen, double mouseX, double mouseY, int button) -
onMouseButtonPre
public static boolean onMouseButtonPre(int button, int action, int mods) -
onMouseButtonPost
public static void onMouseButtonPost(int button, int action, int mods) -
onScreenMouseScrollPre
public static boolean onScreenMouseScrollPre(Screen guiScreen, double mouseX, double mouseY, double deltaX, double deltaY) -
onScreenMouseScrollPost
public static void onScreenMouseScrollPost(Screen guiScreen, double mouseX, double mouseY, double deltaX, double deltaY) -
onMouseScroll
-
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) -
onScreenOpening
-
onScreenClose
-
onPlaySoundSource
-
onPlayStreamingSource
-
onScreenshot
-
onScreenKeyPressedPre
public static boolean onScreenKeyPressedPre(Screen screen, int keyCode, int scanCode, int modifiers) -
onScreenKeyPressedPost
public static boolean onScreenKeyPressedPost(Screen screen, int keyCode, int scanCode, int modifiers) -
onScreenKeyReleasedPre
public static boolean onScreenKeyReleasedPre(Screen screen, int keyCode, int scanCode, int modifiers) -
onScreenKeyReleasedPost
public static boolean onScreenKeyReleasedPost(Screen screen, int keyCode, int scanCode, int modifiers) -
onScreenCharTypedPre
-
onScreenCharTypedPost
-
onClickInput
public static InputEvent.InteractionKeyMappingTriggered onClickInput(int button, KeyMapping keyBinding, InteractionHand hand) -
onContainerRenderBackground
public static void onContainerRenderBackground(AbstractContainerScreen<?> screen, GuiGraphics graphics, int mouseX, int mouseY) -
onContainerRenderForeground
public static void onContainerRenderForeground(AbstractContainerScreen<?> screen, GuiGraphics graphics, int mouseX, int mouseY) -
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) -
fireComputeFov
public static ViewportEvent.ComputeFov fireComputeFov(GameRenderer renderer, Camera camera, double partialTick, double fov, boolean usedConfiguredFov) -
fireComputeCameraAngles
public static ViewportEvent.ComputeCameraAngles fireComputeCameraAngles(GameRenderer renderer, Camera camera, float partial) -
onRenderLivingPre
public static <T extends LivingEntity,M extends EntityModel<T>> boolean onRenderLivingPre(LivingEntity entity, LivingEntityRenderer<T, M> renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) -
onRenderLivingPost
public static <T extends LivingEntity,M extends EntityModel<T>> boolean onRenderLivingPost(LivingEntity entity, LivingEntityRenderer<T, M> renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) -
onRenderPlayerPre
public static boolean onRenderPlayerPre(Player player, PlayerRenderer renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) -
onRenderPlayerPost
public static boolean onRenderPlayerPost(Player player, PlayerRenderer renderer, float partialTick, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) -
onRenderArm
public static boolean onRenderArm(PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, AbstractClientPlayer player, HumanoidArm arm) -
onRenderItemInFrame
public static boolean onRenderItemInFrame(ItemFrame itemFrame, ItemFrameRenderer<?> renderItemFrame, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight) -
fireRenderNameTagEvent
public static RenderNameTagEvent fireRenderNameTagEvent(Entity entity, Component content, EntityRenderer<?> entityRenderer, PoseStack poseStack, MultiBufferSource multiBufferSource, int packedLight, float partialTick) -
onRenderScreenBackground
-
onRenderTickStart
-
onRenderTickEnd
-