Jump to content

Problems with Fluid Resource Location[1.12.2]


Habeeb_M

Recommended Posts

Hello. I am having troubles adding textures to a fluid. I have the fluid in game, with a bucket and a BlockFluid. However, the fluid in game shows up as the purple and black missing texture. I will show the methods and how I call them below:

 

private static ResourceLocation createLoc(String name) {
    return new ResourceLocation(metallurgy.MODID,"blocks/" + name);
}

public static Fluid addFluid(String fluidName, int density, int viscosity) {
    Fluid fluid = new Fluid(fluidName, createLoc(fluidName + "_still"), createLoc(fluidName + "_flow"))
            .setDensity(density)
            .setViscosity(viscosity);
    FluidRegistry.registerFluid(fluid);
    FluidRegistry.addBucketForFluid(fluid);
    return fluid;
}

public static Block addBlock(Fluid fluid, MapColor colour) {
    return new BlockFluidClassic(fluid, new MaterialLiquid(colour))
            .setRegistryName(fluid.getName())
            .setTranslationKey(fluid.getName());
}

 

ModFluid.addBlock(ModFluid.addFluid("fluidmolten", 500, 500), MapColor.RED);

 

There are no errors in the log, I have skimmed it and ctrl+f'ed, as well as posted it publicly to people. Here is one of the logs: https://gist.github.com/c2b6ebb5217915b9741c10bad3ec4b06

 

Any ideas?

Link to comment
Share on other sites

I managed to solve it with some help in the discord by registering in `RegisterBlocks` in CommonProxy, which printed an error to the log. Then we were able to create a statemapper and objectholder for the fluid, and it works! Credit goes to Virtuoel#9746.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.