Skip to content

Commit

Permalink
Unimportant changes (readability)
Browse files Browse the repository at this point in the history
  • Loading branch information
XSoussou committed Dec 3, 2020
1 parent 4534333 commit b2f0649
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/main/java/me/soussou/chopchop/ChopChopConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public class ChopChopConfig {
public static final Set<Material> AXES_MATERIALS = VersionUtil.getCompatibleAxesMaterials();
public static final Map<Material, Set<Material>> MUSHROOMS_MATERIALS = VersionUtil.getCompatibleMushroomsMaterials();

// Contains the max distances per tree type (ACACIA, BIRCH, DARK_OAK, JUNGLE, OAK, SPRUCE, MUSHROOM, CRIMSON, WARPED)
/*
* Contains the max distances per tree type (ACACIA, BIRCH, DARK_OAK, JUNGLE, OAK, SPRUCE, MUSHROOM, CRIMSON, WARPED)
*/
private static final double[] BRANCH_MAX_DISTANCES = {4, 1, 3, 5, 7, 1, 1, 3, 3};
private static final double[] LEAF_MAX_DISTANCES = {3, 3, 3, 5, 3, 3, 3, 5, 5};

Expand All @@ -70,7 +72,7 @@ public class ChopChopConfig {
List<Material> mushrooms = new ArrayList<>(MUSHROOMS_MATERIALS.keySet());

/*
* Initializing the max distance maps
* Initializing max distance maps
*/
for(int i = 0; i < logs.size(); i++) {
MAX_BRANCH_DISTANCE_FROM_TREE.put(logs.get(i), BRANCH_MAX_DISTANCES[i]);
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/me/soussou/chopchop/TreeManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public class TreeManager {
/*
* Vectors used to find tree blocks relative to other blocks.
*/
private static final Set<Vector> MAIN_RELATIVES = new HashSet<>();
private static final Set<Vector> TRUNK_RELATIVES = new HashSet<>();
private static final Set<Vector> BRANCHES_RELATIVES = new HashSet<>();
private static final Set<Vector> LEAVES_RELATIVES = new HashSet<>();
private static final Set<Vector> MUSHROOM_BRANCHES_RELATIVES = new HashSet<>();
private static final Set<Vector> MAIN_RELATIVES = new HashSet<>(),
TRUNK_RELATIVES = new HashSet<>(),
BRANCHES_RELATIVES = new HashSet<>(),
LEAVES_RELATIVES = new HashSet<>(),
MUSHROOM_BRANCHES_RELATIVES = new HashSet<>();

private Set<Block> treeBlocks = new LinkedHashSet<>();
private Set<Material> leavesMaterials = new HashSet<>();
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/me/soussou/chopchop/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private String getXmlVersion(URL url) throws IOException, SAXException, ParserCo

InputStream in = url.openStream();
Document pom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
NodeList elements = pom.getFirstChild().getChildNodes(); // Every element of the main <project> node
NodeList elements = pom.getFirstChild().getChildNodes(); // Elements of the main <project> node

for(int i = 0; i < elements.getLength(); i++) {
Node node = elements.item(i);
Expand All @@ -101,7 +101,6 @@ private String getXmlVersion(URL url) throws IOException, SAXException, ParserCo
break;
}
}

in.close();

return version;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ${project.name} - ${project.description}
# ChopChop Config
# Project page : https://github.com/XSoussou/ChopChop


Expand Down

0 comments on commit b2f0649

Please sign in to comment.