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.

Featured Replies

Posted

Edit: Apparently I was blind and couldn't find the IFluidContainerItem interface. Apologies for that!

 

Hey all!

 

The current method of having an item contain a FluidStack requires that the person registers the item in question, and with this method they are only able to register a static amount. What I'd love to be able to do is take an item that can contain a variable amount of fluid and throw it into a machine, say an Aqueous Accumulator from Thermal Expansion 3, and have it start to fill up the item with the fluid. I don't mean consumes the item and gives another that has 1000mB of water "contained," but instead have it slowly fill up to 50mB, 100mB, 5323mB if I so wish.

 

For this, what I'd like to submit is an interface that can be added to an item, so that the modder can specify what types of fluids can be added to their item, the max quantity of fluid that can be there, as well as being able to load in any fluid that it so wishes. I have an interface with 5 simple methods below that I think should be able to cover everything that both a modder and a player may wish for.

 

public interface IItemFluidContainer 
{
public boolean hasRoomForFluid(ItemStack itemStack, Fluid reference);

public FluidStack getFluidStackByFluid(ItemStack itemStack, Fluid reference);

public int getCapacityByFluid(ItemStack itemStack, Fluid reference);

public ItemStack getResultFromSyphoningFluid(ItemStack itemStack, FluidStack fluid);

public ItemStack getResultFromAddingFluid(ItemStack itemStack, FluidStack fluid);
}

 

Of course it's missing the imports, but that should be easy enough. Let me know what you think!

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...

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.