BloodMagic/src/main/java/WayofTime/bloodmagic/apibutnotreally/altar/AltarComponent.java

57 lines
1.4 KiB
Java
Raw Normal View History

package WayofTime.bloodmagic.apibutnotreally.altar;
import net.minecraft.util.math.BlockPos;
/**
* Used for building the altar structure.
*/
2017-08-16 04:30:48 +00:00
public class AltarComponent {
private BlockPos offset;
private boolean upgradeSlot;
private EnumAltarComponent component;
/**
* Sets a component location for the altar.
2017-08-16 04:30:48 +00:00
*
* @param offset - Where the block should be in relation to the Altar
* @param component - The type of Component the location should contain
*/
2017-08-16 04:30:48 +00:00
public AltarComponent(BlockPos offset, EnumAltarComponent component) {
this.offset = offset;
this.component = component;
}
/**
* Use for setting a location at which there must be a block, but the type
* of block does not matter.
2017-08-16 04:30:48 +00:00
*
* @param offset - Where the block should be in relation to the Altar
*/
2017-08-16 04:30:48 +00:00
public AltarComponent(BlockPos offset) {
this(offset, EnumAltarComponent.NOTAIR);
}
/**
* Sets the location to an upgrade slot.
2017-08-16 04:30:48 +00:00
*
* @return the current instance for further use.
*/
2017-08-16 04:30:48 +00:00
public AltarComponent setUpgradeSlot() {
this.upgradeSlot = true;
return this;
}
public BlockPos getOffset() {
return offset;
}
public boolean isUpgradeSlot() {
return upgradeSlot;
}
public EnumAltarComponent getComponent() {
return component;
}
}