aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-01-29 22:47:18 -0800
committerJason Mitchell <mitchej@gmail.com>2023-01-29 22:47:18 -0800
commit960bbb3537d7c8c552050b5826de58bc8d798f04 (patch)
tree8006e73e99cc48c8b401cf9b34388f9b293dd43e /src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java
parent1e0349649cf45764435b993bc87339742a025078 (diff)
downloadGT5-Unofficial-960bbb3537d7c8c552050b5826de58bc8d798f04.tar.gz
GT5-Unofficial-960bbb3537d7c8c552050b5826de58bc8d798f04.tar.bz2
GT5-Unofficial-960bbb3537d7c8c552050b5826de58bc8d798f04.zip
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java')
-rw-r--r--src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java123
1 files changed, 64 insertions, 59 deletions
diff --git a/src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java b/src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java
index 857e379629..d5f6feb1ca 100644
--- a/src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java
+++ b/src/main/java/bloodasp/galacticgreg/api/SpecialBlockComb.java
@@ -1,66 +1,71 @@
package bloodasp.galacticgreg.api;
-import bloodasp.galacticgreg.api.Enums.AllowedBlockPosition;
import net.minecraft.block.Block;
+import bloodasp.galacticgreg.api.Enums.AllowedBlockPosition;
+
public class SpecialBlockComb extends BlockMetaComb {
- private AllowedBlockPosition _mBlockPosition;
-
- /** Creates a simple instance for a block that has a meta value and a block position it is allowed to spawn
- * @param pBlock The Block in question
- * @param pMeta The meta value of the block
- * @param pBlockPosition The position this block is allowed to generate
- */
- public SpecialBlockComb(Block pBlock, int pMeta, AllowedBlockPosition pBlockPosition) {
- super(pBlock, pMeta);
- _mBlockPosition = pBlockPosition;
- }
- /** Creates a simple instance for a block that has no meta value but a position it is allowed to spawn
- * @param pBlock The Block in question. 0 is used as meta
- * @param pBlockPosition The position this block is allowed to generate
- */
- public SpecialBlockComb(Block pBlock, AllowedBlockPosition pBlockPosition) {
- super(pBlock, 0);
- _mBlockPosition = pBlockPosition;
- }
-
- /** Creates a simple instance for a block that has no meta value and is allowed to spawn everywhere
- * @param pBlock The Block in question. 0 is used as meta, and "CoreAndShell" is used as position
- */
- public SpecialBlockComb(Block pBlock) {
- super(pBlock, 0);
- _mBlockPosition = AllowedBlockPosition.AsteroidCoreAndShell;
- }
-
- /** Internal function
- * @return The position the block is supposed to spawn at
- */
- public AllowedBlockPosition getBlockPosition()
- {
- return _mBlockPosition;
- }
-
- @Override
- public boolean equals(Object other)
- {
- if (other == null) return false;
- if (other == this) return true;
- if (!(other instanceof SpecialBlockComb))return false;
- SpecialBlockComb otherObj = (SpecialBlockComb)other;
-
- boolean tFlag = true;
- String otherName = Block.blockRegistry.getNameForObject(otherObj.getBlock());
- String thisName = Block.blockRegistry.getNameForObject(this.getBlock());
- if (!otherName.equals(thisName))
- tFlag = false;
-
- if (!(otherObj.getMeta() == this.getMeta()))
- tFlag = false;
-
- if (!(otherObj.getBlockPosition() == this.getBlockPosition()))
- tFlag = false;
-
- return tFlag;
- }
+ private AllowedBlockPosition _mBlockPosition;
+
+ /**
+ * Creates a simple instance for a block that has a meta value and a block position it is allowed to spawn
+ *
+ * @param pBlock The Block in question
+ * @param pMeta The meta value of the block
+ * @param pBlockPosition The position this block is allowed to generate
+ */
+ public SpecialBlockComb(Block pBlock, int pMeta, AllowedBlockPosition pBlockPosition) {
+ super(pBlock, pMeta);
+ _mBlockPosition = pBlockPosition;
+ }
+
+ /**
+ * Creates a simple instance for a block that has no meta value but a position it is allowed to spawn
+ *
+ * @param pBlock The Block in question. 0 is used as meta
+ * @param pBlockPosition The position this block is allowed to generate
+ */
+ public SpecialBlockComb(Block pBlock, AllowedBlockPosition pBlockPosition) {
+ super(pBlock, 0);
+ _mBlockPosition = pBlockPosition;
+ }
+
+ /**
+ * Creates a simple instance for a block that has no meta value and is allowed to spawn everywhere
+ *
+ * @param pBlock The Block in question. 0 is used as meta, and "CoreAndShell" is used as position
+ */
+ public SpecialBlockComb(Block pBlock) {
+ super(pBlock, 0);
+ _mBlockPosition = AllowedBlockPosition.AsteroidCoreAndShell;
+ }
+
+ /**
+ * Internal function
+ *
+ * @return The position the block is supposed to spawn at
+ */
+ public AllowedBlockPosition getBlockPosition() {
+ return _mBlockPosition;
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == null) return false;
+ if (other == this) return true;
+ if (!(other instanceof SpecialBlockComb)) return false;
+ SpecialBlockComb otherObj = (SpecialBlockComb) other;
+
+ boolean tFlag = true;
+ String otherName = Block.blockRegistry.getNameForObject(otherObj.getBlock());
+ String thisName = Block.blockRegistry.getNameForObject(this.getBlock());
+ if (!otherName.equals(thisName)) tFlag = false;
+
+ if (!(otherObj.getMeta() == this.getMeta())) tFlag = false;
+
+ if (!(otherObj.getBlockPosition() == this.getBlockPosition())) tFlag = false;
+
+ return tFlag;
+ }
}