Esempio n. 1
0
  public static ItemStack forColors(int color1, int color2) {
    ItemStack stack = new ItemStack(ModItems.twigWand);
    ItemNBTHelper.setInt(stack, TAG_COLOR1, color1);
    ItemNBTHelper.setInt(stack, TAG_COLOR2, color2);

    return stack;
  }
Esempio n. 2
0
 public void bindPool(ItemStack stack, TileEntity pool) {
   ItemNBTHelper.setInt(stack, TAG_POS_X, pool == null ? 0 : pool.xCoord);
   ItemNBTHelper.setInt(stack, TAG_POS_Y, pool == null ? -1 : pool.yCoord);
   ItemNBTHelper.setInt(stack, TAG_POS_Z, pool == null ? 0 : pool.zCoord);
   ItemNBTHelper.setInt(
       stack, TAG_DIM, pool == null ? 0 : pool.getWorldObj().provider.dimensionId);
 }
Esempio n. 3
0
 @Override
 public ItemStack getOutput() {
   ItemStack stack = new ItemStack(Items.SKULL, 1, 3);
   if (!name.isEmpty()) ItemNBTHelper.setString(stack, "SkullOwner", name);
   return stack;
 }
Esempio n. 4
0
 public int getDimension(ItemStack stack) {
   return ItemNBTHelper.getInt(stack, TAG_DIM, 0);
 }
Esempio n. 5
0
 public ChunkCoordinates getPoolCoords(ItemStack stack) {
   int x = ItemNBTHelper.getInt(stack, TAG_POS_X, 0);
   int y = ItemNBTHelper.getInt(stack, TAG_POS_Y, -1);
   int z = ItemNBTHelper.getInt(stack, TAG_POS_Z, 0);
   return new ChunkCoordinates(x, y, z);
 }
Esempio n. 6
0
 public void setManaBacklog(ItemStack stack, int backlog) {
   ItemNBTHelper.setInt(stack, TAG_MANA_BACKLOG, backlog);
 }
Esempio n. 7
0
 public int getManaBacklog(ItemStack stack) {
   return ItemNBTHelper.getInt(stack, TAG_MANA_BACKLOG, 0);
 }
Esempio n. 8
0
 public void setMana(ItemStack stack, int mana) {
   ItemNBTHelper.setInt(stack, TAG_MANA, Math.max(0, mana));
 }
Esempio n. 9
0
 @Override
 public int getMana(ItemStack stack) {
   return ItemNBTHelper.getInt(stack, TAG_MANA, 0);
 }
Esempio n. 10
0
 public static ChunkCoordinates getBoundSpreader(ItemStack stack) {
   int x = ItemNBTHelper.getInt(stack, TAG_SPREADER_X, 0);
   int y = ItemNBTHelper.getInt(stack, TAG_SPREADER_Y, -1);
   int z = ItemNBTHelper.getInt(stack, TAG_SPREADER_Z, 0);
   return new ChunkCoordinates(x, y, z);
 }
Esempio n. 11
0
 public static void setBoundSpreader(ItemStack stack, int x, int y, int z) {
   ItemNBTHelper.setInt(stack, TAG_SPREADER_X, x);
   ItemNBTHelper.setInt(stack, TAG_SPREADER_Y, y);
   ItemNBTHelper.setInt(stack, TAG_SPREADER_Z, z);
 }
Esempio n. 12
0
 public static int getTicksSinceSpreaderUse(ItemStack stack) {
   return ItemNBTHelper.getInt(stack, TAG_TICKS_SINCE_SPREADER, 20);
 }
Esempio n. 13
0
 public static void setTicksSinceSpreaderUse(ItemStack stack, int ticks) {
   ItemNBTHelper.setInt(stack, TAG_TICKS_SINCE_SPREADER, ticks);
 }
Esempio n. 14
0
 public static int getColor2(ItemStack stack) {
   return ItemNBTHelper.getInt(stack, TAG_COLOR2, 0);
 }
Esempio n. 15
0
 public void setManaForDisplay(ItemStack stack, int mana) {
   ItemNBTHelper.setInt(stack, TAG_MANA_VISUAL, mana);
 }
Esempio n. 16
0
 public int getManaForDisplay(ItemStack stack) {
   return ItemNBTHelper.getInt(stack, TAG_MANA_VISUAL, 0);
 }