Posted May 14, 201411 yr Hello forge, I am new here and am trying to create a custom liquid just to see how it works. I have knowledge of Java and will not be asking you guys to teach me Java, don't worry. Here is what I have in the main class: // Fluids public static Block basicFluidBlock; // Register Stuff Fluid basicFluid = new Fluid("basicFluid"); FluidHelper.createFluid(basicFluid, 5, 1000, 295, 2000, false); basicFluid.setUnlocalizedName(basicFluid.getUnlocalizedName()); RegisterHelper.registerFluid(basicFluid); basicFluidBlock = new BasicFluidBlock(basicFluid); RegisterHelper.registerBlock(basicFluidBlock); And here is my BasicFluidBlock class: public class BasicFluidBlock extends BlockFluidClassic { @SideOnly(Side.CLIENT) protected IIcon stillIcon; @SideOnly(Side.CLIENT) protected IIcon flowingIcon; public BasicFluidBlock(Fluid fluid) { super(fluid, Material.water); setBlockName("basicFluid"); setCreativeTab(HapMod.basicTab); } @Override public IIcon getIcon(int side, int meta) { return (side == 0 || side == 1)? stillIcon : flowingIcon; } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister register) { stillIcon = register.registerIcon(Reference.MODID + ":" + "fluidStill"); flowingIcon = register.registerIcon(Reference.MODID + ":" + "fluidFlowing"); } @SideOnly(Side.CLIENT) public void flowIntoBlock(World world, int x, int y, int z, int meta) { if (meta < 0) return; if (displaceIfPossible(world, x, y, z)) { world.setBlock(x, y, z, this, meta, 3); } } } I have looked at the wiki, and watching many tutorials(even though they are from 1.6.4/1.6.2). The liquid has no texture, and there is an error while loading: [07:16:35] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_166_basicFluid.png java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_166_basicFluid.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:581) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_05] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_05] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_05] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] I have tried setting the texture in the blocks and items folder, both don't work. Thanks, HeyAwesomePeople
June 11, 201411 yr I'm pretty sure that you need to replace registerIcons with registerBlockIcons, it used to be what you did, but in 1.7.2, it's registerBlockIcons. Hope this helps! Currently developing the More Metals Mod.
June 11, 201411 yr Try adding @Override annotations to all your methods that should be overriding methods in the superclass, you don't need this; but it won't hurt and it will give your errors when method names/args are wrong, helping you out.
June 11, 201411 yr Try adding @Override annotations to all your methods that should be overriding methods in the superclass, you don't need this; but it won't hurt and it will give your errors when method names/args are wrong, helping you out. Indeed, as I've tried to get across many times: if you think you are overriding a method - you NEED to put an @override annotation for sanity's sake. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
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.