Skip to content

Commit

Permalink
make matchTiles work the way it's supposed to
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuclearfarts authored and Nuclearfarts committed May 9, 2020
1 parent 1fc61e2 commit fa21be3
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ classes/
bin/
.classpath
.project

*.launch
# fabric

run/
16 changes: 0 additions & 16 deletions connected-block-textures_client.launch

This file was deleted.

16 changes: 0 additions & 16 deletions connected-block-textures_server.launch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public abstract class BaseCTMConfig<Self extends BaseCTMConfig<Self>> implements

public BaseCTMConfig(Properties properties, Identifier location, ResourceManager manager, SpriteProviderFactory<Self> bakedModelFactory, String packName) throws IOException {
if(properties.containsKey("matchTiles")) {
tileMatcher = Arrays.stream(properties.getProperty("matchTiles").split(" ")).map(Identifier::new).collect(Collectors.toCollection(HashSet::new))::contains;
tileMatcher = Arrays.stream(properties.getProperty("matchTiles").split(" ")).map(s -> CBTUtil.prependId(new Identifier(s), "block/")).collect(Collectors.toCollection(HashSet::new))::contains;
} else {
tileMatcher = null;
}

if(properties.containsKey("matchBlocks")) {
blockMatcher = Arrays.stream(properties.getProperty("matchBlocks").split(" ")).map(ModelIdentifier::new).map(CBTUtil::stripBlankVariants).collect(Collectors.toCollection(HashSet::new))::contains;
blockMatcher = Arrays.stream(properties.getProperty("matchBlocks").split(" ")).map(Identifier::new).collect(Collectors.toCollection(HashSet::new))::contains;
} else {
blockMatcher = Predicates.alwaysTrue();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
matchTiles=block/red_sandstone
matchTiles=red_sandstone
connect=tile
method=top
faces=sides
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
matchTiles=block/sandstone
matchTiles=sandstone
connect=tile
method=top
faces=sides
Expand Down

0 comments on commit fa21be3

Please sign in to comment.