Massive rework of configs, items and blocks.
I redone where the items/blocsks are stored and how the configs are handled to clean up it and give space. You can change the config line to AWWayofTime if you want to keep the compatibility with old configs. Now you reference the blocks from the ModBlocks and Items from the ModItems.
This commit is contained in:
parent
8601e9faff
commit
e3644f2d2b
304 changed files with 3941 additions and 5108 deletions
|
@ -1,16 +1,14 @@
|
|||
package thaumcraft.api.aspects;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
public class Aspect
|
||||
{
|
||||
public class Aspect {
|
||||
String tag;
|
||||
Aspect[] components;
|
||||
int color;
|
||||
|
@ -20,11 +18,12 @@ public class Aspect
|
|||
|
||||
/**
|
||||
* Use this constructor to register your own aspects.
|
||||
* @param tag the key that will be used to reference this aspect, as well as its latin display name
|
||||
* @param color color to display the tag in
|
||||
*
|
||||
* @param tag the key that will be used to reference this aspect, as well as its latin display name
|
||||
* @param color color to display the tag in
|
||||
* @param components the aspects this one is formed from
|
||||
* @param image ResourceLocation pointing to a 32x32 icon of the aspect
|
||||
* @param blend GL11 blendmode (1 or 771). Used for rendering nodes. Default is 1
|
||||
* @param image ResourceLocation pointing to a 32x32 icon of the aspect
|
||||
* @param blend GL11 blendmode (1 or 771). Used for rendering nodes. Default is 1
|
||||
*/
|
||||
public Aspect(String tag, int color, Aspect[] components, ResourceLocation image, int blend)
|
||||
{
|
||||
|
@ -63,7 +62,7 @@ public class Aspect
|
|||
*/
|
||||
public Aspect(String tag, int color, String chatcolor, int blend)
|
||||
{
|
||||
this(tag, color, (Aspect[])null, blend);
|
||||
this(tag, color, (Aspect[]) null, blend);
|
||||
this.setChatcolor(chatcolor);
|
||||
}
|
||||
|
||||
|
@ -133,7 +132,7 @@ public class Aspect
|
|||
ArrayList<Aspect> primals = new ArrayList<Aspect>();
|
||||
Collection<Aspect> pa = aspects.values();
|
||||
|
||||
for (Aspect aspect: pa)
|
||||
for (Aspect aspect : pa)
|
||||
{
|
||||
if (aspect.isPrimal())
|
||||
{
|
||||
|
@ -149,7 +148,7 @@ public class Aspect
|
|||
ArrayList<Aspect> compounds = new ArrayList<Aspect>();
|
||||
Collection<Aspect> pa = aspects.values();
|
||||
|
||||
for (Aspect aspect: pa)
|
||||
for (Aspect aspect : pa)
|
||||
{
|
||||
if (!aspect.isPrimal())
|
||||
{
|
||||
|
@ -171,7 +170,7 @@ public class Aspect
|
|||
}
|
||||
|
||||
///////////////////////////////
|
||||
public static LinkedHashMap<String, Aspect> aspects = new LinkedHashMap<String, Aspect>();
|
||||
public static LinkedHashMap<String,Aspect> aspects = new LinkedHashMap<String,Aspect>();
|
||||
|
||||
//PRIMAL
|
||||
public static final Aspect AIR = new Aspect("aer", 0xffff7e, "e", 1);
|
||||
|
@ -182,59 +181,59 @@ public class Aspect
|
|||
public static final Aspect ENTROPY = new Aspect("perditio", 0x404040, "8", 771);
|
||||
|
||||
//SECONDARY TODO
|
||||
public static final Aspect VOID = new Aspect("vacuos", 0x888888, new Aspect[] {AIR, ENTROPY}, 771);
|
||||
public static final Aspect LIGHT = new Aspect("lux", 0xfff663, new Aspect[] {AIR, FIRE});
|
||||
public static final Aspect ENERGY = new Aspect("potentia", 0xc0ffff, new Aspect[] {ORDER, FIRE});
|
||||
public static final Aspect MOTION = new Aspect("motus", 0xcdccf4, new Aspect[] {AIR, ORDER});
|
||||
public static final Aspect STONE = new Aspect("saxum", 0x808080, new Aspect[] {EARTH, EARTH});
|
||||
public static final Aspect LIFE = new Aspect("victus", 0xde0005, new Aspect[] {WATER, EARTH});
|
||||
public static final Aspect WEATHER = new Aspect("tempestas", 0xFFFFFF, new Aspect[] {AIR, WATER});
|
||||
public static final Aspect ICE = new Aspect("gelum", 0xe1ffff, new Aspect[] {WATER, ORDER});
|
||||
public static final Aspect CRYSTAL = new Aspect("vitreus", 0x80ffff, new Aspect[] {STONE, WATER});
|
||||
public static final Aspect VOID = new Aspect("vacuos", 0x888888, new Aspect[]{AIR, ENTROPY}, 771);
|
||||
public static final Aspect LIGHT = new Aspect("lux", 0xfff663, new Aspect[]{AIR, FIRE});
|
||||
public static final Aspect ENERGY = new Aspect("potentia", 0xc0ffff, new Aspect[]{ORDER, FIRE});
|
||||
public static final Aspect MOTION = new Aspect("motus", 0xcdccf4, new Aspect[]{AIR, ORDER});
|
||||
public static final Aspect STONE = new Aspect("saxum", 0x808080, new Aspect[]{EARTH, EARTH});
|
||||
public static final Aspect LIFE = new Aspect("victus", 0xde0005, new Aspect[]{WATER, EARTH});
|
||||
public static final Aspect WEATHER = new Aspect("tempestas", 0xFFFFFF, new Aspect[]{AIR, WATER});
|
||||
public static final Aspect ICE = new Aspect("gelum", 0xe1ffff, new Aspect[]{WATER, ORDER});
|
||||
public static final Aspect CRYSTAL = new Aspect("vitreus", 0x80ffff, new Aspect[]{STONE, WATER});
|
||||
|
||||
//TERTIARY TODO
|
||||
|
||||
public static final Aspect DEATH = new Aspect("mortuus", 0x887788, new Aspect[] {LIFE, ENTROPY});
|
||||
public static final Aspect FLIGHT = new Aspect("volatus", 0xe7e7d7, new Aspect[] {AIR, MOTION});
|
||||
public static final Aspect DARKNESS = new Aspect("tenebrae", 0x222222, new Aspect[] {VOID, LIGHT});
|
||||
public static final Aspect SOUL = new Aspect("spiritus", 0xebebfb, new Aspect[] {LIFE, DEATH});
|
||||
public static final Aspect HEAL = new Aspect("sano", 0xff2f34, new Aspect[] {LIFE, LIFE});
|
||||
public static final Aspect DEATH = new Aspect("mortuus", 0x887788, new Aspect[]{LIFE, ENTROPY});
|
||||
public static final Aspect FLIGHT = new Aspect("volatus", 0xe7e7d7, new Aspect[]{AIR, MOTION});
|
||||
public static final Aspect DARKNESS = new Aspect("tenebrae", 0x222222, new Aspect[]{VOID, LIGHT});
|
||||
public static final Aspect SOUL = new Aspect("spiritus", 0xebebfb, new Aspect[]{LIFE, DEATH});
|
||||
public static final Aspect HEAL = new Aspect("sano", 0xff2f34, new Aspect[]{LIFE, LIFE});
|
||||
|
||||
public static final Aspect TRAVEL = new Aspect("iter", 0xe0585b, new Aspect[] {MOTION, EARTH});
|
||||
public static final Aspect POISON = new Aspect("venenum", 0x89f000, new Aspect[] {WATER, DEATH});
|
||||
public static final Aspect TRAVEL = new Aspect("iter", 0xe0585b, new Aspect[]{MOTION, EARTH});
|
||||
public static final Aspect POISON = new Aspect("venenum", 0x89f000, new Aspect[]{WATER, DEATH});
|
||||
|
||||
public static final Aspect ELDRITCH = new Aspect("alienis", 0x805080, new Aspect[] {VOID, DARKNESS});
|
||||
public static final Aspect MAGIC = new Aspect("praecantatio", 0x9700c0, new Aspect[] {VOID, ENERGY});
|
||||
public static final Aspect AURA = new Aspect("auram", 0xffc0ff, new Aspect[] {MAGIC, AIR});
|
||||
public static final Aspect TAINT = new Aspect("vitium", 0x800080, new Aspect[] {MAGIC, ENTROPY});
|
||||
public static final Aspect ELDRITCH = new Aspect("alienis", 0x805080, new Aspect[]{VOID, DARKNESS});
|
||||
public static final Aspect MAGIC = new Aspect("praecantatio", 0x9700c0, new Aspect[]{VOID, ENERGY});
|
||||
public static final Aspect AURA = new Aspect("auram", 0xffc0ff, new Aspect[]{MAGIC, AIR});
|
||||
public static final Aspect TAINT = new Aspect("vitium", 0x800080, new Aspect[]{MAGIC, ENTROPY});
|
||||
|
||||
public static final Aspect SEED = new Aspect("granum", 0xeea16e, new Aspect[] {LIFE, EARTH});
|
||||
public static final Aspect SLIME = new Aspect("limus", 0x01f800, new Aspect[] {LIFE, WATER});
|
||||
public static final Aspect PLANT = new Aspect("herba", 0x01ac00, new Aspect[] {SEED, EARTH});
|
||||
public static final Aspect TREE = new Aspect("arbor", 0x876531, new Aspect[] {EARTH, PLANT});
|
||||
public static final Aspect SEED = new Aspect("granum", 0xeea16e, new Aspect[]{LIFE, EARTH});
|
||||
public static final Aspect SLIME = new Aspect("limus", 0x01f800, new Aspect[]{LIFE, WATER});
|
||||
public static final Aspect PLANT = new Aspect("herba", 0x01ac00, new Aspect[]{SEED, EARTH});
|
||||
public static final Aspect TREE = new Aspect("arbor", 0x876531, new Aspect[]{EARTH, PLANT});
|
||||
|
||||
public static final Aspect BEAST = new Aspect("bestia", 0x9f6409, new Aspect[] {MOTION, LIFE});
|
||||
public static final Aspect FLESH = new Aspect("corpus", 0xee478d, new Aspect[] {DEATH, BEAST});
|
||||
public static final Aspect UNDEAD = new Aspect("exanimis", 0x3a4000, new Aspect[] {MOTION, DEATH});
|
||||
public static final Aspect MIND = new Aspect("cognitio", 0xffc2b3, new Aspect[] {EARTH, SOUL});
|
||||
public static final Aspect SENSES = new Aspect("sensus", 0x0fd9ff, new Aspect[] {AIR, SOUL});
|
||||
public static final Aspect BEAST = new Aspect("bestia", 0x9f6409, new Aspect[]{MOTION, LIFE});
|
||||
public static final Aspect FLESH = new Aspect("corpus", 0xee478d, new Aspect[]{DEATH, BEAST});
|
||||
public static final Aspect UNDEAD = new Aspect("exanimis", 0x3a4000, new Aspect[]{MOTION, DEATH});
|
||||
public static final Aspect MIND = new Aspect("cognitio", 0xffc2b3, new Aspect[]{EARTH, SOUL});
|
||||
public static final Aspect SENSES = new Aspect("sensus", 0x0fd9ff, new Aspect[]{AIR, SOUL});
|
||||
|
||||
public static final Aspect MAN = new Aspect("humanus", 0xffd7c0, new Aspect[] {BEAST, MIND});
|
||||
public static final Aspect CROP = new Aspect("messis", 0xe1b371, new Aspect[] {SEED, MAN});
|
||||
public static final Aspect HARVEST = new Aspect("meto", 0xeead82, new Aspect[] {CROP, MAN});
|
||||
public static final Aspect METAL = new Aspect("metallum", 0xb5b5cd, new Aspect[] {STONE, ORDER});
|
||||
public static final Aspect MINE = new Aspect("perfodio", 0xdcd2d8, new Aspect[] {MAN, STONE});
|
||||
public static final Aspect TOOL = new Aspect("instrumentum", 0x4040ee, new Aspect[] {MAN, METAL});
|
||||
public static final Aspect WEAPON = new Aspect("telum", 0xc05050, new Aspect[] {TOOL, ENTROPY});
|
||||
public static final Aspect ARMOR = new Aspect("tutamen", 0x00c0c0, new Aspect[] {TOOL, EARTH});
|
||||
public static final Aspect HUNGER = new Aspect("fames", 0x9a0305, new Aspect[] {LIFE, VOID});
|
||||
public static final Aspect GREED = new Aspect("lucrum", 0xe6be44, new Aspect[] {MAN, HUNGER});
|
||||
public static final Aspect CRAFT = new Aspect("fabrico", 0x809d80, new Aspect[] {MAN, TOOL});
|
||||
public static final Aspect MAN = new Aspect("humanus", 0xffd7c0, new Aspect[]{BEAST, MIND});
|
||||
public static final Aspect CROP = new Aspect("messis", 0xe1b371, new Aspect[]{SEED, MAN});
|
||||
public static final Aspect HARVEST = new Aspect("meto", 0xeead82, new Aspect[]{CROP, MAN});
|
||||
public static final Aspect METAL = new Aspect("metallum", 0xb5b5cd, new Aspect[]{STONE, ORDER});
|
||||
public static final Aspect MINE = new Aspect("perfodio", 0xdcd2d8, new Aspect[]{MAN, STONE});
|
||||
public static final Aspect TOOL = new Aspect("instrumentum", 0x4040ee, new Aspect[]{MAN, METAL});
|
||||
public static final Aspect WEAPON = new Aspect("telum", 0xc05050, new Aspect[]{TOOL, ENTROPY});
|
||||
public static final Aspect ARMOR = new Aspect("tutamen", 0x00c0c0, new Aspect[]{TOOL, EARTH});
|
||||
public static final Aspect HUNGER = new Aspect("fames", 0x9a0305, new Aspect[]{LIFE, VOID});
|
||||
public static final Aspect GREED = new Aspect("lucrum", 0xe6be44, new Aspect[]{MAN, HUNGER});
|
||||
public static final Aspect CRAFT = new Aspect("fabrico", 0x809d80, new Aspect[]{MAN, TOOL});
|
||||
|
||||
public static final Aspect CLOTH = new Aspect("pannus", 0xeaeac2, new Aspect[] {TOOL, BEAST});
|
||||
public static final Aspect MECHANISM = new Aspect("machina", 0x8080a0, new Aspect[] {MOTION, TOOL});
|
||||
public static final Aspect TRAP = new Aspect("vinculum", 0x9a8080, new Aspect[] {MOTION, ENTROPY});
|
||||
public static final Aspect EXCHANGE = new Aspect("permutatio", 0x578357, new Aspect[] {MOTION, WATER});
|
||||
public static final Aspect CLOTH = new Aspect("pannus", 0xeaeac2, new Aspect[]{TOOL, BEAST});
|
||||
public static final Aspect MECHANISM = new Aspect("machina", 0x8080a0, new Aspect[]{MOTION, TOOL});
|
||||
public static final Aspect TRAP = new Aspect("vinculum", 0x9a8080, new Aspect[]{MOTION, ENTROPY});
|
||||
public static final Aspect EXCHANGE = new Aspect("permutatio", 0x578357, new Aspect[]{MOTION, WATER});
|
||||
|
||||
// public static final Aspect LAVA = new Aspect("lava",0xe85729, new Aspect[] {EARTH, FIRE});
|
||||
// public static final Aspect STEAM = new Aspect("steam",0xFFFFFF, new Aspect[] {WATER, FIRE});
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
package thaumcraft.api.aspects;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import thaumcraft.api.ThaumcraftApiHelper;
|
||||
|
||||
public class AspectList implements Serializable
|
||||
{
|
||||
public LinkedHashMap<Aspect, Integer> aspects = new LinkedHashMap<Aspect, Integer>(); //aspects associated with this object
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
public class AspectList implements Serializable {
|
||||
public LinkedHashMap<Aspect,Integer> aspects = new LinkedHashMap<Aspect,Integer>(); //aspects associated with this object
|
||||
|
||||
/**
|
||||
* this creates a new aspect list with preloaded values based off the aspects of the given item.
|
||||
* @param id the item/block id of an existing item
|
||||
*
|
||||
* @param id the item/block id of an existing item
|
||||
* @param meta the damage value of an existing item
|
||||
*/
|
||||
public AspectList(int id, int meta)
|
||||
|
@ -24,12 +24,13 @@ public class AspectList implements Serializable
|
|||
AspectList temp = ThaumcraftApiHelper.getObjectAspects(new ItemStack(id, 1, meta));
|
||||
|
||||
if (temp != null)
|
||||
for (Aspect tag: temp.getAspects())
|
||||
for (Aspect tag : temp.getAspects())
|
||||
{
|
||||
add(tag, temp.getAmount(tag));
|
||||
}
|
||||
} catch (Exception e)
|
||||
{
|
||||
}
|
||||
catch (Exception e) {}
|
||||
}
|
||||
|
||||
public AspectList()
|
||||
|
@ -40,7 +41,7 @@ public class AspectList implements Serializable
|
|||
{
|
||||
AspectList out = new AspectList();
|
||||
|
||||
for (Aspect a: this.getAspects())
|
||||
for (Aspect a : this.getAspects())
|
||||
{
|
||||
out.add(a, this.getAmount(a));
|
||||
}
|
||||
|
@ -63,7 +64,7 @@ public class AspectList implements Serializable
|
|||
{
|
||||
int q = 0;
|
||||
|
||||
for (Aspect as: aspects.keySet())
|
||||
for (Aspect as : aspects.keySet())
|
||||
{
|
||||
q += this.getAmount(as);
|
||||
}
|
||||
|
@ -87,7 +88,7 @@ public class AspectList implements Serializable
|
|||
{
|
||||
AspectList t = new AspectList();
|
||||
|
||||
for (Aspect as: aspects.keySet())
|
||||
for (Aspect as : aspects.keySet())
|
||||
{
|
||||
if (as.isPrimal())
|
||||
{
|
||||
|
@ -169,11 +170,12 @@ public class AspectList implements Serializable
|
|||
*/
|
||||
public int getAmount(Aspect key)
|
||||
{
|
||||
return aspects.get(key) == null ? 0 : aspects.get(key);
|
||||
return aspects.get(key) == null ? 0 : aspects.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduces the amount of an aspect in this collection by the given amount.
|
||||
*
|
||||
* @param key
|
||||
* @param amount
|
||||
* @return
|
||||
|
@ -193,6 +195,7 @@ public class AspectList implements Serializable
|
|||
/**
|
||||
* Reduces the amount of an aspect in this collection by the given amount.
|
||||
* If reduced to 0 or less the aspect will be removed completely.
|
||||
*
|
||||
* @param key
|
||||
* @param amount
|
||||
* @return
|
||||
|
@ -204,8 +207,7 @@ public class AspectList implements Serializable
|
|||
if (am <= 0)
|
||||
{
|
||||
aspects.remove(key);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
this.aspects.put(key, am);
|
||||
}
|
||||
|
@ -215,6 +217,7 @@ public class AspectList implements Serializable
|
|||
|
||||
/**
|
||||
* Simply removes the aspect from the list
|
||||
*
|
||||
* @param key
|
||||
* @param amount
|
||||
* @return
|
||||
|
@ -228,6 +231,7 @@ public class AspectList implements Serializable
|
|||
/**
|
||||
* Adds this aspect and amount to the collection.
|
||||
* If the aspect exists then its value will be increased by the given amount.
|
||||
*
|
||||
* @param aspect
|
||||
* @param amount
|
||||
* @return
|
||||
|
@ -247,6 +251,7 @@ public class AspectList implements Serializable
|
|||
/**
|
||||
* Adds this aspect and amount to the collection.
|
||||
* If the aspect exists then only the highest of the old or new amount will be used.
|
||||
*
|
||||
* @param aspect
|
||||
* @param amount
|
||||
* @return
|
||||
|
@ -269,6 +274,7 @@ public class AspectList implements Serializable
|
|||
|
||||
/**
|
||||
* Reads the list of aspects from nbt
|
||||
*
|
||||
* @param nbttagcompound
|
||||
* @return
|
||||
*/
|
||||
|
@ -284,13 +290,14 @@ public class AspectList implements Serializable
|
|||
if (rs.hasKey("key"))
|
||||
{
|
||||
add(Aspect.getAspect(rs.getString("key")),
|
||||
rs.getInteger("amount"));
|
||||
rs.getInteger("amount"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the list of aspects to nbt
|
||||
*
|
||||
* @param nbttagcompound
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
package thaumcraft.api.aspects;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author azanor
|
||||
*
|
||||
* Used by blocks like the crucible and alembic to hold their aspects.
|
||||
* Tiles extending this interface will have their aspects show up when viewed by goggles of revealing
|
||||
*
|
||||
* <p/>
|
||||
* Used by blocks like the crucible and alembic to hold their aspects.
|
||||
* Tiles extending this interface will have their aspects show up when viewed by goggles of revealing
|
||||
*/
|
||||
public interface IAspectContainer
|
||||
{
|
||||
public interface IAspectContainer {
|
||||
public AspectList getAspects();
|
||||
|
||||
public void setAspects(AspectList aspects);
|
||||
|
||||
/**
|
||||
* This method is used to determine of a specific aspect can be added to this container.
|
||||
*
|
||||
* @param tag
|
||||
* @return true or false
|
||||
*/
|
||||
|
@ -22,6 +21,7 @@ public interface IAspectContainer
|
|||
|
||||
/**
|
||||
* This method is used to add a certain amount of an aspect to the tile entity.
|
||||
*
|
||||
* @param tag
|
||||
* @param amount
|
||||
* @return the amount of aspect left over that could not be added.
|
||||
|
@ -30,6 +30,7 @@ public interface IAspectContainer
|
|||
|
||||
/**
|
||||
* Removes a certain amount of a specific aspect from the tile entity
|
||||
*
|
||||
* @param tag
|
||||
* @param amount
|
||||
* @return true if that amount of aspect was available and was removed
|
||||
|
@ -38,6 +39,7 @@ public interface IAspectContainer
|
|||
|
||||
/**
|
||||
* removes a bunch of different aspects and amounts from the tile entity.
|
||||
*
|
||||
* @param ot the ObjectTags object that contains the aspects and their amounts.
|
||||
* @return true if all the aspects and their amounts were available and successfully removed
|
||||
*/
|
||||
|
@ -45,6 +47,7 @@ public interface IAspectContainer
|
|||
|
||||
/**
|
||||
* Checks if the tile entity contains the listed amount (or more) of the aspect
|
||||
*
|
||||
* @param tag
|
||||
* @param amount
|
||||
* @return
|
||||
|
@ -53,6 +56,7 @@ public interface IAspectContainer
|
|||
|
||||
/**
|
||||
* Checks if the tile entity contains all the listed aspects and their amounts
|
||||
*
|
||||
* @param ot the ObjectTags object that contains the aspects and their amounts.
|
||||
* @return
|
||||
*/
|
||||
|
@ -60,6 +64,7 @@ public interface IAspectContainer
|
|||
|
||||
/**
|
||||
* Returns how much of the aspect this tile entity contains
|
||||
*
|
||||
* @param tag
|
||||
* @return the amount of that aspect found
|
||||
*/
|
||||
|
|
|
@ -2,11 +2,9 @@ package thaumcraft.api.aspects;
|
|||
|
||||
/**
|
||||
* @author Azanor
|
||||
*
|
||||
* This interface is implemented by tile entites (or possibly anything else) like jars
|
||||
* so that they can act as an essentia source for blocks like the infusion altar.
|
||||
*
|
||||
* <p/>
|
||||
* This interface is implemented by tile entites (or possibly anything else) like jars
|
||||
* so that they can act as an essentia source for blocks like the infusion altar.
|
||||
*/
|
||||
public interface IAspectSource extends IAspectContainer
|
||||
{
|
||||
public interface IAspectSource extends IAspectContainer {
|
||||
}
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
package thaumcraft.api.aspects;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author azanor
|
||||
*
|
||||
* Used by wispy essences and essentia phials to hold their aspects.
|
||||
* Useful for similar item containers that store their aspect information in nbt form so TC
|
||||
* automatically picks up the aspects they contain
|
||||
*
|
||||
* <p/>
|
||||
* Used by wispy essences and essentia phials to hold their aspects.
|
||||
* Useful for similar item containers that store their aspect information in nbt form so TC
|
||||
* automatically picks up the aspects they contain
|
||||
*/
|
||||
public interface IEssentiaContainerItem
|
||||
{
|
||||
public interface IEssentiaContainerItem {
|
||||
public AspectList getAspects(ItemStack itemstack);
|
||||
|
||||
public void setAspects(ItemStack itemstack, AspectList aspects);
|
||||
}
|
||||
|
||||
//Example implementation
|
||||
/*
|
||||
@Override
|
||||
@Override
|
||||
public AspectList getAspects(ItemStack itemstack) {
|
||||
if (itemstack.hasTagCompound()) {
|
||||
AspectList aspects = new AspectList();
|
||||
|
|
|
@ -4,13 +4,13 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
|
||||
/**
|
||||
* @author Azanor
|
||||
* This interface is used by tiles that use or transport vis.
|
||||
* Only tiles that implement this interface will be able to connect to vis conduits or other thaumic devices
|
||||
* This interface is used by tiles that use or transport vis.
|
||||
* Only tiles that implement this interface will be able to connect to vis conduits or other thaumic devices
|
||||
*/
|
||||
public interface IEssentiaTransport
|
||||
{
|
||||
public interface IEssentiaTransport {
|
||||
/**
|
||||
* Is this tile able to connect to other vis users/sources on the specified side?
|
||||
*
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
|
@ -18,6 +18,7 @@ public interface IEssentiaTransport
|
|||
|
||||
/**
|
||||
* Is this side used to input essentia?
|
||||
*
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
|
@ -25,6 +26,7 @@ public interface IEssentiaTransport
|
|||
|
||||
/**
|
||||
* Is this side used to output essentia?
|
||||
*
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
|
@ -44,26 +46,29 @@ public interface IEssentiaTransport
|
|||
|
||||
/**
|
||||
* Sets the amount of suction this block will apply
|
||||
*
|
||||
* @param suction
|
||||
*/
|
||||
public void setSuction(AspectList suction);
|
||||
|
||||
/**
|
||||
* Sets the amount of suction this block will apply
|
||||
*
|
||||
* @param suction
|
||||
*/
|
||||
public void setSuction(Aspect aspect, int amount);
|
||||
|
||||
/**
|
||||
* Returns the amount of suction this block is applying.
|
||||
* @param loc
|
||||
* the location from where the suction is being checked
|
||||
*
|
||||
* @param loc the location from where the suction is being checked
|
||||
* @return
|
||||
*/
|
||||
public AspectList getSuction(ForgeDirection face);
|
||||
|
||||
/**
|
||||
* remove the specified amount of vis from this transport tile
|
||||
*
|
||||
* @param suction
|
||||
* @return how much was actually taken
|
||||
*/
|
||||
|
@ -73,6 +78,7 @@ public interface IEssentiaTransport
|
|||
|
||||
/**
|
||||
* Essentia will not be drawn from this container unless the suction exceeds this amount.
|
||||
*
|
||||
* @return the amount
|
||||
*/
|
||||
public int getMinimumSuction();
|
||||
|
@ -80,6 +86,7 @@ public interface IEssentiaTransport
|
|||
/**
|
||||
* Return true if you want the conduit to extend a little further into the block.
|
||||
* Used by jars and alembics that have smaller than normal hitboxes
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean renderExtendedTube();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue