Creating a usable API (#1713)

* Initial stab at API structuring

* Throwing all the things into the API*
Eliminated all internal imports
Also added some helpful comments
*except for the ritual stuff

* Reducing the API
Threw back the altar/incense/unnecessary items to main
Added in a functional API instance

* API cleanup
Removing all the unnecessities
Smushed and vaporized some redundant recipe stuffs

* Made API dummy instances
Refactor packaging
This commit is contained in:
Arcaratus 2020-11-23 21:03:19 -05:00 committed by GitHub
parent 952b6aeeb0
commit 574d6a8e74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
144 changed files with 558 additions and 990 deletions

View file

@ -9,4 +9,17 @@ public enum EnumTranquilityType
WATER(),
FIRE(),
LAVA(),;
public static EnumTranquilityType getType(String type)
{
for (EnumTranquilityType t : values())
{
if (t.name().equalsIgnoreCase(type))
{
return t;
}
}
return null;
}
}

View file

@ -1,15 +0,0 @@
package wayoftime.bloodmagic.incense;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IIncensePath
{
/**
* Goes from 0 to however far this path block can be from the altar while still
* functioning. 0 represents a block that can work when it is two blocks
* horizontally away from the altar.
*/
int getLevelOfPath(World world, BlockPos pos, BlockState state);
}

View file

@ -5,6 +5,9 @@ import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
* This is a functional interface to return the TranquilityStack of a certain Block type
*/
public interface ITranquilityHandler
{
TranquilityStack getTranquilityOfBlock(World world, BlockPos pos, Block block, BlockState state);

View file

@ -1,5 +1,8 @@
package wayoftime.bloodmagic.incense;
/**
* Holds the tranquility type and value for valid tranquility modifiers
*/
public class TranquilityStack
{
public final EnumTranquilityType type;