diff options
author | Kyle Gunger <corechg@gmail.com> | 2020-04-15 16:05:25 -0400 |
---|---|---|
committer | Kyle Gunger <corechg@gmail.com> | 2020-04-15 16:05:25 -0400 |
commit | 9c071a9d077a11865a83246152fffc8ea09e2666 (patch) | |
tree | fa3c3b70a4e6faecf138eb51e992a03056b8299d | |
parent | aed6ed909ee81beecac2836cb86654efe29e154b (diff) |
[Update] Version 0.6.2
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/net/transit/type/TFluid.java | 33 | ||||
-rw-r--r-- | src/main/java/net/transit/type/TMana.java | 31 | ||||
-rw-r--r-- | src/main/java/net/transit/type/group/simple/SimpleGroups.java | 21 | ||||
-rw-r--r-- | src/main/java/net/transit/type/simple/SimpleTypes.java | 22 | ||||
-rw-r--r-- | src/main/resources/fabric.mod.json | 2 |
6 files changed, 98 insertions, 13 deletions
diff --git a/gradle.properties b/gradle.properties index dececde..fbb5a24 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.6.1+build.164 # Mod Properties - mod_version = 0.5.1 + mod_version = 0.6.2 maven_group = net.transit archives_base_name = transit-api diff --git a/src/main/java/net/transit/type/TFluid.java b/src/main/java/net/transit/type/TFluid.java new file mode 100644 index 0000000..fbceb0e --- /dev/null +++ b/src/main/java/net/transit/type/TFluid.java @@ -0,0 +1,33 @@ +package net.transit.type; + +import net.minecraft.fluid.Fluid; + +/** Units of fluid. + * @author Kyle Gunger + */ +public class TFluid { + private Fluid fluid; + private Number millibuckets; + + /** Constructor + * + * @param f Fluid stored (Water/Lava/etc.) + * @param ct Count of fluid (mB) + */ + public TFluid(Fluid f, Number mb) { + fluid = f; + millibuckets = mb; + } + + /** Get the fluid stored. + */ + public Fluid getFluid() { + return fluid; + } + + /** Get the millibuckets stored. + */ + public Number getMilliBuckets() { + return millibuckets; + } +}
\ No newline at end of file diff --git a/src/main/java/net/transit/type/TMana.java b/src/main/java/net/transit/type/TMana.java new file mode 100644 index 0000000..3a60d52 --- /dev/null +++ b/src/main/java/net/transit/type/TMana.java @@ -0,0 +1,31 @@ +package net.transit.type; + +/** Units of mana. + * @author Kyle Gunger + */ +public class TMana { + private String type; + private Number count; + + /** Constructor + * + * @param t Type of mana (Fire/Water/Dark/Light/etc.) + * @param ct Count of mana + */ + public TMana(String t, Number ct) { + type = t; + count = ct; + } + + /** Get the mana type. + */ + public String getType() { + return type; + } + + /** Get the mana stored. + */ + public Number getCount() { + return count; + } +} diff --git a/src/main/java/net/transit/type/group/simple/SimpleGroups.java b/src/main/java/net/transit/type/group/simple/SimpleGroups.java index b4fcb76..f3e2ad2 100644 --- a/src/main/java/net/transit/type/group/simple/SimpleGroups.java +++ b/src/main/java/net/transit/type/group/simple/SimpleGroups.java @@ -1,16 +1,27 @@ package net.transit.type.group.simple; -import net.minecraft.fluid.Fluid; -import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; import net.transit.type.group.GroupRegistry; import net.transit.type.group.TypeGroup; import net.transit.type.simple.SimpleTypes; +import net.transit.type.*; public final class SimpleGroups { + /** Transfers energy. Basic unit is TJoule (Transit Joule). + */ public static final TypeGroup<Number> ENERGY_GROUP = new TypeGroup<Number>(SimpleTypes.TransitJoule); - public static final TypeGroup<Number> MANA_GROUP = new TypeGroup<Number>(SimpleTypes.TransitMana); - public static final TypeGroup<Item> ITEM_GROUP = new TypeGroup<Item>(SimpleTypes.Item); - public static final TypeGroup<Fluid> FLUID_GROUP = new TypeGroup<Fluid>(SimpleTypes.Fluid); + + /** Transfers mana. Basic unit is TMana (Transit Mana). + */ + public static final TypeGroup<TMana> MANA_GROUP = new TypeGroup<TMana>(SimpleTypes.TransitMana); + + /** Transfers items. Basic type is ItemStack. + */ + public static final TypeGroup<ItemStack> ITEM_GROUP = new TypeGroup<ItemStack>(SimpleTypes.Item); + + /** Transfers fluids. Basic unit is TFluid. + */ + public static final TypeGroup<TFluid> FLUID_GROUP = new TypeGroup<TFluid>(SimpleTypes.Fluid); public static final void init() { diff --git a/src/main/java/net/transit/type/simple/SimpleTypes.java b/src/main/java/net/transit/type/simple/SimpleTypes.java index db839aa..cae234f 100644 --- a/src/main/java/net/transit/type/simple/SimpleTypes.java +++ b/src/main/java/net/transit/type/simple/SimpleTypes.java @@ -1,12 +1,22 @@ package net.transit.type.simple; -import net.minecraft.fluid.Fluid; -import net.minecraft.item.Item; -import net.transit.type.Type; +import net.minecraft.item.ItemStack; +import net.transit.type.*; public final class SimpleTypes { + /** Transfers energy. Energy is stored as a numeric, base value is TJoule (TransitJoule) + */ public static final Type<Number> TransitJoule = new Type<Number>("TJoule", "ENERGY"); - public static final Type<Number> TransitMana = new Type<Number>("TMana", "MANA"); - public static final Type<Item> Item = new Type<Item>("Item", "ITEM"); - public static final Type<Fluid> Fluid = new Type<Fluid>("Fluid", "FLUID"); + + /** Transfers mana. TMana stores mana count and type. + */ + public static final Type<TMana> TransitMana = new Type<TMana>("TMana", "MANA"); + + /** Transfers items in a itemstack. + */ + public static final Type<ItemStack> Item = new Type<ItemStack>("Item", "ITEM"); + + /** Transfers fluid. TFluid stores fluid and mB. + */ + public static final Type<TFluid> Fluid = new Type<TFluid>("Fluid", "FLUID"); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 1a5136b..bca1407 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "transit-api", - "version": "0.5.1", + "version": "0.6.2", "name": "Transit API", "description": "General purpose API for transfering fluid, items, energy, anything.", |