Changed formatting to have bracing on a new line
This commit is contained in:
parent
e5eddd6c45
commit
e48eedb874
189 changed files with 6092 additions and 4041 deletions
|
@ -7,7 +7,8 @@ import net.minecraft.util.BlockPos;
|
|||
* Used for building the altar structure.
|
||||
*/
|
||||
@Getter
|
||||
public class AltarComponent {
|
||||
public class AltarComponent
|
||||
{
|
||||
|
||||
private BlockPos offset;
|
||||
private boolean upgradeSlot;
|
||||
|
@ -16,11 +17,14 @@ public class AltarComponent {
|
|||
|
||||
/**
|
||||
* Sets a component location for the altar.
|
||||
*
|
||||
* @param offset - Where the block should be in relation to the Altar
|
||||
* @param component - The type of Component the location should contain
|
||||
*
|
||||
* @param offset
|
||||
* - Where the block should be in relation to the Altar
|
||||
* @param component
|
||||
* - The type of Component the location should contain
|
||||
*/
|
||||
public AltarComponent(BlockPos offset, EnumAltarComponent component) {
|
||||
public AltarComponent(BlockPos offset, EnumAltarComponent component)
|
||||
{
|
||||
this.offset = offset;
|
||||
this.component = component;
|
||||
}
|
||||
|
@ -29,16 +33,18 @@ public class AltarComponent {
|
|||
* Use for setting a location at which there must be a block, but the type
|
||||
* of block does not matter.
|
||||
*/
|
||||
public AltarComponent(BlockPos offset) {
|
||||
public AltarComponent(BlockPos offset)
|
||||
{
|
||||
this(offset, EnumAltarComponent.NOTAIR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the location to an upgrade slot.
|
||||
*
|
||||
*
|
||||
* @return the current instance for further use.
|
||||
*/
|
||||
public AltarComponent setUpgradeSlot() {
|
||||
public AltarComponent setUpgradeSlot()
|
||||
{
|
||||
this.upgradeSlot = true;
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,8 @@ import lombok.NoArgsConstructor;
|
|||
@Getter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AltarUpgrade {
|
||||
public class AltarUpgrade
|
||||
{
|
||||
|
||||
private int speedCount;
|
||||
private int efficiencyCount;
|
||||
|
@ -21,47 +22,56 @@ public class AltarUpgrade {
|
|||
|
||||
// Adders
|
||||
|
||||
public AltarUpgrade addSpeed() {
|
||||
public AltarUpgrade addSpeed()
|
||||
{
|
||||
speedCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addEfficiency() {
|
||||
public AltarUpgrade addEfficiency()
|
||||
{
|
||||
efficiencyCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addSacrifice() {
|
||||
public AltarUpgrade addSacrifice()
|
||||
{
|
||||
sacrificeCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addSelfSacrifice() {
|
||||
public AltarUpgrade addSelfSacrifice()
|
||||
{
|
||||
selfSacrificeCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addDisplacement() {
|
||||
public AltarUpgrade addDisplacement()
|
||||
{
|
||||
displacementCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addCapacity() {
|
||||
public AltarUpgrade addCapacity()
|
||||
{
|
||||
capacityCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addOrbCapacity() {
|
||||
public AltarUpgrade addOrbCapacity()
|
||||
{
|
||||
orbCapacityCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addBetterCapacity() {
|
||||
public AltarUpgrade addBetterCapacity()
|
||||
{
|
||||
betterCapacityCount++;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AltarUpgrade addAcceleration() {
|
||||
public AltarUpgrade addAcceleration()
|
||||
{
|
||||
accelerationCount++;
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package WayofTime.bloodmagic.api.altar;
|
||||
|
||||
public enum EnumAltarComponent {
|
||||
public enum EnumAltarComponent
|
||||
{
|
||||
|
||||
GLOWSTONE,
|
||||
BLOODSTONE,
|
||||
BEACON,
|
||||
BLOODRUNE,
|
||||
CRYSTAL,
|
||||
NOTAIR
|
||||
GLOWSTONE, BLOODSTONE, BEACON, BLOODRUNE, CRYSTAL, NOTAIR
|
||||
}
|
||||
|
|
|
@ -6,11 +6,13 @@ import net.minecraft.util.BlockPos;
|
|||
import java.util.ArrayList;
|
||||
|
||||
@Getter
|
||||
public enum EnumAltarTier {
|
||||
ONE(),
|
||||
TWO() {
|
||||
public enum EnumAltarTier
|
||||
{
|
||||
ONE(), TWO()
|
||||
{
|
||||
@Override
|
||||
public void buildComponents() {
|
||||
public void buildComponents()
|
||||
{
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-1, -1, -1), EnumAltarComponent.BLOODRUNE));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(0, -1, -1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(1, -1, -1), EnumAltarComponent.BLOODRUNE));
|
||||
|
@ -21,9 +23,11 @@ public enum EnumAltarTier {
|
|||
altarComponents.add(new AltarComponent(new BlockPos(1, -1, 1), EnumAltarComponent.BLOODRUNE));
|
||||
}
|
||||
},
|
||||
THREE() {
|
||||
THREE()
|
||||
{
|
||||
@Override
|
||||
public void buildComponents() {
|
||||
public void buildComponents()
|
||||
{
|
||||
altarComponents.addAll(TWO.getAltarComponents());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-1, -1, -1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(0, -1, -1), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
|
@ -46,7 +50,8 @@ public enum EnumAltarTier {
|
|||
altarComponents.add(new AltarComponent(new BlockPos(-3, 1, 3), EnumAltarComponent.GLOWSTONE));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(3, 1, 3), EnumAltarComponent.GLOWSTONE));
|
||||
|
||||
for (int i = -2; i <= 2; i++) {
|
||||
for (int i = -2; i <= 2; i++)
|
||||
{
|
||||
altarComponents.add(new AltarComponent(new BlockPos(3, -2, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-3, -2, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(i, -2, 3), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
|
@ -54,19 +59,23 @@ public enum EnumAltarTier {
|
|||
}
|
||||
}
|
||||
},
|
||||
FOUR() {
|
||||
FOUR()
|
||||
{
|
||||
@Override
|
||||
public void buildComponents() {
|
||||
public void buildComponents()
|
||||
{
|
||||
altarComponents.addAll(THREE.getAltarComponents());
|
||||
|
||||
for (int i = -3; i <= 3; i++) {
|
||||
for (int i = -3; i <= 3; i++)
|
||||
{
|
||||
altarComponents.add(new AltarComponent(new BlockPos(5, -3, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-5, -3, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(i, -3, 5), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(i, -3, -5), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
}
|
||||
|
||||
for (int i = -2; i <= 1; i++) {
|
||||
for (int i = -2; i <= 1; i++)
|
||||
{
|
||||
altarComponents.add(new AltarComponent(new BlockPos(5, i, 5)));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(5, i, -5)));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-5, i, -5)));
|
||||
|
@ -79,16 +88,19 @@ public enum EnumAltarTier {
|
|||
altarComponents.add(new AltarComponent(new BlockPos(-5, 2, 5), EnumAltarComponent.BLOODSTONE));
|
||||
}
|
||||
},
|
||||
FIVE() {
|
||||
FIVE()
|
||||
{
|
||||
@Override
|
||||
public void buildComponents() {
|
||||
public void buildComponents()
|
||||
{
|
||||
altarComponents.addAll(FOUR.getAltarComponents());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-8, -3, 8), EnumAltarComponent.BEACON));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-8, -3, -8), EnumAltarComponent.BEACON));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(8, -3, -8), EnumAltarComponent.BEACON));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(8, -3, 8), EnumAltarComponent.BEACON));
|
||||
|
||||
for (int i = -6; i <= 6; i++) {
|
||||
for (int i = -6; i <= 6; i++)
|
||||
{
|
||||
altarComponents.add(new AltarComponent(new BlockPos(8, -4, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-8, -4, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(i, -4, 8), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
|
@ -96,12 +108,15 @@ public enum EnumAltarTier {
|
|||
}
|
||||
}
|
||||
},
|
||||
SIX() {
|
||||
SIX()
|
||||
{
|
||||
@Override
|
||||
public void buildComponents() {
|
||||
public void buildComponents()
|
||||
{
|
||||
altarComponents.addAll(FIVE.getAltarComponents());
|
||||
|
||||
for (int i = -4; i <= 2; i++) {
|
||||
for (int i = -4; i <= 2; i++)
|
||||
{
|
||||
altarComponents.add(new AltarComponent(new BlockPos(11, i, 11)));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-11, i, -11)));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(11, i, -11)));
|
||||
|
@ -113,7 +128,8 @@ public enum EnumAltarTier {
|
|||
altarComponents.add(new AltarComponent(new BlockPos(11, 3, -11), EnumAltarComponent.CRYSTAL));
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-11, 3, 11), EnumAltarComponent.CRYSTAL));
|
||||
|
||||
for (int i = -9; i <= 9; i++) {
|
||||
for (int i = -9; i <= 9; i++)
|
||||
{
|
||||
altarComponents.add(new AltarComponent(new BlockPos(11, -5, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(-11, -5, i), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
altarComponents.add(new AltarComponent(new BlockPos(i, -5, 11), EnumAltarComponent.BLOODRUNE).setUpgradeSlot());
|
||||
|
@ -126,11 +142,13 @@ public enum EnumAltarTier {
|
|||
|
||||
ArrayList<AltarComponent> altarComponents = new ArrayList<AltarComponent>();
|
||||
|
||||
public void buildComponents() {
|
||||
public void buildComponents()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
public int toInt()
|
||||
{
|
||||
return ordinal() + 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.bloodmagic.api.altar;
|
||||
|
||||
public interface IAltarComponent {
|
||||
public interface IAltarComponent
|
||||
{
|
||||
|
||||
EnumAltarComponent getType(int meta);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package WayofTime.bloodmagic.api.altar;
|
||||
|
||||
/**
|
||||
* Any item that implements this interface will not be pulled into the Altar
|
||||
* on right click.
|
||||
* Any item that implements this interface will not be pulled into the Altar on
|
||||
* right click.
|
||||
*/
|
||||
public interface IAltarManipulator {
|
||||
public interface IAltarManipulator
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.bloodmagic.api.altar;
|
||||
|
||||
public interface IBloodAltar {
|
||||
public interface IBloodAltar
|
||||
{
|
||||
|
||||
int getCapacity();
|
||||
|
||||
|
@ -31,18 +32,20 @@ public interface IBloodAltar {
|
|||
void startCycle();
|
||||
|
||||
void checkTier();
|
||||
|
||||
|
||||
boolean isActive();
|
||||
|
||||
|
||||
void setActive();
|
||||
|
||||
|
||||
int fillMainTank(int amount);
|
||||
|
||||
/**
|
||||
* Will set the altar to initiate a cooldown cycle after it crafts before starting to craft again, giving the user time to interact with the altar.
|
||||
* Will set the altar to initiate a cooldown cycle after it crafts before
|
||||
* starting to craft again, giving the user time to interact with the altar.
|
||||
* This can only be set while the altar is not active.
|
||||
*
|
||||
* @param cooldown - How long the cooldown should last
|
||||
*
|
||||
* @param cooldown
|
||||
* - How long the cooldown should last
|
||||
*/
|
||||
void requestPauseAfterCrafting(int cooldown);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue