mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
create SingleBlockMatchPatternTemplate
This commit is contained in:
parent
db93c9e2e9
commit
abfd050acb
@ -0,0 +1,22 @@
|
|||||||
|
package com.dfsek.terra.addons.feature.locator.config.pattern;
|
||||||
|
|
||||||
|
import com.dfsek.tectonic.annotations.Value;
|
||||||
|
import com.dfsek.tectonic.loading.object.ObjectTemplate;
|
||||||
|
import com.dfsek.terra.addons.feature.locator.patterns.Pattern;
|
||||||
|
import com.dfsek.terra.addons.feature.locator.patterns.match.MatchPattern;
|
||||||
|
import com.dfsek.terra.api.block.state.BlockState;
|
||||||
|
import com.dfsek.terra.api.util.Range;
|
||||||
|
|
||||||
|
public class SingleBlockMatchPatternTemplate implements ObjectTemplate<Pattern> {
|
||||||
|
@Value("block")
|
||||||
|
private BlockState block;
|
||||||
|
|
||||||
|
@Value("offset")
|
||||||
|
private Range offset;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Pattern get() {
|
||||||
|
return new MatchPattern(offset, block::matches);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user