2015-11-02 12:39:44 -08:00
|
|
|
package WayofTime.bloodmagic.api.altar;
|
2015-10-29 20:22:14 -07:00
|
|
|
|
2016-03-17 13:00:44 -07:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2015-10-29 20:22:14 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Used for building the altar structure.
|
|
|
|
*/
|
2017-08-15 21:30:48 -07:00
|
|
|
public class AltarComponent {
|
2015-10-29 20:22:14 -07:00
|
|
|
private BlockPos offset;
|
|
|
|
private boolean upgradeSlot;
|
|
|
|
|
2015-12-02 16:02:18 -08:00
|
|
|
private EnumAltarComponent component;
|
2015-10-29 20:22:14 -07:00
|
|
|
|
|
|
|
/**
|
2015-12-02 16:02:18 -08:00
|
|
|
* Sets a component location for the altar.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
|
|
|
* @param offset - Where the block should be in relation to the Altar
|
|
|
|
* @param component - The type of Component the location should contain
|
2015-10-29 20:22:14 -07:00
|
|
|
*/
|
2017-08-15 21:30:48 -07:00
|
|
|
public AltarComponent(BlockPos offset, EnumAltarComponent component) {
|
2015-12-02 16:02:18 -08:00
|
|
|
this.offset = offset;
|
|
|
|
this.component = component;
|
2015-10-29 20:22:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Use for setting a location at which there must be a block, but the type
|
|
|
|
* of block does not matter.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
|
|
|
* @param offset - Where the block should be in relation to the Altar
|
2015-10-29 20:22:14 -07:00
|
|
|
*/
|
2017-08-15 21:30:48 -07:00
|
|
|
public AltarComponent(BlockPos offset) {
|
2015-12-02 16:02:18 -08:00
|
|
|
this(offset, EnumAltarComponent.NOTAIR);
|
2015-10-29 20:22:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the location to an upgrade slot.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
2015-10-29 20:22:14 -07:00
|
|
|
* @return the current instance for further use.
|
|
|
|
*/
|
2017-08-15 21:30:48 -07:00
|
|
|
public AltarComponent setUpgradeSlot() {
|
2015-10-29 20:22:14 -07:00
|
|
|
this.upgradeSlot = true;
|
|
|
|
return this;
|
|
|
|
}
|
2017-08-14 20:53:42 -07:00
|
|
|
|
|
|
|
public BlockPos getOffset() {
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isUpgradeSlot() {
|
|
|
|
return upgradeSlot;
|
|
|
|
}
|
|
|
|
|
|
|
|
public EnumAltarComponent getComponent() {
|
|
|
|
return component;
|
|
|
|
}
|
2015-10-29 20:22:14 -07:00
|
|
|
}
|