Description
Radioactive is a highly configurable unified radiation system which allows all mods and datapacks in a modpack or on a server to use the same system of radiation.
Features:
- Inventory radiation
- Items in a player's inventory can irradiate them
- Proximity radiation
- Items in a player's inventory can irradiate others, in a configurable radius.
- Entity radiation
- Entities near players can irradiate them
- Block radiation
- Blocks placed in the world can irradiate players within 16 blocks (or more with V3)
- Biome radiation
- Biomes can irradiate entities in them
- Contact/Weapon radiation
- Weapons can instantly irradiate a player when hit (V1 only)
- DamageSource-based radiation
- A DamageSource can be tagged as radiation, and irradiate instead of damage to allow anytime irradiation
- It can also be tagged to remove radiation.
- Radiation protection
- Armor can protect players from radiation
- Radiation detectors and counters
- Items can detect or count the received and incoming radiation for a player
- Config
- Each type of radiation can be disabled
- Default ranges can be modified
- Many options for radiation resistance and application
- Configurable client experience
Effects
Effects are shown with config 'Radiation Effects Scaling' = 100 and 'Radiation Sickness Scaling' = 1.5
- RAD ≥ 100:
- Weakness, level = RAD/100
- RAD ≥ 150:
- Mining Fatigue, level RAD/100
- Slowness, level RAD/100
- RAD ≥ 250
- Nausea.
- RAD ≥ 300
- Radiation Sickness, level RAD/100 - 2
- RAD ≥ 800
- Blindness.
- RAD ≥ 1000
- Instant death.
Radiation Sickness is like Wither, but slow. Each level => 1.5x damage speed, level 1 => 1 damage per 5 seconds.
How to use it:
Old Radiation System
This section requires the config option 'Use Old Radiation System' = true to work.
All values of X and Y must be positive integers (whole numbers above or equal to 0)
Radiation Types
Inventory Radiation
Tag an item as 'forge:radioactive'
Tag it with as many tags of the form 'forge:radioactive_X' where 0 < X ≤ 1000 as needed to sum to the value you want
Done!
Proximity Radiation [old]
Tag an item as 'forge:proximity_radioactive'
Tag it with as many tags of the form 'forge:proximity_radioactive_X' where 0 < X ≤ 1000 as needed to sum to the value you want
To give the range, tag it with as many tags of the form 'forge:proximity_range_Y' where 0 < Y ≤ 100
Done!
Entity Radiation [old]
Tag an entity as 'forge:entity_radioactive'
Tag it with as many tags of the form 'forge:entity_radioactive_X' where 0 < X ≤ 1000 as needed to sum to the value you want
Done!
Block Radiation [old]
Tag a block as 'forge:block_radioactive'
Tag it with as many tags of the form 'forge:block_radioactive_X' where 0 < X ≤ 1000 as needed to sum to the value you want
Done!
Weapon Radiation [old]
Tag an item as 'forge:weapon_radioactive'
Tag it with as many tags of the form 'forge:weapon_radioactive_X' where 0 < X ≤ 1000 as needed to sum to the value you want
Done!
Utility and Protection
Radiation Protection
Tag an armor item as 'forge:radiation_protect'
Tag it with as many tags of the form 'forge:radiation_protect_X' where 0 < X ≤ 100 as needed to sum to the value you want. Protection is a % multiplier, so forge:radiation_protect_25 means 25% reduction.
Done!
Radiation Detection
Tag an item as 'forge:radiation_detectors'
That's it. Done.
Radiation Counting
Tag an item as 'forge:radiation_counters'
That's it. Done.
The New Radiation System
Before 2.0.0, radiation only applied to players. The 'old' radiation types retain this behavior, but the newer DamageSource-based types do not. This is changed by the 'Use Old Radiation System' config option, or changed in isolation by the 'Irradiate Only Players' config option.
DamageSource Types
Tag a damage source as 'forge:radiation_damage' for irradiation damage
Tag a damage source as 'forge:radiation_remove_damage' for removal of radiation (decontamination damage)
Apply damage from this source whenever you want to irradiate or remove radiation - the amount of damage will become the amount given/removed.
This damage will not be dealt as actual damage (unless the config options to enable these types are disabled).
From version 2.0.0, these are the default way to give radiation, to reduce lag. You (or server owners) will need to set the config option 'Use Old Radiation System' to true to use the other types.
NBT Tags
These are used only if both 'Irradiate Only Players' AND 'Use Old Radiation System' are false.
'radiation'
- Number (Double)
- Current radiation amount received
'rad_resistance'
- Number (Technically Double, but could be a Float or even Byte)
- Current Radiation Resistance
Tooltips
Any item using either the 'old' radiation system or V3 will show extra lines in its tooltip, detailing its radioactivity.
If you are using the new system, without V3, make sure to add this information yourself, as this is no longer done automatically.
The tooltips for radiation resistance, detectors and counters will still show with the new system, unless disabled.
How to apply damage?
In Java (for mods):
<entity>.hurt(new DamageSource(world.registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation("<damage_type_id>")))), <amount>);
where <entity> holds the entity to be hurt, <amount> is a number and <damage_type_id> is the registry name of the damage type.
In MCreator:
This block:

Remember to select the right damage source.
Version 3
Requires "Use V3 Radiation" to be set to true. This is enabled by default.
This section is focused on modpack creators, or those with mods to change configs.
The Version 3 (or V3) system uses the mod's configuration file to determine a set of radioactivity properties, much like the old system, but much more efficiently (at the cost of integration withing the mod's files themselves).
To use this, just add the relevant id (Use F3+H in-game to show ids) to the list of the property you wish to give the item or block. Further details and examples are given within the comments of the actual config file, under <game directory>/config/radioactive.toml.
Information
There will be no backporting beyond 1.20.1, and versions below v3 will not be proted to 1.21.1.
Fabric, Quilt, Rift etc will not be supported.
Made with MCreator's graphical interface, with some custom code in procedures.
