From fbdbb388c369fae549cfde3eed38b536f7461d90 Mon Sep 17 00:00:00 2001 From: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Date: Wed, 18 Oct 2023 17:03:23 +0100 Subject: Cleaning up (#767) * Kill playerAPI * Gut more events and compat that is now obsolete * Remove commented out code * Remove final modifier from methods * Make more stuff final * Remove slow building ring * Protected -> private in final classes * More cleaning * More cleaning v2 * Purging * Clean DevHelper * Clean DevHelper 2 * delete DevHelper * remove useless IFMLLoadingPlugin.MCVersion annotation from @Mod files * check for obfuscation only once in the IFMLloadingPlugin.injectData * don't instantiate the static class ASMConfig * delete unused and empty implementation of IFMLCallHook * delete empty class * delete ClassesToTransform class that just holds the class names constants * delete unused methods and unsless logging in dummymod container * delete unused transformer ClassTransformer_TT_ThaumicRestorer * spotless * Clean * Clean utils * Build checkpoint * Purge * Stage 2 * Stage 3 * Stage 4 * Stage 5 * Stage 6 * Spotless * Imports * Stage idk * Stage 1 * Fix issue * Spotless * Format numbers --------- Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Alexdoru <57050655+Alexdoru@users.noreply.github.com> Co-authored-by: Connor Colenso --- src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java') diff --git a/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java b/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java index cd6edf5411..686c0e7667 100644 --- a/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java +++ b/src/main/java/gtPlusPlus/api/objects/minecraft/BlockPos.java @@ -87,10 +87,9 @@ public class BlockPos implements Serializable { if (other == this) { return true; } - if (!(other instanceof BlockPos)) { + if (!(other instanceof BlockPos otherPoint)) { return false; } - BlockPos otherPoint = (BlockPos) other; return this.xPos == otherPoint.xPos && this.yPos == otherPoint.yPos && this.zPos == otherPoint.zPos && this.dim == otherPoint.dim; @@ -153,7 +152,7 @@ public class BlockPos implements Serializable { } public AutoMap getSurroundingBlocks() { - AutoMap sides = new AutoMap(); + AutoMap sides = new AutoMap<>(); sides.put(getUp()); sides.put(getDown()); sides.put(getXPos()); @@ -219,7 +218,7 @@ public class BlockPos implements Serializable { * @return - Does this block have a neighbour that is the same? */ public AutoMap getSimilarNeighbour(boolean strict) { - AutoMap sides = new AutoMap(); + AutoMap sides = new AutoMap<>(); for (BlockPos g : getSurroundingBlocks().values()) { if (getBlockAtPos(g) == getBlockAtPos()) { if (!strict) { @@ -237,7 +236,7 @@ public class BlockPos implements Serializable { public Set getValidNeighboursAndSelf() { AutoMap h = getSimilarNeighbour(true); h.put(this); - Set result = new HashSet(); + Set result = new HashSet<>(); for (BlockPos f : h.values()) { result.add(f); } -- cgit