Java Code Examples for thaumcraft.api.ThaumcraftApiHelper#getObjectAspects()
The following examples show how to use
thaumcraft.api.ThaumcraftApiHelper#getObjectAspects() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AspectList.java From OpenPeripheral-Integration with MIT License | 5 votes |
/** * this creates a new aspect list with preloaded values based off the aspects of the given item. * @param the itemstack of the given item */ public AspectList(ItemStack stack) { try { AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); if (temp!=null) for (Aspect tag:temp.getAspects()) { add(tag,temp.getAmount(tag)); } } catch (Exception e) {} }
Example 2
Source File: AspectList.java From AdvancedMod with GNU General Public License v3.0 | 5 votes |
/** * this creates a new aspect list with preloaded values based off the aspects of the given item. * @param the itemstack of the given item */ public AspectList(ItemStack stack) { try { AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); if (temp!=null) for (Aspect tag:temp.getAspects()) { add(tag,temp.getAmount(tag)); } } catch (Exception e) {} }
Example 3
Source File: AspectList.java From Chisel-2 with GNU General Public License v2.0 | 5 votes |
/** * this creates a new aspect list with preloaded values based off the aspects of the given item. * @param the itemstack of the given item */ public AspectList(ItemStack stack) { try { AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); if (temp!=null) for (Aspect tag:temp.getAspects()) { add(tag,temp.getAmount(tag)); } } catch (Exception e) {} }
Example 4
Source File: AspectList.java From GardenCollection with MIT License | 5 votes |
/** * this creates a new aspect list with preloaded values based off the aspects of the given item. * @param the itemstack of the given item */ public AspectList(ItemStack stack) { try { AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); if (temp!=null) for (Aspect tag:temp.getAspects()) { add(tag,temp.getAmount(tag)); } } catch (Exception e) {} }
Example 5
Source File: AspectList.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
/** * this creates a new aspect list with preloaded values based off the aspects of the given item. * @param the itemstack of the given item */ public AspectList(ItemStack stack) { try { AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); if (temp!=null) for (Aspect tag:temp.getAspects()) { add(tag,temp.getAmount(tag)); } } catch (Exception e) {} }
Example 6
Source File: AspectList.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
/** * this creates a new aspect list with preloaded values based off the aspects of the given item. * @param the itemstack of the given item */ public AspectList(ItemStack stack) { try { AspectList temp = ThaumcraftApiHelper.getObjectAspects(stack); if (temp!=null) for (Aspect tag:temp.getAspects()) { add(tag,temp.getAmount(tag)); } } catch (Exception e) {} }
Example 7
Source File: DarkAspects.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 4 votes |
private static AspectList getAspectList(ItemStack stack) { AspectList list = ThaumcraftApiHelper.getObjectAspects(stack); return list != null ? list : new AspectList(); }