mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
register and/or locator templates
This commit is contained in:
+5
@@ -1,6 +1,8 @@
|
|||||||
package com.dfsek.terra.addons.feature.locator;
|
package com.dfsek.terra.addons.feature.locator;
|
||||||
|
|
||||||
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||||
|
import com.dfsek.terra.addons.feature.locator.config.AndLocatorTemplate;
|
||||||
|
import com.dfsek.terra.addons.feature.locator.config.OrLocatorTemplate;
|
||||||
import com.dfsek.terra.addons.feature.locator.config.PatternLocatorTemplate;
|
import com.dfsek.terra.addons.feature.locator.config.PatternLocatorTemplate;
|
||||||
import com.dfsek.terra.addons.feature.locator.config.RandomLocatorTemplate;
|
import com.dfsek.terra.addons.feature.locator.config.RandomLocatorTemplate;
|
||||||
import com.dfsek.terra.addons.feature.locator.config.SurfaceLocatorTemplate;
|
import com.dfsek.terra.addons.feature.locator.config.SurfaceLocatorTemplate;
|
||||||
@@ -46,6 +48,9 @@ public class LocatorAddon extends TerraAddon {
|
|||||||
locatorRegistry.register("SURFACE", () -> new SurfaceLocatorTemplate(main));
|
locatorRegistry.register("SURFACE", () -> new SurfaceLocatorTemplate(main));
|
||||||
locatorRegistry.register("RANDOM", RandomLocatorTemplate::new);
|
locatorRegistry.register("RANDOM", RandomLocatorTemplate::new);
|
||||||
locatorRegistry.register("PATTERN", PatternLocatorTemplate::new);
|
locatorRegistry.register("PATTERN", PatternLocatorTemplate::new);
|
||||||
|
|
||||||
|
locatorRegistry.register("AND", AndLocatorTemplate::new);
|
||||||
|
locatorRegistry.register("OR", OrLocatorTemplate::new);
|
||||||
})
|
})
|
||||||
.then(event -> {
|
.then(event -> {
|
||||||
CheckedRegistry<Supplier<ObjectTemplate<Pattern>>> patternRegistry = event.getPack().getOrCreateRegistry(PATTERN_TOKEN);
|
CheckedRegistry<Supplier<ObjectTemplate<Pattern>>> patternRegistry = event.getPack().getOrCreateRegistry(PATTERN_TOKEN);
|
||||||
|
|||||||
Reference in New Issue
Block a user