Mods / Expanded Liquid Container Library

Draft
Set to published to be listed. A draft mod is still visible to everyone via direct link
Category: #Library #Storage
Author: Sean_OCuin
Side: Both
Created: Dec 20th 2022 at 7:36 PM
Last modified: Dec 20th 2022 at 7:36 PM
Downloads: 0
Follow Unfollow 5

Currently not publically available as it is in testing, if you would like a pre-release dll to test it with your mods please message me on discord @ Sean Quinn#7566

This is a library mod for modders, it will do nothing if installed by itself. Unless you are using a mod that uses this library you will have no need to download this.

This enables control over the spoil/cure speeds for both vanilla liquids and modded liquids. It should also enable you to assign any block you create in your mod as a liquid storage container!

To use this in your mod you need to set your containers json file to include the below.

class: "BlockLiquidContainerExpanded",
entityClass: "EntityLiquidContainerExpanded",


In order to set up your custom values you can add the below.

Spoiler!

 

attributes: {
        canDrinkFrom: true,
        vanillaPerishMult: 1,
        vanillaTransitionMult: 1,
        spoilSpeedMulByFoodCat: {
            "normal": {
                "vegetable": 1,
                "protein": 1,
                "grain": 1,
                "dairy": 1,
                "fruit": 1,
                "unknown": 1,
                "nonutrition": 1
            }
        },
        transitionSpeedMulByType: {
            "normal": {
                "vegetable": 1,
                "protein": 1,
                "grain": 1,
                "dairy": 1,
                "fruit": 1,
                "unknown": 1
                "nonutrition": 1
            }
        },
        liquidContainerProps: {
            capacityLitres: 30,
            transferSizeLitres: 1,
            emptyShapeLoc: "keg:block/wood/keg/empty",
            opaqueContentShapeLoc: "game:shapes/block/basic/nothing",
            liquidContentShapeLoc: "game:shapes/block/basic/nothing",
            liquidMaxYTranslate: 0.4375
        }
    },

 

 

The below code is an example of a working json file.

Spoiler!

 

{
	"code": "keg",
	class: "BlockLiquidContainerExpanded",
	entityClass: "EntityLiquidContainerExpanded",
    "shape": { base: "keg:block/wood/keg/empty" },
	textures: {
		oak1: { base: "oak1" },
		kegfacefront: { base: "kegfacefront" },
		kegfacerear: { base: "kegfacerear" }
	},
	"behaviors": [ {name: "UnstableFalling"} ],
	attributes: {
        canDrinkFrom: true,
        vanillaPerishMult: 1,
        vanillaTransitionMult: 1,
        spoilSpeedMulByFoodCat: {
            "normal": {
                "vegetable": 1,
                "protein": 1,
                "grain": 1,
                "dairy": 1,
                "fruit": 1,
                "unknown": 1,
                "nonutrition": 1
            }
        },
        transitionSpeedMulByType: {
            "normal": {
                "vegetable": 1,
                "protein": 1,
                "grain": 1,
                "dairy": 1,
                "fruit": 1,
                "unknown": 1
                "nonutrition": 1
            }
        },
        liquidContainerProps: {
            capacityLitres: 30,
            transferSizeLitres: 1,
            emptyShapeLoc: "keg:block/wood/keg/empty",
            opaqueContentShapeLoc: "game:shapes/block/basic/nothing",
            liquidContentShapeLoc: "game:shapes/block/basic/nothing",
            liquidMaxYTranslate: 0.4375
        }
    },
	"creativeinventory": { "general": ["*"], "decorative": ["*"] },
	"blockmaterial": "Wood",
	"replaceable": 900,
	"resistance": 1.5,
	"lightAbsorption": 1,
	"maxStackSize": 1,
	sounds: {
		"place": "game:block/planks",
		"hit": "game:block/planks",
		"break": "game:block/planks",
		"walk": "game:walk/wood"
	},
	"sidesolid": {
		"all": false
	},
	"sideopaque": {
		"all": false
	},
	"emitsideao": {
		"all": false
	},
	heldTpIdleAnimation: "holdbothhandslarge", heldTpUseAnimation: "twohandplaceblock",
	collisionbox: {
		x1: 0, y1: 0, z1: 0,
		x2: 1, y2: 0.9375, z2: 1
	},
	selectionbox: {
		x1: 0, y1: 0, z1: 0, 
		x2: 1, y2: 0.9375, z2: 1
	},
		tpHandTransform: {
		translation: { x: -0.9, y: -1.4, z: -0.5 },
		rotation: { x: 137, y: -11, z: -75 },
		origin: { x: 0.2, y: 0.5, z: 0.5 },
		scale: 0.5899
	},
		fpHandTransform: {
		translation: { x: -0.4, y: 1.05, z: 0.9 },
		rotation: { x: 0, y: -134, z: 0 },
		scale: 2.01
	}
}

Version For Game version Downloads Release date Changelog Download 1-click mod install*
No releases found

0 Comments (oldest first | newest first)

(edit comment delete)