Main
Vintage Story Mods

Adding custom glass

To add your own glass type, you need to create a file assets/MODID/worldproperties/abstract/glasstype.json and write there:


{
	"code": "glasstype",
	"variants": [
		{
			"code": "CODE",
			"meltingPoint": TEMPERATURE
		}
	]
}

Where CODE is the glass codename and TEMPERATURE is a number, the melting point in Celsius. Example on github.

Note that this temperature is multiplied by 1.1 (i.e. +10%) for bubbling, so consider the smeltery maximum temperature when setting the melting temperature.

To add a glass name to a lang file, use the format MODID:glassblend-CODE, for example game:glassblend-plain. You do not need to add glass to the name (like Plain glass), just use Plain.

The glass texture should have the path assets/MODID/textures/block/glass/CODE.png.

Adding glass blend

In order for the glass above to be smelted in the smelter, create an item with the "glassmaking:glassblend" attribute:


"attributes": {
	"glassmaking:glassblend": {
		"code": "CODE",
		"amount": AMOUNT
	}
}

Where CODE is the glass codename and AMOUNT is the number of units that can be obtained by smelting this item. Example on github.

1000 units of glass are equivalent to one block by volume, keep this in mind.