Exemplo n.º 1
0
  /** Creates a new pumpkin ItemStack with the info this object is tracking. */
  public ItemStack getPumpkin() {

    // Note: I must trust that this object actually contain a pumpkin info.
    final int[] enchantIds = (int[]) this.getObject();

    // Enchantment IDs
    ArrayList<GolemEnchantment> enchantedList = GolemEnchantment.convertToEnchantList(enchantIds);
    ItemStack pumpkin = MagicHelper.getEnchantedPumpkin(enchantedList);

    // Custom name
    if (this.getCustomName() != "") {
      pumpkin.setStackDisplayName(this.getCustomName());
    }

    return pumpkin;
  }
Exemplo n.º 2
0
 public EventTracker(ItemStack pumpkin, Vec3i pos) {
   this(0, pos, pumpkin.getDisplayName(), MagicHelper.getEnchantmentIds(pumpkin));
 }