diff --git a/src/main/scala/resonantinduction/atomic/schematic/SchematicBreedingReactor.java b/src/main/scala/resonantinduction/atomic/schematic/SchematicBreedingReactor.java deleted file mode 100644 index a419fb0c3..000000000 --- a/src/main/scala/resonantinduction/atomic/schematic/SchematicBreedingReactor.java +++ /dev/null @@ -1,68 +0,0 @@ -package resonantinduction.atomic.schematic; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; -import net.minecraftforge.common.util.ForgeDirection; -import resonant.lib.schematic.Schematic; -import resonant.lib.type.Pair; -import resonantinduction.atomic.AtomicContent; -import universalelectricity.core.transform.vector.Vector3; - -import java.util.HashMap; - -public class SchematicBreedingReactor extends Schematic -{ - @Override - public String getName() - { - return "schematic.breedingReactor.name"; - } - - @Override - public HashMap> getStructure(ForgeDirection dir, int size) - { - HashMap> returnMap = new HashMap>(); - - int r = Math.max(size, 2); - - for (int x = -r; x <= r; x++) - { - for (int z = -r; z <= r; z++) - { - returnMap.put(new Vector3(x, 0, z), new Pair(Blocks.water, 0)); - } - } - - r--; - - for (int x = -r; x <= r; x++) - { - for (int z = -r; z <= r; z++) - { - Vector3 targetPosition = new Vector3(x, 1, z); - - if (new Vector3(x, 0, z).magnitude() <= 2) - { - if (!((x == -r || x == r) && (z == -r || z == r))) - { - returnMap.put(new Vector3(x, 0, z), new Pair(AtomicContent.blockReactorCell(), 0)); - returnMap.put(new Vector3(x, -1, z), new Pair(AtomicContent.blockThermometer(), 0)); - returnMap.put(new Vector3(x, -3, z), new Pair(AtomicContent.blockSiren(), 0)); - returnMap.put(new Vector3(x, -2, z), new Pair(Blocks.redstone_wire, 0)); - - } - else - { - returnMap.put(new Vector3(x, -1, z), new Pair(AtomicContent.blockControlRod(), 0)); - returnMap.put(new Vector3(x, -2, z), new Pair(Blocks.piston, 1)); - } - } - } - } - - returnMap.put(new Vector3(0, -2, 0), new Pair(Blocks.stone, 0)); - returnMap.put(new Vector3(0, -3, 0), new Pair(Blocks.stone, 0)); - returnMap.put(new Vector3(), new Pair(AtomicContent.blockReactorCell(), 0)); - return returnMap; - } -} diff --git a/src/main/scala/resonantinduction/atomic/schematic/SchematicBreedingReactor.scala b/src/main/scala/resonantinduction/atomic/schematic/SchematicBreedingReactor.scala new file mode 100644 index 000000000..32dba238c --- /dev/null +++ b/src/main/scala/resonantinduction/atomic/schematic/SchematicBreedingReactor.scala @@ -0,0 +1,64 @@ +package resonantinduction.atomic.schematic + +import java.util.HashMap + +import net.minecraft.block.Block +import net.minecraft.init.Blocks +import net.minecraftforge.common.util.ForgeDirection +import resonant.lib.`type`.Pair +import resonant.lib.schematic.Schematic +import resonantinduction.atomic.AtomicContent +import universalelectricity.core.transform.vector.Vector3 + +class SchematicBreedingReactor extends Schematic +{ + override def getName: String = + { + return "schematic.breedingReactor.name" + } + + override def getStructure(dir: ForgeDirection, size: Int): HashMap[Vector3, Pair[Block, Integer]] = + { + val returnMap: HashMap[Vector3, Pair[Block, Integer]] = new HashMap[Vector3, Pair[Block, Integer]] + var r: Int = Math.max(size, 2) + + for (x <- -r to r) + { + for (z <- -r to r) + { + returnMap.put(new Vector3(x, 0, z), new Pair[Block, Integer](Blocks.water, 0)) + } + } + + r -= 1 + + for (x <- -r to r) + { + for (z <- -r to r) + { + val targetPosition: Vector3 = new Vector3(x, 1, z) + if (new Vector3(x, 0, z).magnitude <= 2) + { + if (!((x == -r || x == r) && (z == -r || z == r))) + { + returnMap.put(new Vector3(x, 0, z), new Pair[Block, Integer](AtomicContent.blockReactorCell, 0)) + returnMap.put(new Vector3(x, -1, z), new Pair[Block, Integer](AtomicContent.blockThermometer, 0)) + returnMap.put(new Vector3(x, -3, z), new Pair[Block, Integer](AtomicContent.blockSiren, 0)) + returnMap.put(new Vector3(x, -2, z), new Pair[Block, Integer](Blocks.redstone_wire, 0)) + } + else + { + returnMap.put(new Vector3(x, -1, z), new Pair[Block, Integer](AtomicContent.blockControlRod, 0)) + returnMap.put(new Vector3(x, -2, z), new Pair[Block, Integer](Blocks.piston, 1)) + } + } + } + } + + returnMap.put(new Vector3(0, -2, 0), new Pair[Block, Integer](Blocks.stone, 0)) + returnMap.put(new Vector3(0, -3, 0), new Pair[Block, Integer](Blocks.stone, 0)) + returnMap.put(new Vector3, new Pair[Block, Integer](AtomicContent.blockReactorCell, 0)) + return returnMap + } + +} \ No newline at end of file