Skip to content

Advanced Modification

nonamecrackers2 edited this page May 11, 2024 · 4 revisions

This page documents features in CWSM that can be utilized or modified using resource packs/data packs. A general understanding of JSON syntax and data/resource pack formatting is a must before diving into this documentation.

Please check out the official Minecraft wiki pages for resource packs or data packs if you're needing more information

Examples are included in each subsection below if you wish to have an example to work off of.

Color Modification

As of 3.3/4.0, you can use a JSON file to modify color RGB values for certain aspects of the Wither Storm, that aren't modifiable via textures directly. This documentation and examples have been updated for 3.4/4.1

Examples

Prerequisites

  • Be familiar with how to create your own resource pack
  • Have a basic understanding of JSON syntax/formatting

The colors.json file

Format Version: 2

Begin by creating a new JSON file called colors.json, located in assets/witherstormmod/config in your resource pack. Here you can begin specifying color RGB values for the various config options. Everything is optional and not required to be present. If it's not present, it will use the default color built in the mod.

Make sure to include format_version and set it to 2.

All color values are stored in a JSON object, with red, green, and blue integer values, ranging from 0 to 255. Some values accept alpha, which also ranges from 0 to 255. The only config that accepts this is night_shine.

NOTE: Make sure to begin the file with { and end it with }, and include everything you add in between those two brackets

A base file looks like this:

//The root JSON object.
{
	"format_version": 2, //The format version
	...
	"night": { //Optional (unless if day is defined), for sky colors at night
		...
	},
	"day": { //Optional (unless if night is defined), for sky colors at day
		...
	}
	"by_phase": //The by_phase object, which can include color options for each phase
	{
		"5": {
			...
		},
		"6": {
			...
		},
		...
	}
}

Bowels Fog

  • Must be in the root JSON object

bowels_fog: The color of the fog found in the bowels dimension. E.x. Make it completely green:

"bowels_fog":
{
    "red": 0,
    "green": 255,
    "blue": 0
}

By Phase [Optional]

  • Must be in the root JSON object

by_phase: You can include a JSON object called by_phase which contains more JSON objects (titled the number of a Wither Storm phase) each containing color values. This can be used to specify tractor beam colors, night glare, sky colors, etc. for each specific phase of the Wither Storm. E.x:

"by_phase":
{
    "4":
    {
        "night_shine":
        {
            "red": 60,
            "green": 50,
            "blue": 10,
            "alpha": 255
        }
    },
    "5": 
    {
        "tractor_beams": 
        {
            "red": 100,
            "green": 100,
            "blue": 100
        },
        "tractor_beams_night": 
        {
            "red": 0,
            "green": 0,
            "blue": 200
        }
    }
}

Tractor Beams

  • Must be in the root JSON object or in a phase object in by_phase

tractor_beams: The tractor beam colors. E.x: Make the tractor beams completely red:

"tractor_beams":
{
    "red": 255,
    "green": 0,
    "blue": 0
}

tractor_beams_night: The color of the tractor beams at night. If this is not specified, the color will be the color specified by tractor_beams. E.x: Make the tractor beams completely green at night:

"tractor_beams_night":
{
    "red": 0,
    "green": 255,
    "blue": 0
}

Night Shine/Glare

  • Must be in the root JSON object or in a phase object in by_phase

night_shine: The color of the shine that glows behind the Wither Storm at night. E.x: Makes the shine completely white:

"night_shine":
{
    "red": 255,
    "green": 255,
    "blue": 255,
    "alpha": 75
}

Sky Darken Colors

  • Must be in the root JSON object or in a phase object in by_phase

Modifies the color of the sky, clouds, and fog during phases where the Wither Storm darkens the sky.

(Optional) Day/Night

You can include the JSON objects day and night (you must include both, not just one), which can include colors (as defined below) for, as their name suggests, day and night time. These day and night objects must be in the root object or in a by_phase phase object.

Specifying the colors

In either the root, a by_phase phase object, or the day/night object, you can specifying objects such as sky_darken, sky_darken_clouds, and/or sky_darken_fog, each with a red, green, and blue 0-255 integer value.

  • sky_darken modifies the color of the sky
  • sky_darken_clouds modifies the color of the clouds
  • sky_darken_fog modifies the color of the world fog

Example

"by_phase": 
{
	"5": 
	{
		"day":
		{
			"sky_darken_fog":
			{
				"red": 255,
				"green": 69,
				"blue": 62
			}
		},
		"night":
		{
			"sky_darken_clouds":
			{
				"red": 0,
				"green": 0,
				"blue": 255
			},
			"sky_darken_fog":
			{
				"red": 133,
				"green": 69,
				"blue": 62
			}
		}
	},
	"6": 
	{
		"sky_darken":
		{
			"red": 16,
			"green": 199,
			"blue": 56
		},
		"sky_darken_clouds":
		{
			"red": 28,
			"green": 10,
			"blue": 27
		},
		"sky_darken_fog":
		{
			"red": 107,
			"green": 222,
			"blue": 237
		}
	},
	"7": 
	{
		"day":
		{
			"sky_darken":
			{
				"red": 96,
				"green": 0,
				"blue": 156
			},
			"sky_darken_clouds":
			{
				"red": 28,
				"green": 10,
				"blue": 27
			},
			"sky_darken_fog":
			{
				"red": 255,
				"green": 41,
				"blue": 234
			}
		},
		"night":
		{
			"sky_darken":
			{
				"red": 16,
				"green": 199,
				"blue": 56
			},
			"sky_darken_clouds":
			{
				"red": 28,
				"green": 10,
				"blue": 27
			},
			"sky_darken_fog":
			{
				"red": 107,
				"green": 222,
				"blue": 237
			}
		}
	}
}

Per-Phase Textures

As of 3.4/4.1, you can use a JSON file to change individual textures for the Wither Storm on a per-phase basis.

Examples

Prerequisites

  • Be familiar with how to create your own resource pack
  • Have a basic understanding of JSON syntax/formatting

The textures.json file

Format Version: 1

Begin by creating a new JSON file called textures.json, located in assets/witherstormmod/config in your resource pack. Populate it with the root JSON object, AKA starting and closing curly braces { }.

Make sure to include format_version, set to 1.

In this file, create as many extra JSON objects for each phase you want to modify textures for. For example, make a new JSON object named 5 if you'd like to change the textures for phase 5. Any phases you do not include will use the default textures provided by the mod for that phase.

A base file looks like this:

//The root JSON object.
{
	"format_version": 1, //The format version
	"5": { //Each phase you want to modify textures for
		... //Textures
	},
	"6": {
		...
	},
	...
}

Now, create the directory assets/<namespace>/textures/entity/wither_storm. Replace <namespace> with a name of your choice, preferably the name of your resource pack, in all lower case, and spaces replaced with underscores.

Note: The namespace cannot contain any special, capital, or whitespace characters. A valid example would be "super_awesome_pack".

In this directory, move or copy and paste the image files you'd like to use into the folder. You can create sub-folders titled the name of the phase you'd like to replace (for example, five, or six) and have your images in those folders. Alternatively, you can also prefix each image file for each phase to distinguish the files. The name or location of your images does not overly matter, just make sure the directory path and name is valid.

Note: Images must .png files

Back in the textures.json file, you can now start specifying textures. To reference a texture here, you must use this format for the image path: <namespace>:textures/entity/wither_storm/<image>.png, where <namespace> is replaced with your namespace and <image> is replaced with the name of your image (or the path to it, if its in a sub-folder).

In each JSON object named with a phase number, include as many of the following texture overrides:

Modifiable textures:

  • invulnerable: The texture used when the Wither Storm is in its invulnerable count down state
  • main: This is the main texture used by the Wither Storm
  • emissive_decal: The texture used to make certain parts of the Wither Storm glow
  • debris_ring: The debris rings that orbit the Wither Storm

Note: You do not need to include all texture overrides.

Note: Things such as color of the eyes for the Wither Storm's heads, debris particles, etc. are in the main texture.

Here's an example file:

{
    "format_version": 1,
    "5": 
    {
        "main": "test:textures/entity/wither_storm/main.png",
        "emissive_decal": "test:textures/entity/wither_storm/emissive.png",
        "debris_ring": "test:textures/entity/wither_storm/debris.png"
    },
    "6":
    {
        "debris_ring": "test:textures/entity/wither_storm/debris.png",
        "main": "test:textures/entity/wither_storm/main.png",
        "emissive_decal": "test:textures/entity/wither_storm/emissive.png"
    }
}

Custom Block Tainting Conversions

As of 3.4/4.1, you can use data packs to add custom conversions between blocks, such as a normal to tainted block variant. This will make your tainted blocks (or any other kind of block, does not matter) compatible with the /witherstormmod convert command, and in any future use cases block tainting may be used for.

Prerequisites

  • Be familiar with how to create your own data pack
  • Have a basic understanding of JSON syntax/formatting

Begin by creating the following directory: data/<namespace>/tainting/block. Replace <namespace> with a name of your choice, preferably the name of your data pack, in all lower case, and spaces replaced with underscores. If you're wanting to modify existing conversions added by the mod, use the witherstormmod namespace.

Note: The namespace cannot contain any special, capital, or whitespace characters. A valid example would be "super_awesome_pack".

In this directory, create a new JSON file, preferably named with the block that you're wanting to be converted (e.x. amethyst_tainting.json). If you're wanting to modify existing conversions added by the mod, use the file name of the conversion you want to replace.

Note: While your JSON files here can be named whatever, the file name cannot contain any special, capital, or whitespace characters. A valid example would be "super_awesome_file".

Populate this newly created JSON file with starting and closing curly braces { }. You can then include the following information:

Parameters

  • block: This is the block that should be converted. This can be either a single block id, such as minecraft:dirt; or a tag, like #minecraft:example.

  • replacement: A block state, which will replace the block specified. Example:

      "replacement": 
      {
      	"Name": "witherstormmod:tainted_sandstone_stairs",
      	"Properties": {
      		"facing": "north",
      		"half": "bottom",
      		"shape": "straight",
      		"waterlogged": "false"
      	}
      }
    
  • properties_to_copy: An array of block state properties that should be copied over from the original block to the converted one. This can be used to retain block orientation when converting. Example:

      "properties_to_copy": [
      	"facing",
      	"half",
      	"shape",
      	"waterlogged"
      ]
    
  • potion_effect [Optional]: If a potion specified by this value comes into contact with the specified block, it will convert it to its tainted form. Used by potions of decay to convert pumpkins into tainted pumpkins. Example: minecraft:wither.

Examples

red_sandstone_stairs_tainting.json:

{
  "block": "minecraft:red_sandstone_stairs",
  "properties_to_copy": [
    "facing",
    "half",
    "shape",
    "waterlogged"
  ],
  "replacement": {
    "Name": "witherstormmod:tainted_sandstone_stairs",
    "Properties": {
      "facing": "north",
      "half": "bottom",
      "shape": "straight",
      "waterlogged": "false"
    }
  }
}

Custom Sickened Mob Conversions

As of 3.4/4.1, you can use data packs to add custom conversions between mobs, such as a normal to sickened variant. Using this feature allows mobs, when infected by wither sickness or killed by another sickened mob, convert to its conversion specified.

Prerequisites

  • Be familiar with how to create your own data pack
  • Have a basic understanding of JSON syntax/formatting

Begin by creating the following directory: data/<namespace>/tainting/entity. Replace <namespace> with a name of your choice, preferably the name of your data pack, in all lower case, and spaces replaced with underscores. If you're wanting to modify existing conversions added by the mod, use the witherstormmod namespace.

Note: The namespace cannot contain any special, capital, or whitespace characters. A valid example would be "super_awesome_pack".

In this directory, create a new JSON file, preferably named with the mob that you're wanting to be converted (e.x. bee_to_sickened_bee.json). If you're wanting to modify existing conversions added by the mod, use the file name of the conversion you want to replace.

Note: While your JSON files here can be named whatever, the file name cannot contain any special, capital, or whitespace characters. A valid example would be "super_awesome_file".

Note: You cannot specify multiple conversions for the same mob.

Populate this newly created JSON file with starting and closing curly braces { }. You can then include the following information:

Parameters

  • from: The id of a mob that should be converted. Example, minecraft:bee
  • to: The id of the converted mob. Example, witherstormmod:sickened_bee
  • convert_from_sickness: If false, this conversion cannot take place from dying to wither sickness.

Examples

bee_to_sickened_bee.json:

{
  "convert_from_sickness": true,
  "from": "minecraft:bee",
  "to": "witherstormmod:sickened_bee"
}