Posted July 29, 20196 yr I managed to successfully implement an acid fluid, but every fluid afterwards has refused to properly accept its model, despite using entirely identical code. Mod fluid registry: public class VOFluids { private static final List<Fluid> FLUIDS = new ArrayList<Fluid>(); public static Fluid ACID; public static Fluid GREASE; public static Fluid PETRIFYING; public static void init() { ACID = addFluid(new FluidAcid()); GREASE = addFluid(new FluidGrease()); PETRIFYING = addFluid(new GasPetrifying()); } private static Fluid addFluid(Fluid fluidIn) { FLUIDS.add(fluidIn); FluidRegistry.registerFluid(fluidIn); return fluidIn; } public static void renderFluids() { ((BlockFluidVO)VOBlocks.ACID).render(); ((BlockFluidVO)VOBlocks.GREASE).render(); ((BlockFluidVO)VOBlocks.PETRIFYING_GAS).render(); } } All of the fluids extend out of Forge's Fluid class, with the exception of GasPetrifying which does a little bit of defaults for gaseous fluids and still experiences the same problem. init() is called by the CommonProxy, renderFluids() is called by the ClientProxy, both during pre-initialisation. Mod fluid block class: public abstract class BlockFluidVO extends BlockFluidClassic { public BlockFluidVO(String nameIn, Fluid fluidIn) { this(nameIn, fluidIn, Material.WATER); } public BlockFluidVO(String nameIn, Fluid fluidIn, Material materialIn) { super(fluidIn, materialIn); setCreativeTab(CreativeTabVO.BLOCKS_TAB); setBlockDefaults(nameIn); } public void setBlockDefaults(String nameIn) { this.setCreativeTab(null); this.setRegistryName(Reference.ModInfo.MOD_ID, nameIn); this.setUnlocalizedName(getRegistryName().toString()); } @SideOnly(Side.CLIENT) public void render() { ModelLoader.setCustomStateMapper(this, new StateMap.Builder().ignore(LEVEL).build()); } } The only meaningful change I've managed to identify is that altering the order of model registration in renderFluids() changes which fluid works fine. All the fluids use essentially identical blockstate files, however only the first registered is accepted, the others complain about missing states for different fluid levels (despite explicitly being told to ignore them). Fluid blockstate: { "forge_marker": 1, "defaults": { "model": "forge:fluid", "transform": "forge:default-item" }, "variants": { "normal": { "model": "forge:fluid", "custom": { "fluid": "varodd:acid" } } } } I've checked for any documentation, tutorials, or other mods that incorporate multiple fluids and I haven't been able to find a reason for this error.
August 3, 20196 yr Author Failing a solution to this bizarre bug, are there any tutorials or references for multi-fluid implementations that can be recommended?
August 3, 20196 yr I don't know exactly what your issue is, but I can point you to my 1.12.2 fluid code where I have several fluids with their own textures: initialisation and registration, model registration, blockstates file. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.