register()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package de.pewpewproject.lasertag.resource;
2
3
import de.pewpewproject.lasertag.LasertagMod;
4
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
5
import net.minecraft.resource.ResourceType;
6
7
/**
8
 * Class for registering all resource managers
9
 *
10
 * @author Étienne Muser
11
 */
12
public class ResourceManagers {
13
    public static final StructureResourceManager STRUCTURE_RESOURCE_MANAGER = new StructureResourceManager();
14
15
    public static final WebResourceManager WEB_RESOURCE_MANAGER = new WebResourceManager();
16
17
    static {
18
        try {
19
            STRUCTURE_RESOURCE_MANAGER.reload();
20
        } catch (Exception ex) {
21
            LasertagMod.LOGGER.error("Could not load arena structure resources:", ex);
22
        }
23
    }
24
25
    public static void register() {
26
        ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(WEB_RESOURCE_MANAGER);
27
    }
28
}
29