de.pewpewproject.lasertag.resource.ResourceManagers   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 2 1
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