-
Notifications
You must be signed in to change notification settings - Fork 0
Infested Crop
#BioForge #BioForge_V2_0 #Build_V0_54T #Block #LegacyUpdated
#Blocks Infected crops are regular vanilla or mod crops (wheat, carrots, potatoes, etc.) that have been contaminated with a pathogen strain. The infection affects the crop's drops - infected crops have a chance to drop contaminated items that can spread the infection when eaten or planted.
| Method | Description |
|---|---|
| Contaminated Substrate | Right‑click an inoculated Contaminated Substrate on a mature crop. The substrate is consumed, and the crop becomes infected. |
| Placing infected seeds | If you plant a seed that has a pathogen strain in its NBT (e.g., from an infected drop), the planted crop starts infected. |
| Natural spread | Infected mature crops can spread the infection to adjacent mature crops (randomly, based on random tick speed). |
- Only crops in the
bioforge:infectable_cropsblock tag can be infected. This tag includes vanilla crops and any mod crops you add. - A crop must be mature (its
ageproperty at maximum) to spread infection.
-
Drops - When you break an infected crop, the event is cancelled and custom drops are generated.
- The original crop drops (e.g., wheat, seeds) are calculated via
Block.getDrops(). - Each drop has a chance to become contaminated based on the crop's
InfectionStrength(a value between 0 and 1). - If the drop is contaminated, its NBT receives the strain data (without the colony ID - the
stripColonyIdmethod removes the colony UUID part, leaving only pathogen type, transmission types, and symptom values). - If the infection strength is low (≤0.0) or random chance fails, the drop is clean.
- The crop block is replaced with air.
- The original crop drops (e.g., wheat, seeds) are calculated via
-
Eating contaminated food - If you eat a food item that has a strain NBT and that strain includes
FOOD_BORNEtransmission type, you become infected with that pathogen (symptoms applied). -
Planting infected seeds - If you plant a seed that has a strain NBT, the newly placed crop block is immediately infected with that strain (via the
CropInfectioncapability on the chunk).
- Every 20 ticks (1 second) on the server, the spread handler runs.
- For each loaded chunk, it checks all infected crop positions.
- For each infected mature crop, it attempts up to 3 times to spread to a random neighbouring crop (same Y level, within 1 block horizontally).
- The chance per attempt is
(randomTickSpeed * 2) / 4096(scales with the game rulerandomTickSpeed). - If the neighbour is a mature, infectable crop and not already infected, it becomes infected with the same strain.
- There is no visual difference in the crop model - you cannot see that a crop is infected.
- You can use a Swab on the crop (right‑click while holding a clean swab) to sample the infection. If the crop is infected, the swab becomes contaminated with the strain, and you get a message: “Swab contaminated with infected crop strain.”
- Alternatively, you can break the crop and look at the drops - contaminated drops will have obfuscated NBT.
-
bioforge:infectable_crops- block tag. Add any crop block that can be infected. - The crop must have an
ageproperty (integer) to determine maturity. The handler finds the first property named “age” and assumes the max value is the mature stage.
BioForge V2.0
Catalogues
- Item Catalogue
- Block and Machine Catalogue
- Mechanics Index
- Mutation Catalogue
- Symptom Catalogue
- Transmission Catalogue
- Command Catalogue
Research
- Research Tablet Progression
- CRISPR Programming
- Vaccine Maker Pages and Inventory
- Vaccines and Immunity
- Containment and PPE
Customization
- Modpack Maker Guide
- Addon Developer Guide
- BioForge addon creation guide
- Localization and Translation
Project