use of net.minecraftforge.fluids.capability.templates.FluidHandlerItemStack in project MinecraftForge by MinecraftForge.
the class CapabilityFluidHandler method register.
public static void register() {
CapabilityManager.INSTANCE.register(IFluidHandler.class, new DefaultFluidHandlerStorage<IFluidHandler>(), new Callable<IFluidHandler>() {
@Override
public IFluidHandler call() throws Exception {
return new FluidTank(Fluid.BUCKET_VOLUME);
}
});
CapabilityManager.INSTANCE.register(IFluidHandlerItem.class, new DefaultFluidHandlerStorage<IFluidHandlerItem>(), new Callable<IFluidHandlerItem>() {
@Override
public IFluidHandlerItem call() throws Exception {
return new FluidHandlerItemStack(new ItemStack(Items.BUCKET), Fluid.BUCKET_VOLUME);
}
});
}
Aggregations