forked from DArkHekRoMaNT/StoneQuarry
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCore.cs
More file actions
38 lines (31 loc) · 1.34 KB
/
Core.cs
File metadata and controls
38 lines (31 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using CommonLib.Config;
using Vintagestory.API.Client;
using Vintagestory.API.Common;
namespace StoneQuarry
{
public class Core : ModSystem
{
public static string ModId => "stonequarry";
public PlugPreviewManager? PlugPreviewManager { get; private set; }
public override void StartPre(ICoreAPI api)
{
var configs = api.ModLoader.GetModSystem<ConfigManager>();
var config = configs.GetConfig<Config>();
api.World.Config.SetInt($"SQ_RubbleStorageMaxSize", config.RubbleStorageMaxSize);
if (api is ICoreClientAPI capi)
{
PlugPreviewManager = new PlugPreviewManager(capi);
}
}
public override void Start(ICoreAPI api)
{
api.RegisterBlockClass("BlockStoneSlab", typeof(BlockStoneSlab));
api.RegisterBlockEntityClass("StoneSlab", typeof(BEStoneSlab));
api.RegisterBlockClass("BlockRubbleStorage", typeof(BlockRubbleStorage));
api.RegisterBlockEntityClass("RubbleStorage", typeof(BERubbleStorage));
api.RegisterBlockClass("BlockPlugAndFeather", typeof(BlockPlugAndFeather));
api.RegisterBlockEntityClass("PlugAndFeather", typeof(BEPlugAndFeather));
api.RegisterItemClass("ItemRubbleHammer", typeof(ItemRubbleHammer));
}
}
}