promotional bannermobile promotional banner
premium banner
Protects structures from fire, mining, and explosions for a time

Description

 

Once upon a time, I spent 5 hours customizing a Woodland Mansion for my friends...

 

They showed up and as we finished preparing and planning we saw fire thru the windows...

 

A lightning bolt had struck the back of it and every bit except the wall facing us burned the ground.

 

This was the reason for this mod.

Structure Control Utility

New in Version 3 for Minecraft 1.20.1 and 1.20.2 (will be moved to other versions 1.20.5, 1.21.0, 1.19.2) next)

Structure Immunities:

By default certain structures (Like Mineshafts) are immune to fire, digging, and explosions.   Others can be configured but are not protected by default (mineshafts and villages for example)

The structure control mod makes structures immune to: 

* Burning for a certain number of minutes (from 0 minutes to essentially forever with a default of 6 hours).   This feature will destroy lava placed inside a structure protected from fire.

* Digging for a certain number of minutes (from 0 minutes to essentially forever with a default of 6 hours)..

* Explosions for a certain number of minutes (from 0 minutes to essentially forever with a default of 6 hours)..

This means players have to play thru the structures as designed until the structures are older and

that random lightning won't burn down wooden structures until they are older.

Most "soft blocks" can be broken (paintings, sand, dirt, carpet, plants, etc) but wood, glass, stone can't be broken, burned, or exploded.   Future support is planned for these blocks to be configurable.  For now, if I missed an obvious soft block, let me know and I'll try to put it in right away.

Effects:
By default, unprotected structures have no effects.
By default, protectected structures have weak Gloom (or Darkness):
The Server Operator or Modpack Designer can add effects to structures at strength 1 to 9.

Available Potion Effects for Players inside Structures

    Jump Boost,

    Movement Slowness,

    Regeneration,

    Slow Falling,

    Water Breathing

    Weakness

   Darkness (Server Only) or "Gloom" (Client / Server)

These effects can independently set from strength 0 (off) to strength 9.  The "Gloom" is a configurable mild atmospheric effect that does not "pulse" and does not blind the player like Darkness.  

Your suggestions are welcome!

Structures Report and Configuration File

There is a report of all registered structures ( for modpack design) to let you easily know all structures in your modpack.  The mod prints it every time it starts.

If you rename it from "structures.rpt" to "structures.csv" it becomes a configuration file and the mod will read it and replace the default values with the values you configured.

Example:

line, structure, potioneffects, potion minutes, fireproof minutes, mining immunity, explosion proof, fatigue

1, minecraft:ancient_city, Effects:0000001, 10080, 10080, 720, 720, 1000, 1
2, minecraft:bastion_remnant, Effects:0000001, 10080, 10080, 720, 720, 1000, 1
3, minecraft:buried_treasure, Effects:0000001, 10080, 10080, 720, 720, 1000, 1
4, minecraft:desert_pyramid, Effects:0000001, 10080, 10080, 720, 720, 1000, 1
5, minecraft:end_city, Effects:000000, 100801, 10080, 720, 720, 1000, 1
6, minecraft:fortress, Effects:000000, 100801, 10080, 720, 720, 1000, 1
...., 

25, minecraft:village_plains, Effects:0000000, 10080, 0, 0, 0, 0, 0, 0, 0
26, minecraft:village_desert, Effects:0000000, 10080, 0, 0, 0, 0, 0, 0, 0
27, minecraft:swamp_hut, Effects:0000001, 10080, 0, 0, 0, 0, 1000, 1
28, minecraft:trail_ruins, Effects:0000001, 10080, 0, 0, 0, 0, 0, 0, 0

Note the defaults are:  
Effects are level 0 (off) but if set to 1 would last 10080 minutes (a real week).
Structures 1-6 are immune to fire for a real week (10080 minutes).
Structures 1-6 are immune to mining for 8 real hours(720 minutes).
Structures 1-6 are immune to explosions for 8 real hours (10080 minutes).
Structures 1-6 cause mining fatigue 1000 minutes at power 1 (of 1 to 5)
These can be set to 2 billion minutes (61 real years).

Structures 25,26, and 29 have no effects, no protections, and no mining fatigue

The main configuration file, "structurecontrolutility-common.toml" has default values that will populate the report.

["Structure Control Utility Values"]

    #If true, server Only (no client, use Minecraft Darkness effect).  If false, ( server+client, use Gloom effect
    onlyServerMode = false

    #Debug Level: 0 = Off, 1 = Log, 2 = Chat+Log
    #Range: 0 ~ 2
    debugLevel = 0
    #Minutes before structure potion effects end.
    #Range: > 0
    structureEffectsMinutes = 10080
    #Default minutes before structures can burn
    #Range: > 0
    "stopFireMinutes " = 10080
    #Default minutes before entities can break blocks
    #Range: > 0
    stopBreakMinutes = 720
    #Default minutes before explosions can break blocks
    #Range: > 0
    stopExplosionMinutes = 720

 
["Structure Control Utility"."Gloom color and transparency settings"."  Default is dark blue black haze"]
#Gloom fog RED component as a percentage (0–100%).
#Range: 0 ~ 100
gloomRed = 2
#Gloom fog GREEN component as a percentage (0–100%).
#Range: 0 ~ 100
gloomGreen = 3
#Gloom fog BLUE component as a percentage (0–100%).
#Range: 0 ~ 100
gloomBlue = 5
#Gloom fog ALPHA/opacity component as a percentage (70–95%).
#Range: 70 ~ 95
gloomAlpha = 91  (note: This has no effect in 1.21.5 and earlier)

So try it, use it, send in your ideas!

Commands
Commands for Modpack developers and Server Operators

/setDebugLevel [0-2]
0 = off
1 = normal
2 = verbose

/Info
Tells you if you are in a structure, and the durations of any immunities and effects remaining.