I have managed to create a new liquid just fine, it works as expected. The problem is that I'd like for it to be translucent just like water.
I'm learning by looking at the code for water, and my attempt at making the liquid translucent can be seen below:
public static final Map<Fluid, RenderType> TYPES_BY_FLUID = Util.make(Maps.newHashMap(), (map) -> {
final RenderType translucent = RenderType.getTranslucent();
map.put(FluidRegistry.FLOWING_ACID.get(), translucent);
map.put(FluidRegistry.ACID.get(), translucent);
});
@Mod.EventBusSubscriber(modid = Mod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ClientSetup {
@SubscribeEvent
public static void clientSetup(final FMLClientSetupEvent event) {
TYPES_BY_FLUID.forEach(RenderTypeLookup::setRenderLayer);
}
}
With this code the liquid however becomes invisible instead. I haven't been able to find anything else about how water is rendered so I'm feeling a bit stuck.