aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/galacticgreg/schematics/SpaceSchematicFactory.java
blob: 584ea803193a5dd666dbf4068f8e2544683f5e7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package galacticgreg.schematics;

import net.minecraft.block.Block;
import net.minecraft.util.Vec3;

import galacticgreg.api.Enums.AllowedBlockPosition;
import galacticgreg.api.Enums.TargetBlockPosition;
import galacticgreg.api.SpecialBlockComb;
import galacticgreg.api.StructureInformation;

/**
 * Class for XML Structure files. You only should edit/use this file/class if you want to add/fix stuff with
 * GalacticGreg itself, and never if you're a mod developer and want to add support for GGreg to your mod. However, feel
 * free to copy this code to your own mod to implement structures. If you have questions, find me on github and ask
 */
public class SpaceSchematicFactory {

    public static SpaceSchematic createSchematic(String pName) {
        SpaceSchematic tSchem = new SpaceSchematic();
        tSchem._mStructureName = pName;
        tSchem._mRarity = 100;
        tSchem._mStructureEnabled = false;

        return tSchem;
    }

    public static StructureInformation createStructureInfo(int pX, int pY, int pZ, Block pBlock, int pMeta) {
        return new StructureInformation(
            Vec3.createVectorHelper(pX, pY, pZ),
            TargetBlockPosition.Invalid,
            new SpecialBlockComb(pBlock, pMeta, AllowedBlockPosition.AsteroidCoreAndShell));
    }
}