net.minecraft.client.render.GameRenderer Java Examples

The following examples show how to use net.minecraft.client.render.GameRenderer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GameRendererMixin.java    From Wurst7 with GNU General Public License v3.0 6 votes vote down vote up
@Redirect(at = @At(value = "INVOKE",
	target = "Lnet/minecraft/client/render/GameRenderer;bobView(Lnet/minecraft/client/util/math/MatrixStack;F)V",
	ordinal = 0),
	method = {
		"renderWorld(FJLnet/minecraft/client/util/math/MatrixStack;)V"})
private void onRenderWorldViewBobbing(GameRenderer gameRenderer,
	MatrixStack matrixStack, float partalTicks)
{
	CameraTransformViewBobbingEvent event =
		new CameraTransformViewBobbingEvent();
	WurstClient.INSTANCE.getEventManager().fire(event);
	
	if(event.isCancelled())
		return;
	
	bobView(matrixStack, partalTicks);
}
 
Example #2
Source File: WorldRenderer_scarpetRenderMixin.java    From fabric-carpet with MIT License 4 votes vote down vote up
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/debug/DebugRenderer;render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;DDD)V"))
private void renderScarpetThings(MatrixStack matrices, float tickDelta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightmapTextureManager lightmapTextureManager, Matrix4f matrix4f, CallbackInfo ci)
{
    if (CarpetClient.shapes != null) CarpetClient.shapes.render(camera, tickDelta);
}