Skip to content

Test Tube

jenki258 edited this page Aug 23, 2026 · 5 revisions

Test Tube

#BioForge #BioForge_V2_0 #Build_V0_54T #Item #Tool #LegacyUpdated

#Tools

The Test Tube (item ID: bioforge:tube) is a versatile glass container that can hold a blood sample and its associated infection strain.
Unlike the Blood Slide (a permanent record), the Test Tube is a processable item – it is used as an input for the Centrifuge and the Incubator.


Obtaining

Filling with Blood

  1. Fill a Syringe or Needle with blood (right‑click air to draw from yourself, or left‑click a mob).
  2. Hold the filled tool in your off‑hand and an empty Tube in your main hand.
  3. Right‑click – the blood and any infection are transferred to the Tube. The tool loses its blood but keeps its contamination memory.

The tube cannot draw blood directly from a mob without a tool.


Properties

The Tube stores the following data (all obfuscated via NbtObfuscator):

  • Blood type – e.g. A_POSITIVE, O_NEGATIVE
  • Source name – the creature the blood came from
  • Subject UUID – the unique identifier of the donor
  • Infection strain – if the donor had a blood‑borne infection (only the dedicated infection tag is copied; plain blood data is not considered an infection for the Incubator)
  • Reagent knowledge – if you have previously tested this subject with Anti‑A/B/D reagents, the results will appear in the tooltip

Usage

Returning Blood to a Syringe

Use a filled Test Tube with an empty Syringe, or a Syringe containing compatible blood, to move the sample back into the Syringe. Donor/blood data is preserved and an infected tube infects the receiving Syringe. Incompatible blood is rejected.

Centrifuge

Place the filled Tube in a Centrifuge that has a valid recipe using "input": "bioforge:tube".
The centrifuge will process the tube and randomly produce either a Cell Pellet or a Plasma Sample, copying all blood data and infection to the output.

Incubator (Blood Duplication mode)

Place the filled Tube in the top slot of the Incubator, and empty Live Culture Vials in the bottom slots.
If the Tube contains a valid infection strain, the Incubator will duplicate that exact strain into all the Live Culture Vials, consuming the Tube.
(Note: a tube with only blood data and no infection will not start the process.)

Microscope

The Tube itself is not directly accepted by the Microscope because there is no entry for "bioforge:tube" in symptoms.json.
You must first process it in the Centrifuge and then insert the resulting Plasma Sample or Cell Pellet.

Viewing Data

Hover over the filled Tube in your inventory to see:

  • “Contains blood” (red text)
  • Source name (e.g. “Name: Dev”)
  • Blood type (e.g. “Blood type: B_POSITIVE”)
  • Reagent results (Anti‑A, Anti‑B, Anti‑D) if previously tested

The tooltip is generated by the same appendKnowledgeLines method used by the Blood Slide.


Tooltips

State Tooltip Lines
Empty “Empty tube” (grey) + usage hint
Filled (with reagent data) “Contains blood”, source, blood type, reagent results (Anti‑A/B/D)
Filled (no reagent data yet) “Contains blood”, source, blood type

Technical Notes

  • TubeItem extends Item and uses BloodSampleUtil for blood data storage and NbtObfuscator for infection storage.
  • The filling logic is in TubeItem.use() – it checks for a valid blood‑filled tool in the off‑hand and copies the data.
  • Unlike the Blood Slide, the Tube does not use ItemStack.of() incorrectly; it writes directly to the tube’s NBT via BloodSampleUtil.setData(tube, …).
  • The Incubator’s getStrainFromBloodItem() helper reads infection from the Tube using NbtObfuscator.readInfection() first, then falls back to readString().
  • The Centrifuge recipe for "bioforge:tube" is configured in data/bioforge/centrifuge/tube_to_sample.json with weighted random outputs.

Clone this wiki locally