Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CreeperShift

Members
  • Joined

  • Last visited

  1. Holy crap, you just summarized what I've been trying to understand via google for the past 2 hours. And it actually makes sense. Thank you! Also, I feel like a complete Idiot now. I JUST had it fixed before reading your post, but I was catching the block and reading the Iicons off it in postInit, then applying them to the fluids. This is 1000x smarter and better. Thanks! Just shows how little I understand Forge atm ._. Thanks for the quick help!
  2. Oh I understand. So they are 2 separate things. I assumed the fluid was simply a reference to the block. However I'm unsure of how I can set the textures inside the fluid class. I've checked a bunch of open source projects and found none of them were doing that. I'm not even sure I understand this whole Iicon thing. Any chance you could point me to an example class?
  3. I'm confused. I thought I was setting the textures here already: @Override public void registerBlockIcons(IIconRegister register){ stillIcon = register.registerIcon("creepgamingmod:fuel_still"); flowingIcon = register.registerIcon("creepgamingmod:fuel_flow"); } Also the textures work flawlessly except inside TE and EnderIO machines. How would I use setIcons()? Wouldn't I just register the same stuff again? oO I'm really confused why they work just fine outside of those 2 things
  4. Fluids: package com.creepgaming.creepgamingmod.fluids; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; public class Fluids { public static Fluid rFuel; public static Block blockRFuel; public static void mainRegistry() { rFuel = new Fluid("fuel").setLuminosity(0).setDensity(790).setViscosity(1000); FluidRegistry.registerFluid(rFuel); blockRFuel = new BlockRFuel(rFuel, Material.water).setBlockName("rfuel"); GameRegistry.registerBlock(blockRFuel, blockRFuel.getUnlocalizedName().substring(5)); rFuel.setUnlocalizedName(blockRFuel.getUnlocalizedName()); } } FluidBlock: package com.creepgaming.creepgamingmod.fluids; import com.creepgaming.creepgamingmod.CreepGamingMod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.Fluid; public class BlockRFuel extends BlockFluidClassic{ @SideOnly(Side.CLIENT) protected IIcon stillIcon; @SideOnly(Side.CLIENT) protected IIcon flowingIcon; public BlockRFuel(Fluid fluid, Material material) { super(fluid, material); setCreativeTab(CreepGamingMod.tabCCG); } @Override public IIcon getIcon(int side, int meta){ return (side == 0 || side == 1)? stillIcon : flowingIcon; } @SideOnly(Side.CLIENT) @Override public void registerBlockIcons(IIconRegister register){ stillIcon = register.registerIcon("creepgamingmod:fuel_still"); flowingIcon = register.registerIcon("creepgamingmod:fuel_flow"); } @Override public boolean canDisplace(IBlockAccess world, int x, int y, int z){ if (world.getBlock(x, y, z).getMaterial().isLiquid()) return false; return super.canDisplace(world, x, y, z); } @Override public boolean displaceIfPossible(World world, int x, int y, int z) { if (world.getBlock(x, y, z).getMaterial().isLiquid()) return false; return super.displaceIfPossible(world, x, y, z); } } I used this tutorial: http://www.minecraftforge.net/wiki/Create_a_Fluid I don't think I've changed anything besides the textures and the properties of the liquid.
  5. Heya, I'm currently making a compatibility mod for our modpack. Now I have the following issue: I have created a fluid, and it's working fine. Buckets included. However when placed inside other mods containers this happens: As you can see, the fuel works in the bucket and when placed, however it shows a lava texture inside Thermal Expansions portable tank. (Mekanism tanks work fine however! ) Also inside the EnderIO VAT: It shows the fluid, but it has no texture (looks like it's empty, even tho it's full) Do I have to include both their api's just to get the fluid working? Or is there something I'm missing.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.