diff options
Diffstat (limited to 'src/main/java')
-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 |
4 files changed, 96 insertions, 11 deletions
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"); } |