MCPcopy Create free account
hub / github.com/Garten/sourcecraft / MaterialWallFilter

Class MaterialWallFilter

src/source/MaterialWallFilter.java:7–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import vmfWriter.Orientation;
6
7public class MaterialWallFilter implements MaterialFilter {
8
9 private AddableManager manager;
10 private Orientation orientation;
11
12 public MaterialWallFilter(AddableManager manager, Orientation orientation) {
13 this.manager = manager;
14 this.orientation = orientation;
15 }
16
17 @Override
18 public boolean filter(int material) {
19 Addable addable = this.manager.getAddable(material);
20 if (addable != null) {
21 return this.manager.getAddable(material)
22 .hasWall(this.orientation);
23 } else {
24 return false;
25 }
26 }
27}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected