CraftTweakerSavedData

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.world.CraftTweakerSavedData;

Description

Data that is saved and loaded with the world when it is saved and loaded from disk.

Saved Data is only on the server side, so you can only get it from a net.minecraft.server.level.ServerLevel.

Extends

CraftTweakerSavedData extends SavedData.

Members

Getter
script.zs
// CraftTweakerSavedData.data as IData
myCraftTweakerSavedData.data

Return Type: IData

Setter
script.zs
// CraftTweakerSavedData.data = (data as MapData);
myCraftTweakerSavedData.data = myMapData;

Parameters:

data Type: MapData
data() as IData
script.zs
// CraftTweakerSavedData.data() as IData;
myCraftTweakerSavedData.data();

Return Type: IData

data(data as MapData)
script.zs
// CraftTweakerSavedData.data(data as MapData);
myCraftTweakerSavedData.data(myMapData);

Parameters:

data Type: MapData
updateData(data as IData)
script.zs
// CraftTweakerSavedData.updateData(data as IData);
myCraftTweakerSavedData.updateData(myIData);

Parameters:

data Type: IData