use of net.fabricmc.fabric.impl.client.render.fluid.FluidRendererHookContainer in project fabric by FabricMC.
the class MixinFluidRenderer method tesselate.
@Inject(at = @At("HEAD"), method = "tesselate", cancellable = true)
public void tesselate(ExtendedBlockView view, BlockPos pos, BufferBuilder bufferBuilder, FluidState state, CallbackInfoReturnable<Boolean> info) {
FluidRendererHookContainer ctr = fabric_renderHandler.get();
FluidRenderHandler handler = FluidRenderHandlerRegistryImpl.INSTANCE.getOverride(state.getFluid());
if (handler == null) {
return;
}
/* ActionResult hResult = handler.tesselate(view, pos, bufferBuilder, state);
if (hResult != ActionResult.PASS) {
info.setReturnValue(hResult == ActionResult.SUCCESS);
return;
} */
ctr.view = view;
ctr.pos = pos;
ctr.state = state;
ctr.handler = handler;
}
Aggregations